SCluster:
Filter:
Classes (extension) | SInstruments

SCluster
ExtensionExtension

a cluster sInstrument
Location: NOT INSTALLED!

Description

See file instruments/sCluster.scd for a complete example.

Class Methods

.new

create a new cluster instrument. the server must be running before starting. there are only two channels (stereo)

Arguments:

numVoices

the number of voices for this instrument.

target

if nil then the localhost server's default group will be used.

outbus

where to send the stereo output.

addAction

a Symbol.

args

extra arguments as an Array with key/value pairs.

.type

a Symbol describing the type of sound produced. For example \Pink.

Inherited class methods

Instance Methods

.defName

a Symbol used for the internal SynthDef.

.func

a Function that will be wrapped inside the internal SynthDef.

.release

fade out the sound and free all internal nodes and busses.

Arguments:

releaseTime

fade out time in seconds.

onFreeFunc

a Function to be evaluated after the reverberating sound disappeared.

.xset

cross fade to a new set of voices. will also set parameters for all internal nodes and save them in the arguments dictionary. set the \atk and \rel parameters to define cross fade time (both are 4 by default).

Arguments:

... args

an Array with key/value pairs. can also be a single key/value pair.

.set

set parameters for all internal nodes and save them in the arguments dictionary.

Arguments:

... args

an Array with key/value pairs. can also be a single key/value pair.

.setAmplitudes

convenience method for .set(\amplitudes, ...)

Arguments:

arr

an array of floats (0.0 to 1.0).

.getAmplitudes

read the amplitude control rate bus synchronously.

Returns:

an array of floats (0.0 to 1.0).

.setDistortions

convenience method for .set(\distortions, ...)

Arguments:

arr

an array of floats (0.0 to 1.0).

.getDistortions

read the distortion control rate bus synchronously.

Returns:

an array of floats (0.0 to 1.0).

.setFrequencies

convenience method for .set(\frequencies, ...)

Arguments:

arr

an array of floats in Hz.

.xsetFrequencies

convenience method for .xset(\frequencies, ...)will crossfade.

Arguments:

arr

an array of floats in Hz.

.getFrequencies

read the frequencies control rate bus synchronously.

Returns:

an array of floats in Hz.

Inherited instance methods

Examples