granulatarize
brad's first feeble attempt at a SuperCollider thingy
originally coded 3/2003, updated to SC3.3/3.4 2/2011)
granulatarize is my first attempt to write an app using
SuperCollider,
that nifty digital sound synthesis/sig-processing
language written by James McCartney. Yeah, I know, everyone writes
a simple granular-synthesis app, but I figured it would be (and it was)
a good Learning Experience. Plus I read somewhere that James McC.
got started down the happy path to SuperColliderhood with a gran-synth
exercise.
I used
SuperCollider 3
for this project, the language-client/processing-server architecture
for Mac OSX (I think the linux version is almost finished, too). Instructions
for getting and compiling the SC3 source can be found
here.
I'm sure that the code is pretty embarrassing to hard-core Smalltalk and
SuperCollider coders. I'm still a functional/procedural kinda guy,
although I did manage to write a bunch of really unreadable
semi-object-oriented LISP code back in the olden days.
I Wanna Make It Go!
1. Click
here
to download the granulatarize.rtf source file (it's zipped for
easy transport!). OR you can click
here
to see the source, copy/paste, ridicule, whatever.
[NOTE: this is for SC3.3/3.4, earlier version does exist -- e-mail me]
2. Start up the SC3 app and open the granulatarize.rtf file.
3. Select everything in the granulatarize.rtf file and hit
that magic ENTER button. Load in a soundfile, and you'll be making
REAL LIVE COMPUTER MUSIC before you even realize what has happened to you.
What the buttons, sliders, etc. do
The Soundfile LOAD Button:
This button will start a file-open dialog that allows you to
select a soundfile for processing. Stereo, mono, wav, aiff -- it does
'em all with one hand tied behind it's back! The soundfile will
be placed into the buffer indicated by...
The Buffer # Box:
This number-box allows you to enter a buffer number. This means
that you can fire up several different instances of granulatarize
and operate on different (or the same) soundfiles.
The GO! Button:
Well gawrsh, I done fergot what this one does. Shucks.
The Grain Rate Slider:
This sets how fast the little grains of sound will be generated. Note
that you can set a range and the rate will be chosen randomly within
that range. The fastest rate is one grain every 0.0025 seconds, although
you can easily change this if you want to live dangerously (a rate of one
grain every 0.0 seconds will do a really good job of crashing the SC3 app
and making your computer run v e r y s l o w l y ). The slowest
rate is one grain per second.
The Grain Duration Slider:
Sets a range for choosing a grain duration. The Grain Rate slider
above it sets
the limits of this slider to prevent over-scheduling of too many sound
processing events and the resultant massive CPU overload. You can still
fake this out if you're clever, though, and happily soak your CPU power.
The Pitch Variance Slider:
This will set a range for choosing random sample-playback speeds.
At the center of the slider is normal speed, above will playback
up to twice as fast, and below will go waaaaay slow.
The Stereo Variance Slider:
Chooses how far from "center" a random stereo placement will be.
For mono files, this simply chooses a stereo amplitude
placement value within
the range selected (full selection will place the sound randomly between
the left and right channels). For stereo files, this determines a
range of multiplier values for the left and right channels, simulating
the placement effect for mono soundfiles.
The Playback Location Slider:
This slider sets a range within the total duration of the soundfile
for choosing where the grain of sound will be selected. A full selection
will allow grains to be grabbed from anywhere in the soundfile, a very
narrow selection will cause repeating of a small part of the soundfile.
The range of this slider will roam through the soundfile at a rate
determined by the...
The Playback Speed Slider:
Moving this to the right of the center point will increase the rate
at which the location of the soundfile "grain segment" (the portion
of the soundfile that will be sampled for the grain sound data) will be
shifted. Left of the center will cause the "grain segment" to travel
backwards through the soundfile. The slider positioned at the
center will stop the "grain segment" roaming.
Contact
Please feel free to send me comments, etc.:
Brad Garton (garton - at - columbia.edu).
Every once in a great while I randomly answer a bunch of stacked-up
e-mail. Also be sure to visit the
Computer Music Center
home page. It's a fun place!
Brad Garton
3/2003; 2/2011