Example Apps
Overview
Quite simply, SilverSynth is a Silverlight library used to create awesome sounds in a web browser. It can be used as a core library for developing music-based applications or for just generating noise that annoys your co-workers. It supports synthesis of sine, saw, square and triangle wave forms, frequency modulation, amplitude modulation, panning, volume control, and dynamic envelopes.
This library is used for
generating sound waves from well-known sine and other wave form functions - not playing or streaming mp3 or wav files.
The library includes a custom MediaStreamSource you can consume from a Silverlight application or user control with a MediaElement:
MediaElement media = new MediaElement();
StereoPcmStreamSource source = new StereoPcmStreamSource();
Oscillator oscillator = new Oscillator(){ Frequency=440 };
source.Input = oscillator;
media.SetSource(source); Much of this library is based on the original work of Charles Petzold's Simple Sequencer for Silverlight -
http://www.charlespetzold.com/blog/2009/07/Simple-Electronic-Music-Sequencer-for-Silverlight.html as well as his digital audio synthesis concepts he has written about in Programming Windows -
http://www.amazon.com/Programming-Windows-Microsoft-Charles-Petzold/dp/157231995X/ref=sr_1_1?ie=UTF8&s=books&qid=1267155209&sr=8-1
Fluent API
One of the nice features of the SilverSynth library is a fluent API that makes signal-chaining easier:
Mixer mixer = Oscillator.Create(440)
.Pan(short.MinValue)
.Attenuate(-10)
.SendToMixer();
Oscillator.Create(441)
.Pan(short.MaxValue)
.Attenuate(-11)
.SendToMixer(mixer);