-
Notifications
You must be signed in to change notification settings - Fork 12
The Prototype
This instrument is based on a SuperCollider patch that grew out of a longer occupation with granular synthesis and more specifically reading Curtis Roads book "Microsound". It was at first developed without a GUI completely relying on SuperColliders pattern system. In preparation for a workshop on granular synthesis with SuperCollider I gave in 2015 it was developed and given more or less its current form.
I think the prototype can serve as a nice reference when trying to understand my thought process and my design decisions that went into the final plugin. I recommend browsing and playing around with the prototype and the source code a bit to get a feel for it before you proceed to the concept.
The prototype is split into four files: INIT_GRNLR.scd, GRNLR_GUI.scd, GRNLR_ENGINE.scd, grnlr_synth.scd
. The files are separated by the task they implement to keep the code more readable.
INIT_GRNLR.scd
contains general setup and initialization of variables. It loads and executes the contents of GRNLR_GUI.scd
and grnlr_synth.scd
which holds the SynthDef
. A SynthDef
is a SuperCollider Class responsible for defining a function that produces the sound in the end (this explanation is of course criminally oversimplified).
GRNLR_GUI
handles, as the name implies, all GUI related operations. This means setting up the window and handling all the interaction the user has with GUI elements, such as sliders and buttons. All the variables are stored in a dictionary we initialize at the start of the file. This dictionary is (in classic SuperCollider style) "sort of global". More precisely it's an environment variable that is in the namespace of the current environment.
GRNLR_ENGINE.scd
contains the main routine (a Tdef
or Task definition which is basically a named routine). This routine is responsible for getting the values of all the GUI elements and other variables and triggering grains with those values. Later in the file the handling of MIDI data is defined.