JUCE
Public Member Functions | List of all members
MidiRPNDetector Class Reference

Parses a stream of MIDI data to assemble RPN and NRPN messages from their constituent MIDI CC messages. More...

Public Member Functions

 MidiRPNDetector () noexcept
 Constructor. More...
 
 ~MidiRPNDetector () noexcept
 Destructor. More...
 
void reset () noexcept
 Resets the RPN detector's internal state, so that it forgets about previously received MIDI CC messages. More...
 
bool parseControllerMessage (int midiChannel, int controllerNumber, int controllerValue, MidiRPNMessage &result) noexcept
 Takes the next in a stream of incoming MIDI CC messages and returns true if it forms the last of a sequence that makes an RPN or NPRN. More...
 

Detailed Description

Parses a stream of MIDI data to assemble RPN and NRPN messages from their constituent MIDI CC messages.

The detector uses the following parsing rules: the parameter number LSB/MSB can be sent/received in either order and must both come before the parameter value; for the parameter value, LSB always has to be sent/received before the value MSB, otherwise it will be treated as 7-bit (MSB only).

Constructor & Destructor Documentation

◆ MidiRPNDetector()

MidiRPNDetector::MidiRPNDetector ( )
noexcept

Constructor.

◆ ~MidiRPNDetector()

MidiRPNDetector::~MidiRPNDetector ( )
noexcept

Destructor.

Member Function Documentation

◆ reset()

void MidiRPNDetector::reset ( )
noexcept

Resets the RPN detector's internal state, so that it forgets about previously received MIDI CC messages.

◆ parseControllerMessage()

bool MidiRPNDetector::parseControllerMessage ( int  midiChannel,
int  controllerNumber,
int  controllerValue,
MidiRPNMessage result 
)
noexcept

Takes the next in a stream of incoming MIDI CC messages and returns true if it forms the last of a sequence that makes an RPN or NPRN.

If this returns true, then the RPNMessage object supplied will be filled-out with the message's details. (If it returns false then the RPNMessage object will be unchanged).


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