GlobalControlMIDIOut:
Filter:
ddwCommon/Classes (extension) | ddwCommon

GlobalControlMIDIOut
ExtensionExtension

Forward GlobalControl values to MIDI CCs

Description

GlobalControlMIDIOut "hangs" off of a GenericGlobalControl, VoicerGlobalControl or MixerControl, forwarding value changes to a MIDIOut, channel number and continuous controller number.

Values will be unmapped according to the global control's spec (that is, normalized to 0.0-1.0), and then mapped onto MIDI's 0-127 range. If the global control is visible in a GUI, the MIDI output value will correspond to the displayed slider position.

Note that this applies to all value changes, including those coming from automation that is being watched.

Class Methods

.new

Creates an instance, and attaches it as a dependent to the given model.

A shortcut is to call .connectMIDIOut(midiout, midichannel, ccnum) on the global control object: for instance, aVoicer.mapGlobal(\name, nil, value, spec).connectMIDIOut(midiout, midichannel, ccnum).

Arguments:

model

The global control instance whose values should be followed.

midiout

A MIDIOut object.

midichannel

An integer, 0-15, for the MIDI channel number.

ccnum

An integer, 0-127, for the controller number.

Returns:

The instance.

Instance Methods

.free

Disconnect from MIDI and stop transmitting. This is called automatically if the 'model' global control is freed (i.e., automatic garbage collection).