JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::MidiRPNDetector Class Reference

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

#include <juce_MidiRPN.h>

Collaboration diagram for juce::MidiRPNDetector:

Classes

struct  ChannelState
 

Public Member Functions

 MidiRPNDetector () noexcept
 Constructor. More...
 
 ~MidiRPNDetector () noexcept
 Destructor. 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...
 
void reset () noexcept
 Resets the RPN detector's internal state, so that it forgets about previously received MIDI CC messages. More...
 

Private Attributes

ChannelState states [16]
 

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).

{Audio}

Constructor & Destructor Documentation

◆ MidiRPNDetector()

juce::MidiRPNDetector::MidiRPNDetector ( )
noexcept

Constructor.

◆ ~MidiRPNDetector()

juce::MidiRPNDetector::~MidiRPNDetector ( )
noexcept

Destructor.

Member Function Documentation

◆ parseControllerMessage()

bool juce::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).

◆ reset()

void juce::MidiRPNDetector::reset ( )
noexcept

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

Member Data Documentation

◆ states

ChannelState juce::MidiRPNDetector::states[16]
private

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