문제

I wish to play MIDI like notes from the C# XNA program. I don't actually need to construct a MIDI file, just have the ability to start and stop notes or play them for a given time.

play("flute", "D4", "start");
play("flute", "D4", "stop");
play("flute", "E4", "5 secs");
도움이 되었습니까?

해결책

I recommend looking at the XNA Midi Project.

It includes two examples and is easy to use:

NoteOn(int channel, int note, int velocity, int program)

Unlike other solutions like using WinAPI this will also run on XBox and WP7.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top