JUCE
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions
MidiKeyboardStateListener Class Reference

Receives events from a MidiKeyboardState object. More...

Inherited by MidiKeyboardComponent, and MidiMessageCollector.

List of all members.

Public Member Functions

 MidiKeyboardStateListener () noexcept
virtual ~MidiKeyboardStateListener ()
virtual void handleNoteOn (MidiKeyboardState *source, int midiChannel, int midiNoteNumber, float velocity)=0
 Called when one of the MidiKeyboardState's keys is pressed.
virtual void handleNoteOff (MidiKeyboardState *source, int midiChannel, int midiNoteNumber)=0
 Called when one of the MidiKeyboardState's keys is released.

Detailed Description

Receives events from a MidiKeyboardState object.

See also:
MidiKeyboardState

Constructor & Destructor Documentation


Member Function Documentation

virtual void MidiKeyboardStateListener::handleNoteOn ( MidiKeyboardState source,
int  midiChannel,
int  midiNoteNumber,
float  velocity 
) [pure virtual]

Called when one of the MidiKeyboardState's keys is pressed.

This will be called synchronously when the state is either processing a buffer in its MidiKeyboardState::processNextMidiBuffer() method, or when a note is being played with its MidiKeyboardState::noteOn() method.

Note that this callback could happen from an audio callback thread, so be careful not to block, and avoid any UI activity in the callback.

Implemented in MidiKeyboardComponent, and MidiMessageCollector.

virtual void MidiKeyboardStateListener::handleNoteOff ( MidiKeyboardState source,
int  midiChannel,
int  midiNoteNumber 
) [pure virtual]

Called when one of the MidiKeyboardState's keys is released.

This will be called synchronously when the state is either processing a buffer in its MidiKeyboardState::processNextMidiBuffer() method, or when a note is being played with its MidiKeyboardState::noteOff() method.

Note that this callback could happen from an audio callback thread, so be careful not to block, and avoid any UI activity in the callback.

Implemented in MidiKeyboardComponent, and MidiMessageCollector.


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