@mohayonao/fm-synth
v0.1.3
Published
simple frequency modulation synthesizer
Readme
FM SYNTH
simple frequency modulation synthesizer
Installation
Node.js
npm install @mohayonao/fm-synthBrowser
API
Operator
constructor(algorithm: number|string, operators: any[])
Instance attribute
context: AudioContextoperators: any[]algorithm: stringonended: function
Instance methods
connect(destination: AudioNode): voiddisconnect(): voidstart(when: number): voidstop(when: number): void
Algorithm Notation
let A = audioContext.createDelay();
let B = new Operator(audioContext);
let C = new Operator(audioContext);
let D = new Operator(audioContext);
let fm = new FMSynth("E-D-C->; B-A->", [ A, B, C, D, 0 ]);A,B,C...Z: index of the operators-: connection (connects to a node's frequency or node self if not has frequency)>: connection to output;: separator0in operators mean OFF. Those are ignored in the audio graph.
Now, the instance of FMSynth builds the below graph by the given algorithm "D-C->; B-A->".

Algorithm Presets

See Also
- @mohayonao/operator - simple operator
License
MIT
