// // Programmer: Craig Stuart Sapp // Creation Date: Sat Nov 2 20:29:03 PST 2002 // Last Modified: Sat Nov 2 20:33:56 PST 2002 // Filename: midiouttest.cpp // Syntax: C++; midiio 1.0 // // Description: Test program to make sure that MIDI output is working. // #include "midiiolib.h" int main(void) { Voice output; output.setPort(0); // choose which port you want to sent MIDI out on. output.open(); // not necessary for all OS configurations but best // to always use the open command. // output.setAndOpenPort(0) can also be used. int i; for (i=0; i<100; i++) { cout << "Playing Note " << i << " ..." << endl; output.play(0, 60, 64); // play a Middle C MIDI note millisleep(250); // pause for 250 milliseconds } output.close(); // port will close automatically when exiting the // program (normally) if not explicitly closed. return 0; }