2

I want to build a musical Ear Training program. I have samples of piano notes on mp3 or wav files, and i want to play them simultaneously to build musical chords.

What will be the easiest or the most successful way of playing sounds together?

Thanks :-)

Matthieu Brucher
  • 21,634
  • 7
  • 38
  • 62
Chopinist
  • 182
  • 1
  • 12
  • 1
    _What have you tried so far to solve this problem?_ Show your effort first.. Read [FAQ] and [ask] – Soner Gönül Mar 20 '13 at 09:40
  • Have a look at this interesting discussion - http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/d9391ced-ad5d-42dd-9025-f387828c0ca8/ – Angshuman Agarwal Mar 20 '13 at 09:41
  • @AngshumanAgarwal Thanks, but i need to play chords from audio files, not displaying notes (yet)... – Chopinist Mar 20 '13 at 09:48
  • @SonerGönül I have searched how to play sounds simultaneously, and found few solutions: A library called NAUDIO for C#, playing the sounds in Media player. I just wanted to know what will be the best practice to such a project. – Chopinist Mar 20 '13 at 09:50
  • Looks like you have to use the Managed DirectX SDK - http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/abc86695-20c6-4dcd-82cb-544a9111cd11 – Angshuman Agarwal Mar 20 '13 at 10:06

2 Answers2

0

For this kind of things you could call the SDL_mixer library. It's not C#, but here you can see it interfaced by C# in a gaming library.

You can have multiple channels, each one playing a different sound.

Francesco Baruchelli
  • 7,320
  • 2
  • 32
  • 40
0

See this question for popular C# audio libraries and refer to their documentations on how to achieve simultaneous playback (e.g. BASS.NET, NAudio etc.).

Community
  • 1
  • 1
thSoft
  • 21,755
  • 5
  • 88
  • 103