Sometimes I feel a bit useless or demented, so I poke around in Csound. Last night I did a doodle … it didn’t even qualify as a sketch. But this morning I worked on it a little more, and now I guess it’s a sketch. It’s called “Groovish.” The link is for folks who are on mobile devices that lack Flash. Here’s the Flash player:
All of the frequencies are whole-number multiples of 25Hz, and the fundamental is at 100Hz, so this is an example of just intonation. The groove is deterministic, not random, though it’s not deterministic in any perceptible way. And it’s not in any time signature at all; five different generators are running at once, each of them using a sine-wave-driven divide-down process to either fire or not fire on any given pulse. You may hear it in 4/4 time, or at least as 16th-notes within a quarter-note pulse — I do — but that perception is just the way the brain does stuff, it’s not in the code.
Each note chooses one of three possible pitches at random, so the result is unpredictable, but the seed value was chosen by hand, so the playback is the same every time. I did not plan the final cadence, but it’s nice that it’s repeatable. Three global line generators are responsible for changing the attack times, reverb send levels, and a couple of other things.
Csound users can download the source code here. It’s not commented, and the p-fields are not in any sensible order, but even so, you can probably figure out what’s going on, as the algorithm (which is implemented directly in Csound, not in Python) isn’t terribly complex. A lot more could be done with this concept, and I may carry it further.
Pretty cool stuff. Have you ever seen that Flash toy Tone Matrix?
No, I hadn’t seen it. It’s quite clever.