C# MIDI Player

Playing MIDI files

Page 1 of 1

4 Replies - 10447 Views - Last Post: 05 April 2010 - 02:47 AM Rate Topic: -----

#1 Zdrenka  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 7
  • View blog
  • Posts: 116
  • Joined: 24-November 09

C# MIDI Player

Posted 02 April 2010 - 03:40 PM

Hey, I've been looking at how to play MIDI files in C# for a while now and I haven't been very successful...

I found thistutorial from people in the Java section of DreamInCode which does the job. I was wondering if anyone knows of a similar way to do this in C#.

Any Suggestions?
Is This A Good Question/Topic? 0
  • +

Replies To: C# MIDI Player

#2 keakTheGEEK  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 107
  • View blog
  • Posts: 344
  • Joined: 23-February 10

Re: C# MIDI Player

Posted 02 April 2010 - 10:04 PM

Get it to play in C first. Then raise it a half step :walkman:

D.I.C is definitely not going to be your answer to all, but check out This Link. I think you might find some interesting information along the lines of what you are looking for...
Was This Post Helpful? 1
  • +
  • -

#3 Skaggles  Icon User is offline

  • THE PEN IS MIGHTIER
  • member icon





Reputation: 251
  • View blog
  • Posts: 640
  • Joined: 01-March 09

Re: C# MIDI Player

Posted 02 April 2010 - 10:25 PM

I think Microsoft gave up on supporting MIDI audio files. There's no real way to load them into an XNA game either without creating your own content pipeline to read/play them.
Was This Post Helpful? 0
  • +
  • -

#4 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 774
  • View blog
  • Posts: 5,097
  • Joined: 08-December 08

Re: C# MIDI Player

Posted 03 April 2010 - 01:40 AM

Actually, there are ways to play MIDI files.

First of all, there is System.Media (issue explained in the answer):
http://social.msdn.m...d1-b782aa92ea71

Then again, you can use WinAPI:
http://www.codeproje...SoundClass.aspx
(NOTE: You need to be familiar with VB.NET code. It won't be hard to convert it to C#)
Was This Post Helpful? 1
  • +
  • -

#5 Zdrenka  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 7
  • View blog
  • Posts: 116
  • Joined: 24-November 09

Re: C# MIDI Player

Posted 05 April 2010 - 02:47 AM

Thanks guys that's a real help, I can hopefully get started now I knew about "System.Media" but I thought it was just for .WAV files for some reason

Thanks guys!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1