Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

TSE3::MidiCommand Struct Reference

Data type of a single complete MIDI message. More...

#include <Midi.h>

List of all members.

Public Types

enum  MagicPortNumbers { NoPort = -1, AllPorts = -2, SamePort = -3 }
enum  MagicChannelNumbers { NoChannel = -1, AllChannels = -2, SameChannel = -3 }

Public Member Functions

 MidiCommand (int status, int channel, int port, int data1, int data2)
 MidiCommand (int status, int channel, int port, int data1)
 MidiCommand ()
int noDataBytes () const
bool isChannel () const
bool isNote () const
int operator== (const MidiCommand &c) const

Public Attributes

int port
unsigned status: 4
signed channel: 5
unsigned data1: 8
unsigned data2: 8
unsigned selected: 1


Detailed Description

Data type of a single complete MIDI message.

The MidiCommand describes one complete MIDI message, including status byte and any data associated with it.

This is a value type.

Author:
Pete Goodliffe
Version:
3.00
See also:
MidiEvent


Member Enumeration Documentation

enum TSE3::MidiCommand::MagicPortNumbers
 

These are some "reserved" port numbers. Valid port numbers are positive integers. Negative integers have specific meanings.

Enumeration values:
NoPort 
AllPorts 
SamePort 

enum TSE3::MidiCommand::MagicChannelNumbers
 

These are some "reserved" channel numbers. Valid channel numbers are 0-15. Negative integers have specific meanings.

Enumeration values:
NoChannel 
AllChannels 
SameChannel 


Constructor & Destructor Documentation

TSE3::MidiCommand::MidiCommand int  status,
int  channel,
int  port,
int  data1,
int  data2
[inline]
 

Construct a MidiCommmand with two data bytes

Parameters:
status Status value (4 bits).
channel Channel value (0-15).
port Port value.
data1 First data byte value (0-127).
data2 Second data byte value (0-127).

TSE3::MidiCommand::MidiCommand int  status,
int  channel,
int  port,
int  data1
[inline]
 

Construct a MidiCommmand with one data byte

Parameters:
status Status value (4 bits).
channel Channel value (0-15).
port Port value.
data1 Data byte value (0-127).

TSE3::MidiCommand::MidiCommand  )  [inline]
 

Construct a MidiCommand with status MidiCommand_Invalid.


Member Function Documentation

int TSE3::MidiCommand::noDataBytes  )  const [inline]
 

Returns the number of data bytes this type of MidiCommand has.

Returns:
The value 1 or 2

bool TSE3::MidiCommand::isChannel  )  const [inline]
 

Returns whether this is a 'channel' MIDI command or not

Returns:
Whether this is a 'channel' MIDI command

bool TSE3::MidiCommand::isNote  )  const [inline]
 

Returns whether the data1 value is defined to be a note number.

Returns:
Whether data1 contains a note value

int TSE3::MidiCommand::operator== const MidiCommand c  )  const [inline]
 

MidiCommands are considered equal if all data members except selected match.


Member Data Documentation

int TSE3::MidiCommand::port
 

The port value. Valid port numbers are positive integers. There are some defined minus numbers that have special meanings, too.

unsigned TSE3::MidiCommand::status
 

The status (type of MIDI message identifier) value (4 bits).

signed TSE3::MidiCommand::channel
 

The channel value (0-15, with some magic minus numbers).

unsigned TSE3::MidiCommand::data1
 

The data1 value (0-127).

unsigned TSE3::MidiCommand::data2
 

The data2 value (0-127).

unsigned TSE3::MidiCommand::selected
 

Whether this command is 'selected' or not (0/1). This may be used by some sort of Phrase editor.

See also:
Phrase


The documentation for this struct was generated from the following file:
Generated on Wed May 25 14:46:24 2005 for TSE3 by doxygen 1.3.2