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 getPort ()
 
uint8_t getProgramChange ()
 
uint8_t getStatus ()
 
uint8_t getVelocity ()
 
bool isChannelPressure ()
 
bool isControlChange ()
 
bool isNoteOff ()
 
bool isNoteOn ()
 
bool isPitchBend ()
 
bool isProgramChange ()
 
 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 69 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 85 of file MidiMessage.h.

References CHANNEL_PRESSURE, MidiMessage(), and USB_COMMAND_CHANNEL_PRESSURE.

uint8_t MidiMessage::getChannel ( )
inline

Definition at line 23 of file MidiMessage.h.

References data, and MIDI_CHANNEL_MASK.

uint8_t MidiMessage::getChannelPressure ( )
inline

Definition at line 41 of file MidiMessage.h.

References data.

uint8_t MidiMessage::getControllerNumber ( )
inline

Definition at line 35 of file MidiMessage.h.

References data.

uint8_t MidiMessage::getControllerValue ( )
inline

Definition at line 38 of file MidiMessage.h.

References data.

uint8_t MidiMessage::getNote ( )
inline

Definition at line 29 of file MidiMessage.h.

References data.

int16_t MidiMessage::getPitchBend ( )
inline

Definition at line 47 of file MidiMessage.h.

References data, and pb().

uint8_t MidiMessage::getPort ( )
inline

Definition at line 20 of file MidiMessage.h.

References data.

uint8_t MidiMessage::getProgramChange ( )
inline

Definition at line 44 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 32 of file MidiMessage.h.

References data.

Referenced by isNoteOff(), and isNoteOn().

bool MidiMessage::isChannelPressure ( )
inline

Definition at line 63 of file MidiMessage.h.

References CHANNEL_PRESSURE, data, and MIDI_STATUS_MASK.

bool MidiMessage::isControlChange ( )
inline

Definition at line 57 of file MidiMessage.h.

References CONTROL_CHANGE, data, and MIDI_STATUS_MASK.

bool MidiMessage::isNoteOff ( )
inline

Definition at line 54 of file MidiMessage.h.

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

bool MidiMessage::isNoteOn ( )
inline

Definition at line 51 of file MidiMessage.h.

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

bool MidiMessage::isPitchBend ( )
inline

Definition at line 66 of file MidiMessage.h.

References data, MIDI_STATUS_MASK, and PITCH_BEND_CHANGE.

bool MidiMessage::isProgramChange ( )
inline

Definition at line 60 of file MidiMessage.h.

References data, MIDI_STATUS_MASK, and PROGRAM_CHANGE.

static MidiMessage MidiMessage::note ( uint8_t  ch,
uint8_t  note,
uint8_t  velocity 
)
inlinestatic

Definition at line 79 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 75 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 72 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: