Index

A

Active Sensing (0xFE) 21
aftertouch 16, 28
     channel 17
     key 16
Application Programming Interface (API) 436
AppWizard 136-37
asynchronous 436
audio
     digital 2, 73
     waveform 2, 73

B

Basic Channel 19, 436
baud 436
bend range 17
Big-Endian 189, 436
boilerplate 437

C

callbacks 53-54, 66, 68, 437
     sync 115, 117
Ch10Ex1 136
Ch10Ex2 143
Ch10Ex3 146
Ch11Ex1 151
Ch11Ex2 160
Ch12Ex1 171
Ch12Ex2 178
Ch14Ex1 212
Ch14Ex2 218
channel 14, 437
Channel Mode 17, 18, 437
channel pressure 17
Channel Voice 14, 437
chasing 99, 103, 437
chunk 187-88, 437
     header 188, 191-92, 439
     track 188, 192-93, 445
class
     abstract base 436
     derived 438
     document 138, 152, 164, 172, 179, 212, 221
     MainFrame 138, 146, 172, 221
     MyMidiIn 144, 157, 221
     MySync 179, 222
     view 138, 148, 175, 181, 221
ClassWizard 148, 156, 163, 166, 253, 262, 269, 279
CloseMidiIn() 67, 71, 84, 235, 341
CloseMidiIn16() 312
CloseMidiOut() 52, 57, 87, 231, 340
CloseMidiOut16() 323
CloseSMF() 197, 199, 206, 243, 345
CloseSync() 109, 114, 238, 341
CloseSync16() 330
CMaxMidiIn 122, 124-26, 144, 156, 171, 261-62, 363
~CMaxMidiIn() Destructor 263, 365
     Attach() 125, 264, 266, 365
     Close() 264, 366
CMaxMidiIn() Constructor 262, 364
     Detach() 265, 365
     Get() 126, 265, 367
     GetDescription() 126, 266, 366
     GetIDFromName() 364
     GetNumDevices() 126, 266, 366
     GetSync() 266
     IsOpen() 125, 266, 366
     Open() 125, 266-68, 365
     ProcessMidiData() 123, 124, 261, 268
     Reset() 366
     Start() 126, 268, 366
     Stop() 126, 268, 366
CMaxMidiOut 122, 126-29, 139, 161, 210, 253-54, 367
~CMaxMidiOut() 255
     Attach() 128, 253, 255-56, 370
     Close() 256
CMaxMidiOut() Constructor 254-55, 368
CMaxMidiOut() Destructor 371
     Detach() 256, 370
     Flush() 256, 372
     GetDescription() 128, 256, 371
     GetIDFromName() 368
     GetNumDevices() 128, 256, 371
     GetSync() 257, 368
     IsOpen() 128, 257, 371
     MergeOut() 190, 211, 257, 374
     MergeTracks() 211, 257, 372
     Open() 128, 257-59, 371
     ProcessOutBufferReady() 123, 126, 162, 253, 261, 368
     Put() 253, 259-60, 372
     Reset() 260, 372
     StartOut() 211, 253, 260, 374
CMaxMidiSMF 122, 187, 293, 385
~CMaxMidiSMF() 387
     Attach() 202, 293, 295, 386
     Close() 293, 387
CMaxMidiSMF() Constructor 293, 386
     Detach() 202, 294, 387
     GetFormat() 201, 294, 385
     GetMode() 204, 294, 385
     IsOpen() 201, 294, 385
     Load() 201, 202, 294, 389
     NumTracks() 201, 294, 385
     Open() 201, 295, 387
     Read() 296, 388
     ReadMeta() 203, 296, 389
     Resolution() 202, 204, 298, 385
     Rewind() 204, 298, 385
     Save() 203, 298, 388
     Write() 298, 388
     WriteMeta() 204, 298-300, 389
CMaxMidiSync 122, 129-31, 171, 255, 269, 375
     Attach() 271, 376
     Close() 271, 377
CMaxMidiSync() Constructor 270, 376
CMaxMidiSync() Destructor 270, 376
     Convert() 133, 271, 378
     GetHSync() 272, 375
     GetPosition() 272, 342
     IsOpen() 271, 377
     IsRunning() 271, 375
     Mode() 272, 377
     Open() 272-76, 376
     Pause() 274, 378
     Period() 274, 377
     ProcessMidiBeat() 123, 129, 131, 222, 269, 276, 375
     ProcessSyncDone() 123, 129, 130, 269, 276, 375
     Resolution() 133, 275, 295, 378
     ReStart() 275, 377
     Start() 275, 377
     Stop() 275, 378
     Tempo() 133, 275, 378
CMaxMidiTrack 122, 168, 171, 253, 255, 284, 295, 379
~CMaxMidiTrack() 380
     AbsNow() 284, 384
     AbsToDelta() 284, 384
     Attach() 170, 261, 285, 381
CMaxMidiTrack() Constructor 284, 380
     CreateBuffer() 382
     DeleteEvent() 170, 285, 383
     DeltaToAbs() 286, 384
     Detach() 170, 286, 381
     Flush() 287, 380
     FreeBuffer() 382
     GetAbsBuffer() 211, 287, 384
     GetBuffer() 287, 380
     GetBufferSize() 287, 380
     GetEvent() 170, 288, 382
     GetMidiIn() 288, 379
     GetMidiOut() 288, 379
     GetName() 203, 288, 381
     GetNumEvents() 288, 380
     GetSMF() 288, 379
     GetTime() 211, 289, 385
     InsertEvent() 170, 289, 382
     IsEmpty() 289, 379
     IsRecording() 170, 185, 289, 379
     Load() 290, 383
     Mute() 170, 290, 379
     Read() 170, 290, 382
     Rewind() 290, 380
     Save() 290, 383
     SetBuffer() 291, 380
     SetBufferSize() 291, 380
     SetEvent() 170, 291, 382
     SetName() 204, 291, 382
     SetNumEvents() 292, 380
     SlideTrack() 170, 292, 383
     Write() 292, 382
CMidiInDeviceMenu 146, 276, 390
     Attach() 277
CMidiInDeviceMenu() Constructor 276, 390
     Create() 277, 390
     GetDeviceCount() 278, 390
     GetDeviceName() 278, 391
     GetMenu() 278, 390
     SelectDevice() 279-80, 391
CMidiOutDeviceMenu 146, 280, 391
     Attach() 281
CMidiOutDeviceMenu() Constructor 280, 392
     Create() 281, 392
     GetDeviceCount() 282, 392
     GetDeviceName() 282, 392
     GetMenu() 282, 392
     SelectDevice() 282-83, 393
code segments
     fixed 54, 68
Continue (0xFB) 21, 103, 110
Control Change 16, 17, 18
controllers 17
CWnd 122, 253, 261, 269

D

data byte 14, 437
data flow diagram 121, 437
     MIDI input 68, 82
     MIDI output 54, 85, 117
     sync device 112
device driver 9, 46, 438
device ID 47, 55, 62, 68, 263, 438
DISABLE_SYSEX 229, 233, 258, 267
DLL 9, 33, 438
     MaxMidi 440
DllEntryPoint() 309
DllMain() 339
drift 93, 438
drum machine 438
Dynamic Link Library. See DLL

E

echo 61
ENABLE_SYSEX 49, 64, 77, 229, 233, 257, 267
End of Exclusive. See EOX
EOX 20, 22, 73, 86, 116
ERR_NOMATCH 48, 63
Error Codes 250

F

FIXED 54, 68
FlushMidiOut() 52, 57, 232, 340
FlushMidiOut16() 321
Format 0 file 189, 295
Format 1 file 189, 295
Format 2 file 189
frame 23-24, 438
     origin 98, 441
     start 98, 443
frame address 438
frame rate 439
Full 24, 25

G

General MIDI 26-30
GetIDFromName 369
GetIDFromName() 47, 63
GetMaxMidiVersion() 48, 141, 172, 249, 339
GetMaxMidiVersion16() 310
GetMidiIn() 64, 70, 78, 83, 233, 234, 236, 341
GetMidiIn16() 313
GetMidiInDescription() 63, 232, 340
GetMidiInDescription16() 310
GetMidiOutDescription() 47, 228, 340
GetMidiOutDescription16() 319
GetNumInDevices() 232, 339
GetNumOutDevices() 228, 339
GetResolution() 108, 110, 114, 241, 342
GetResolution16() 334
GetSMFResolution() 200, 243, 245, 346
GetTempo() 108, 110, 114, 240, 342
GetTempo16() 334
global channel 19, 436
GM. See MIDI: General
GM Sound Set 26, 28
granularity. See resolution
greyhound 65, 439

H

HMIDIIN 39, 80
HMIDIOUT 39, 80
HMIN 64, 68
HMOUT 50, 55

I

IDM_INPUT 148
IDM_OUTPUT 148
Import file 439
Internal mode 237
internal sync 439
interrupts 54, 86, 94, 107
irrational number 439

J

jitter 93, 439

L

Little-Endian 189, 439
Local Control 20

M

m_bAutoMenuEnable 148, 279, 283
magic cookie 50, 439
manufacturer ID 22, 76, 440
master 100
MaxMidi.h 302
MAXPNAMELEN 228, 233
MaxSeq 11, 219, 225, 417
MC_HOLD 102
MCI. See Media Control Interface
MCI Sequencer 6
Media Control Interface 6
_MENUS 276, 280
memory
     fixed 438
