AbstractMIDISocket:
Filter:
ddwMIDI/Classes (extension) | External Control > MIDI

AbstractMIDISocket
ExtensionExtension

Abstract superclass of all ddwMIDI sockets

Description

This class implements behavior that is common to all MIDI sockets. You will not use this class directly in normal cases.

If you need to define a custom socket, inherit from this class.

Class Methods

.new

Creates an instance of the socket subclass being invoked. Arguments are generic, and are forwarded to the subclass's init method.

Arguments:

chan

The messages' source. See ddwMIDI_Guide: Identifying MIDI channels.

destination

In general, sockets target another object: a VoicerMIDISocket addresses messages to a Voicer. This target object is the destination.

... args

Additional arguments are up to the subclass.

Returns:

The socket instance.

Instance Methods

.free

Remove the socket completely from the ddwMIDI hierarchy.

.destination

Returns:

The socket's target object.

.parent

Returns:

The socket's parent MIDIChannel object. From this, you can get information about the device and channel from which the socket is receiving messages.

.enable

Move the socket to the parent MIDIChannel's list of enabled sockets. The socket will then respond to incoming messages.

.disable

Move the socket to the parent MIDIChannel's list of disabled sockets. The socket will not respond to incoming messages, but it remains intact so that you can reenable it at any time.

.clear

Subclasses may implement clear to keep the socket registered in the hierarchy, but become inactive.

.init

Subclasses should implement init for their specific requirements. Users should not call init directly.