30#ifndef _NICMIDI_MIDI_H
31#define _NICMIDI_MIDI_H
118enum :
unsigned char {
135enum :
unsigned char {
193enum :
unsigned char {
208enum :
unsigned char {
268extern const signed char chan_msg_len[16];
269extern const signed char sys_msg_len[16];
311const char*
KeyName (
signed char sharp_flats,
unsigned char major_minor,
bool uppercase =
true,
312 bool space =
false,
bool use_Mm =
true);
const char * GetSysMsgName(unsigned char status)
Returns a readable name for the given sys message status.
const char * GetMetaMsgName(unsigned char type)
Returns a readable name for the given meta message status.
const double MIDI_DEFAULT_TEMPO
Musical tempo.
Definition: midi.h:323
unsigned long MIDIClockTime
The type of a variable which can hold a time in MIDI ticks.
Definition: midi.h:40
const MIDIClockTime TIME_INFINITE
A constant which represents an infinite time.
Definition: midi.h:47
const char * GetChanModeMsgName(unsigned char number)
Returns a readable name for the given channel mode (Control change with controller number between 0x7...
const char * GetGMDrumkitName(unsigned char number, int format=0)
Returns a readable name for a GM program number on channel 10 (drumkit).
const int MIDI_DEFAULT_TIMESIG_DENOMINATOR
Timesig denominator.
Definition: midi.h:322
const int MIDI_DEFAULT_TIMESIG_NUMERATOR
Timesig numerator.
Definition: midi.h:321
const char * GetChanMsgName(unsigned char status)
Returns a readable name for the given channel message status.
const int MIDI_DEFAULT_KEYSIG_KEY
Keysig key (C)
Definition: midi.h:324
const int MIDI_DEFAULT_KEYSIG_MODE
Keysig mode (major)
Definition: midi.h:325
const unsigned int DEFAULT_CLKS_PER_BEAT
The default clocks per beat parameter when initializing a MIDIMultiTrack.
Definition: midi.h:51
bool IsNoteBlack(unsigned char note)
Returns true if the MIDI number of the note denotes a black key.
int GetNoteOctave(unsigned char note)
MIDI note number to standard octave conversion.
Definition: midi.h:301
const char * KeyName(signed char sharp_flats, unsigned char major_minor, bool uppercase=true, bool space=false, bool use_Mm=true)
Converts a MIDI key signature into a readable form.
bool IsNoteWhite(unsigned char note)
Returns true if the MIDI number of the note denotes a white key.
const char * GetGMProgramName(unsigned char number, int format=0)
Returns a readable name for a GM program number.
@ META_CHANNEL_PREFIX
Associates a MIDI channel with following meta events. Its effect is terminated by another MIDI Channe...
Definition: midi.h:233
@ META_INSTRUMENT_NAME
Text: instrument name.
Definition: midi.h:218
@ META_CUE_TEXT
Text: cue point.
Definition: midi.h:221
@ META_MARKER_TEXT
Text: marker.
Definition: midi.h:220
@ META_OUTPUT_CABLE
This may be used in multiport environments to associate a track with a specific port....
Definition: midi.h:236
@ META_COPYRIGHT
Text: copyright.
Definition: midi.h:216
@ META_SMPTE
Specifies the initial SMPTE offset of the beginning of playback. It has 5 data bytes (stored in the s...
Definition: midi.h:246
@ META_END_OF_TRACK
The end of track marker in a MIDI file (also used in the MIDITrack object). The data length is 0 byte...
Definition: midi.h:239
@ META_TEMPO
Specifies a tempo change and has a length of 3 bytes. The data is a 3-byte integer,...
Definition: midi.h:243
@ META_GENERIC_TEXT_F
Text: generic f.
Definition: midi.h:229
@ META_DEVICE_NAME
Text: device name.
Definition: midi.h:223
@ META_GENERIC_TEXT_B
Text: generic b.
Definition: midi.h:225
@ META_KEYSIG
Specifies a musical key signature change. It has 2 data bytes: the 1st is a signed char denoting the ...
Definition: midi.h:256
@ META_GENERIC_TEXT_D
Text: generic d.
Definition: midi.h:227
@ META_PROGRAM_NAME
Text: program name.
Definition: midi.h:222
@ META_SEQUENCE_NUMBER
Defines the pattern number of a Type 2 MIDI file or the number of a sequence in a Type 0 or Type 1 MI...
Definition: midi.h:212
@ META_SEQUENCER_SPECIFIC
Used to give informations specific to a hardware or software sequencer. The first Data byte (or three...
Definition: midi.h:260
@ META_GENERIC_TEXT_E
Text: generic e.
Definition: midi.h:228
@ META_TIMESIG
Specifies a musical time signature change. It has 4 data bytes (stored in the sysex object) which den...
Definition: midi.h:252
@ META_LYRIC_TEXT
Text: lyric.
Definition: midi.h:219
@ META_TRACK_NAME
Text: track name.
Definition: midi.h:217
@ META_GENERIC_TEXT_C
Text: generic c.
Definition: midi.h:226
@ META_GENERIC_TEXT_A
Text: generic a.
Definition: midi.h:224
@ META_GENERIC_TEXT
This and the following are used for embedding ascii text in a MIDI file. They have variable data leng...
Definition: midi.h:215
@ C_LSB
add this to a non-switch controller to access the LSB.
Definition: midi.h:136
@ C_RPN_LSB
registered parameter LSB
Definition: midi.h:174
@ C_CELESTE_DEPTH
celeste (detune) depth
Definition: midi.h:166
@ C_BREATH
breath controller
Definition: midi.h:139
@ C_OMNI_ON
omni on, all notes off
Definition: midi.h:182
@ C_BALANCE
balance control
Definition: midi.h:144
@ C_SOSTENUTO
sostenuto switch
Definition: midi.h:154
@ C_GENERAL_7
general purpose controller 7
Definition: midi.h:160
@ C_NRPN_MSB
non registered parameter MSB
Definition: midi.h:173
@ C_GENERAL_2
general purpose controller 2
Definition: midi.h:148
@ C_MONO
mono on, all notes off
Definition: midi.h:183
@ C_ALL_NOTES_OFF
all notes off
Definition: midi.h:180
@ C_SOFT_PEDAL
soft pedal
Definition: midi.h:155
@ C_POLY
poly on, all notes off
Definition: midi.h:184
@ C_RESET
reset all controllers
Definition: midi.h:178
@ C_PHASER_DEPTH
phaser effect depth
Definition: midi.h:167
@ C_DAMPER
hold pedal (sustain)
Definition: midi.h:152
@ C_DATA_INC
increment data value
Definition: midi.h:169
@ C_ALL_SOUND_OFF
all sound off
Definition: midi.h:177
@ C_GM_BANK
General Midi bank select.
Definition: midi.h:137
@ C_MAIN_VOLUME
main volume control
Definition: midi.h:143
@ C_HOLD_2
hold pedal 2
Definition: midi.h:156
@ C_PORTA
portamento switch
Definition: midi.h:153
@ C_DATA_ENTRY
data entry value
Definition: midi.h:142
@ C_GENERAL_8
general purpose controller 8
Definition: midi.h:161
@ C_LOCAL
local control on/off
Definition: midi.h:179
@ C_MODULATION
modulation
Definition: midi.h:138
@ C_GENERAL_1
general purpose controller 1
Definition: midi.h:147
@ C_FOOT
foot controller
Definition: midi.h:140
@ C_PORTA_TIME
portamento time
Definition: midi.h:141
@ C_CHORUS_DEPTH
chorus depth
Definition: midi.h:165
@ C_EFFECT_DEPTH
external effects depth
Definition: midi.h:163
@ C_PAN
panpot stereo control
Definition: midi.h:145
@ C_OMNI_OFF
omni off, all notes off
Definition: midi.h:181
@ C_DATA_DEC
decrement data value
Definition: midi.h:170
@ C_RPN_MSB
registered parameter MSB
Definition: midi.h:175
@ C_GENERAL_6
general purpose controller 6
Definition: midi.h:159
@ C_GENERAL_5
general purpose controller 5
Definition: midi.h:158
@ C_EXPRESSION
expression control
Definition: midi.h:146
@ C_NRPN_LSB
non registered parameter LSB
Definition: midi.h:172
@ C_GENERAL_4
general purpose controller 4
Definition: midi.h:150
@ C_GENERAL_3
general purpose controller 3
Definition: midi.h:149
@ C_TREMELO_DEPTH
tremelo depth
Definition: midi.h:164
@ TUNE_REQUEST
Tune request.
Definition: midi.h:105
@ PROGRAM_CHANGE
Program (patch) change.
Definition: midi.h:98
@ PITCH_BEND
Pitch bend.
Definition: midi.h:100
@ SONG_SELECT
Song Select Pointer.
Definition: midi.h:104
@ META_EVENT
Meta event.
Definition: midi.h:108
@ SONG_POSITION
Song Position pointer.
Definition: midi.h:103
@ RESET
0xff never used as reset in a MIDIMessage
Definition: midi.h:107
@ MTC
MIDI Time Code.
Definition: midi.h:102
@ CONTROL_CHANGE
Control change.
Definition: midi.h:97
@ CHANNEL_PRESSURE
Channel (afertouch) pressure.
Definition: midi.h:99
@ NOTE_ON
Note on.
Definition: midi.h:95
@ NOTE_OFF
Note off.
Definition: midi.h:94
@ SYSEX_START
Start of a sysex.
Definition: midi.h:101
@ POLY_PRESSURE
Polyphonic (aftertouch) pressure.
Definition: midi.h:96
@ SYSEX_END
End of a sysex.
Definition: midi.h:106
@ RPN_COARSE_TUNE
coarse tuning
Definition: midi.h:196
@ RPN_FINE_TUNE
fine tuning
Definition: midi.h:195
@ RPN_BEND_WIDTH
bender sensitivity
Definition: midi.h:194
@ RT_TIMING_CLOCK
MIDI Real time clock.
Definition: midi.h:119
@ RT_START
Sequencer start.
Definition: midi.h:121
@ RT_ACTIVE_SENSE
MIDI Active sensing.
Definition: midi.h:124
@ RT_CONTINUE
Sequencer continue.
Definition: midi.h:122
@ RT_STOP
Sequencer stop.
Definition: midi.h:123
@ RT_MEASURE_END
Proposed measure end byte UNUSED.
Definition: midi.h:120