WIP 20121207 - synth patches

I've written a custom wave selector. This one is evidently more graphical than the previous drop-down selector. I am using a temporary instance of the synth to plot the values of the selector canvas, by telling the instance that the sampling rate is the width of the graph. I am not sure if that could be called a hack or a clever trick; I leave that up to your judgment. Apart from that, I think the waves look quite cute. That's not something you usually say about a GUI element: think about it for a minute!

While developing that, I accidentally ended up with this funny, quirky image:


Who you gonna call? SINEBUSTERS! (Now you'll have the song stuck in your head for hours)

I also extracted the code for displaying the sound output (i.e. the green graph in the example) into its own class, ScopeGraph. This will come in handy for showing output in future examples. Besides, that makes the code in the example more readable.

I still have to rework the UI for the noise and oscillator mix configurations.

Finally, one of the best things about working with web technologies is that sharing stuff is incredibly easy. You just copy and paste a URL, and voilà, the rest of the world can see what you're looking at, without having to install an app or anything!

So I've added support for storing the synth status into the URL (more exactly, in the window.location.hash property). Each time you change a parameter, the hash changes accordingly. When you get to a combination you like, you can save it for later by bookmarking the page.

Some examples:

Please mention me on twitter with a link to your patch so I can hear what you do with the synth. Don't be shy! :D