Hi, is it at all possible to generate sound on-the-fly in a Silverlight app and play it? I.e. if I want to play a sine-wave, can I generate a buffer and feed it to some media API?
Cheers
Nik
Hi, is it at all possible to generate sound on-the-fly in a Silverlight app and play it? I.e. if I want to play a sine-wave, can I generate a buffer and feed it to some media API?
Cheers
Nik
looks like you're in luck...
http://blogs.msdn.com/gillesk/archive/2009/03/23/playing-back-wave-files-in-silverlight.aspx
http://code.msdn.microsoft.com/wavmss/Release/ProjectReleases.aspx?ReleaseId=2417
you should be able to hack this around a bit to synthesize
Pete Brown already has a working prototype: http://community.irritatedvowel.com/blogs/pete_browns_blog/archive/2009/03/23/Creating-Sound-using-MediaStreamSource-in-Silverlight-3-Beta.aspx
Charles Petzold has the best example out there: http://www.charlespetzold.com/blog/2009/07/Simple-Electronic-Music-Sequencer-for-Silverlight.html