Loading...
Searching...
No Matches
juce::MidiKeyboardState::Listener Class Referenceabstract

## Detailed Description

Receives events from a MidiKeyboardState object.

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

- juce_audio_basics/midi/juce_MidiKeyboardState.h

Inheritance diagram for juce::MidiKeyboardState::Listener:

## Public Member Functions

virtual | ~Listener ()=default
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, float velocity)=0
| Called when one of the MidiKeyboardState's keys is released.

## Constructors and Destructors

## ~Listener()

virtual juce::MidiKeyboardState::Listener::~Listener | ( |  | ) |

virtual default

## Member Functions

## handleNoteOn()

virtual void juce::MidiKeyboardState::Listener::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 juce::MidiMessageCollector.

References juce::MidiKeyboardState::MidiKeyboardState().

## handleNoteOff()

virtual void juce::MidiKeyboardState::Listener::handleNoteOff | ( | MidiKeyboardState * | source,
|  | int | midiChannel,
|  | int | midiNoteNumber,
|  | float | velocity )

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 juce::MidiMessageCollector.

References juce::MidiKeyboardState::MidiKeyboardState().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited