SynthLab SDK
SynthLab::MidiInputData Class Reference

Holds all MIDI input data values. More...

#include <synthbase.h>

Inheritance diagram for SynthLab::MidiInputData:
SynthLab::IMidiInputData

Public Member Functions

 MidiInputData ()
 clears out all data arrays
 
virtual uint32_t getGlobalMIDIData (uint32_t index)
 get a global MIDI data value More...
 
virtual uint32_t getCCMIDIData (uint32_t index)
 get a CC MIDI data value More...
 
virtual uint32_t getAuxDAWDataUINT (uint32_t index)
 get aux data value More...
 
virtual float getAuxDAWDataFloat (uint32_t index)
 get aux data value More...
 
void setGlobalMIDIData (uint32_t index, uint32_t value)
 set the global MIDI value More...
 
void setCCMIDIData (uint32_t index, uint32_t value)
 set the CC MIDI value More...
 
void setAuxDAWDataUINT (uint32_t index, uint32_t value)
 set the aux data with a uint32_t More...
 
void setAuxDAWDataFloat (uint32_t index, float value)
 set the aux data with a float More...
 
IMidiInputDatagetIMIDIInputData ()
 

Protected Attributes

uint32_t globalMIDIData [kNumMIDIGlobals]
 the global MIDI INPUT table that is shared across the voices via the IMIDIData interface
 
uint32_t ccMIDIData [kNumMIDICCs]
 the global MIDI CC INPUT table that is shared across the voices via the IMIDIData interface
 
double auxData [kNumMIDIAuxes]
 the aux values, specific to SynthLab
 

Detailed Description

Holds all MIDI input data values.

  • exposes the IMidiInputData interface
  • allows access to the three types of MIDI input data
  • has function that returns (this) cast as the IMidiInputData pointer
Author
Will Pirkle http://www.willpirkle.com
Remarks
This object is included and described in further detail in Designing Software Synthesizer Plugins in C++ 2nd Ed. by Will Pirkle
Version
Revision : 1.0
Date
Date : 2021 / 04 / 26

Member Function Documentation

◆ getAuxDAWDataFloat()

float SynthLab::MidiInputData::getAuxDAWDataFloat ( uint32_t  index)
virtual

get aux data value

  • returns value as float
  • may or may not be "real" MIDI data
  • may contain DAW parameters such as BPM
Parameters
indexin AUX MIDI input array
Returns
the aux value as float

Implements SynthLab::IMidiInputData.

◆ getAuxDAWDataUINT()

uint32_t SynthLab::MidiInputData::getAuxDAWDataUINT ( uint32_t  index)
virtual

get aux data value

  • returns value as uint32_t
  • may or may not be "real" MIDI data
  • may contain DAW parameters such as BPM
Parameters
indexin AUX MIDI input array
Returns
the aux value as uint32_t

Implements SynthLab::IMidiInputData.

◆ getCCMIDIData()

uint32_t SynthLab::MidiInputData::getCCMIDIData ( uint32_t  index)
virtual

get a CC MIDI data value

  • example: midiVolumeGain = midiInputData->getCCMIDIData(VOLUME_CC07);
Parameters
indexin CC MIDI input array
Returns
the MIDI value as uint32_t

Implements SynthLab::IMidiInputData.

◆ getGlobalMIDIData()

uint32_t SynthLab::MidiInputData::getGlobalMIDIData ( uint32_t  index)
virtual

get a global MIDI data value

IMidiInputData access functions

  • example: uint32_t lsb = processInfo.midiInputData->getGlobalMIDIData(kMIDIPitchBendDataLSB);
Parameters
indexin global MIDI input array
Returns
the MIDI value as uint32_t

Implements SynthLab::IMidiInputData.

◆ getIMIDIInputData()

IMidiInputData* SynthLab::MidiInputData::getIMIDIInputData ( )
inline

get this cast as interface pointer

◆ setAuxDAWDataFloat()

void SynthLab::MidiInputData::setAuxDAWDataFloat ( uint32_t  index,
float  value 
)

set the aux data with a float

  • this uses a special function to store the floating point as a uint32_t without casting; does not mangle bits
Parameters
indexin CC MIDI input array
valuefloat value to set

◆ setAuxDAWDataUINT()

void SynthLab::MidiInputData::setAuxDAWDataUINT ( uint32_t  index,
uint32_t  value 
)

set the aux data with a uint32_t

Parameters
indexin CC MIDI input array
valueUINT value to set

◆ setCCMIDIData()

void SynthLab::MidiInputData::setCCMIDIData ( uint32_t  index,
uint32_t  value 
)

set the CC MIDI value

Parameters
indexin CC MIDI input array
valueMIDI value to set

◆ setGlobalMIDIData()

void SynthLab::MidiInputData::setGlobalMIDIData ( uint32_t  index,
uint32_t  value 
)

set the global MIDI value

functions to set the incoming MIDI data

Parameters
indexin Global MIDI input array
valueMIDI value to set

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