This project has moved. For the latest updates, please go here.

How to set a MIDI instrument on a Chanel

May 12, 2014 at 3:08 PM
Hello,
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.
Coordinator
May 12, 2014 at 8: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 6:33 AM
Oh! So easy!
It works really fine.
I can even change the instrument after some notes without changing the chanel.
Thank you.