NPVoicer simplifies the use of polyphony in NodeProxies. One can flexibly play, access and release multiple voices of the same synth source with this wrapper around a nodeproxy.
make a new NPVoicer
proxy |
required - a nodeproxy to play voices in. |
indivParams |
which params will be set for each new voice individually. this protects these params from accidental global setting. |
prepare proxy for playing voices.
obj |
can be anything a nodeproxy accepts as source : a SynthDef, a Symbol (synthdef name), a function, ... |
useSpawn |
a flag whether to put obj into slot 0. As voicers usually have individual voices and not a preferred front synth, default = false. |
internal - a SynthDefControl created when priming, and used for the voices.
the list of param used individually and not globally.
the flag whether a new nodeproxy object will play in slot 0 or not.
put a new voice into the objects list at
key |
at this key, typically a note number. (replaces a playing object there) |
args |
with these starting individual arguments. |
release voice playing at key with given fadeTime.
return the keys of all currently playing voices.
return all currently playing voices withgiven fadetime.
if NPVoicer usesSpawn, spawn will create new voices that are only triggered and then take care of themselves, i.e. end automatically and do not allow control settings. see example.
args |
args for the spawned voice. |
(addAction) |
addAction for the spawned voice. /* Interfacing to nodeproxy */ |
the nodeproxy used to play the voices
play the nodeproxy. see NodeProxy:play for full info
playN the nodeproxy. see NodeProxy:playN for full info
pause the nodeproxy
resume the nodeproxy
stop the nodeproxy with fadeTime and reset options.
end the nodeproxy with fadeTime.
set global params of the nodeproxy. args are key value pairs to set, e.g. key1, val1, key2, val2, ... keyN, valN
unset global params of the nodeproxy. keys are the keys to unset, e.g. key1, key2, keyN
map global params of the nodeproxy. args are key value pairs to map, e.g. key1, val1, key2, val2, ... keyN, valN
unmap global params of the nodeproxy. ... keys are the keys to unmap, e.g. key1, key2, keyN
set and unset params at individual playing voices. key is the key of the voice to set params of; args are key value pairs to map, e.g. key1, val1, key2, val2, ... keyN, valN
unset params at individual playing voices. key is the key of the voice to unset params of; keys are the keys to unset, e.g. key1, key2, keyN
// ToDo - more examples - e.g.: