ProxyChain:
Filter:
Classes (extension) | Libraries > JITLib > JITLibExtensions

ProxyChain : Object
ExtensionExtension

play ordered synth and filter functions flexibly in one proxy

Description

A ProxyChain is a wrapper around a nodeproxy which keeps an ordered collection of sound functions, which can be individually added to or removed from the proxy signal chain, by name.

The ProxyChain class keeps a global dictionary of such sound functions, and a ProxyChain can also have local sound functions.

Like Ndef, Pdef, Tdef, the ProxyChain class keeps all named instances in a class variable ProxyChain.all where they can be accessed by name: ProxyChain('chain1').

First Examples

Basic code-only usage first:

NOTE: When using ProxyChains with GUIs and controllers, things become much easier when specs for the process parameters are defined along with the processes. One can do this by adding global specs (Spec.add(\dens, [1, 100, \exp])s), or by adding specs to the ProxyChain's proxy. ProxyChain also supports defining these specs when setting up the repertoire of functions.

Class Methods

ProxyChain.allSources

a dict of all available synth and filter functions

ProxyChain.all

a dict of all ProxyChain instances.

ProxyChain.add( ... args)

put synth functions into ProxyChain.all, by name, func, name, func ...

ProxyChain.add3(srcName, source, level, specs)

add a named synth func with level and specs

ProxyChain.addSource(srcName, source)

add a source func at srcName

ProxyChain.addLevel(srcName, level)

add a default level for the func at srcName

ProxyChain.addSpecs(srcName, specs, srcDict)

add specs for the func at srcName

ProxyChain.sourceDicts

access the dict which contains all sourceDicts

ProxyChain.atSrcDict(key)

get the srcDict at given srcName

ProxyChain.checkDicts

check all sourceDicts for integrity

ProxyChain.checkSourceDictAt(srcname)

check the sourceDict at srcName

ProxyChain.new(key, slotNames, numChannels, server)

look up an existing ProxyChain, or (if new and slotNames are given), make a new ProxyChain with ordered names of synth functions in the slotNames.

Arguments:

key

lookup name for the proxychain

slotNames

the names of the functions to have available.

numChannels

number of audio channels. default = 2.

server

server to use. default = s.

ProxyChain.from(proxy, slotNames: [ ])

like new, but using an existing NodeProxy or Ndef

Inherited class methods

Undocumented class methods

ProxyChain.blendSpec

ProxyChain.blendSpec = value

Instance Methods

.key

the key under which the proxyChain is stored in ProxyChain.all

.sources

an optional dict of local source funcs - these will override source funcs with the same name in ProxyChain.all

.proxy

the proxy inside the chain

methods that get forwarded to proxy

.play(out, numChannels, group, multi: false, vol, fadeTime, addAction)

.playN(outs, amps, ins, vol, fadeTime, group, addAction)

.stop(fadeTime, reset: false)

.end(fadeTime, reset: false)

.set( ... args)

de/activating slots

.add(key, wet, func)

kick in a source by name, with a mix level

Arguments:

key

which function to kick in

wet

wet/dry mix ratio

func

an optional func that can locally replace the global func with that name.

.remove(key)

remove a currently playing source by name.

.setSlots(keys, levels: [ ], update: false)

set (add or remove) multiple slots at once.

configuration & introspection

.slotNames

.slotNames = argSlotNames

get slotNames, change to new slotNames.

NOTE: Changing slotNames only works predictably when all slots are turned off!

.slotsInUse

the names of the currently playing slots.

.activeSlotNames

get the currently active slot names

.getCurr(except)

get the current settings (for the optional slotNames given)

.keysAt(slotName)

get all keys at slotName

.keysValuesAt(slotName)

get all keys and values at slotName

.gui(numItems: 16, buttonList, parent, bounds, isMaster: false)

make a ProxyChainGui for the ProxyChain - see examples.

Inherited instance methods

Undocumented instance methods

.clear

Examples

Replacing a slot and reordering slots: