Knogjärnet, kapitel 1

//for sending a note message //byte1 = the channel, 0x90 is channel 1 //byte2 = the note, middle C is 60 //byte3 = velocity, e.g., on = 127, off = 0 void midi::shortMessage(unsigned char byte1, unsigned char byte2, unsigned char byte3) { u.bData[0] = (UCHAR)byte1; /* MIDI status byte */ u.bData[1] = (UCHAR)byte2; /* first MIDI data byte */ u.bData[2] = (UCHAR)byte3; /* second MIDI data byte */ u.bData[3] = 0; /* Output the note event */ if ((err = midiOutShortMsg(handle, u.dwData))) { printMidiOutErrorMsg(err); } } nästa funktion