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

ProxyChain
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

.allSources

a dict of all available synth and filter functions

.all

a dict of all ProxyChain instances.

.add

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

.add3

add a named synth func with level and specs

.addSource

add a source func at srcName

.addLevel

add a default level for the func at srcName

.addSpecs

add specs for the func at srcName

.sourceDicts

access the dict which contains all sourceDicts

.atSrcDict

get the srcDict at given srcName

.checkDicts

check all sourceDicts for integrity

.checkSourceDictAt

check the sourceDict at srcName

.new

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.

.from

like new, but using an existing NodeProxy or Ndef

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

.playN

.stop

.end

.set

de/activating slots

.add

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

remove a currently playing source by name.

.setSlots

set (add or remove) multiple slots at once.

configuration & introspection

.slotNames

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

get the current settings (for the optional slotNames given)

.keysAt

get all keys at slotName

.keysValuesAt

get all keys and values at slotName

.gui

make a ProxyChainGui for the ProxyChain - see examples.

Examples

Replacing a slot and reordering slots: