A Patch is a player that plays an Instr.
An Instr (Instrument) is a named function.
A Patch specifies an Instr and the inputs that will be passed to the Instr function.
Note that an Instr can also be connected with other things using Mx and SynthDefs can be made from Instr in other ways than using Patch.
Patch can also express arguments using argName:value dicts:
name |
The Instr can be specified as: an Instr name a direct function that will be used to create an Instr in place or directly pass an Instr object |
inputs |
an array of arguments for the Instr function. Can also be a dictionary: (argName: value, ... ) |
outClass |
default is Out.ar You could supply ReplaceOut to do effect processing on a Bus |
newInstr |
inputs |
array or dict |
The Patch is a dependant of the Instr. When the Instr is redefined (you edit the func def and evaluate the Instr code, it saves it to the Library) it will call .changed on itself and the Patch can be set to automatically respawn iself.
if nil (default) then it will not
if a number then it is an atTime specifier: 1 means respawn on the next bar, 4 means on the next beat. 0.1 would respawn in 0.1 seconds after change.
private the children are the inputs to the Patch. the stepChildren are hidden objects like ClientOnTrigResponder or TempoBus
index | |
newArg |
index | |
value |
call .rand on all inputs that support .rand; specifically NumberEditors will do a gaussian distribution randomization centered on the default value of the ControlSpec.
standardDeviation |
for the gaussian randomization in NumberEditors. default 0.15 |
this
overides unmatched method selectors to return the inputs by name. eg aPatch.freq will return a KrNumberEditor
selector | |
... dnuargs |
i |
i |
argName |
argName |
name |
argargs |
atTime |
see atTime |
changed | |
what |
bundle |
bundle |
private
bundle |
value the Instr as a function returning the result
... overideArgs |
array or dict of args that should overide any of the Patch's inputs. |
overideArgs |
returns an Event that encapsulates the current state of the Patch. this can be spawned with .play or further manipulated
event |
s |
stream |
Patch inside a patch