Jump to content

Designing Sound in SuperCollider/Running water

From Wikibooks, open books for an open world

Fig 36.3: random-frequency sines

[edit | edit source]

Not a physically realistic model, but notice how it has some of the same aural qualities:

x = {SinOsc.ar(LFNoise0.kr(170).range(800, 2400), 0, 0.3)}.play;
x.free;


Fig 36.4: rising pitches

[edit | edit source]

Tweak the above so that the sounds drift in pitch, tending to rise:

(
x = {
	var trigs, freq;
	trigs = Dust.kr(170);
	freq = 
		// Generally choose from a varied base freq
		TExpRand.kr(800, 2000, trigs)
		// Wobbly variation
		+ LFNoise2.kr(20, mul: 300)
		// General tendency for upward rise
		+ EnvGen.kr(Env.perc(1).range(0,17), trigs)
		;
	SinOsc.ar(freq, 0, 0.3)
}.play;
)
x.free;


// hmmm, let's try combining a few of these in parallel.
// do we sound like a river yet?
(
x = {
	var trigs, freq;
	6.collect{
		trigs = Dust.kr(170);
		freq = 
			// Generally choose from a varied base freq
			TExpRand.kr(800, 2000, trigs)
			// Wobbly variation
			+ LFNoise2.kr(20, mul: 300)
			// General tendency for upward rise
			+ EnvGen.kr(Env.perc(1).range(0,17), trigs)
			;
		SinOsc.ar(freq, 0, 0.3)
	}.mean
}.play;
)
x.free;