Web Audio API Phase Modulator

I'm a bit of an audio nut, playing with synths and samples and whatnot. Somehow this was bound to collide with my leanings towards web development, and when I heard of the Web Audio API and found a basic oscillator implementation, I was very excited to finally be able to produce a crude phase modulated synth.

[edit April 2016 - it appears there's been some changes in the API that will need to be corrected before this script works again. I'll leave this up for legacy reasons but it probably won't work unless you have an older browser.]

There are two oscillators, one on the left panel and one on the right. You can control the frequency and amplitude of each. Also on each panel is a knob that dictates how much of the other oscillator feeds into the current one (this bypasses the amplitude control of the other oscillator). They kind of cross-feed into each other which can cause some interesting distortions.

For some reason the audio buffer glitches in chrome on my Ubuntu box, but it worked well for me Chrome in Windows last time I checked.

[edit]This seems to work fine for me now in my current Crunchbang (Debian distro) in Chromium, and of course still on windows.[/edit]

You can check it out the demo here - oh, and be sure to turn down your headphones, it produces sounds ranging from weird and wonderful to horrible and nasty in a matter of seconds.

You can also check the code out on github.

It also uses knobrot, a jQuery interface plugin I developed to go with a synth app I plan (some day) to build.