OpenWareLaboratory
MidiMessage Class Reference

Public Member Functions

uint8_t getChannel ()
 
uint8_t getChannelPressure ()
 
uint8_t getControllerNumber ()
 
uint8_t getControllerValue ()
 
uint8_t getNote ()
 
int16_t getPitchBend ()
 
uint8_t getPolyKeyPressure ()
 
uint8_t getPort ()
 
uint8_t getProgramChange ()
 
uint8_t getSize ()
 
uint8_t getStatus ()
 
uint8_t getVelocity ()
 
bool isChannelPressure ()
 
bool isControlChange ()
 
bool isNote ()
 
bool isNoteOff ()
 
bool isNoteOn ()
 
bool isPitchBend ()
 
bool isPolyKeyPressure ()
 
bool isProgramChange ()
 
bool isSysEx ()
 
 MidiMessage ()
 
 MidiMessage (uint32_t msg)
 
 MidiMessage (uint8_t port, uint8_t d0, uint8_t d1, uint8_t d2)
 

Static Public Member Functions

static MidiMessage cc (uint8_t ch, uint8_t cc, uint8_t value)
 
static MidiMessage cp (uint8_t ch, uint8_t value)
 
static MidiMessage note (uint8_t ch, uint8_t note, uint8_t velocity)
 
static MidiMessage pb (uint8_t ch, int16_t bend)
 
static MidiMessage pc (uint8_t ch, uint8_t pc)
 

Data Fields

union {
   uint8_t   data [4]
 
   uint32_t   packed
 
}; 
 

Detailed Description

Definition at line 6 of file MidiMessage.h.

Constructor & Destructor Documentation

MidiMessage::MidiMessage ( )
inline

Definition at line 12 of file MidiMessage.h.

Referenced by cc(), cp(), note(), pb(), and pc().

MidiMessage::MidiMessage ( uint32_t  msg)
inline

Definition at line 13 of file MidiMessage.h.

MidiMessage::MidiMessage ( uint8_t  port,
uint8_t  d0,
uint8_t  d1,
uint8_t  d2 
)
inline

Definition at line 14 of file MidiMessage.h.

References data.

Member Function Documentation

static MidiMessage MidiMessage::cc ( uint8_t  ch,
uint8_t  cc,
uint8_t  value 
)
inlinestatic

Definition at line 115 of file MidiMessage.h.

References CONTROL_CHANGE, MidiMessage(), and USB_COMMAND_CONTROL_CHANGE.

static MidiMessage MidiMessage::cp ( uint8_t  ch,
uint8_t  value 
)
inlinestatic

Definition at line 131 of file MidiMessage.h.

References CHANNEL_PRESSURE, MidiMessage(), and USB_COMMAND_CHANNEL_PRESSURE.

uint8_t MidiMessage::getControllerNumber ( )
inline
int16_t MidiMessage::getPitchBend ( )
inline
uint8_t MidiMessage::getPort ( )
inline

Definition at line 20 of file MidiMessage.h.

References data.

uint8_t MidiMessage::getProgramChange ( )
inline

Definition at line 78 of file MidiMessage.h.

References data.

uint8_t MidiMessage::getStatus ( )
inline

Definition at line 26 of file MidiMessage.h.

References data, and MIDI_STATUS_MASK.

uint8_t MidiMessage::getVelocity ( )
inline

Definition at line 63 of file MidiMessage.h.

References data.

Referenced by isNoteOff(), isNoteOn(), AbstractSynth::noteOn(), and MidiProcessor::process().

bool MidiMessage::isChannelPressure ( )
inline

Definition at line 106 of file MidiMessage.h.

References CHANNEL_PRESSURE, data, and MIDI_STATUS_MASK.

Referenced by MidiProcessor::process().

bool MidiMessage::isControlChange ( )
inline

Definition at line 100 of file MidiMessage.h.

References CONTROL_CHANGE, data, and MIDI_STATUS_MASK.

Referenced by MidiProcessor::process().

bool MidiMessage::isNote ( )
inline

Definition at line 85 of file MidiMessage.h.

References isNoteOff(), and isNoteOn().

bool MidiMessage::isNoteOff ( )
inline

Definition at line 91 of file MidiMessage.h.

References data, getVelocity(), MIDI_STATUS_MASK, NOTE_OFF, and NOTE_ON.

Referenced by isNote(), and MidiProcessor::process().

bool MidiMessage::isNoteOn ( )
inline

Definition at line 88 of file MidiMessage.h.

References data, getVelocity(), MIDI_STATUS_MASK, and NOTE_ON.

Referenced by isNote(), and MidiProcessor::process().

bool MidiMessage::isPitchBend ( )
inline

Definition at line 112 of file MidiMessage.h.

References data, MIDI_STATUS_MASK, and PITCH_BEND_CHANGE.

Referenced by MidiProcessor::process().

bool MidiMessage::isPolyKeyPressure ( )
inline

Definition at line 109 of file MidiMessage.h.

References data, MIDI_STATUS_MASK, and POLY_KEY_PRESSURE.

Referenced by MidiProcessor::process().

bool MidiMessage::isProgramChange ( )
inline

Definition at line 103 of file MidiMessage.h.

References data, MIDI_STATUS_MASK, and PROGRAM_CHANGE.

bool MidiMessage::isSysEx ( )
inline
static MidiMessage MidiMessage::note ( uint8_t  ch,
uint8_t  note,
uint8_t  velocity 
)
inlinestatic

Definition at line 125 of file MidiMessage.h.

References MidiMessage(), NOTE_OFF, NOTE_ON, USB_COMMAND_NOTE_OFF, and USB_COMMAND_NOTE_ON.

static MidiMessage MidiMessage::pb ( uint8_t  ch,
int16_t  bend 
)
inlinestatic

Definition at line 121 of file MidiMessage.h.

References MidiMessage(), PITCH_BEND_CHANGE, and USB_COMMAND_PITCH_BEND_CHANGE.

Referenced by getPitchBend().

static MidiMessage MidiMessage::pc ( uint8_t  ch,
uint8_t  pc 
)
inlinestatic

Definition at line 118 of file MidiMessage.h.

References MidiMessage(), PROGRAM_CHANGE, and USB_COMMAND_PROGRAM_CHANGE.

Field Documentation

union { ... }
uint32_t MidiMessage::packed

Definition at line 9 of file MidiMessage.h.


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