Public Member Functions

MidiInputCallback Class Reference

Receives incoming messages from a physical MIDI input device. More...

Inherited by AudioDeviceManager::CallbackHandler, AudioProcessorPlayer, and MidiMessageCollector.

List of all members.

Public Member Functions

virtual ~MidiInputCallback ()
 Destructor.
virtual void handleIncomingMidiMessage (MidiInput *source, const MidiMessage &message)=0
 Receives an incoming message.
virtual void handlePartialSysexMessage (MidiInput *source, const uint8 *messageData, const int numBytesSoFar, const double timestamp)
 Notification sent each time a packet of a multi-packet sysex message arrives.

Detailed Description

Receives incoming messages from a physical MIDI input device.

This class is overridden to handle incoming midi messages. See the MidiInput class for more details.

See also:
MidiInput

Constructor & Destructor Documentation

virtual MidiInputCallback::~MidiInputCallback (  ) [virtual]

Destructor.


Member Function Documentation

virtual void MidiInputCallback::handleIncomingMidiMessage ( MidiInput source,
const MidiMessage message 
) [pure virtual]

Receives an incoming message.

A MidiInput object will call this method when a midi event arrives. It'll be called on a high-priority system thread, so avoid doing anything time-consuming in here, and avoid making any UI calls. You might find the MidiBuffer class helpful for queueing incoming messages for use later.

Parameters:
sourcethe MidiInput object that generated the message
messagethe incoming message. The message's timestamp is set to a value equivalent to (Time::getMillisecondCounter() / 1000.0) to specify the time when the message arrived.

Implemented in MidiMessageCollector, and AudioProcessorPlayer.

Referenced by MidiDataConcatenator::pushMidiData().

virtual void MidiInputCallback::handlePartialSysexMessage ( MidiInput source,
const uint8 messageData,
const int  numBytesSoFar,
const double  timestamp 
) [virtual]

Notification sent each time a packet of a multi-packet sysex message arrives.

If a long sysex message is broken up into multiple packets, this callback is made for each packet that arrives until the message is finished, at which point the normal handleIncomingMidiMessage() callback will be made with the entire message.

The message passed in will contain the start of a sysex, but won't be finished with the terminating 0xf7 byte.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines