A structure for controlling modular processes, with the capabilitiy to record its output in real-time.
ProcModR will update the state of another object in a model-view-controller paradigm (see SimpleController). Currently implemented messages are \isRunning
and \amp
. See ProcEvents: Model-view-controller examples.
env |
An overall amplitude envelope that synths created and sent to the ProcModRs internal routing bus will be shaped by. There is a max of 20 breakpoints to the env. If the Env has a releaseNode, ProcModR will continue to process events until .release is called. |
amp |
An overall amplitude control for an instance of ProcMod. |
numChannels |
The number of channels of output events in this function will contain. |
procout |
Where the sound from this ProcModR should be routed to. |
id |
A \symbol or "string" to be used later to identify an instance of ProcMod. |
group |
A group for an instance of ProcMod to run in. Defaults to nil and a new group is created. If ProcMod creates the group, a new one is created on each .play call. |
addAction |
An addAction for this instance of ProcMod. Defaults to 0. |
target |
A target for this instance of ProcMod. Defaults to 1. |
function |
A Function, Task or Routine to be evaluated on the playing of this instance of ProcMod. If a Function is passed in that returns a Task or Routine, the ProcMod will become 're-triggerable' and will allow for overlapping getures (it can be released and restarted immediately). All Functions, when evaluated, will have the current group id and envbus passed in as an argument. |
releaseFunc |
A Function, Task or Routine to be evaluated after the ProcMod has finished its release. |
onReleaseFunc |
A Function, Task or Routine to be evaluated at release time. |
responder |
An instance of OSCresponder or OSCresponderNode for use by this instance of ProcMod. It is automatically added when the ProcMod starts, and released after the ProcMod finishes its release. |
timeScale |
Applies a scale function to the ProcMod envelope. Defaults to 1. |
lag |
Applies to chages to the amp value passed into this instance of ProcMod. |
clock |
An intance of Clock to run this instance of ProcMod. Defaults to SystemClock. |
server |
An instance of Server to run this ProcMod on. Useful for remote servers. Defaults to Server.default. |
recpath |
env | |
amp | |
numChannels | |
procout | |
id | |
group | |
addAction | |
target | |
function | |
releaseFunc | |
onReleaseFunc | |
responder | |
timeScale | |
lag | |
clock | |
server |
argNumChannels | |
argProcout |
oldproc | |
oldresp | |
oldgroup | |
oldrelfunc | |
oldclock | |
oldhdr | |
oldroute | |
oldccctrl | |
oldAmpDef |
argClock | |
argServer | |
argEnv | |
argNumChannels | |
argProcout |
Evaluates this instance of ProcMod. ProcMod.function is evaluated, and ProcMod.responder is set up if they are declared.
recpath | |
timestamp | |
argHeaderFormat | |
argSampleFormat |
Releases an instance of ProcMod. If ProcMod.env has a release section, functions and OSCresponders wait until this has executed before releasing the ProcMods functionality.
reltime |
Immediately free the ProcMod, regardless of ProcMod.env.
num |
path |
newbus |
Re-triggerable ProcModRs
ProcModRs are meant for the most part, to be played and released. However, if the function slot is passed a Function object, they can be re-triggered after they have been released. If the Function returns a Task or Routine, the ProcMod will function as though a Task or Routine were placed in the function slot (it will be started and released in the same way). Re-triggered events will be assigned a new group and envbus, so these are made available to the Function through arguments. If an OSCresponderNode or releaseFunc are needed for each re-triggered event, they should be assigned inside the Function:
Recording the output of ProcModRs
ProcModRs can record their output (anything that is sent to its private routebus) out to a file with the recordPM method. You just supply a basepath, and other timestamp info is added to it:
ProcModR and ProcEvents
ProcModRs is interchangable with ProcMod. The main difference is you can give the .record method to ProcEvents, with a path, and it will use that base path to record every ProcModR out to it's own, timestamped file.