Homework 3: Sequencer
GrainBox
GrainBox initially came from a desire to have a very ephemeral sequencer; the idea was that with no user input, a sequence would slowly disappear into silence. This was then combined with the idea of a granular sequencer, a cool type of sequencer that I think the world needs more of. However, I wanted a user’s interaction with the sequencer to feel more “physical” than the “math-y wizard vibe” I’ve experienced with most other granular instruments. This led to the visual metaphor of a sandbox where the grains of sand are also grains of sound, being played as they fall into a hole in the bottom of the sandbox. This steady disappearance of grains highlights their fragility and ephemerality in a way that I think is beautiful. Below is a video of me performing with the sequencer and a set of four audio samples, although on my end it felt more like getting lost in a little moment than performing for 7 minutes:
On the technical end, each virtual grain of sand holds some audio information and some corresponding visual information. The four samples are colored blue, green, yellow, and red, and their hues shift warmer or colder based on a small randomized pitch shift for each grain. Grains at the start of a sample correspond to more muted shades of a color, while grains at the end of samples correspond to more saturated colors.
Samples are chosen with the 1, 2, 3, and 4 keys, or an eraser can be chosen with the C key. Grains can be placed by clicking and holding your mouse inside the box, in which case they start from the beginning of a sample and loop through it. They can also, however, be randomly placed throughout the box by pressing the R key, in which case their start times are also randomized. The hole at the bottom of the box can be turned right with the D key or left with the A key, and will be stopped by the spacebar.
The code is available here, and can be run by navigating to its folder in your computer’s terminal and typing “chuck –bufsize:2048 run.ck” (your mileage may vary, but I found a buffer size of 2048 to work best on my laptop): grainBox.zip
GrainBox uses ChucK, ChuGL, and some code for keyboard and mouse input written by Andrew Zhu Aday. All texture images used are my own, and all samples are my own recordings. I’m playing in all except the red sample, which is a recording of Ben Moore noodling around before a rehearsal. Further special thanks to Andrew for his debugging help and a method to make GrainBox load much faster than before!
Previous Assignment: Milestone 2