97 bool isMemberChannel (
int midiChannel) noexcept;
104 bool isMasterChannel (
int midiChannel)
const noexcept;
138 virtual void processNextMidiEvent (
const MidiMessage& message);
147 virtual void noteOn (
int midiChannel,
int midiNoteNumber,
MPEValue midiNoteOnVelocity);
155 virtual void noteOff (
int midiChannel,
int midiNoteNumber,
MPEValue midiNoteOffVelocity);
165 virtual void pitchbend (
int midiChannel,
MPEValue pitchbend);
173 virtual void pressure (
int midiChannel,
MPEValue value);
182 virtual void timbre (
int midiChannel,
MPEValue value);
189 virtual void sustainPedal (
int midiChannel,
bool isDown);
196 virtual void sostenutoPedal (
int midiChannel,
bool isDown);
202 void releaseAllNotes();
206 int getNumPlayingNotes() const noexcept;
213 MPENote getNote (
int index) const noexcept;
219 MPENote getNote (
int midiChannel,
int midiNoteNumber) const noexcept;
226 MPENote getMostRecentNote (
int midiChannel) const noexcept;
233 MPENote getMostRecentNoteOtherThan (
MPENote otherThanThisNote) const noexcept;
248 virtual ~Listener() =
default;
253 virtual void noteAdded (
MPENote newNote) = 0;
258 virtual void notePressureChanged (
MPENote changedNote) = 0;
267 virtual void notePitchbendChanged (
MPENote changedNote) = 0;
272 virtual void noteTimbreChanged (
MPENote changedNote) = 0;
281 virtual void noteKeyStateChanged (
MPENote changedNote) = 0;
288 virtual void noteReleased (
MPENote finishedNote) = 0;
293 void addListener (
Listener* listenerToAdd);
296 void removeListener (
Listener* listenerToRemove);
318 void enableLegacyMode (
int pitchbendRange = 2,
322 bool isLegacyModeEnabled()
const noexcept;
325 Range<int> getLegacyModeChannelRange()
const noexcept;
328 void setLegacyModeChannelRange (
Range<int> channelRange);
331 int getLegacyModePitchbendRange()
const noexcept;
334 void setLegacyModePitchbendRange (
int pitchbendRange);
346 uint8 lastPressureLowerBitReceivedOnChannel[16];
347 uint8 lastTimbreLowerBitReceivedOnChannel[16];
348 bool isMemberChannelSustained[16];
360 MPEValue lastValueReceivedOnChannel[16];
365 LegacyMode legacyMode;
366 MPEDimension pitchbendDimension, pressureDimension, timbreDimension;
368 void updateDimension (
int midiChannel, MPEDimension&,
MPEValue);
369 void updateDimensionMaster (
bool, MPEDimension&,
MPEValue);
371 void callListenersDimensionChanged (
const MPENote&,
const MPEDimension&);
372 MPEValue getInitialValueForNewNote (
int midiChannel, MPEDimension&)
const;
374 void processMidiNoteOnMessage (
const MidiMessage&);
375 void processMidiNoteOffMessage (
const MidiMessage&);
376 void processMidiPitchWheelMessage (
const MidiMessage&);
377 void processMidiChannelPressureMessage (
const MidiMessage&);
378 void processMidiControllerMessage (
const MidiMessage&);
379 void processMidiResetAllControllersMessage (
const MidiMessage&);
380 void handlePressureMSB (
int midiChannel,
int value) noexcept;
381 void handlePressureLSB (
int midiChannel,
int value) noexcept;
382 void handleTimbreMSB (
int midiChannel,
int value) noexcept;
383 void handleTimbreLSB (
int midiChannel,
int value) noexcept;
384 void handleSustainOrSostenuto (
int midiChannel,
bool isDown,
bool isSostenuto);
386 const MPENote* getNotePtr (
int midiChannel,
int midiNoteNumber)
const noexcept;
387 MPENote* getNotePtr (
int midiChannel,
int midiNoteNumber) noexcept;
390 const MPENote* getLastNotePlayedPtr (
int midiChannel)
const noexcept;
391 MPENote* getLastNotePlayedPtr (
int midiChannel) noexcept;
392 const MPENote* getHighestNotePtr (
int midiChannel)
const noexcept;
393 MPENote* getHighestNotePtr (
int midiChannel) noexcept;
394 const MPENote* getLowestNotePtr (
int midiChannel)
const noexcept;
395 MPENote* getLowestNotePtr (
int midiChannel) noexcept;
396 void updateNoteTotalPitchbend (
MPENote&);
#define JUCE_API
This macro is added to all JUCE public class declarations.
This class represents the current MPE zone layout of a device capable of handling MPE...
Encapsulates a MIDI message.
The highest note (by initialNote) on the channel with the note key still down.
The most recent note on the channel that is still played (key down and/or sustained).
Derive from this class to be informed about any changes in the expressive MIDI notes played by this i...
Holds a set of objects and can invoke a member function callback on each object in the set with a sin...
TrackingMode
The MPE note tracking mode.
The lowest note (by initialNote) on the channel with the note key still down.
Holds a resizable array of primitive or copy-by-value objects.
This struct represents a playing MPE note.
This class represents an instrument handling MPE.
This class represents a single value for any of the MPE dimensions of control.