NPVoicer:
Filter:
JITLibExtensions/Classes (extension) | Undocumented classes

NPVoicer
ExtensionExtension

handle polyphony with nodeproxies

Description

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.

Class Methods

.new

make a new NPVoicer

Arguments:

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.

Instance Methods

.prime

prepare proxy for playing voices.

Arguments:

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.

.synCtl

internal - a SynthDefControl created when priming, and used for the voices.

.indivParams

the list of param used individually and not globally.

.usesSpawn

the flag whether a new nodeproxy object will play in slot 0 or not.

.put

put a new voice into the objects list at

Arguments:

key

at this key, typically a note number. (replaces a playing object there)

args

with these starting individual arguments.

.release

release voice playing at key with given fadeTime.

.playingKeys

return the keys of all currently playing voices.

.releaseAll

return all currently playing voices withgiven fadetime.

.spawn

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.

Arguments:

args

args for the spawned voice.

addAction

addAction for the spawned voice.

/* Interfacing to nodeproxy */

.proxy

the nodeproxy used to play the voices

.play

play the nodeproxy. see NodeProxy:play for full info

.playN

playN the nodeproxy. see NodeProxy:playN for full info

.pause

pause the nodeproxy

.resume

resume the nodeproxy

.stop

stop the nodeproxy with fadeTime and reset options.

.end

end the nodeproxy with fadeTime.

.set

set global params of the nodeproxy. args are key value pairs to set, e.g. key1, val1, key2, val2, ... keyN, valN

.unset

unset global params of the nodeproxy. keys are the keys to unset, e.g. key1, key2, keyN

.map

map global params of the nodeproxy. args are key value pairs to map, e.g. key1, val1, key2, val2, ... keyN, valN

.unmap

unmap global params of the nodeproxy. ... keys are the keys to unmap, e.g. key1, key2, keyN

.setAt

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

.unsetAt

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

Examples

// ToDo - more examples - e.g.: