![]()  | 
  
    VCV Rack API v2
    
   | 
 
Converts MIDI note and transport messages to gates, CV, and other states. More...
#include <midi.hpp>
Public Types | |
| enum | MonoMode {  LAST_PRIORITY_MODE , FIRST_PRIORITY_MODE , LOWEST_PRIORITY_MODE , HIGHEST_PRIORITY_MODE , NUM_MONO_MODES }  | 
| enum | PolyMode {  ROTATE_MODE , REUSE_MODE , RESET_MODE , MPE_MODE , NUM_POLY_MODES }  | 
| Method for assigning notes to polyphony channels.  More... | |
Public Member Functions | |
| MidiParser () | |
| void | reset () | 
| Resets settings and performance state.   | |
| void | panic () | 
| Resets performance state.   | |
| void | processFilters (float deltaTime) | 
| void | processPulses (float deltaTime) | 
| void | processMessage (const midi::Message &msg) | 
| void | processCC (const midi::Message &msg) | 
| void | processSystem (const midi::Message &msg) | 
| uint8_t | assignChannel (uint8_t note) | 
| void | pressNote (uint8_t note, uint8_t channel, uint8_t velocity) | 
| void | releaseNote (uint8_t note, int8_t channel, int8_t velocity) | 
| -1 velocity means unset.   | |
| void | refreshHeld () | 
| Deactivates all notes that are not held, and reactivates notes that are.   | |
| void | pressPedal () | 
| void | releasePedal () | 
| uint8_t | getChannels () | 
| void | setChannels (uint8_t channels) | 
| void | setMonoMode (MonoMode monoMode) | 
| void | setPolyMode (PolyMode polyMode) | 
| float | getPitchVoltage (uint8_t channel) | 
| void | setFilterLambda (float lambda) | 
| Sets exponential smoothing filter lambda speed.   | |
| float | getPw (uint8_t channel) | 
| Returns pitch wheel value, from -1 to 1.   | |
| float | getMod (uint8_t channel) | 
| Returns mod wheel value, from 0 to 1.   | |
| uint8_t | getWheelChannels () | 
| Returns number of polyphonic channels for pitch and mod wheels.   | |
| json_t * | toJson () | 
| void | fromJson (json_t *rootJ) | 
Public Attributes | |
| uint8_t | channels | 
| Actual number of output polyphonic channels.   | |
| MonoMode | monoMode | 
| bool | retriggerOnResume | 
| In monophonic mode, generate Retrigger pulse when the active note is released and another takes over.   | |
| PolyMode | polyMode | 
| bool | releaseVelocityEnabled | 
| Set Velocity output from Note Off velocity.   | |
| float | pwRange | 
| Number of semitones to bend up/down by pitch wheel.   | |
| bool | smooth | 
| Enables pitch-wheel and mod-wheel exponential smoothing.   | |
| uint32_t | clockDivision | 
| Number of 24 PPQN clocks between clock divider pulses.   | |
| int64_t | clock | 
| Clock index from song start.   | |
| bool | pedal | 
| Whether sustain pedal is held.   | |
| uint8_t | notes [MAX_CHANNELS] | 
| bool | gates [MAX_CHANNELS] | 
| uint8_t | velocities [MAX_CHANNELS] | 
| uint8_t | aftertouches [MAX_CHANNELS] | 
| std::vector< uint8_t > | heldNotes | 
| int8_t | rotateIndex | 
| int16_t | pws [MAX_CHANNELS] | 
| Pitch wheel values, from -8192 to 8191.   | |
| uint8_t | mods [MAX_CHANNELS] | 
| Mod wheel values, from 0 to 127.   | |
| dsp::ExponentialFilter | pwFilters [MAX_CHANNELS] | 
| Smoothing filters for wheel values.   | |
| dsp::ExponentialFilter | modFilters [MAX_CHANNELS] | 
| dsp::PulseGenerator | clockPulse | 
| dsp::PulseGenerator | clockDividerPulse | 
| dsp::PulseGenerator | retriggerPulses [MAX_CHANNELS] | 
| dsp::PulseGenerator | startPulse | 
| dsp::PulseGenerator | stopPulse | 
| dsp::PulseGenerator | continuePulse | 
Converts MIDI note and transport messages to gates, CV, and other states.
MAX_CHANNELS is the maximum number of polyphonic channels.
| enum rack::dsp::MidiParser::MonoMode | 
| enum rack::dsp::MidiParser::PolyMode | 
      
  | 
  inline | 
      
  | 
  inline | 