message
     All Notes Off 19
     All Sound Off 19
     channel 14, 437
     Channel Mode 17, 18, 19, 437
     Channel Voice 14, 437
     Continue (OxFB) 20, 103, 110
     Control Change 17, 18
     long 73, 77
     OnCreate() 142
     posted 441
     sent 442
     short 73, 77
     Song Position Pointer (SPP) 20, 103
     system 14, 444
     System Common 14, 20, 444
     System Exclusive 14, 22, 45, 73, 73-87, 116-19, 151-66, 211, 229, 233, 267, 444
     System Real-Time 14, 21, 444
message map 440
     afx_msg 122
Meta event 187, 190, 193-94, 242, 440
     Copyright Notice 194
     Cue Point 194
     End of Track 193, 194
     Instrument Name 194
     Key Signature 194
     Lyric 193
     Marker 194
     MIDI Channel Prefix 194
     Sequencer-Specific 194
     Set Tempo 194, 199, 204
     SMPTE Offset 194
     Text 193
     Time Signature 194, 199
     Track Name 193
MHDR_DONE 80
Microsoft Foundation Classes (MFC) 122
MIDI 2-4, 13, 440
     General 26-30
     Machine Control 3, 13
     Show Control 3, 13
     specification 13
MIDI Clock 21, 103
MIDI file 440
MIDI input 4, 59, 82, 106, 121, 136
MIDI interface 7, 46
MIDI Manufacturers Association (MMA) 13
MIDI Mapper 49, 55, 440
MIDI output 4, 106, 121, 136
     data flow diagram 85
MIDI Start 100, 103, 108, 110
MIDI Stop 100, 110
MIDI sync 20, 21, 100-103, 106, 112, 440
     mode 237
MIDI thru 4
MIDI Time Code (MTC) 13, 23, 97, 440
     Full 24, 25
     Quarter Frame 24, 98, 442
MIDI Timing Clock 20, 91, 440
MIDI_BEAT 107, 222, 237, 250
MIDI_DATA 61, 66, 78, 83, 111, 114, 234, 251
MIDI_MAPPER 49, 257
MidiEvent 45, 51, 61, 65, 69, 73, 108, 143, 151, 229, 252, 257, 260, 265, 267, 441
MIDIHDR 39, 79
_MIDIIN 123, 124
MidiIn.c 308
MIDIIN_DEFAULT 77, 235
midiInAddBuffer() 81, 84
MIDIINCAPS 39
midiInClose() 41
midiInGetDevCaps() 40
midiInGetNumDevs() 40, 62, 232
midiInOpen() 41, 68, 80
midiInPrepareHeader() 41, 80, 84
midiInReset() 41, 83, 84
midiInStart() 41, 70
midiInStop() 41, 70
midiInUnprepareHeader() 41, 84
_MIDIOUT 123, 126, 139
MidiOut.c 318
MIDIOUT_DEFAULT 77, 231, 259
MIDIOUTCAPS 39
midiOutClose() 42
midiOutGetDevCaps() 42
midiOutGetNumDevs() 42, 46, 228
midiOutLongMsg() 42, 77, 81, 86, 114, 119
midiOutOpen() 42, 49, 55, 80
midiOutPrepareHeader() 42, 80, 86, 87
midiOutReset() 43
midiOutShortMsg() 42, 56, 114
midiOutUnprepareHeader() 42, 87
MidiSpy 11, 225, 395
MIM_CLOSE 62, 69, 71, 234, 250
MIM_DATA 70
MIM_LONGDATA 83, 116
Mix Bookshelf 13
MMA. See MIDI Manufacturers Association
MMSYSTEM 9, 38, 54, 441
modShortMsg() 129
Modulation Wheel 17, 19
MOM_CLOSE 49, 57, 229, 251
MOM_DONE 87
MOM_LONGDATA 86
mono. See monophonic
monophonic (mono) 19, 441
MTC. See MIDI Time Code
Multimedia Extensions 46, 73, 441
Musical Instrument Digital Interface 2
Mutex 441
MxDll.h 305
MxMidi.def 338
MxMidi16 10, 54, 86, 308
MxMidi32 10, 56, 204, 338
MxMidi32.c 338
MxMidi32.lib 136, 139

O

omni 19, 441
ON_COMMAND 148, 156
ON_UPDATE_COMMAND_UI 148
OnCmdMsg() 148, 156, 279, 281
OnCreate() 173, 279, 283
OnDraw() 166, 221
OnNewTrack() 215
OnOpenDocument() 220
OnOutBufferReady() 211
OnPlayStart() 181, 217
OnPlayStop() 181, 217
OnRecordStart() 177, 217
OnRecordStop() 177, 217
OnSaveDocument() 219
opaque handle. See magic cookie
OpenMidiIn() 62, 68, 82, 125, 233-35, 340
OpenMidiOut() 49, 55, 86, 110, 128, 228-31, 340
OpenMidiOut16() 319
OpenSMF() 194, 198, 206, 242, 343
OpenSync() 106, 112, 236-38, 341
OpenSync16() 329
OUTBUFFER_READY 49, 87, 110, 118, 211, 229, 251, 253

