Buffer Source File:
Hi! I’m Patrick and I’m a web developer from Kentucky.
When I originally read Curtis Roads’ excellent book on Granular Synthesis, Microsound, I found myself very drawn to the concept and sought out a way to play around with the ideas in Max. I soon found Nathan Wolek’s essential Granular Toolkit and spent quite a bit of time teaching myself how it all worked so that I could incorporate it into my own granular patch, with which I continued to tinker with and expand slowly over time.
I have a basic proof-of-concept up and running and am beginning to expand functionality.
Questions & Answers
Aren’t there already numerous examples of Web Audio-based granular synthesis?
Absolutely! I haven’t found many that implement the grain windows discussed in Microsound or available in Nathan Wolek’s granular tools though. I’ve found the subtle variations between each window type to be interesting, as if they were the granular tool’s vocal cords / glottis, imparting their own tonal coloring on the resultant sound.
How do you personally use an app like this?
I enjoy granular synthesis/processing more for random generation of ideas and textures than for any sort of traditional melodic or tonal usage. Most often, I love using a long source file of speech or dialogue that, when granulated and cut up, sometimes synthesizes new and often bizarre phrases out of the rearranaged syntax. See also the literary cutup techniques pioneered by William S. Burroughs and Brion Gysin (as well as their book on the subject, The Third Mind).
Lessons I’ve Learned So Far
ArrayBuffers aren’t really arrays but raw sequences of bytes. You have to create a typed view of those bytes to get the actual array data.
The arrays you use for the grain windows should have as few rows as you can get away with. 1000 rows creates garbled noise when playing back but 100 rows is a smooth curve when using AudioParam.setValueCurveAtTime().
AudioParam.setValueCurveAtTime() does all the heavy lifting for windowing the grains’ amplitude curves. You feed it an array of level values and a duration and it handles the complex task of interpolating through those array values evenly over that duration.