Resets settings and performance state.
      
  | 
  inline | 
Resets performance state.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
-1 velocity means unset.
      
  | 
  inline | 
Deactivates all notes that are not held, and reactivates notes that are.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Sets exponential smoothing filter lambda speed.
      
  | 
  inline | 
Returns pitch wheel value, from -1 to 1.
      
  | 
  inline | 
Returns mod wheel value, from 0 to 1.
      
  | 
  inline | 
Returns number of polyphonic channels for pitch and mod wheels.
      
  | 
  inline | 
      
  | 
  inline | 
| uint8_t rack::dsp::MidiParser< MAX_CHANNELS >::channels | 
Actual number of output polyphonic channels.
| MonoMode rack::dsp::MidiParser< MAX_CHANNELS >::monoMode | 
| bool rack::dsp::MidiParser< MAX_CHANNELS >::retriggerOnResume | 
In monophonic mode, generate Retrigger pulse when the active note is released and another takes over.
| PolyMode rack::dsp::MidiParser< MAX_CHANNELS >::polyMode | 
| bool rack::dsp::MidiParser< MAX_CHANNELS >::releaseVelocityEnabled | 
Set Velocity output from Note Off velocity.
| float rack::dsp::MidiParser< MAX_CHANNELS >::pwRange | 
Number of semitones to bend up/down by pitch wheel.
| bool rack::dsp::MidiParser< MAX_CHANNELS >::smooth | 
Enables pitch-wheel and mod-wheel exponential smoothing.
| uint32_t rack::dsp::MidiParser< MAX_CHANNELS >::clockDivision | 
Number of 24 PPQN clocks between clock divider pulses.
| int64_t rack::dsp::MidiParser< MAX_CHANNELS >::clock | 
Clock index from song start.
| bool rack::dsp::MidiParser< MAX_CHANNELS >::pedal | 
Whether sustain pedal is held.
| uint8_t rack::dsp::MidiParser< MAX_CHANNELS >::notes[MAX_CHANNELS] | 
| bool rack::dsp::MidiParser< MAX_CHANNELS >::gates[MAX_CHANNELS] | 
| uint8_t rack::dsp::MidiParser< MAX_CHANNELS >::velocities[MAX_CHANNELS] | 
| uint8_t rack::dsp::MidiParser< MAX_CHANNELS >::aftertouches[MAX_CHANNELS] | 
| std::vector<uint8_t> rack::dsp::MidiParser< MAX_CHANNELS >::heldNotes | 
| int8_t rack::dsp::MidiParser< MAX_CHANNELS >::rotateIndex | 
| int16_t rack::dsp::MidiParser< MAX_CHANNELS >::pws[MAX_CHANNELS] | 
Pitch wheel values, from -8192 to 8191.
When MPE is disabled, only the first channel is used.
| uint8_t rack::dsp::MidiParser< MAX_CHANNELS >::mods[MAX_CHANNELS] | 
Mod wheel values, from 0 to 127.
| dsp::ExponentialFilter rack::dsp::MidiParser< MAX_CHANNELS >::pwFilters[MAX_CHANNELS] | 
Smoothing filters for wheel values.
| dsp::ExponentialFilter rack::dsp::MidiParser< MAX_CHANNELS >::modFilters[MAX_CHANNELS] | 
| dsp::PulseGenerator rack::dsp::MidiParser< MAX_CHANNELS >::clockPulse | 
| dsp::PulseGenerator rack::dsp::MidiParser< MAX_CHANNELS >::clockDividerPulse | 
| dsp::PulseGenerator rack::dsp::MidiParser< MAX_CHANNELS >::retriggerPulses[MAX_CHANNELS] | 
| dsp::PulseGenerator rack::dsp::MidiParser< MAX_CHANNELS >::startPulse | 
| dsp::PulseGenerator rack::dsp::MidiParser< MAX_CHANNELS >::stopPulse | 
| dsp::PulseGenerator rack::dsp::MidiParser< MAX_CHANNELS >::continuePulse |