midi
Borland C++ Compiler 5.5
MIDIを鳴らす
MIDIの入出力
midi.c
#include
#include
int main() { HMIDIOUT hmo; midiOutOpen(&hmo, MIDI_MAPPER, 0, 0, 0); midiOutShortMsg(hmo, 0x000000c0); // 音色 midiOutShortMsg(hmo, 0x007f3c90); // on c midiOutShortMsg(hmo, 0x00007f40); // e midiOutShortMsg(hmo, 0x00007f43); // g Sleep(1000); midiOutShortMsg(hmo, 0x00003c80); // off midiOutShortMsg(hmo, 0x00000040); midiOutShortMsg(hmo, 0x00000043); Sleep(1000); midiOutReset(hmo); midiOutClose(hmo); return 0; }