BASS.NET API for the Un4seen BASS Audio Library

MIDIStatus Enumeration

BASS.NET API for the Un4seen BASS Audio Library
Defines constants for Midi message status.

Namespace:  radio42.Multimedia.Midi
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public enum MIDIStatus
Members

  Member nameValueDescription
None0 No status.
NoteOff128 Channel Message: Note Off.

Status: 0x80 to 0x8F where the low nibble is the MIDI channel.

Data1: The first data is the note number. There are 128 possible notes on a MIDI device, numbered 0 to 127 (where Middle C is note number 60). This indicates which note should be released.

Data2: The second data byte is the velocity, a value from 0 to 127. This indicates how quickly the note should be released (where 127 is the fastest). It's up to a MIDI device how it uses velocity information. Often velocity will be used to tailor the VCA release time. MIDI devices that can generate Note Off messages, but don't implement velocity features, will transmit Note Off messages with a preset velocity of 64.

This status might also be used, if the Midi message actually returned 'NoteOn' but with a velocity (data2) of 0. The MidiShortMessage class already translates those messages to NoteOff (see StatusType).

An 'AllNotesOff' ControlChange message can be used to turn off all notes for which a device received NoteOn messages (without having received respective Note Off messages).

NoteOn144 Channel Message: Note On.

Status: 0x90 to 0x9F where the low nibble is the MIDI channel.

Data1: The first data is the note number. There are 128 possible notes on a MIDI device, numbered 0 to 127 (where Middle C is note number 60). This indicates which note should be played.

Data2: The second data byte is the velocity, a value from 0 to 127. This indicates with how much force the note should be played (where 127 is the most force). It's up to a MIDI device how it uses velocity information. Often velocity is be used to tailor the VCA attack time and/or attack level (and therefore the overall volume of the note). MIDI devices that can generate Note On messages, but don't implement velocity features, will transmit Note On messages with a preset velocity of 64.

NoteOn message that has a velocity of 0 is considered to actually be a NoteOff message!, and the respective note is therefore released. The MidiShortMessage class already translates those messages to NoteOff (see StatusType).

An 'AllNotesOff' ControlChange message can be used to turn off all notes for which a device received NoteOn messages (without having received respective Note Off messages).

Aftertouch160 Channel Message: Polyphonic Aftertouch (Polyphonic Pressure).

Status: 0xA0 to 0xAF where the low nibble is the MIDI channel.

Data1: The first data is the note number. There are 128 possible notes on a MIDI device, numbered 0 to 127 (where Middle C is note number 60). This indicates to which note the pressure is being applied.

Data2: The second data byte is the pressure amount, a value from 0 to 127 (where 127 is the most pressure).

ControlChange176 Channel Message: Control Change.

Status: 0xB0 to 0xBF where the low nibble is the MIDI channel.

Data1: The first data is the controller number (0 to 127). This indicates which controller is affected by the received MIDI message.

Data2: The second data byte is the value to which the controller should be set, a value from 0 to 127.

Some Midi data messages might actually use two sub-sequent short messages to construct a paired message representing a single value range (e.g. the ControlChange with a BankSelect). This to support paired values with a higher resolution (16384 instead of 128 values). The same might apply the the controller value itself. In such case two short messages will be send, where one contains the LSB value (single steps) in it's Data2 or Data1 byte and the other message contains the MSB value (128th steps) in it's Data2 or Data1 byte. Typically the messages with a StatusType of ControlChange and with a Controller value between 0 and 31 (MSB) are paired with a message of a Controller value between 32 and 63 (LSB). But also a Controller value of 98 (LSB) will be paired with a Controller value of 99 (MSB) as well as a Controller value of 100 (LSB) will be paired with a Controller value of 101 (MSB). Other pairs might be hardware specific.

An 'AllControllersOff' ControlChange message can be used to reset all controllers (that a MIDI device implements) to default values. See the MIDIControllerType for a list of defined controller numbers for more information about particular controllers.

ProgramChange192 Channel Message: Program Change.

Status: 0xC0 to 0xCF where the low nibble is the MIDI channel.

Data1: The program number to change to, a number from 0 to 127.

Data2: not used.

ChannelPressure208 Channel Message: Channel Pressure (Channel Aftertouch).

Status: 0xC0 to 0xCF where the low nibble is the MIDI channel.

Data1: The program number to change to, a number from 0 to 127.

Data2: not used.

