REF / Music API / Voices

Ascene . Agraph . Aengine
Anode . Modulator . Envelope
Songbook . Song . TimeKeeper
Voices . SampleMgr . StreamMgr
Loader . Async . Plot
Random . Rhythm . Util
MIDI . OSC . HID . Piano
Music Theory with Tonal

right-click to navigate to page sections


Voices == "polyphonic voice manager"
do you hear Voices?

Most popular CLAP synths manage their own polyphony. This means that a single Anode instance can play multiple notes simultaneously.

With Hz, you can roll your own synthesizer from a network of modular components. If you do this you'll end up with mono-voice synthesizer. As soon as you hit two notes simultaneously you're in a pickle.

To work around this problem you can roll your own meta-synth in the form of an Anode chain and provide that template to Voices which duplicates this chain for a requested voice count. Now a voices instance can play the role of a polyphonic synth, assigning new notes to a quiescent subchain, aka voice. Typically all voices managed by voices are the same, but you can actually provide different graph chains to multiple AddVoices for interesting (or not) results.

These are the awesome deeds of Voices.

Voices Functionality

Voices

Voices Methods

Voices method Description
AddVoices(voiceTemplateNode, num) Duplicates voicesTemplateNode's subgraph num times. Sinces this changes the audio graph, it should be followed by await scene.Sync()
Note(...), NoteOn(...)* These Anode methods assign a voice and return [noteid, voiceid].
SetVoiceParam(voiceid, node, paramId, value) * Distributes the SetParam to the duplicated node associated with voiceid
NoteExpression(..., noteid), NoteChoke(...,noteid), MidiEvent(...., noteid)* These Anode methods distribute events to the voice associated with noteid.

* see Anode for method details.

See Also

Voices Example

home .. topics .. interface .. reference .. examples .. tipjar