MIDIClient:
Filter:
Classes | External Control > MIDI

MIDIClient : Object

Basic access to MIDI on your computer
Source: MIDIOut.sc

Description

MIDIClient is the core class that provides access to the MIDI subsystem on your computer.

See the Using MIDI helpfile for practical considerations and techniques for using MIDI in SC.

Class Methods

MIDIClient.init(inports, outports, verbose: true)

Initializes the MIDIClient, checks which available MIDI sources and destinations there are, and opens as many connections as desired.

Arguments:

inports

the number of MIDI input connections to open; if nil then opens as many inports as there are MIDI sources.

outports

the number of MIDI output connections to open; if nil then opens as many outports as there are MIDI destinations.

verbose

A flag whether or not to post the MIDI sources and destinations that were found. Default is true.

MIDIClient.initialized

A flag that tells whether of not the MIDIClient has been initialized.

MIDIClient.disposeClient

Cleans up the MIDIClient. After using this method, you will have to reinitialize the MIDIClient before you can use MIDI again.

MIDIClient.list

Created the list of available sources and destinations.

MIDIClient.sources

The list of available MIDI sources, including SuperCollider's own sources.

Returns:

A List of MIDIEndPoints

MIDIClient.externalSources

From extension in /usr/local/share/SuperCollider/SCClassLibrary/Platform/linux/SystemOverwrites/extMIDIOut.sc

The list of available MIDI sources, excluding SuperCollider's own sources. Only on Linux the list of sources and externalSources differs.

Returns:

A List of MIDIEndPoints

MIDIClient.destinations

The list of available MIDI destinations, including SuperCollider's own destinations.

Returns:

A List of MIDIEndPoints

MIDIClient.externalDestinations

From extension in /usr/local/share/SuperCollider/SCClassLibrary/Platform/linux/SystemOverwrites/extMIDIOut.sc

The list of available MIDI destinations, excluding SuperCollider's own destinations. Only on Linux the list of destinations and externalDestinations differs.

Returns:

A List of MIDIEndPoints

MIDIClient.restart

Restart the MIDIClient.

MIDIClient.myinports

The number of input ports that SuperCollider created. This is mainly useful to know on the Linux platform.

MIDIClient.myoutports

The number of output ports that SuperCollider created. This is mainly useful to know on the Linux platform.

MIDIClient.getClientID

From extension in /usr/local/share/SuperCollider/SCClassLibrary/Platform/linux/SystemOverwrites/extMIDIOut.sc

Linux only. This gets the client ID by which the MIDIClient is defined in the ALSA subsystem. It can be used to identify whether a port is belonging to this client or another one.

On non-linux systems, it posts a warning and returns nil.

Inherited class methods

Instance Methods

Inherited instance methods

Examples