Best way to play MIDI sounds using C#

Question :

Best way to play MIDI sounds using C#,

Answer :

I’m trying to rebuild an old metronome application that was originally written using MFC in C++ to be written in .NET using C#. One of the issues I’m running into is playing the midi files that are used to represent the metronome “clicks”.

I’ve found a few articles online about playing MIDI in .NET, but most of them seem to rely on custom libraries that someone has cobbled together and made available. I’m not averse to using these, but I’d rather understand for myself how this is being done, since it seems like it should be a mostly trivial exercise.

Read More  Automated testing a game

So, am I missing something? Or is it just difficult to use MIDI inside of a .NET application?


I’m working on a C# MIDI application at the moment, and the others are right – you need to use p/invoke for this. I’m rolling my own as that seemed more appropriate for the application (I only need a small subset of MIDI functionality), but for your purposes the  might be a better fit. It is at least the best .NET MIDI library I found, and I searched extensively before starting the project.

Read More  Anyone know of an on-line free database?

That’s the answer Best way to play MIDI sounds using C#, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you