Grainbox

A Granular Synthesis Sandbox!

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, and a granular-synthesis-based sequencer seemed like a great approach to this type of user interaction. However, I wanted a user’s interaction with this instrument to feel more physical-feeling 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, hence the title of the demo video above. The samples chosen for this demo came from the collection of short recordings on my phone that I keep as little sound-memories, in an effort to highlight the fun interplay between permanence and impermanence already present in this instrument.

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 on your keyboard, 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 or left and sped up or slowed down with the W, A, S, and D keys.

Tools

ChucK and the ChuGL ChuGin

Link:

https://ccrma.stanford.edu/~jomitch/grainbox-2/grainBox.zip

Requires:

The latest versions of ChucK and ChuGL

To start GrainBox, navigate to the folder in your computer’s terminal and run the command chuck –bufsize:2048 run.ck