Sample audio: ksynth.demo.mp3 [8 MB – 5:27]
These days I’ve been more about producing and futzing with fun stuff than blogging and explaining. Well, maybe you can see (or hear) what I’ve been up to now…
I’ve been chipping away at a multi-voice audio synthesizer in Silverlight 3 and C# for the past few days. I’m at a point where I just couldn’t wait to share what the heck this thing sounds like any more. Here are a few points of interest:
- There are three separate wave oscillators generating the sound
- Each oscillator can generate sine, saw, square, triangle, or a “custom” wave form
- Each oscillator can be panned right or left, and can be phase-shifted from 0 to 360 degrees
- A simple sequencer is used to control 16 timed steps. Each step has 8 possible notes.
- Each possible note can be set up to play any of the 12 half musical steps, with a 6-octave range
- There is a dynamic envelope that controls each note’s attack, sustain, and decay
- Tempo can be altered.
- Added a pitch bender to boot
- Much help received from the example work of Charles Petzold’s Simple Silverlight 3 Sequencer and Pete Brown’s Silverlight Synthesizer.
The sample mp3 demonstrates most of the synth’s capabilities – starting from a simple single sine voice to full-blown madness with everything turned to 11. Around 2:35 or so, I add in a custom wave form that I authored using a wave form editing tool I’m working on.
Here is a screen shot:
And here is a glimpse of the waveform editor:
I just saw that Charles Petzold blogged about a multi-voice synthesizer approach. I’m not showing source code here, but I’m glad to see that he and I agree on a similar approach of using a generic C# List of child sample providers summed up (and divided) by a parent provider.
Next I’ll be working on voice de-tuning and a delay effect. I also need to polish up the custom wave editor feature and add the ability to save synth settings for future recall.
Until next time… keep those earplugs in.
posted on
Friday, July 24, 2009 10:10 PM
|