Henk Lasschuit's code
Confetti2 is an old project that I wrote for my first toy computer, the Aquarius by Mattel. I liked the sound of it so much, that I rewrote it for every system that I worked with: Atari-PASCAL and a few BASIC-dialects on the Mac. Now I hope that Apple computers and SuperCollider are here to stay so I don't ever have to rewrite this again.
In his book "Schema's voor programmeren" (Diagrams for programming, Kluwer, Deventer, 1988) Andree Hollander introduces a simple algorithm for generating a series of numbers: pick a number, if it is even, divide by 2, else multiply by 3 and add 1. Repeat until the value 1 is reached (or else 4,2,1,4,2,1 will be repeated endlessly). Use the numbers as sound parameters and you have, well, music! I generated 100 series, starting with 1 to 100. Of the sound in the middle the pitch is controlled by the numbers within a series and the timbre by the starting number. The sound in the left channel is the length of a series (pitch) and the longest series up until now determines the timbre. The sound in the right channel is controlled by the maximum value within a series and the highest value up until now determines the timbre.
A thunderstorm, made with SuperCollider. There are three layers of sounds: rain, wind and thunder. There is a global envelope controlling the density of the raindrops and the thunder as well as the frequency of the wind. For the rain there are ticks of noise, but also a few drops falling on metal objects. I like that sound. For the wind there are two identical functions, one plays in the left channel and one plays right. Thunder is the most complicated of them all. It is filtered noise with a slow trigger for making a thunderclap and a fast trigger for the rumbling within a thunder. I added some FreeVerb to make it more spatial.