ZZZDevice:
Filter:
ZZZ/Classes (extension) | External Control > Eurorack

ZZZDevice
ExtensionExtension

Interface Expert Sleepers devices

Description

This class provides an interface to Expert Sleepers' Eurorack modules. It offers convenience methods to create clocks and gates on the device's outputs, based on (shared) TempoBusClocks.

NOTE: ZZZDevice assumes that the (ADAT) channels used to interface with the Eurorack module are set to 0.0dB at +4dBu.

Class Methods

.new

Creates an instance of ZZZDevice on a Server using an Array of output bus channels (within the range of ServerOptions: -numOutputBusChannels). Throws ZZZError if the parameters ar not set or invalid.

Arguments:

channels

An Array of Integers, that represent output bus channels indeces (within the range of ServerOptions: -numOutputBusChannels) on the Server instance.

server

The Server instance to use.

Returns:

An instance of ZZZDevice interfacing the given hardware device.

.playTypes

Return the understood playTypes that can be used. A playType relates to how scheduling takes place on a given TempoBusClock when adding or changing clocks on an output:

Returns:

An Array of Symbols representing the understood playTypes.

.clockTypes

Return the understood types of clocks that can be used:

Returns:

An Array of Symbols representing the understood clockTypes.

Instance Methods

Initialization

.init

Initializes the Dictionaries required for -clocks, -gates, -gateBusses, -outs, -tempos and -tempoBusses, as well as populates the -outs Dictionary and initializes -deviceGroup when the Server is booted.

NOTE: This method is called when creating a new instance of ZZZDevice using *new.

Adding and Removing

.addTempo

Adds a TempoBusClock to the -tempos Dictionary. Throws ZZZError on invalid input.

Arguments:

slot

An Integer (>=1) identifying the slot to use for the TempoBusClock.

tempo

A Float (>=0.0) setting the tempo.

.removeTempo

Removes a TempoBusClock from the -tempos Dictionary and any clock relying on it.

Arguments:

slot

An Integer (>=1) identifying the TempoBusClock in the -tempos Dictionary.

playType

A Symbol describing the playType to use (see *playTypes for the valid types and explanation).

quant

An Integer setting the quant (the beat) on which to schedule removal of the tempo and clock Synth(s). Only regarded if playType is set to \beat.

.addClock

Adds a clock Synth on a hardware output. Throws ZZZError on invalid input.

NOTE: Requires a tempo to be setup beforehand (see -addTempo).

Arguments:

output

An Integer (>=1) identifying the output on a hardware device.

slot

An Integer (>=1) identifying the tempo slot to use for the clock (see -addTempo on how to add a tempo).

type

A Symbol describing the clock type to use (see *clockTypes for the valid types and explanation).

playType

A Symbol describing the playType to use (see *playTypes for the valid types and explanation).

quant

An Integer setting the quant (the beat) on which to schedule playing the clock Synth. Only regarded if playType is set to \beat.

replace

A Boolean indicating whether to replace clock currently playing at output.

.removeClock

Removes a clock Synth playing on a hardware output. Throws ZZZError on invalid input.

Arguments:

output

An Integer (>=1) identifying the output on a hardware device.

playType

A Symbol describing the playType to use (see *playTypes for the valid types and explanation).

quant

An Integer setting the quant (the beat) on which to schedule removal of the clock Synth. Only regarded if playType is set to \beat.

.addGate

Adds a gate Synth on a hardware output. Throws ZZZError on invalid input. The gate's multiplication value can be controlled using the respective Bus exposed in -gateBusses.

Arguments:

output

An Integer (>=1) identifying the output on a hardware device.

input

A Float (>=0.0, <=1.0) setting the initial multiplication value.

.removeGate

Removes a gate Synth from a hardware output. Throws ZZZError on invalid input.

Arguments:

output

An Integer (>=1) identifying the output on ahardware device.

Setting Data

.setClockTempo

Sets the TempoBusClock used for a given clock on an output of an Expert Sleepers device. Throws ZZZError on invalid input.

Arguments:

output

An Integer (>=1) identifying the output on ahardware device.

slot

An Integer (>=1) identifying the TempoBusClock in the -tempos Dictionary.

playType

A Symbol describing the playType to use (see *playTypes for the valid types and explanation).

quant

An Integer setting the quant (the beat) on which to schedule playing the clock Synth. Only regarded if playType is set to \beat.

type

A Symbol describing the clock type to use (see *clockTypes for the valid types and explanation).

.setTempo

Sets the tempo of a TempoBusClock (see -addTempo on how to add a tempo).

NOTE: It may prove more pragmatic to write to the tempo's respective Bus in -tempoBusses.

Arguments:

slot

An Integer (>=1) identifying the TempoBusClock in the -tempos Dictionary.

tempo

A Float (>=0.0) setting the tempo.

Accessing Data

.clocks

Returns a Dictionary of hardware output numbers and their respective clock Synths (see -addClock on how to add a clock).

Returns:

A Dictionary of Integer and Synth associations.

.deviceGroup

Returns the Group instance to which all Synths are added. This variable is setup during -init.

Returns:

A Group.

.gateBusses

Returns a Dictionary of hardware outputs and their respective Busses connected to the gate Synths (see -addGate on how to setup a gate).

Returns:

A Dictionary of Integer and Bus associations.

.gates

Returns a Dictionary of hardware output numbers and their respective gate Synths (see -addGate on how to add a gate).

Returns:

A Dictionary of Integer and Synth associations.

.outs

Returns a Dictionary representing the mapping between the outputs on the hardware (the numbering starts at 1) and the Server's output bus channels (within the range of ServerOptions: -numOutputBusChannels) connected to the hardware.

Returns:

A Dictionary of Integer associations.

.outputOnHardware

Returns the output bus channel (an Integer within the range of ServerOptions: -numOutputBusChannels) mapped to a given hardware output number. Throws ZZZError if the output parameter is invalid.

Arguments:

output

An Integer (>=1) identifying the output on a hardware device.

Returns:

An Integer representing an output bus channel.

.tempoBusses

Returns a Dictionary of slots (starting from 1) and their respective Busses, which are connected to TempoBusClocks and clock Synths.

Returns:

A Dictionary of Integer and Bus associations.

.tempos

Returns a Dictionary of the currently available tempos (see -addTempo on how to setup a tempo).

Returns:

A Dictionary of slots (Integer) and TempoBusClock associations.

Posting Information

.postAll

Convenience wrapper around -postClocks, -postGates, -postOuts and -postTempos.

.postClocks

Posts information about the currently running clocks.

.postGates

Posts information about the currently running gate Synth(s).

.postOuts

Posts information about the mapping of hardware outputs to Server output bus channels.

.postTempos

Posts information about the currently running TempoBusClocks.

Examples