The Conductor is a kind of Dictionary and its components are stored and accessed as dictionary entries (i.e., key/value pairs). This allows the Conductor to be configured either when it is first defined or in separate code.
Create a new Conductor object, containing a NullPreset and a ConductorPlayer instance.
a Conductor
The first argument of the function is set to the Conductor being constructed. Subsequent arguments are initalized as CVs; arguments with default values are set to instances of the class the default value specifies.
Below, the first line defines a Conductor with four CVs assigned to the arguments a,b,c,d. The second line displays that Conductor.
func |
a Function. See explanation above. |
a Conductor
Conductor.specs
is a dictionary of ControlSpecs. When an argument in the make function is initialized to a CV, its identifier is looked up in this dictionary. If that does not provide a ControlSpec, the same identifier stripped of all of its numeric characters is used once again look-up.
The specs dictionary is provided with the following defaults: amp, audiobus, beats, bipolar, boostcut, controlbus, db, dbamp, delay, detune, dur, fadeTime, fin, freq, i_out, in, lofreq, longdelay, midfreq, midi, midinote, midivelocity, out, pan, phase, rate, ratio, rq, unipolar, widefreq
an IdentityDictionary of ControlSpecs
(describe method here)
name |
(describe argument here) |
value |
(describe argument here) |
(describe returnvalue here)
(describe method here)
name |
(describe argument here) |
(describe returnvalue here)
(describe method here)
name |
(describe argument here) |
spec |
(describe argument here) |
(describe returnvalue here)
(describe method here)
(describe returnvalue here)
(describe method here)
(describe returnvalue here)
(describe method here)
(describe returnvalue here)
An instance of ConductorPlayer, which provides unified stop/play/pause/resume control for Patterns, Tasks, and, on the Servers, Synths, Groups, Buses, and Buffers. (These objects use a variant of Server: -sendBundle to guarantee correct order execution on the server.)
An instance of CVPreset or CVInterpolator. This provides preset values for a user specified collection of CVs and Conductor's. The CVInterpolator allows interpolations between presets to be used for values
a CVPreset or CVInterpolator
An array of keys that determine the Conductor's response to value. (Typically includes both individual CVs and the CVPreset or CVInterpolator used by the Conductor.)
Adds an ActionPlayer which responds to play
, stop
, pause
, and resume
by evaluating the corresponding function with the Conductor as currentEnvironment.
playFunc |
define what shall be played the Conductor |
stopFunc | |
pauseFunc | |
resumeFunc |
Adds a TaskPlayer which plays the function within a Task scheduled by the specified Clock and quantization. (On stop, tasks that block on a message port are also be deleted.)
func |
a Function |
clock |
a Clock: e.g. a TempoClock, AppClock or SystemClock instance |
quant |
a Quant object: a SimpleNumber, an Array or (See also: Quant: Automatic instantiation) |
Adds a PatternPlayer which plays the Pattern with the specified event, clock and quantization.
pat |
a Pattern |
clock |
a Clock: e.g. a TempoClock, AppClock or SystemClock instance |
event |
an Event |
quant |
a Quant object: a SimpleNumber, an Array or (See also: Quant: Automatic instantiation) |
Adds a NodeProxyPlayer, which uses the following bus
, numChannels
, and group
if specified, otherwise uses default values. See NodeProxy for details.
nodeProxy | |
args |
an Array denoting the arguments to the NodeProxy |
bus |
a Bus |
numChannels |
an Integer |
group |
a Group |
multi |
a Boolean, indicating whether the NodeProxy shall keep old playback links and add a new one or not |
Control a Synth through a Conductor
ev |
an Event |
cvs |
an Array, denoting the controls used in the Conductor |
CVs assigned to a group affect all of the synths within the group. In the following example the CV only alters playing synths, new synths use the default value:
The argument cvs
is an interleaved array of keys and CVs (or value). CVs can also be altered before being sent to the server and combinations of CVs can determine the value to be sent:
[freq: 440]
[freq: aCV]
[freq: [aCV, aCV.midicps]]
[freq: [[aCV, bCV], aCV.midicps + bCV]]
[freq: [aCV, { aCV.midicps.value + 33.rand }]
The Events use the same keys as note events in patterns. The keys server
, group
, and addAction
and, for Synths, instrument
determine the Group or Synth. As in Patterns, the default values for these keys are:
Usually the node ID of the group or synth is dynamically allocated, but the key id can be set to set the id directly. For group events, a new group or collection of groups is created with the specified id(s). For synth events, no synths are created, but the control values determined by the event are sent to the specified id(s).
ev | |
cvs |
an Array, denoting the controls used in the Conductor |
ev |
an Event, specifiing
| ||||
cvs |
an Array of CVs that are used to determine the value of consecutive Buses |
ev |
an Event, designed primarily for small waveform buffers, specifiing:
|
If called as a getter it returns an Array of the values of all components identified by -valueKeys.
If called as a setter (with a trailing underscore) it iterates over the Array defined in the argument kvs
assigning the value to be the value of the corresponding component identified by valueKeys
kvs |
an Array of key/value pairs. E.g.: |
an Array of key/value pairs
A Conductor can load a set of initial settings for its contents from a file.
No file controls are displayed.
Allow a single set of settings to be saved to file and restored from file.
Stores the pathname of the file that saves the Conductor's settings and attempts to load those settings.
path |
a path to a location on the local harddisk. |
a String containing a path to a location on the local harddisk
A CVPreset saves 'presets' for an array of CVs or other objects that respond to input
and input_
.
The objects at the keys will have their settings saved and restored by preset, which defaults to the object in the preset instance variable.
keys | |
argPreset |
a CVPreset |
Creates a CVPreset, gives it valueKeys as its default presetKeys
A CVInterpolator will set a specified set of CVs to values that derived from interpolating between two presets.
The objects at the keys (which must be a subset of the valueKeys of the preset) can have their settings interpolated between preset values.
keys | |
argPreset |
a CVPreset |
Creates a CVInterpolator, sets valueKeys to be both presetKeys and interpKeys
An example:
Creates a CV inserts it at key in the Conductor and appends it to valueKeys and, if it exists, preset items
name |
a Symbol, denoting the name under which the CV will be added to the Conductor |
val | |
argGui |
a Symbol, denoting the name of the view in which the CVshall appear. The view can be determined by calling Conductor: -gui. |
a CV
This will add a set of controls to enable linking individual CVs to MIDI continuous controllers
argKeys |
The function receives a key number and velocity value and returns an object that responds to release (typically a Synth). If midiChan
is nil
, it responds to MIDI key commands from all channels in "omni" mode. See also: Using MIDI.
noteOnFunction |
a Function, triggered when a key is played. E.g.: |
midiChan |
an Integer, denoting a MIDI channel |
Draw the Conductor within a window named argName at x, y with size w, h.
argName |
a Symbol or a String, denoting the name of the Window to be drawn |
x |
an Integer, denoting the x-position on screen |
y |
an Integer, denoting the y-position on screen |
w |
an Integer, denoting the width of the GUI to be drawn |
h |
an Integer, denoting the height of the GUI to be drawn |
a Window
Draw the Conductor within the specified window.
win |
a Window within which the representation of the Conductor shall be drawn |
name | |
conductor |
the Conductor object |
kv |
(describe argument here) |
(describe returnvalue here)
(describe method here)
argPath |
(describe argument here) |
(describe returnvalue here)
(describe method here)
func |
(describe argument here) |
(describe returnvalue here)
(describe method here)
path |
(describe argument here) |
(describe returnvalue here)
(describe method here)
name |
(describe argument here) |
(describe returnvalue here)
(describe method here)
name |
(describe argument here) |
obj |
(describe argument here) |
guiSpec |
(describe argument here) |
(describe returnvalue here)
(describe method here)
(describe returnvalue here)
(describe method here)
kv |
(describe argument here) |
(describe returnvalue here)
(describe method here)
argPath |
(describe argument here) |
(describe returnvalue here)
(describe method here)
vals |
(describe argument here) |
argPath |
(describe argument here) |
(describe returnvalue here)
(describe method here)
function |
(describe argument here) |
cvs |
(describe argument here) |
ev |
(describe argument here) |
(describe returnvalue here)
(describe method here)
func |
(describe argument here) |
(describe returnvalue here)
(describe method here)
(describe returnvalue here)
(describe method here)
(describe returnvalue here)
(describe method here)
kvs |
(describe argument here) |
(describe returnvalue here)
(describe method here)
name |
(describe argument here) |
func |
(describe argument here) |
(describe returnvalue here)
(describe method here)
key |
(describe argument here) |
(describe returnvalue here)
The basic components of a Conductor are:
By default a Conductor has a single player, but it can be readily configured to have several.
Typically, a Conductor has multiple CV's.
The messages spec_(specName, default)
and sp(default, lo, hi, step, warp)
can be used to set the range of values a CV can assume. CVs may be given a single value or an Array of values as default value. See examples below.