This project has moved and is read-only. For the latest updates, please go here.

How to set a MIDI instrument on a Chanel

May 12, 2014 at 4:08 PM
I would like to create .mid MIDI songs with NAudio and play them with Media Player.
I can create a MidiEventCollection and fill it with many NoteOnEvent, prepare for export and export the song. Then I can listen to it with Media Player, it's quite simple and effective.
I can mix drums (chanel 10) with Piano (chanel 1-9 and 11-15).
But how can I play others instruments than piano?
I miss something like a command for selecting the defaut instrument to play on a specified chanel (for example guitar on chanel 1, organ on chanel 2...)
Is it possible to do that with NAudio, and if so, how to do it?
Thank you.
May 12, 2014 at 9:26 PM
Add patch change events for the other channels.
Marked as answer by Demosthene2014 on 5/12/2014 at 11:33 PM
May 13, 2014 at 7:33 AM
Oh! So easy!
It works really fine.
I can even change the instrument after some notes without changing the chanel.
Thank you.