|
| | MPEInstrument () noexcept |
| | MPEInstrument (MPEZoneLayout layout) |
| virtual | ~MPEInstrument () |
| MPEZoneLayout | getZoneLayout () const noexcept |
| void | setZoneLayout (MPEZoneLayout newLayout) |
| bool | isMemberChannel (int midiChannel) const noexcept |
| bool | isMasterChannel (int midiChannel) const noexcept |
| bool | isUsingChannel (int midiChannel) const noexcept |
| void | setPressureTrackingMode (TrackingMode modeToUse) |
| void | setPitchbendTrackingMode (TrackingMode modeToUse) |
| void | setTimbreTrackingMode (TrackingMode modeToUse) |
| virtual void | processNextMidiEvent (const MidiMessage &message) |
| virtual void | noteOn (int midiChannel, int midiNoteNumber, MPEValue midiNoteOnVelocity) |
| virtual void | noteOff (int midiChannel, int midiNoteNumber, MPEValue midiNoteOffVelocity) |
| virtual void | pitchbend (int midiChannel, MPEValue pitchbend) |
| virtual void | pressure (int midiChannel, MPEValue value) |
| virtual void | timbre (int midiChannel, MPEValue value) |
| virtual void | polyAftertouch (int midiChannel, int midiNoteNumber, MPEValue value) |
| virtual void | sustainPedal (int midiChannel, bool isDown) |
| virtual void | sostenutoPedal (int midiChannel, bool isDown) |
| void | releaseAllNotes () |
| int | getNumPlayingNotes () const noexcept |
| MPENote | getNote (int index) const noexcept |
| MPENote | getNote (int midiChannel, int midiNoteNumber) const noexcept |
| MPENote | getNoteWithID (uint16 noteID) const noexcept |
| MPENote | getMostRecentNote (int midiChannel) const noexcept |
| MPENote | getMostRecentNoteOtherThan (MPENote otherThanThisNote) const noexcept |
| void | addListener (Listener *listenerToAdd) |
| void | removeListener (Listener *listenerToRemove) |
| void | enableLegacyMode (int pitchbendRange=2, Range< int > channelRange=Range< int >(1, 17)) |
| bool | isLegacyModeEnabled () const noexcept |
| Range< int > | getLegacyModeChannelRange () const noexcept |
| void | setLegacyModeChannelRange (Range< int > channelRange) |
| int | getLegacyModePitchbendRange () const noexcept |
| void | setLegacyModePitchbendRange (int pitchbendRange) |
|
| void | resetLastReceivedValues () |
| void | updateDimension (int midiChannel, MPEDimension &, MPEValue) |
| void | updateDimensionMaster (bool, MPEDimension &, MPEValue) |
| void | updateDimensionForNote (MPENote &, MPEDimension &, MPEValue) |
| void | callListenersDimensionChanged (const MPENote &, const MPEDimension &) |
| MPEValue | getInitialValueForNewNote (int midiChannel, MPEDimension &) const |
| void | processMidiNoteOnMessage (const MidiMessage &) |
| void | processMidiNoteOffMessage (const MidiMessage &) |
| void | processMidiPitchWheelMessage (const MidiMessage &) |
| void | processMidiChannelPressureMessage (const MidiMessage &) |
| void | processMidiControllerMessage (const MidiMessage &) |
| void | processMidiResetAllControllersMessage (const MidiMessage &) |
| void | processMidiAfterTouchMessage (const MidiMessage &) |
| void | handlePressureMSB (int midiChannel, int value) noexcept |
| void | handlePressureLSB (int midiChannel, int value) noexcept |
| void | handleTimbreMSB (int midiChannel, int value) noexcept |
| void | handleTimbreLSB (int midiChannel, int value) noexcept |
| void | handleSustainOrSostenuto (int midiChannel, bool isDown, bool isSostenuto) |
| const MPENote * | getNotePtr (int midiChannel, int midiNoteNumber) const noexcept |
| MPENote * | getNotePtr (int midiChannel, int midiNoteNumber) noexcept |
| const MPENote * | getNotePtr (int midiChannel, TrackingMode) const noexcept |
| MPENote * | getNotePtr (int midiChannel, TrackingMode) noexcept |
| const MPENote * | getLastNotePlayedPtr (int midiChannel) const noexcept |
| MPENote * | getLastNotePlayedPtr (int midiChannel) noexcept |
| const MPENote * | getHighestNotePtr (int midiChannel) const noexcept |
| MPENote * | getHighestNotePtr (int midiChannel) noexcept |
| const MPENote * | getLowestNotePtr (int midiChannel) const noexcept |
| MPENote * | getLowestNotePtr (int midiChannel) noexcept |
| void | updateNoteTotalPitchbend (MPENote &) |
This class represents an instrument handling MPE.
It has an MPE zone layout and maintains a state of currently active (playing) notes and the values of their dimensions of expression.
You can trigger and modulate notes:
- by passing MIDI messages with the method processNextMidiEvent;
- by directly calling the methods noteOn, noteOff etc.
The class implements the channel and note management logic specified in MPE. If you pass it a message, it will know what notes on what channels (if any) should be affected by that message.
The class has a Listener class that can be used to react to note and state changes and trigger some functionality for your application. For example, you can use this class to write an MPE visualiser.
If you want to write a real-time audio synth with MPE functionality, you should instead use the classes MPESynthesiserBase, which adds the ability to render audio and to manage voices.
- See also
- MPENote, MPEZoneLayout, MPESynthesiser
@tags{Audio}
| void juce::MPEInstrument::enableLegacyMode |
( |
int | pitchbendRange = 2, |
|
|
Range< int > | channelRange = Range<int> (1, 17) ) |
Puts the instrument into legacy mode. If legacy mode is already enabled this method does nothing.
As a side effect, this will discard all currently playing notes, and call noteReleased for all of them.
This special zone layout mode is for backwards compatibility with non-MPE MIDI devices. In this mode, the instrument will ignore the current MPE zone layout. It will instead take a range of MIDI channels (default: all channels 1-16) and treat them as note channels, with no master channel. MIDI channels outside of this range will be ignored.
- Parameters
-
| pitchbendRange | The note pitchbend range in semitones to use when in legacy mode. Must be between 0 and 96, otherwise behaviour is undefined. The default pitchbend range in legacy mode is +/- 2 semitones. |
| channelRange | The range of MIDI channels to use for notes when in legacy mode. The default is to use all MIDI channels (1-16). |
To get out of legacy mode, set a new MPE zone layout using setZoneLayout.