If multiple banks do exist a ProgramChange command will select a new program number from the current bank only. A different bank will be selected with two sub-sequent ControlChange commands. This will also be called a BankSelect command.

PitchBend224 Channel Message: Pitch Bend.

Status: 0xE0 to 0xEF where the low nibble is the MIDI channel.

Data1: The first data byte's bits 0 to 6 are bits 0 to 6 of the 14-bit value.

Data2: The second data byte's bits 0 to 6 are really bits 7 to 13 of the 14-bit value.

The two data bytes should be combined together to form a single 14-bit value.

A combined value of 0x2000 is meant to indicate that the Pitch Wheel is centered (ie, the sounding notes aren't being transposed up or down). Higher values transpose pitch up, and lower values transpose pitch down.

SystemMsgs240 SystemExclusive Message: Start of system-exclusive message.

Status: 0xF0.

Various data bytes will follow, finally ending with an EOX.

MidiTimeCode241 SystemCommon Message: MIDI Time Code (see MIDIMTCType for details).

Status: 0xF1.

Data1: It's the time code value, a number from 0 to 127.

Data2: not used.

The two data bytes should be combined together to form a single 14-bit value.

See the MIDIMTCType for details.

SongPosition242 SystemCommon Message: Song Position Pointer.

Status: 0xF2.

Data1: The first data byte's bits 0 to 6 are bits 0 to 6 of the 14-bit value.

Data2: The second data byte's bits 0 to 6 are really bits 7 to 13 of the 14-bit value.

The two data bytes should be combined together to form a single 14-bit value. This 14-bit value is the MIDI Beat upon which to start the song. Songs are always assumed to start on a MIDI Beat of 0. Each MIDI Beat spans 6 MIDI Clocks. In other words, each MIDI Beat is a 16th note (since there are 24 MIDI Clocks in a quarter note).

SongSelect243 SystemCommon Message: Song Select.

Status: 0xF3.

Data1: The song number, a value from 0 to 127.

Data2: not used.

TuneRequest246 SystemCommon Message: Tune Request.

Status: 0xF6.

Data1: not used.

Data2: not used.

EOX247 SystemExclusive Message: End of system-exclusive message.

Status: 0xF7.

No data bytes should follow.

Clock248 SystemRealtime Message: Timing Clock.

Status: 0xF8.

Data1: not used.

Data2: not used.

There are 24 MIDI Clocks in every quarter note. (12 MIDI Clocks in an eighth note, 6 MIDI Clocks in a 16th, etc). Therefore, when a slave device counts down the receipt of 24 MIDI Clock messages, it knows that one quarter note has passed.

Tick249 SystemRealtime Message: Tick System Realtime.

Status: 0xF9.

Data1: not used.

Data2: not used.

While a master device's 'Clock' is playing back, it will send a continuous stream of MIDI Tick events at a rate of one per every 10 milliseconds.

Start250 SystemRealtime Message: Start.

Status: 0xFA.

Data1: not used.

Data2: not used.

MIDI Start always begins playback at MIDI Beat 0 (ie, the very beginning of the song). So, when a slave device receives a MIDI Start, it automatically resets its "Song Position" to 0. If the device needs to start playback at some other point (either set by a previous Song Position Pointer message, or manually by the musician), then MIDI Continue is used instead of MIDI Start.

Continue251 SystemRealtime Message: Continue.

Status: 0xFB.

Data1: not used.

Data2: not used.

Often, the slave device has its playback tempo synced to the master via MIDI Clock.

Stop252 SystemRealtime Message: Stop.

Status: 0xFC.

Data1: not used.

Data2: not used.

When a device receives a MIDI Stop, it should keep track of the point at which it stopped playback (ie, its stopped "Song Position"), in the anticipation that a MIDI Continue might be received next.

ActiveSense254 SystemRealtime Message: Active Sense.

Status: 0xFE.

Data1: not used.

Data2: not used.

A device sends out an Active Sense message (at least once) every 300 milliseconds if there has been no other activity on the MIDI buss, to let other devices know that there is still a good MIDI connection between the devices. This is an optional feature that only a few devices implement. Many devices don't ever initiate this minimal "safety" feature.

Reset255 SystemRealtime Message: System Reset.

Status: 0xFF.

Data1: not used.

Data2: not used.

A Reset message should never be sent automatically by any MIDI device. Rather, this should only be sent when a musician specifically tells a device to do so.

See Also

Reference