@libraz/libcantus-wasm 1.4.1 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/analyze/index.d.ts +3 -3
- package/dist/cantus.js +1 -1
- package/dist/cantus.wasm +0 -0
- package/dist/generate/index.d.ts +4 -4
- package/dist/{index-C1dnzRkt.d.ts → index-DvS253M2.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/model/index.d.ts +6 -6
- package/dist/{profile-kmJqJ3aO.d.ts → profile-DyqvdA9x.d.ts} +1 -1
- package/dist/{types-DPPzRpc3.d.ts → types-CCbTf0rL.d.ts} +4 -1
- package/package.json +10 -3
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
**The libcantus music-theory engine as WebAssembly: the same API and types as `@libraz/libcantus`, running the C++ core.**
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Detect chords, keys, Roman numerals and cadences in MIDI note events and write new parts against that harmony, in Node.js or the browser. Every call is synchronous once the module has loaded.
|
|
12
12
|
|
|
13
13
|
**[Documentation](https://github.com/libraz/libcantus/blob/main/docs/en/getting-started.md)** · **[Differences from pure TypeScript](https://github.com/libraz/libcantus/blob/main/docs/en/cpp.md)** · **[Repository](https://github.com/libraz/libcantus)**
|
|
14
14
|
|
package/dist/analyze/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ export { M as MeterChange, b as MeterLike, c as MeterMap, T as TimeSignature } f
|
|
|
4
4
|
import { r as SpelledKeyLike } from '../coerce-Cr9AZsTY.js';
|
|
5
5
|
export { b as ChordData, c as ChordLike, d as ChordQuality, e as ChordSegment, g as ChordSpan, i as ChordToneRole, K as KeyLike, j as KeyRelation, k as KeyVariant, N as NoteSafety, l as PitchSpelling, n as ResolvedKey, o as SafetyProfile, s as SpelledKeyScale, V as VoiceSnapshot } from '../coerce-Cr9AZsTY.js';
|
|
6
6
|
export { r as ScaleName } from '../masks-BDxvQO8b.js';
|
|
7
|
-
import { w as MelodicPhrase, a5 as ReferenceProfile, h as ChordTimeline } from '../types-
|
|
8
|
-
export { A as AnalyzeChordOptions, a as AnalyzedNote, B as BarPositionProfile, b as BorrowedSource, C as CADENCE_TYPES, c as CadenceHit, d as CadenceResult, e as CadenceType, f as ChordAnalysis, g as ChordSegmentation, i as ChordTimelineOptions, j as ChordTimelineResult, k as ChordToRomanOptions, l as ContourDirection, D as DetectCadenceOptions, E as ExplainRomanOptions, m as ExtractMotifsOptions, F as FormSection, n as FormSectionOptions, H as HARMONIC_FUNCTIONS, o as HarmonicFunction, I as IdentifiedVoiceNote, K as KeyContext, p as KeyProfileName, q as KeyProfilePair, r as KeyRegion, s as KeyTimelineOptions, M as MELODIC_CONTOUR_SHAPES, t as MOTIF_RELATION_KINDS, u as MelodicContour, v as MelodicContourShape, x as MotifData, y as MotifGraph, z as MotifGraphEdge, G as MotifGraphNode, J as MotifGraphOptions, L as MotifOccurrence, N as MotifRelation, O as MotifRelationKind, P as MotifRelationSummary, Q as PivotChord, R as REDUCTION_LEVELS, S as REFERENCE_PROFILE_VERSION, T as RHYTHM_IOI_BINS, U as ReduceProgressionOptions, V as ReducedChord, W as ReductionBasis, X as ReductionLevel, Y as ReferenceCadence, Z as ReferenceChord, _ as ReferenceForm, $ as ReferenceHarmony, a0 as ReferenceKeyRegion, a1 as ReferenceMelody, a2 as ReferenceMotif, a3 as ReferencePhrase, a4 as ReferencePhraseMelody, a6 as RejectedCandidate, a7 as RhythmAnalysis, a8 as RhythmAnalysisOptions, a9 as RomanExplanation, aa as SuspensionFigure, ab as TheoryLabel, ac as VoiceNote, ad as analyzeChord, ae as analyzeRhythm, af as analyzeVoice, ag as assertChordTimeline, ah as borrowedSource, ai as chordTimelineFromChords, aj as chordTimelineFromNotes, ak as chordToRoman, al as detectCadence, am as detectCadences, an as detectModulations, ao as explainRoman, ap as extractMotifs, aq as functionOf, ar as isBorrowedChord, as as isDiatonic, at as isMinorKey, au as keyTimelineFromNotes, av as melodicContour, aw as motifFromNotes, ax as motifGraph, ay as pivotChords, az as prevailingKeyOf, aA as reduceProgression, aB as relateMotifs, aC as romanToChord, aD as secondaryDominant, aE as secondaryDominantOf, aF as sectionsFromNotes, aG as toVoiceNotes } from '../types-
|
|
9
|
-
export { A as ArrangementAnalysis, a as ArrangementOptions, b as ArrangementSession, c as ArrangementTrack, d as AugmentedSixthKind, C as ChordMatch, e as Conflict, f as ConflictPartner, D as DetectChordOptions, g as DetectKeyOptions, H as Hypermeter, h as HypermeterOptions, K as KeyMatch, M as MODAL_SCALE_NAMES, i as ModalCandidate, j as ModalScaleName, P as Phrase, k as PhraseOptions, l as PhraseSignal, R as ReferenceProfileOptions, S as StructuralCadence, T as TensionPoint, m as TrackAnalysis, n as TrackEdit, o as TrackRole, p as analyzeArrangement, q as analyzePolyphony, r as analyzeReference, s as augmentedSixthChord, t as augmentedSixthFromPitchClasses, u as augmentedSixthKind, v as createArrangementSession, w as detectChord, x as detectChordBest, y as detectKey, z as detectKeyBest, B as detectKeyFromNotes, E as hypermeter, F as phrasesFromTimeline, G as spellAugmentedSixth, I as structuralCadences, J as tensionCurve, L as tensionCurveFrom } from '../profile-
|
|
7
|
+
import { w as MelodicPhrase, a5 as ReferenceProfile, h as ChordTimeline } from '../types-CCbTf0rL.js';
|
|
8
|
+
export { A as AnalyzeChordOptions, a as AnalyzedNote, B as BarPositionProfile, b as BorrowedSource, C as CADENCE_TYPES, c as CadenceHit, d as CadenceResult, e as CadenceType, f as ChordAnalysis, g as ChordSegmentation, i as ChordTimelineOptions, j as ChordTimelineResult, k as ChordToRomanOptions, l as ContourDirection, D as DetectCadenceOptions, E as ExplainRomanOptions, m as ExtractMotifsOptions, F as FormSection, n as FormSectionOptions, H as HARMONIC_FUNCTIONS, o as HarmonicFunction, I as IdentifiedVoiceNote, K as KeyContext, p as KeyProfileName, q as KeyProfilePair, r as KeyRegion, s as KeyTimelineOptions, M as MELODIC_CONTOUR_SHAPES, t as MOTIF_RELATION_KINDS, u as MelodicContour, v as MelodicContourShape, x as MotifData, y as MotifGraph, z as MotifGraphEdge, G as MotifGraphNode, J as MotifGraphOptions, L as MotifOccurrence, N as MotifRelation, O as MotifRelationKind, P as MotifRelationSummary, Q as PivotChord, R as REDUCTION_LEVELS, S as REFERENCE_PROFILE_VERSION, T as RHYTHM_IOI_BINS, U as ReduceProgressionOptions, V as ReducedChord, W as ReductionBasis, X as ReductionLevel, Y as ReferenceCadence, Z as ReferenceChord, _ as ReferenceForm, $ as ReferenceHarmony, a0 as ReferenceKeyRegion, a1 as ReferenceMelody, a2 as ReferenceMotif, a3 as ReferencePhrase, a4 as ReferencePhraseMelody, a6 as RejectedCandidate, a7 as RhythmAnalysis, a8 as RhythmAnalysisOptions, a9 as RomanExplanation, aa as SuspensionFigure, ab as TheoryLabel, ac as VoiceNote, ad as analyzeChord, ae as analyzeRhythm, af as analyzeVoice, ag as assertChordTimeline, ah as borrowedSource, ai as chordTimelineFromChords, aj as chordTimelineFromNotes, ak as chordToRoman, al as detectCadence, am as detectCadences, an as detectModulations, ao as explainRoman, ap as extractMotifs, aq as functionOf, ar as isBorrowedChord, as as isDiatonic, at as isMinorKey, au as keyTimelineFromNotes, av as melodicContour, aw as motifFromNotes, ax as motifGraph, ay as pivotChords, az as prevailingKeyOf, aA as reduceProgression, aB as relateMotifs, aC as romanToChord, aD as secondaryDominant, aE as secondaryDominantOf, aF as sectionsFromNotes, aG as toVoiceNotes } from '../types-CCbTf0rL.js';
|
|
9
|
+
export { A as ArrangementAnalysis, a as ArrangementOptions, b as ArrangementSession, c as ArrangementTrack, d as AugmentedSixthKind, C as ChordMatch, e as Conflict, f as ConflictPartner, D as DetectChordOptions, g as DetectKeyOptions, H as Hypermeter, h as HypermeterOptions, K as KeyMatch, M as MODAL_SCALE_NAMES, i as ModalCandidate, j as ModalScaleName, P as Phrase, k as PhraseOptions, l as PhraseSignal, R as ReferenceProfileOptions, S as StructuralCadence, T as TensionPoint, m as TrackAnalysis, n as TrackEdit, o as TrackRole, p as analyzeArrangement, q as analyzePolyphony, r as analyzeReference, s as augmentedSixthChord, t as augmentedSixthFromPitchClasses, u as augmentedSixthKind, v as createArrangementSession, w as detectChord, x as detectChordBest, y as detectKey, z as detectKeyBest, B as detectKeyFromNotes, E as hypermeter, F as phrasesFromTimeline, G as spellAugmentedSixth, I as structuralCadences, J as tensionCurve, L as tensionCurveFrom } from '../profile-DyqvdA9x.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* How alike two phrases are, when they stand in no named relation.
|
package/dist/cantus.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
async function createCantusModule(moduleArg={}){var Module=moduleArg;var ENVIRONMENT_IS_WEB=!!globalThis.window;var ENVIRONMENT_IS_WORKER=!!globalThis.WorkerGlobalScope;var ENVIRONMENT_IS_NODE=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";if(ENVIRONMENT_IS_NODE){const{createRequire}=await import(/* webpackIgnore: true */ /* @vite-ignore */ ["node:module"][0]);var require=createRequire(import.meta.url)}var programArgs=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var _scriptName=import.meta.url;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("node:fs");if(_scriptName.startsWith("file:")){scriptDirectory=require("node:path").dirname(require("node:url").fileURLToPath(_scriptName))+"/"}readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");return ret};if(process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}programArgs=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}{if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=async url=>{var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var out=console.log.bind(console);var err=console.error.bind(console);var wasmBinary;var ABORT=false;var isFileURI=filename=>filename.startsWith("file://");var runtimeInitialized=false;function getMemoryBuffer(){return wasmMemory.buffer}function updateMemoryViews(){if(HEAP8?.buffer?.resizable)return;var b=getMemoryBuffer();HEAP8=new Int8Array(b);HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);HEAPU16=new Uint16Array(b);HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);HEAPF32=new Float32Array(b);HEAPF64=new Float64Array(b);HEAP64=new BigInt64Array(b);HEAPU64=new BigUint64Array(b)}function preRun(){var preRun=Module["preRun"];if(preRun){if(typeof preRun=="function")preRun=[preRun];onPreRuns.push(...preRun)}callRuntimeCallbacks(onPreRuns)}function initRuntime(){runtimeInitialized=true;wasmExports["f"]()}function postRun(){var postRun=Module["postRun"];if(postRun){if(typeof postRun=="function")postRun=[postRun];onPostRuns.push(...postRun)}callRuntimeCallbacks(onPostRuns)}function abort(what){Module["onAbort"]?.(what);what=`Aborted(${what})`;err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";if(runtimeInitialized){___trap()}var e=new WebAssembly.RuntimeError(what);throw e}var wasmBinaryFile;function findWasmBinary(){if(Module["locateFile"]){return locateFile("cantus.wasm")}return new URL("cantus.wasm",import.meta.url).href}function getBinarySync(file){if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&!ENVIRONMENT_IS_NODE){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){var imports={a:wasmImports};return imports}async function createWasm(){function receiveInstance(instance){wasmExports=instance.exports;assignWasmExports(wasmExports);updateMemoryViews();return wasmExports}function receiveInstantiationResult(result){return receiveInstance(result["instance"])}var info=getWasmImports();var instantiateWasm=Module["instantiateWasm"];if(instantiateWasm){return new Promise(resolve=>{instantiateWasm(info,inst=>resolve(receiveInstance(inst)))})}wasmBinaryFile??=findWasmBinary();var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);var exports=receiveInstantiationResult(result);return exports}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var HEAP16;var HEAP32;var HEAP64;var HEAP8;var HEAPF32;var HEAPF64;var HEAPU16;var HEAPU32;var HEAPU64;var HEAPU8;var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var onPostRuns=[];var onPreRuns=[];var noExitRuntime=true;var __abort_js=()=>abort("");var getHeapMax=()=>2147483648;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var growMemory=size=>{var oldHeapSize=wasmMemory.buffer.byteLength;var pages=(size-oldHeapSize+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var ENV={};var getExecutableName=()=>thisProgram;var getEnvStrings=()=>{if(!getEnvStrings.strings){var lang=(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8";var env={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:lang,_:getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(`${x}=${env[x]}`)}getEnvStrings.strings=strings}return getEnvStrings.strings};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.codePointAt(i);if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63;i++}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var _environ_get=(__environ,environ_buf)=>{var bufSize=0;var envp=0;for(var string of getEnvStrings()){var ptr=environ_buf+bufSize;HEAPU32[__environ+envp>>2]=ptr;bufSize+=stringToUTF8(string,ptr,Infinity)+1;envp+=4}return 0};var lengthBytesUTF8=str=>{var len=0;for(var i=0;i<str.length;++i){var c=str.charCodeAt(i);if(c<=127){len++}else if(c<=2047){len+=2}else if(c>=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var _environ_sizes_get=(penviron_count,penviron_buf_size)=>{var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;for(var string of strings){bufSize+=lengthBytesUTF8(string)+1}HEAPU32[penviron_buf_size>>2]=bufSize;return 0};var getWasmTableEntry=funcPtr=>wasmTable.get(funcPtr);var updateTableMap=(offset,count)=>{if(functionsInTableMap){for(var i=offset;i<offset+count;i++){var item=getWasmTableEntry(i);if(item){functionsInTableMap.set(item,i)}}}};var functionsInTableMap;var getFunctionAddress=func=>{if(!functionsInTableMap){functionsInTableMap=new WeakMap;updateTableMap(0,wasmTable.length)}return functionsInTableMap.get(func)||0};var freeTableIndexes=[];var getEmptyTableSlot=()=>{if(freeTableIndexes.length){return freeTableIndexes.pop()}return wasmTable["grow"](1)};var setWasmTableEntry=(idx,func)=>wasmTable.set(idx,func);var uleb128EncodeWithLen=arr=>{const n=arr.length;return[n%128|128,n>>7,...arr]};var wasmTypeCodes={i:127,p:127,j:126,f:125,d:124,e:111};var generateTypePack=types=>uleb128EncodeWithLen(Array.from(types,type=>{var code=wasmTypeCodes[type];return code}));var convertJsFunctionToWasm=(func,sig)=>{var bytes=Uint8Array.of(0,97,115,109,1,0,0,0,1,...uleb128EncodeWithLen([1,96,...generateTypePack(sig.slice(1)),...generateTypePack(sig[0]==="v"?"":sig[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var module=new WebAssembly.Module(bytes);var instance=new WebAssembly.Instance(module,{e:{f:func}});var wrappedFunc=instance.exports["f"];return wrappedFunc};var addFunction=(func,sig)=>{var rtn=getFunctionAddress(func);if(rtn){return rtn}var ret=getEmptyTableSlot();try{setWasmTableEntry(ret,func)}catch(err){if(!(err instanceof TypeError)){throw err}var wrapped=convertJsFunctionToWasm(func,sig);setWasmTableEntry(ret,wrapped)}functionsInTableMap.set(func,ret);return ret};{if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];if(Module["print"])out=Module["print"];if(Module["printErr"])err=Module["printErr"];if(Module["arguments"])programArgs=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];var preInit=Module["preInit"];if(preInit){if(typeof preInit=="function")Module["preInit"]=preInit=[preInit];while(preInit.length>0){preInit.shift()()}}}Module["addFunction"]=addFunction;var _cantus_call,_cantus_free,_cantus_release,_cantus_version,_cantus_algorithm_version,_cantus_abi_version,_cantus_list_ops,_malloc,_free,___trap,memory,__indirect_function_table,wasmMemory,wasmTable;function assignWasmExports(wasmExports){_cantus_call=Module["_cantus_call"]=wasmExports["g"];_cantus_free=Module["_cantus_free"]=wasmExports["h"];_cantus_release=Module["_cantus_release"]=wasmExports["i"];_cantus_version=Module["_cantus_version"]=wasmExports["j"];_cantus_algorithm_version=Module["_cantus_algorithm_version"]=wasmExports["k"];_cantus_abi_version=Module["_cantus_abi_version"]=wasmExports["l"];_cantus_list_ops=Module["_cantus_list_ops"]=wasmExports["m"];_malloc=Module["_malloc"]=wasmExports["n"];_free=Module["_free"]=wasmExports["o"];___trap=wasmExports["p"];memory=wasmMemory=wasmExports["e"];__indirect_function_table=wasmTable=wasmExports["q"]}var wasmImports={c:__abort_js,d:_emscripten_resize_heap,a:_environ_get,b:_environ_sizes_get};async function run(){preRun();var setStatus=Module["setStatus"];if(setStatus){setStatus("Running...");await new Promise(resolve=>setTimeout(resolve,1));setTimeout(setStatus,1,"")}if(ABORT)return;initRuntime();Module["onRuntimeInitialized"]?.();postRun()}var wasmExports;wasmExports=await createWasm();await run();
|
|
1
|
+
async function createCantusModule(moduleArg={}){var Module=moduleArg;var ENVIRONMENT_IS_WEB=!!globalThis.window;var ENVIRONMENT_IS_WORKER=!!globalThis.WorkerGlobalScope;var ENVIRONMENT_IS_NODE=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";if(ENVIRONMENT_IS_NODE){const{createRequire}=await(import(/* webpackIgnore: true */ /* @vite-ignore */ ["node:module"][0]));var require=createRequire(import.meta.url)}var thisProgram="./this.program";var _scriptName=import.meta.url;var scriptDirectory="";function locateFile(path){if(Module["locateFile"])return Module["locateFile"](path,scriptDirectory);return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("node:fs");if(_scriptName.startsWith("file:"))scriptDirectory=require("node:path").dirname(require("node:url").fileURLToPath(_scriptName))+"/";readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?void 0:"utf8");return ret};if(process.argv.length>1)thisProgram=process.argv[1].replace(/\\/g,"/");process.argv.slice(2);0}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}if(ENVIRONMENT_IS_WORKER)readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)};readAsync=async url=>{var response=await fetch(url,{credentials:"same-origin"});if(response.ok)return response.arrayBuffer();throw new Error(response.status+" : "+response.url)}}console.log.bind(console);var err=console.error.bind(console);var ABORT=false;var isFileURI=filename=>filename.startsWith("file://");var runtimeInitialized=false;function getMemoryBuffer(){return wasmMemory.buffer}function updateMemoryViews(){if(HEAP8?.buffer?.resizable)return;var b=getMemoryBuffer();HEAP8=new Int8Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b)}function preRun(){var preRun=Module["preRun"];if(preRun){if(typeof preRun==="function")preRun=[preRun];onPreRuns.push(...preRun)}callRuntimeCallbacks(onPreRuns)}function initRuntime(){runtimeInitialized=true;wasmExports["f"]()}function postRun(){var postRun=Module["postRun"];if(postRun){if(typeof postRun==="function")postRun=[postRun];onPostRuns.push(...postRun)}callRuntimeCallbacks(onPostRuns)}function abort(what){Module["onAbort"]?.(what);what=`Aborted(${what})`;err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";if(runtimeInitialized)___trap();throw new WebAssembly.RuntimeError(what)}var wasmBinaryFile;function findWasmBinary(){if(Module["locateFile"])return locateFile("cantus.wasm");return new URL("cantus.wasm",import.meta.url).href}function getBinarySync(file){if(readBinary)return readBinary(file);throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(true)try{return await readAsync(binaryFile)}catch{}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&!ENVIRONMENT_IS_NODE)try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){var imports={a:wasmImports};return imports}var HEAP8;var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0)callbacks.shift()(Module)};var onPostRuns=[];var onPreRuns=[];var HEAPU8;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var getHeapMax=()=>2147483648;var growMemory=size=>{var oldHeapSize=wasmMemory.buffer.byteLength;var pages=(size-oldHeapSize+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var HEAPU32;var ENV={};var getExecutableName=()=>thisProgram;var getEnvStrings=()=>{if(!getEnvStrings.strings){var lang=(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8";var env={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:lang,_:getExecutableName()};for(var x in ENV)if(ENV[x]===void 0)delete env[x];else env[x]=ENV[x];var strings=[];for(var x in env)strings.push(`${x}=${env[x]}`);getEnvStrings.strings=strings}return getEnvStrings.strings};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.codePointAt(i);if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63;i++}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var lengthBytesUTF8=str=>{var len=0;for(var i=0;i<str.length;++i){var u=str.codePointAt(i);if(u<=127)len++;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else{len+=4;i++}}return len};var uleb128EncodeWithLen=arr=>{const n=arr.length;return[n%128|128,n>>7,...arr]};var wasmTypeCodes={i:127,p:127,j:126,f:125,d:124,e:111};var generateTypePack=types=>uleb128EncodeWithLen(Array.from(types,type=>{var code=wasmTypeCodes[type];return code}));var wrapperModuleCache={};var convertJsFunctionToWasm=(func,sig)=>{var module=wrapperModuleCache[sig];if(!module){var bytes=Uint8Array.of(0,97,115,109,1,0,0,0,1,...uleb128EncodeWithLen([1,96,...generateTypePack(sig.slice(1)),...generateTypePack(sig[0]==="v"?"":sig[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);module=wrapperModuleCache[sig]=new WebAssembly.Module(bytes)}var instance=new WebAssembly.Instance(module,{e:{f:func}});var wrappedFunc=instance.exports["f"];return wrappedFunc};var functionsInTableMap;var freeTableIndexes=[];var getEmptyTableSlot=()=>{if(freeTableIndexes.length)return freeTableIndexes.pop();return wasmTable["grow"](1)};var getWasmTableEntry=funcPtr=>wasmTable.get(funcPtr);var updateTableMap=(offset,count)=>{if(functionsInTableMap)for(var i=offset;i<offset+count;i++){var item=getWasmTableEntry(i);if(item)functionsInTableMap.set(item,i)}};var getFunctionAddress=func=>{if(!functionsInTableMap){functionsInTableMap=new WeakMap;updateTableMap(0,wasmTable.length)}return functionsInTableMap.get(func)||0};var setWasmTableEntry=(idx,func)=>wasmTable.set(idx,func);var addFunction=(func,sig)=>{var rtn=getFunctionAddress(func);if(rtn)return rtn;var ret=getEmptyTableSlot();try{setWasmTableEntry(ret,func)}catch(err){if(!(err instanceof TypeError))throw err;var wrapped=convertJsFunctionToWasm(func,sig);setWasmTableEntry(ret,wrapped)}functionsInTableMap.set(func,ret);return ret};if(Module["noExitRuntime"])Module["noExitRuntime"];if(Module["print"])Module["print"];if(Module["printErr"])err=Module["printErr"];if(Module["arguments"])Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];var preInit=Module["preInit"];if(preInit){if(typeof preInit==="function")Module["preInit"]=preInit=[preInit];while(preInit.length>0)preInit.shift()()}Module["addFunction"]=addFunction;var ___trap,wasmMemory,wasmTable;function assignWasmExports(wasmExports){Module["_cantus_call"]=wasmExports["g"];Module["_cantus_free"]=wasmExports["h"];Module["_cantus_release"]=wasmExports["i"];Module["_cantus_version"]=wasmExports["j"];Module["_cantus_algorithm_version"]=wasmExports["k"];Module["_cantus_abi_version"]=wasmExports["l"];Module["_cantus_list_ops"]=wasmExports["m"];Module["_malloc"]=wasmExports["n"];Module["_free"]=wasmExports["o"];___trap=wasmExports["p"];wasmMemory=wasmExports["e"];wasmTable=wasmExports["q"]}var wasmImports={c:()=>abort(""),d:requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize)return false;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement)return true}return false},a:(__environ,environ_buf)=>{var bufSize=0;var envp=0;for(var string of getEnvStrings()){var ptr=environ_buf+bufSize;HEAPU32[__environ+envp>>2]=ptr;bufSize+=stringToUTF8(string,ptr,1/0)+1;envp+=4}return 0},b:(penviron_count,penviron_buf_size)=>{var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;for(var string of strings)bufSize+=lengthBytesUTF8(string)+1;HEAPU32[penviron_buf_size>>2]=bufSize;return 0}};var wasmExports;wasmExports=await async function(){function receiveInstance(instance){wasmExports=instance.exports;assignWasmExports(wasmExports);updateMemoryViews();return wasmExports}var info=getWasmImports();var instantiateWasm=Module["instantiateWasm"];if(instantiateWasm)return new Promise(resolve=>{instantiateWasm(info,inst=>resolve(receiveInstance(inst)))});wasmBinaryFile??=findWasmBinary();var result=await instantiateAsync(void 0,wasmBinaryFile,info);var exports=function(result){return receiveInstance(result["instance"])}(result);return exports}();await async function(){preRun();var setStatus=Module["setStatus"];if(setStatus){setStatus("Running...");await new Promise(resolve=>setTimeout(resolve,1));setTimeout(setStatus,1,"")}if(ABORT)return;initRuntime();Module["onRuntimeInitialized"]?.();postRun()}();
|
|
2
2
|
;return Module}export default createCantusModule;
|
package/dist/cantus.wasm
CHANGED
|
Binary file
|
package/dist/generate/index.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ import { h as NoteEvent, a as Articulation, b as IntervalLike } from '../index-C
|
|
|
4
4
|
export { I as IntervalData, c as IntervalQualityLabel, e as KeyScale, g as NoteData, S as SpelledInterval } from '../index-C9MYbuKS.js';
|
|
5
5
|
import { e as ChordSegment, c as ChordLike, K as KeyLike } from '../coerce-Cr9AZsTY.js';
|
|
6
6
|
export { b as ChordData, d as ChordQuality, g as ChordSpan, i as ChordToneRole, k as KeyVariant, l as PitchSpelling, m as ProfileWeights, n as ResolvedKey, r as SpelledKeyLike, s as SpelledKeyScale } from '../coerce-Cr9AZsTY.js';
|
|
7
|
-
import { h as ChordTimeline } from '../types-
|
|
8
|
-
export { B as BarPositionProfile, b as BorrowedSource, e as CadenceType, F as FormSection, o as HarmonicFunction, v as MelodicContourShape, y as MotifGraph, z as MotifGraphEdge, G as MotifGraphNode, P as MotifRelationSummary, X as ReductionLevel, Y as ReferenceCadence, Z as ReferenceChord, _ as ReferenceForm, $ as ReferenceHarmony, a0 as ReferenceKeyRegion, a1 as ReferenceMelody, a2 as ReferenceMotif, a3 as ReferencePhrase, a4 as ReferencePhraseMelody, a5 as ReferenceProfile, a7 as RhythmAnalysis } from '../types-
|
|
7
|
+
import { h as ChordTimeline } from '../types-CCbTf0rL.js';
|
|
8
|
+
export { B as BarPositionProfile, b as BorrowedSource, e as CadenceType, F as FormSection, o as HarmonicFunction, v as MelodicContourShape, y as MotifGraph, z as MotifGraphEdge, G as MotifGraphNode, P as MotifRelationSummary, X as ReductionLevel, Y as ReferenceCadence, Z as ReferenceChord, _ as ReferenceForm, $ as ReferenceHarmony, a0 as ReferenceKeyRegion, a1 as ReferenceMelody, a2 as ReferenceMotif, a3 as ReferencePhrase, a4 as ReferencePhraseMelody, a5 as ReferenceProfile, a7 as RhythmAnalysis } from '../types-CCbTf0rL.js';
|
|
9
9
|
import { f as StringedProfile, P as PercussionProfile, c as Limb } from '../positional-DLnfUgqG.js';
|
|
10
10
|
export { I as InstrumentProfile, a as InstrumentProfileCommon, d as PositionalRng, S as SeedPath } from '../positional-DLnfUgqG.js';
|
|
11
11
|
export { H as HarmonyRole } from '../index-CBQLVwv_.js';
|
|
12
|
-
import { x as Genre, w as GenerationContextInput, ah as Vocabulary, y as GridEvent, r as DrumStyle, ac as Section, s as DrumVoice, z as GrooveFeel, p as DrumHit, I as HarmonizeOptions, K as HarmonizeResult, j as CompositionPlan } from '../index-
|
|
13
|
-
export { B as BAR_STEPS, a as BASS_STYLES, b as BEAT_STEPS, c as BORROWED_DEGREES, d as BassLineOptions, e as BassSegment, f as BassStyle, g as BorrowedChord, C as COMPOSITION_PLAN_VERSION, h as Complexity, i as CompositionEvaluation, k as CompositionPlanOptions, l as CompositionViolation, m as CounterMelodyOptions, D as DRUM_NOTES, n as DeformOptions, o as Draw, q as DrumRole, t as DrumsOptions, E as EuclideanKick, u as EvaluateCompositionOptions, G as GENRES, v as GenerationContext, A as GrooveSlot, F as GrooveStyle, H as GrooveTemplate, J as HarmonizePlacement, L as HumanizeOptions, M as MelodyNote, N as MelodyOptions, O as MotifCell, P as MotifContour, Q as MotifNote, R as MotifOptions, S as MotifTransform, T as ORNAMENT_STYLES, U as OrnamentOptions, V as OrnamentStyle, W as PROVENANCE_BASES, X as PlannedChord, Y as PlannedMotif, Z as PlannedPhrase, _ as PlannedRhythm, $ as PlannedSection, a0 as PreserveWeights, a1 as ProgFunction, a2 as ProgStyle, a3 as ProgressionDegree, a4 as ProgressionOptions, a5 as ProgressionPreset, a6 as Provenance, a7 as ProvenanceBasis, a8 as ResolvedContext, a9 as RhythmEvent, aa as RhythmOptions, ab as STEP_BEATS, ad as SubstituteOptions, ae as Substitution, af as SubstitutionType, ag as SyncopateOptions, ai as VocabularyQuery, aj as applyGrooveTemplate, ak as assertVocabulary, al as deform, am as deriveCompositionPlan, an as developMotif, ao as double, ap as doubleTime, aq as drumVoiceOf, ar as evaluateComposition, as as extractGrooveTemplate, at as fitsQuery, au as generateBassLine, av as generateCounterMelody, aw as generateDrums, ax as generateMelody, ay as generateMotif, az as generateProgression, aA as generateRhythm, aB as gridMetricWeight, aC as halfTime, aD as humanize, aE as mergeVocabulary, aF as modalInterchangePalette, aG as motifToNoteEvents, aH as negativeHarmonyMirror, aI as onsetWeightCurve, aJ as ornament, aK as ornamentBy, aL as pickProgressionPreset, aM as pickVocabulary, aN as progressions, aO as progressionsByStyle, aP as resolveContext, aQ as rhythmDensity, aR as rhythmToNoteEvents, aS as selectVocabulary, aT as substituteChord, aU as syncopate, aV as thin, aW as transformMotif, aX as vocabularyOfKind, aY as withinCeiling } from '../index-
|
|
12
|
+
import { x as Genre, w as GenerationContextInput, ah as Vocabulary, y as GridEvent, r as DrumStyle, ac as Section, s as DrumVoice, z as GrooveFeel, p as DrumHit, I as HarmonizeOptions, K as HarmonizeResult, j as CompositionPlan } from '../index-DvS253M2.js';
|
|
13
|
+
export { B as BAR_STEPS, a as BASS_STYLES, b as BEAT_STEPS, c as BORROWED_DEGREES, d as BassLineOptions, e as BassSegment, f as BassStyle, g as BorrowedChord, C as COMPOSITION_PLAN_VERSION, h as Complexity, i as CompositionEvaluation, k as CompositionPlanOptions, l as CompositionViolation, m as CounterMelodyOptions, D as DRUM_NOTES, n as DeformOptions, o as Draw, q as DrumRole, t as DrumsOptions, E as EuclideanKick, u as EvaluateCompositionOptions, G as GENRES, v as GenerationContext, A as GrooveSlot, F as GrooveStyle, H as GrooveTemplate, J as HarmonizePlacement, L as HumanizeOptions, M as MelodyNote, N as MelodyOptions, O as MotifCell, P as MotifContour, Q as MotifNote, R as MotifOptions, S as MotifTransform, T as ORNAMENT_STYLES, U as OrnamentOptions, V as OrnamentStyle, W as PROVENANCE_BASES, X as PlannedChord, Y as PlannedMotif, Z as PlannedPhrase, _ as PlannedRhythm, $ as PlannedSection, a0 as PreserveWeights, a1 as ProgFunction, a2 as ProgStyle, a3 as ProgressionDegree, a4 as ProgressionOptions, a5 as ProgressionPreset, a6 as Provenance, a7 as ProvenanceBasis, a8 as ResolvedContext, a9 as RhythmEvent, aa as RhythmOptions, ab as STEP_BEATS, ad as SubstituteOptions, ae as Substitution, af as SubstitutionType, ag as SyncopateOptions, ai as VocabularyQuery, aj as applyGrooveTemplate, ak as assertVocabulary, al as deform, am as deriveCompositionPlan, an as developMotif, ao as double, ap as doubleTime, aq as drumVoiceOf, ar as evaluateComposition, as as extractGrooveTemplate, at as fitsQuery, au as generateBassLine, av as generateCounterMelody, aw as generateDrums, ax as generateMelody, ay as generateMotif, az as generateProgression, aA as generateRhythm, aB as gridMetricWeight, aC as halfTime, aD as humanize, aE as mergeVocabulary, aF as modalInterchangePalette, aG as motifToNoteEvents, aH as negativeHarmonyMirror, aI as onsetWeightCurve, aJ as ornament, aK as ornamentBy, aL as pickProgressionPreset, aM as pickVocabulary, aN as progressions, aO as progressionsByStyle, aP as resolveContext, aQ as rhythmDensity, aR as rhythmToNoteEvents, aS as selectVocabulary, aT as substituteChord, aU as syncopate, aV as thin, aW as transformMotif, aX as vocabularyOfKind, aY as withinCeiling } from '../index-DvS253M2.js';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* The playing-difficulty ceiling, as the generators apply it.
|
|
@@ -2,7 +2,7 @@ import { T as TimeSignature, b as MeterLike, c as MeterMap } from './index-wE8Se
|
|
|
2
2
|
import { a as Articulation, h as NoteEvent } from './index-C9MYbuKS.js';
|
|
3
3
|
import { S as SeedPath, d as PositionalRng, I as InstrumentProfile, f as StringedProfile } from './positional-DLnfUgqG.js';
|
|
4
4
|
import { d as ChordQuality, e as ChordSegment, c as ChordLike, K as KeyLike, b as Chord, m as ProfileWeights, g as ChordSpan, n as ResolvedKey, r as SpelledKeyLike } from './coerce-Cr9AZsTY.js';
|
|
5
|
-
import { h as ChordTimeline, e as CadenceType, v as MelodicContourShape, P as MotifRelationSummary, a5 as ReferenceProfile, b as BorrowedSource, o as HarmonicFunction } from './types-
|
|
5
|
+
import { h as ChordTimeline, e as CadenceType, v as MelodicContourShape, P as MotifRelationSummary, a5 as ReferenceProfile, b as BorrowedSource, o as HarmonicFunction } from './types-CCbTf0rL.js';
|
|
6
6
|
import { H as HarmonyRole } from './index-CBQLVwv_.js';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -7,11 +7,11 @@ export { A as Alteration, a as AlteredDegree, C as ChordBase, b as ChordData, c
|
|
|
7
7
|
export { FiguredBassRealization, FiguredBassSuspension, HiddenParallelReading, ScaleLadderPosition, SpellingContext, classifySpelledInterval, createsBattuta, createsHiddenParallelPerfect, createsParallelOctave, createsParallelPerfect, createsParallelUnison, createsVerticalDissonance, createsVoiceCrossing, createsVoiceOverlap, diatonicPitchClasses, exceedsSpacing, figuredBassOf, figuredBassRealization, isAugmentedMelodicInterval, isForbiddenMelodicLeap, isLeadingToneResolution, isScaleTone, majorKey, minorKey, nearestScaleTone, nextVoicing, noteNames, pitchToScaleDegree, realizeFiguredBass, resolveKey, scaleByName, scaleLadderPitch, scaleLadderPosition, scaleOf, scaleTonesInDegreeOrder, shiftByScaleDegrees, spellChord, spellChordFromRoot, spellPitch, spellPitchClass, spellPitchClasses, spellScale, tryResolveKeyName, voiceLeadingCost } from './theory/index.js';
|
|
8
8
|
export { A as ALTERED_MASK, B as BLUES_MASK, C as CHROMATIC_MASK, D as DORIAN_MASK, a as DOUBLE_HARMONIC_MASK, H as HARMONIC_MINOR_MASK, L as LOCRIAN_MASK, b as LOCRIAN_NATURAL2_MASK, c as LYDIAN_DOMINANT_MASK, d as LYDIAN_MASK, M as MAJOR_MASK, e as MAJOR_PENTATONIC_MASK, f as MARWA_MASK, g as MELODIC_MINOR_MASK, h as MINOR_PENTATONIC_MASK, i as MIXOLYDIAN_B13_MASK, j as MIXOLYDIAN_MASK, k as MIYAKO_BUSHI_MASK, N as NAMED_SCALES, l as NATURAL_MINOR_MASK, O as OCTATONIC_HALF_WHOLE_MASK, m as OCTATONIC_WHOLE_HALF_MASK, P as PHRYGIAN_DOMINANT_MASK, n as PHRYGIAN_MASK, o as PURVI_MASK, R as RITSU_MASK, p as RYUKYU_MASK, S as SCALE_ALIASES, q as ScaleAliasName, r as ScaleName, s as ScaleNameInput, T as TODI_MASK, W as WHOLE_TONE_MASK, t as WORLD_SCALES, u as WorldScaleName, v as assertKeyVariant, w as assertModeMask, x as maskFromOffsets, y as namedScaleMask, z as requireScaleMask, E as resolveScaleName, F as variantOfMask } from './masks-BDxvQO8b.js';
|
|
9
9
|
export { A as AvailableTensionsOptions, a as AvoidNoteUse, b as AvoidNotesOptions, C as ChordScaleMatch, c as ChordScaleReportEntry, d as ChordSymbolOptions, K as KeyMode, P as PartWritingOptions, e as PartWritingViolation, f as PartWritingViolationKind, S as SATB_RANGES, g as SCALE_SYSTEMS, h as ScaleChoice, i as ScaleSystem, j as Species, k as SpeciesOptions, l as SpelledVoicing, m as StyledVoicingOptions, T as TRANSPOSING_INSTRUMENTS, n as TransposingInstrument, o as TransposingInstrumentName, V as VoiceIndependenceOptions, p as VoiceIndependenceReport, q as VoiceRange, r as VoicingOptions, s as VoicingStyle, t as availableTensions, u as avoidNotes, v as checkPartWriting, w as checkSpecies, x as chordScaleReport, y as chordScales, z as formatChordSymbol, B as instrumentTransposition, D as isSignatureKey, E as keyFromFifths, F as keySignatureFifths, G as parseChordSymbol, H as scaleMatchesChord, I as scaleSystemOf, J as scalesForChanges, L as spellVoicing, M as supportsFunctionalHarmony, N as toSoundingPitch, O as toWrittenPitch, Q as transposeChordSymbol, R as tryParseChordSymbol, U as voiceChord, W as voiceChordStyled, X as voiceIndependence, Y as voiceProgression } from './index-COyI6W_w.js';
|
|
10
|
-
export { A as AnalyzeChordOptions, a as AnalyzedNote, B as BarPositionProfile, b as BorrowedSource, C as CADENCE_TYPES, c as CadenceHit, d as CadenceResult, e as CadenceType, f as ChordAnalysis, g as ChordSegmentation, h as ChordTimeline, i as ChordTimelineOptions, j as ChordTimelineResult, k as ChordToRomanOptions, l as ContourDirection, D as DetectCadenceOptions, E as ExplainRomanOptions, m as ExtractMotifsOptions, F as FormSection, n as FormSectionOptions, H as HARMONIC_FUNCTIONS, o as HarmonicFunction, I as IdentifiedVoiceNote, K as KeyContext, p as KeyProfileName, q as KeyProfilePair, r as KeyRegion, s as KeyTimelineOptions, M as MELODIC_CONTOUR_SHAPES, t as MOTIF_RELATION_KINDS, u as MelodicContour, v as MelodicContourShape, w as MelodicPhrase, x as MotifData, y as MotifGraph, z as MotifGraphEdge, G as MotifGraphNode, J as MotifGraphOptions, L as MotifOccurrence, N as MotifRelation, O as MotifRelationKind, P as MotifRelationSummary, Q as PivotChord, R as REDUCTION_LEVELS, S as REFERENCE_PROFILE_VERSION, T as RHYTHM_IOI_BINS, U as ReduceProgressionOptions, V as ReducedChord, W as ReductionBasis, X as ReductionLevel, Y as ReferenceCadence, Z as ReferenceChord, _ as ReferenceForm, $ as ReferenceHarmony, a0 as ReferenceKeyRegion, a1 as ReferenceMelody, a2 as ReferenceMotif, a3 as ReferencePhrase, a4 as ReferencePhraseMelody, a5 as ReferenceProfile, a6 as RejectedCandidate, a7 as RhythmAnalysis, a8 as RhythmAnalysisOptions, a9 as RomanExplanation, aa as SuspensionFigure, ab as TheoryLabel, ac as VoiceNote, ad as analyzeChord, ae as analyzeRhythm, af as analyzeVoice, ag as assertChordTimeline, ah as borrowedSource, ai as chordTimelineFromChords, aj as chordTimelineFromNotes, ak as chordToRoman, al as detectCadence, am as detectCadences, an as detectModulations, ao as explainRoman, ap as extractMotifs, aq as functionOf, ar as isBorrowedChord, as as isDiatonic, at as isMinorKey, au as keyTimelineFromNotes, av as melodicContour, aw as motifFromNotes, ax as motifGraph, ay as pivotChords, az as prevailingKeyOf, aA as reduceProgression, aB as relateMotifs, aC as romanToChord, aD as secondaryDominant, aE as secondaryDominantOf, aF as sectionsFromNotes, aG as toVoiceNotes } from './types-
|
|
11
|
-
export { A as ArrangementAnalysis, a as ArrangementOptions, b as ArrangementSession, c as ArrangementTrack, d as AugmentedSixthKind, C as ChordMatch, e as Conflict, f as ConflictPartner, D as DetectChordOptions, g as DetectKeyOptions, H as Hypermeter, h as HypermeterOptions, K as KeyMatch, M as MODAL_SCALE_NAMES, i as ModalCandidate, j as ModalScaleName, P as Phrase, k as PhraseOptions, l as PhraseSignal, R as ReferenceProfileOptions, S as StructuralCadence, T as TensionPoint, m as TrackAnalysis, n as TrackEdit, o as TrackRole, p as analyzeArrangement, q as analyzePolyphony, r as analyzeReference, s as augmentedSixthChord, t as augmentedSixthFromPitchClasses, u as augmentedSixthKind, v as createArrangementSession, w as detectChord, x as detectChordBest, y as detectKey, z as detectKeyBest, B as detectKeyFromNotes, E as hypermeter, F as phrasesFromTimeline, G as spellAugmentedSixth, I as structuralCadences, J as tensionCurve, L as tensionCurveFrom } from './profile-
|
|
10
|
+
export { A as AnalyzeChordOptions, a as AnalyzedNote, B as BarPositionProfile, b as BorrowedSource, C as CADENCE_TYPES, c as CadenceHit, d as CadenceResult, e as CadenceType, f as ChordAnalysis, g as ChordSegmentation, h as ChordTimeline, i as ChordTimelineOptions, j as ChordTimelineResult, k as ChordToRomanOptions, l as ContourDirection, D as DetectCadenceOptions, E as ExplainRomanOptions, m as ExtractMotifsOptions, F as FormSection, n as FormSectionOptions, H as HARMONIC_FUNCTIONS, o as HarmonicFunction, I as IdentifiedVoiceNote, K as KeyContext, p as KeyProfileName, q as KeyProfilePair, r as KeyRegion, s as KeyTimelineOptions, M as MELODIC_CONTOUR_SHAPES, t as MOTIF_RELATION_KINDS, u as MelodicContour, v as MelodicContourShape, w as MelodicPhrase, x as MotifData, y as MotifGraph, z as MotifGraphEdge, G as MotifGraphNode, J as MotifGraphOptions, L as MotifOccurrence, N as MotifRelation, O as MotifRelationKind, P as MotifRelationSummary, Q as PivotChord, R as REDUCTION_LEVELS, S as REFERENCE_PROFILE_VERSION, T as RHYTHM_IOI_BINS, U as ReduceProgressionOptions, V as ReducedChord, W as ReductionBasis, X as ReductionLevel, Y as ReferenceCadence, Z as ReferenceChord, _ as ReferenceForm, $ as ReferenceHarmony, a0 as ReferenceKeyRegion, a1 as ReferenceMelody, a2 as ReferenceMotif, a3 as ReferencePhrase, a4 as ReferencePhraseMelody, a5 as ReferenceProfile, a6 as RejectedCandidate, a7 as RhythmAnalysis, a8 as RhythmAnalysisOptions, a9 as RomanExplanation, aa as SuspensionFigure, ab as TheoryLabel, ac as VoiceNote, ad as analyzeChord, ae as analyzeRhythm, af as analyzeVoice, ag as assertChordTimeline, ah as borrowedSource, ai as chordTimelineFromChords, aj as chordTimelineFromNotes, ak as chordToRoman, al as detectCadence, am as detectCadences, an as detectModulations, ao as explainRoman, ap as extractMotifs, aq as functionOf, ar as isBorrowedChord, as as isDiatonic, at as isMinorKey, au as keyTimelineFromNotes, av as melodicContour, aw as motifFromNotes, ax as motifGraph, ay as pivotChords, az as prevailingKeyOf, aA as reduceProgression, aB as relateMotifs, aC as romanToChord, aD as secondaryDominant, aE as secondaryDominantOf, aF as sectionsFromNotes, aG as toVoiceNotes } from './types-CCbTf0rL.js';
|
|
11
|
+
export { A as ArrangementAnalysis, a as ArrangementOptions, b as ArrangementSession, c as ArrangementTrack, d as AugmentedSixthKind, C as ChordMatch, e as Conflict, f as ConflictPartner, D as DetectChordOptions, g as DetectKeyOptions, H as Hypermeter, h as HypermeterOptions, K as KeyMatch, M as MODAL_SCALE_NAMES, i as ModalCandidate, j as ModalScaleName, P as Phrase, k as PhraseOptions, l as PhraseSignal, R as ReferenceProfileOptions, S as StructuralCadence, T as TensionPoint, m as TrackAnalysis, n as TrackEdit, o as TrackRole, p as analyzeArrangement, q as analyzePolyphony, r as analyzeReference, s as augmentedSixthChord, t as augmentedSixthFromPitchClasses, u as augmentedSixthKind, v as createArrangementSession, w as detectChord, x as detectChordBest, y as detectKey, z as detectKeyBest, B as detectKeyFromNotes, E as hypermeter, F as phrasesFromTimeline, G as spellAugmentedSixth, I as structuralCadences, J as tensionCurve, L as tensionCurveFrom } from './profile-DyqvdA9x.js';
|
|
12
12
|
export { MelodicComparison, ReferenceComparison, ReferenceComparisonOptions, SpellLineOptions, assertReferenceProfile, compareMelodies, compareReferences, melodicSimilarity, spellLine } from './analyze/index.js';
|
|
13
13
|
export { C as ConsonanceClass, c as classifyInterval, i as isConsonantInterval, a as isPerfectInterval } from './index-DInQqT8Q.js';
|
|
14
14
|
export { H as HarmonyRole, L as LockLevel, V as VoicedRole, r as roleOf } from './index-CBQLVwv_.js';
|
|
15
|
-
export { B as BAR_STEPS, a as BASS_STYLES, b as BEAT_STEPS, c as BORROWED_DEGREES, d as BassLineOptions, e as BassSegment, f as BassStyle, g as BorrowedChord, C as COMPOSITION_PLAN_VERSION, h as Complexity, i as CompositionEvaluation, j as CompositionPlan, k as CompositionPlanOptions, l as CompositionViolation, m as CounterMelodyOptions, D as DRUM_NOTES, n as DeformOptions, o as Draw, p as DrumHit, q as DrumRole, r as DrumStyle, s as DrumVoice, t as DrumsOptions, E as EuclideanKick, u as EvaluateCompositionOptions, G as GENRES, v as GenerationContext, w as GenerationContextInput, x as Genre, y as GridEvent, z as GrooveFeel, A as GrooveSlot, F as GrooveStyle, H as GrooveTemplate, I as HarmonizeOptions, J as HarmonizePlacement, K as HarmonizeResult, L as HumanizeOptions, M as MelodyNote, N as MelodyOptions, O as MotifCell, P as MotifContour, Q as MotifNote, R as MotifOptions, S as MotifTransform, T as ORNAMENT_STYLES, U as OrnamentOptions, V as OrnamentStyle, W as PROVENANCE_BASES, X as PlannedChord, Y as PlannedMotif, Z as PlannedPhrase, _ as PlannedRhythm, $ as PlannedSection, a0 as PreserveWeights, a1 as ProgFunction, a2 as ProgStyle, a3 as ProgressionDegree, a4 as ProgressionOptions, a5 as ProgressionPreset, a6 as Provenance, a7 as ProvenanceBasis, a8 as ResolvedContext, a9 as RhythmEvent, aa as RhythmOptions, ab as STEP_BEATS, ac as Section, ad as SubstituteOptions, ae as Substitution, af as SubstitutionType, ag as SyncopateOptions, ah as Vocabulary, ai as VocabularyQuery, aj as applyGrooveTemplate, ak as assertVocabulary, al as deform, am as deriveCompositionPlan, an as developMotif, ao as double, ap as doubleTime, aq as drumVoiceOf, ar as evaluateComposition, as as extractGrooveTemplate, at as fitsQuery, au as generateBassLine, av as generateCounterMelody, aw as generateDrums, ax as generateMelody, ay as generateMotif, az as generateProgression, aA as generateRhythm, aB as gridMetricWeight, aC as halfTime, aD as humanize, aE as mergeVocabulary, aF as modalInterchangePalette, aG as motifToNoteEvents, aH as negativeHarmonyMirror, aI as onsetWeightCurve, aJ as ornament, aK as ornamentBy, aL as pickProgressionPreset, aM as pickVocabulary, aN as progressions, aO as progressionsByStyle, aP as resolveContext, aQ as rhythmDensity, aR as rhythmToNoteEvents, aS as selectVocabulary, aT as substituteChord, aU as syncopate, aV as thin, aW as transformMotif, aX as vocabularyOfKind, aY as withinCeiling } from './index-
|
|
15
|
+
export { B as BAR_STEPS, a as BASS_STYLES, b as BEAT_STEPS, c as BORROWED_DEGREES, d as BassLineOptions, e as BassSegment, f as BassStyle, g as BorrowedChord, C as COMPOSITION_PLAN_VERSION, h as Complexity, i as CompositionEvaluation, j as CompositionPlan, k as CompositionPlanOptions, l as CompositionViolation, m as CounterMelodyOptions, D as DRUM_NOTES, n as DeformOptions, o as Draw, p as DrumHit, q as DrumRole, r as DrumStyle, s as DrumVoice, t as DrumsOptions, E as EuclideanKick, u as EvaluateCompositionOptions, G as GENRES, v as GenerationContext, w as GenerationContextInput, x as Genre, y as GridEvent, z as GrooveFeel, A as GrooveSlot, F as GrooveStyle, H as GrooveTemplate, I as HarmonizeOptions, J as HarmonizePlacement, K as HarmonizeResult, L as HumanizeOptions, M as MelodyNote, N as MelodyOptions, O as MotifCell, P as MotifContour, Q as MotifNote, R as MotifOptions, S as MotifTransform, T as ORNAMENT_STYLES, U as OrnamentOptions, V as OrnamentStyle, W as PROVENANCE_BASES, X as PlannedChord, Y as PlannedMotif, Z as PlannedPhrase, _ as PlannedRhythm, $ as PlannedSection, a0 as PreserveWeights, a1 as ProgFunction, a2 as ProgStyle, a3 as ProgressionDegree, a4 as ProgressionOptions, a5 as ProgressionPreset, a6 as Provenance, a7 as ProvenanceBasis, a8 as ResolvedContext, a9 as RhythmEvent, aa as RhythmOptions, ab as STEP_BEATS, ac as Section, ad as SubstituteOptions, ae as Substitution, af as SubstitutionType, ag as SyncopateOptions, ah as Vocabulary, ai as VocabularyQuery, aj as applyGrooveTemplate, ak as assertVocabulary, al as deform, am as deriveCompositionPlan, an as developMotif, ao as double, ap as doubleTime, aq as drumVoiceOf, ar as evaluateComposition, as as extractGrooveTemplate, at as fitsQuery, au as generateBassLine, av as generateCounterMelody, aw as generateDrums, ax as generateMelody, ay as generateMotif, az as generateProgression, aA as generateRhythm, aB as gridMetricWeight, aC as halfTime, aD as humanize, aE as mergeVocabulary, aF as modalInterchangePalette, aG as motifToNoteEvents, aH as negativeHarmonyMirror, aI as onsetWeightCurve, aJ as ornament, aK as ornamentBy, aL as pickProgressionPreset, aM as pickVocabulary, aN as progressions, aO as progressionsByStyle, aP as resolveContext, aQ as rhythmDensity, aR as rhythmToNoteEvents, aS as selectVocabulary, aT as substituteChord, aU as syncopate, aV as thin, aW as transformMotif, aX as vocabularyOfKind, aY as withinCeiling } from './index-DvS253M2.js';
|
|
16
16
|
export { BASS_LICKS, BassLick, ClassifiedMelodyTone, DRUM_KIT, DRUM_PATTERNS, DrumPattern, DrumPatternOptions, DrumStroke, DrumVocabulary, FILL_ARCHETYPES, FILL_TYPES, FillArchetype, FillStroke, FillType, FillVelocity, ImitationAnswer, ImitationOptions, KICK_FIGURES, KICK_STEPS, KickFigure, KickPattern, KickSlot, LickMaterial, LickNote, MAX_DIFFICULTY, MIN_DIFFICULTY, MelodyToneRole, PlaceLicksOptions, assertCompositionPlan, classifyMelodyTones, harmonizeMelody, imitate, isDrumPattern, isFillArchetype, isLickMaterial, placeDrumPattern, placeLicks, planTimeline, sustainsShift, sustainsStrokes } from './generate/index.js';
|
|
17
17
|
export { Arrangement, ArrangementData, ArrangementSettings, ArrangementSetup, ArrangementTensionOptions, BassLineSettings, Chord, Composer, ComposerOptions, CounterMelodySettings, DetectedKeyMatch, Duration, HarmonizedMelody, Instrument, Interval, Key, KeyData, Meter, Motif, MotifGenerateOptions, Note, Progression, ProgressionData, Rhythm, RhythmData, RhythmDeformOptions, Score, ScoreData, ScoreOptions, Tempo, TempoData, Timeline, TimelineData, TimelineRoman, Tuning, Voicing, VoicingData, VoicingIndependenceOptions, VoicingSafetyQuery } from './model/index.js';
|
package/dist/model/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { D as DetectChordOptions, C as ChordMatch, g as DetectKeyOptions, K as KeyMatch, d as AugmentedSixthKind, k as PhraseOptions, P as Phrase, S as StructuralCadence, h as HypermeterOptions, H as Hypermeter, R as ReferenceProfileOptions, c as ArrangementTrack, a as ArrangementOptions, A as ArrangementAnalysis, e as Conflict, n as TrackEdit, T as TensionPoint } from '../profile-
|
|
2
|
-
export { b as ArrangementSession, f as ConflictPartner, j as ModalScaleName, l as PhraseSignal, m as TrackAnalysis, o as TrackRole } from '../profile-
|
|
3
|
-
import { r as KeyRegion, i as ChordTimelineOptions, U as ReduceProgressionOptions, V as ReducedChord, c as CadenceHit, s as KeyTimelineOptions, k as ChordToRomanOptions, h as ChordTimeline, o as HarmonicFunction, A as AnalyzeChordOptions, D as DetectCadenceOptions, f as ChordAnalysis, d as CadenceResult, E as ExplainRomanOptions, a9 as RomanExplanation, b as BorrowedSource, n as FormSectionOptions, F as FormSection, m as ExtractMotifsOptions, x as MotifData, u as MelodicContour, a5 as ReferenceProfile, a8 as RhythmAnalysisOptions, a7 as RhythmAnalysis, J as MotifGraphOptions, y as MotifGraph, a as AnalyzedNote, I as IdentifiedVoiceNote, N as MotifRelation } from '../types-
|
|
4
|
-
export { B as BarPositionProfile, e as CadenceType, g as ChordSegmentation, j as ChordTimelineResult, l as ContourDirection, K as KeyContext, p as KeyProfileName, q as KeyProfilePair, v as MelodicContourShape, z as MotifGraphEdge, G as MotifGraphNode, L as MotifOccurrence, O as MotifRelationKind, P as MotifRelationSummary, Q as PivotChord, W as ReductionBasis, X as ReductionLevel, Y as ReferenceCadence, Z as ReferenceChord, _ as ReferenceForm, $ as ReferenceHarmony, a0 as ReferenceKeyRegion, a1 as ReferenceMelody, a2 as ReferenceMotif, a3 as ReferencePhrase, a4 as ReferencePhraseMelody, a6 as RejectedCandidate, aa as SuspensionFigure, ab as TheoryLabel, ac as VoiceNote } from '../types-
|
|
1
|
+
import { D as DetectChordOptions, C as ChordMatch, g as DetectKeyOptions, K as KeyMatch, d as AugmentedSixthKind, k as PhraseOptions, P as Phrase, S as StructuralCadence, h as HypermeterOptions, H as Hypermeter, R as ReferenceProfileOptions, c as ArrangementTrack, a as ArrangementOptions, A as ArrangementAnalysis, e as Conflict, n as TrackEdit, T as TensionPoint } from '../profile-DyqvdA9x.js';
|
|
2
|
+
export { b as ArrangementSession, f as ConflictPartner, j as ModalScaleName, l as PhraseSignal, m as TrackAnalysis, o as TrackRole } from '../profile-DyqvdA9x.js';
|
|
3
|
+
import { r as KeyRegion, i as ChordTimelineOptions, U as ReduceProgressionOptions, V as ReducedChord, c as CadenceHit, s as KeyTimelineOptions, k as ChordToRomanOptions, h as ChordTimeline, o as HarmonicFunction, A as AnalyzeChordOptions, D as DetectCadenceOptions, f as ChordAnalysis, d as CadenceResult, E as ExplainRomanOptions, a9 as RomanExplanation, b as BorrowedSource, n as FormSectionOptions, F as FormSection, m as ExtractMotifsOptions, x as MotifData, u as MelodicContour, a5 as ReferenceProfile, a8 as RhythmAnalysisOptions, a7 as RhythmAnalysis, J as MotifGraphOptions, y as MotifGraph, a as AnalyzedNote, I as IdentifiedVoiceNote, N as MotifRelation } from '../types-CCbTf0rL.js';
|
|
4
|
+
export { B as BarPositionProfile, e as CadenceType, g as ChordSegmentation, j as ChordTimelineResult, l as ContourDirection, K as KeyContext, p as KeyProfileName, q as KeyProfilePair, v as MelodicContourShape, z as MotifGraphEdge, G as MotifGraphNode, L as MotifOccurrence, O as MotifRelationKind, P as MotifRelationSummary, Q as PivotChord, W as ReductionBasis, X as ReductionLevel, Y as ReferenceCadence, Z as ReferenceChord, _ as ReferenceForm, $ as ReferenceHarmony, a0 as ReferenceKeyRegion, a1 as ReferenceMelody, a2 as ReferenceMotif, a3 as ReferencePhrase, a4 as ReferencePhraseMelody, a6 as RejectedCandidate, aa as SuspensionFigure, ab as TheoryLabel, ac as VoiceNote } from '../types-CCbTf0rL.js';
|
|
5
5
|
import { c as IntervalQualityLabel, I as IntervalData, P as ParseResult, S as SpelledInterval, g as Note$1, j as NoteNameOptions, b as IntervalLike, h as NoteEvent, i as NoteLike, e as KeyScale, a as Articulation } from '../index-C9MYbuKS.js';
|
|
6
6
|
export { B as BudgetExceededError, d as InvalidInputError, L as LibcantusError, N as NoSolutionError, k as NoteNameSystem } from '../index-C9MYbuKS.js';
|
|
7
7
|
import { K as KeyLike, e as ChordSegment, g as ChordSpan, b as Chord$1, d as ChordQuality, h as ChordSpec, i as ChordToneRole, n as ResolvedKey, k as KeyVariant, j as KeyRelation, c as ChordLike, r as SpelledKeyLike, p as SafetyQuery, E as EvaluateSafetyOptions, q as SafetyResult } from '../coerce-Cr9AZsTY.js';
|
|
@@ -15,8 +15,8 @@ export { M as MeterChange } from '../index-wE8SecK5.js';
|
|
|
15
15
|
import { s as ScaleNameInput, r as ScaleName } from '../masks-BDxvQO8b.js';
|
|
16
16
|
import { n as TransposingInstrument, r as VoicingOptions, h as ScaleChoice, d as ChordSymbolOptions, m as StyledVoicingOptions, C as ChordScaleMatch, c as ChordScaleReportEntry, A as AvailableTensionsOptions, b as AvoidNotesOptions, K as KeyMode, i as ScaleSystem, q as VoiceRange, P as PartWritingOptions, e as PartWritingViolation, j as Species, k as SpeciesOptions, V as VoiceIndependenceOptions, p as VoiceIndependenceReport } from '../index-COyI6W_w.js';
|
|
17
17
|
export { a as AvoidNoteUse, f as PartWritingViolationKind, o as TransposingInstrumentName, s as VoicingStyle } from '../index-COyI6W_w.js';
|
|
18
|
-
import { af as SubstitutionType, ad as SubstituteOptions, ae as Substitution, g as BorrowedChord, L as HumanizeOptions, U as OrnamentOptions, H as GrooveTemplate, j as CompositionPlan, u as EvaluateCompositionOptions, i as CompositionEvaluation, d as BassLineOptions, h as Complexity, ah as Vocabulary, a4 as ProgressionOptions, t as DrumsOptions, e as BassSegment, m as CounterMelodyOptions, I as HarmonizeOptions, k as CompositionPlanOptions, N as MelodyOptions, v as GenerationContext, O as MotifCell, P as MotifContour, w as GenerationContextInput, Q as MotifNote, S as MotifTransform, a9 as RhythmEvent, aa as RhythmOptions } from '../index-
|
|
19
|
-
export { f as BassStyle, l as CompositionViolation, q as DrumRole, E as EuclideanKick, x as Genre, y as GridEvent, z as GrooveFeel, A as GrooveSlot, F as GrooveStyle, J as HarmonizePlacement, M as MelodyNote, V as OrnamentStyle, X as PlannedChord, Y as PlannedMotif, Z as PlannedPhrase, _ as PlannedRhythm, $ as PlannedSection, a0 as PreserveWeights, a1 as ProgFunction, a2 as ProgStyle, a3 as ProgressionDegree, a5 as ProgressionPreset, a6 as Provenance, a7 as ProvenanceBasis, ac as Section } from '../index-
|
|
18
|
+
import { af as SubstitutionType, ad as SubstituteOptions, ae as Substitution, g as BorrowedChord, L as HumanizeOptions, U as OrnamentOptions, H as GrooveTemplate, j as CompositionPlan, u as EvaluateCompositionOptions, i as CompositionEvaluation, d as BassLineOptions, h as Complexity, ah as Vocabulary, a4 as ProgressionOptions, t as DrumsOptions, e as BassSegment, m as CounterMelodyOptions, I as HarmonizeOptions, k as CompositionPlanOptions, N as MelodyOptions, v as GenerationContext, O as MotifCell, P as MotifContour, w as GenerationContextInput, Q as MotifNote, S as MotifTransform, a9 as RhythmEvent, aa as RhythmOptions } from '../index-DvS253M2.js';
|
|
19
|
+
export { f as BassStyle, l as CompositionViolation, q as DrumRole, E as EuclideanKick, x as Genre, y as GridEvent, z as GrooveFeel, A as GrooveSlot, F as GrooveStyle, J as HarmonizePlacement, M as MelodyNote, V as OrnamentStyle, X as PlannedChord, Y as PlannedMotif, Z as PlannedPhrase, _ as PlannedRhythm, $ as PlannedSection, a0 as PreserveWeights, a1 as ProgFunction, a2 as ProgStyle, a3 as ProgressionDegree, a5 as ProgressionPreset, a6 as Provenance, a7 as ProvenanceBasis, ac as Section } from '../index-DvS253M2.js';
|
|
20
20
|
import '../index-CBQLVwv_.js';
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { e as KeyScale, h as NoteEvent, i as NoteLike, g as Note } from './index-C9MYbuKS.js';
|
|
3
3
|
import { d as ChordQuality, k as KeyVariant, b as Chord, r as SpelledKeyLike, c as ChordLike, K as KeyLike, n as ResolvedKey, N as NoteSafety, o as SafetyProfile } from './coerce-Cr9AZsTY.js';
|
|
4
4
|
import { r as ScaleName } from './masks-BDxvQO8b.js';
|
|
5
|
-
import { p as KeyProfileName, q as KeyProfilePair, a6 as RejectedCandidate, r as KeyRegion, h as ChordTimeline, c as CadenceHit, a as AnalyzedNote, ab as TheoryLabel, K as KeyContext, d as CadenceResult, a5 as ReferenceProfile } from './types-
|
|
5
|
+
import { p as KeyProfileName, q as KeyProfilePair, a6 as RejectedCandidate, r as KeyRegion, h as ChordTimeline, c as CadenceHit, a as AnalyzedNote, ab as TheoryLabel, K as KeyContext, d as CadenceResult, a5 as ReferenceProfile } from './types-CCbTf0rL.js';
|
|
6
6
|
import { b as MeterLike } from './index-wE8SecK5.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1369,7 +1369,10 @@ type ChordTimelineResult = {
|
|
|
1369
1369
|
* for two beats, two beats of rest and a G triad read C over beats 0-4. Under `'grid'` any
|
|
1370
1370
|
* window with nothing sounding produces no segment. A window whose notes give
|
|
1371
1371
|
* fewer than two tones of any chord produces none either: a lone pitch class
|
|
1372
|
-
* names no chord
|
|
1372
|
+
* names no chord — except where the harmony arrives on it. Straight after a
|
|
1373
|
+
* chord its own tones name, a lone pitch class of a heptatonic key reads as the
|
|
1374
|
+
* triad the key builds on it, so a melody ending on its tonic after the
|
|
1375
|
+
* dominant closes on the tonic chord. Each segment carries a confidence in [0, 1]
|
|
1373
1376
|
* — the fraction of its weight explained by chord tones, reduced when the match
|
|
1374
1377
|
* is inexact, and duration-weighted across anything merged into it.
|
|
1375
1378
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libraz/libcantus-wasm",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.4.3",
|
|
4
|
+
"description": "Detect chords, keys, Roman numerals and cadences in MIDI note events with the libcantus C++ core in WebAssembly. Same API and types as @libraz/libcantus; ESM only.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": "libraz",
|
|
@@ -29,7 +29,14 @@
|
|
|
29
29
|
"arrangement",
|
|
30
30
|
"generative-music",
|
|
31
31
|
"webassembly",
|
|
32
|
-
"wasm"
|
|
32
|
+
"wasm",
|
|
33
|
+
"harmonic-analysis",
|
|
34
|
+
"key-detection",
|
|
35
|
+
"roman-numeral-analysis",
|
|
36
|
+
"cadence",
|
|
37
|
+
"chord-progression",
|
|
38
|
+
"voice-leading",
|
|
39
|
+
"counterpoint"
|
|
33
40
|
],
|
|
34
41
|
"engines": {
|
|
35
42
|
"node": ">=22"
|