ConductorPlayer:
Filter:
Conductor/Classes (extension) | Control

ConductorPlayer
ExtensionExtension

Add play/pause/stop/resume functionality to Conductor

Description

ConductorPlayer provides unified control for any collection of 'players', which are objects that respond to stop/play/pause/resume. The player classes listed above (ActionPlayer, PatternPlayer, TaskPlayer, and NodeProxyPlayer) adapt standard classes to this interface.

Groups, Synths, Control Buses, and Buffers can be controlled with Events.

The instance variable server can contain either a single Server or an array of Servers. ConductorPlayer bundles all of the OSC commands generated in response to stop/play/pause/resume for the servers in that variable.

Instance Methods

Instance Variables

.conductor

Returns:

the Conductor that is the context for its players

.name

Discussion:

the name is used in GUI display

.server

Discussion:

A server or array of servers, all of the OSC commands generated in response to stop/play/pause/resume are bundled for the server(s).

.players

Returns:

the players controlled by the ConductorPlayer

Instance Methods

.play

.stop

.pause

.resume

.add

A player is an object that respods to stop, play, pause, resume

.remove

.action

Adds an ActionPlayer which responds to play, stop, pause, and resume by evaluating the corresponding function with the Conductor as currentEnvironment.

.task

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.)

.pattern

Adds a PatternPlayer which plays the pattern with the specified event, clock and quantization.

.nodeProxy

Adds a NodeProxy, which uses the following bus, numChannels, and group if specified, otherwise uses default values. See BusPlug

.group

The event is assigned CVEvent-groupEvent as its parent.

Arguments:

ev

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).

cvs

The argument args 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:

value[freq: 440 ]
CV[freq: aCV ]
altered CV[freq: [ aCV, aCV.midicps ] ]
combination[freq: [ [aCV, bCV], aCV.midicps + bCV] ]
function[freq: [ aCV, { aCV.midicps.value + 33.rand }] ]

.synth

The event is assigned CVEvent-synthEvent as its parent.

.controlBus

Arguments:

ev

The event can specify

cvs

CVs is an array of CVs that are used to determine the value of consecutive buses

.buffer

Arguments:

ev

This event is designed primarily for small waveform buffers, it specifies:

serveraServer (defaults to Server.default)
cva CV that determines the values in the buffer
msgA symbol that determines how the values are used to fill the buffer. Is is one of: \sine1, \cheby, \wave, or \signal.
displayanotherCV An optional CV used to display the contents of the buffer (as received from the server)
sizeinteger (defaults to 512 and should not exceed 1024).

.makeBundles

This is called by play,stop, pause and resume to bundle all of OSC commands sent to any of the Servers listed in the instance variable server.

.draw

Draws the ConductorPlayer in a ConductorGUI.