OpenShot Audio Library | OpenShotAudio: juce::MidiInputCallback Class Reference

OpenShot Audio Library | OpenShotAudio 0.6.0

Loading...
Searching...
No Matches
juce::MidiInputCallback Class Referenceabstract

`#include <juce_MidiDevices.h>`

Inheritance diagram for juce::MidiInputCallback:

## Public Member Functions
virtual | ~MidiInputCallback ()=default
virtual void | handleIncomingMidiMessage (MidiInput *source, const MidiMessage &message)=0
virtual void | handlePartialSysexMessage (MidiInput *source, const uint8 *messageData, int numBytesSoFar, double timestamp)

## 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

Definition at line 276 of file juce_MidiDevices.h.

## Constructor & Destructor Documentation

## ◆ ~MidiInputCallback()

virtual juce::MidiInputCallback::~MidiInputCallback | ( |  | ) |
| virtualdefault

Destructor.

## Member Function Documentation

## ◆ handleIncomingMidiMessage()

virtual void juce::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

  source | the MidiInput object that generated the message
  message | the 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 juce::MidiMessageCollector.

## ◆ handlePartialSysexMessage()

void juce::MidiInputCallback::handlePartialSysexMessage | ( | MidiInput * | source,
|  | const uint8 * | messageData,
|  | int | numBytesSoFar,
|  | 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.

Definition at line 101 of file juce_MidiDevices.cpp.

Referenced by handleIncomingMidiMessage().

The documentation for this class was generated from the following files:

- juce_MidiDevices.h
- juce_MidiDevices.cpp