Search code examples
silverlightplayback

Silverlight Polyphony


Any ideas or working solutions for achieving polyphonic audio in Silverlight?

It is possible to play individual notes using sound files (e.g. wmv), but holding samples of every combination of the 3, 4, 5 or more note combinations in a chord based on any one of twelve root notes is unworkable. In WinForms I can use APIs to access the soundcard or MIDI device and generate the notes and their durations to play simultaneously.

How close can I get to this in Silverlight?


Solution

  • Here's the Silverlight synthesizer I wrote back in January/February. I updated it for RTW and released the source. It may help you get on your way.

    It uses MediaStreamSource to generate sounds in real-time.

    Silverlight Synthesizer Source Code

    Rather than use algorithms to create the waveforms, you could read in a sample file or files (wavetable) and use a lookup + skipping algorithm to get hte right frequencies.

    Pete