P

patch 2, 17
patch editor 2
PauseSync() 108, 114, 239, 341
PauseSync16() 331
Percussion Map 28
Pitch Bend 17, 19, 28
poly. See polyphonic
polyphonic (poly) 19, 441
Polyphonic Key Pressure 16
polyphony 441
port 8, 46, 441
POS_MS 272
POS_TICKS 272
ppqn 441
protocol 13, 14, 441
pseudo code 442
PutMidiOut() 50, 56, 77, 85, 86, 117, 229, 231-32, 340
PutMidiOut16() 324

Q

quantize 442
Quarter Frame 97
queue 65-67, 442
     circular 65, 437
     linear 439
     message 48, 66

R

READ 296
ReadByte() 206
ReadMetaEvent() 196, 242, 246-47, 347
ReadSMF() 196, 244, 346
Reset All Controllers 19
ResetMidiOut() 52, 57, 231, 232, 340
ResetMidiOut16() 321
resolution 90-92, 108, 192, 237, 272, 295, 442
ReStartSync() 109, 114, 239, 341
ReStartSync16() 332
RewindSMF() 200, 243, 244, 345
RIFF file 187
running status 17-18, 45, 51, 192, 442

S

S_INT 106, 132, 272
S_MIDI 114, 132, 272
SeekAbsolute() 205, 350
semitone 442
sequencer 2, 168-85
SetResolution() 108, 109, 114, 241, 341
SetResolution16() 334
SetSMFResolution() 200, 243, 245, 346
SetTempo() 108, 110, 114, 199, 240, 341
SetTempo16() 333
slave 100
_SMF 123
SMF.c 342
SMPTE 23, 442
     frame rate 192
     stalled 24
Society of Motion Picture and Television Engineers. See SMPTE
Song Position Pointer (SPP) 20, 103
sound module 442
sounds 2
Standard MIDI File (SMF) 2, 13, 187-207, 242, 443
Start (0xFA) 21
StartMidiIn() 64, 70, 111, 236, 237, 239, 340
StartMidiIn16() 312
StartSync() 108, 110, 111, 114, 239, 341
StartSync16() 332
StarWord 33, 443
status 14, 45, 73, 151
     running 17-18, 45, 51, 192, 442
status byte 22, 51, 443
Stop (0xFC) 21
StopMidiIn() 64, 70, 235, 236, 340
StopMidiIn16() 312
StopSync() 108, 114, 239, 341
StopSync16() 331
stopwatch time 443
streaming data 443
streams 6
stripe 443
SxLib 11, 164, 225, 406
SYNC 123, 129
sync. See synchronization
sync device 106, 136
sync engine 443
Sync.c 328
SYNC_DONE 107, 111, 237, 252
SYNC_INPUT 132, 234, 267
SYNC_OUTPUT 110, 114, 132, 229, 258
synchronization 8, 21, 24, 25, 81, 89-104, 105-19, 171, 228, 231, 233, 237, 255, 257, 264, 266, 269, 443
     internal sync 106
synchronous 443
synthesizer 443
sysex. See System Exclusive message
sysex librarian 2, 151, 443
System Common 14, 20, 444
System Exclusive message 14, 22, 45, 73, 73-87, 114, 115, 151-66, 211, 229, 233, 258, 267, 444
System Real-Time 14, 21, 444
System Reset (0xFF) 22

T

tempo 21, 89, 90-91, 108, 237, 271, 444
     changing 106
tempo change event 108, 133
thread 444
thunk 9, 34-38, 444
     flat 438
     script 360
tick 89, 90-91, 93-97, 444
     absolute 210
     delta 89, 437
     generator 93-97, 115, 118, 444
ticks per beat (tpb) 91
timebase 89
timeslice 37, 444
timestamp 89, 94, 210, 445
timing accuracy 92, 237, 273, 445
timing resolution 237, 243, 273
track 168-70, 187
     playing back 178-85
     recording 171-78
_TRACK 123
TrackMidiOut() 56, 57, 322
Tune Request 20
TurnNotesOff() 322

U

UPDATE_COMMAND_UI 156
USE_CURRENT 107, 238

V

variable-length value 188-89, 445
velocity 15-16, 45
Virtual Device Driver 445
virtual function 261, 268, 445
VxD. See Virtual Device Driver

W

wall-clock time 445
waveform audio 2, 73
wavetable synthesis 4
Win16Mutex 35-36, 54, 445
WINMM 9, 36, 445
WRITE 295, 296
WriteByte() 206, 361
WriteMetaEvent() 199, 242, 247, 359
WriteSMF() 198, 244, 248, 355