View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide

walk in the snow

//walk in snow, julian rohrhuber 01/11, sc2
//mouse y controls rest
//mouse x controls listening direction
(
var w;
w = GUIWindow.new("", Rect.newBy(-10, -10, 2000, 2000)).backColor_(rgb(225,225,225));

{
	var walk, bird;
	m = MouseX.kr(0, 2.5, 'linear', 0.2);
	
	walk = XFadeTexture.ar({
		RLPF.ar(
			Decay2.ar(Dust.ar(MouseY.kr(0, 100))
				, 0.02, 0.05, 
				PinkNoise.ar(
					Lag.kr(
						LFPulse.kr(rrand(0.7, 1.0), 0.02, 6), rrand(0.4, 0.9)
					) 
				)),
			LFNoise1.kr(rrand(2, 1.1), 50, rrand(200,300)), rrand(0.4,0.5))
	}, 3, 1, 1);
	
	bird = SinOsc.ar(
			Lag.kr(LFPulse.kr(3, LFNoise1.kr(0.1, 0.1, 0.5), 450, 3000), 0.1), 
			0, LFNoise0.kr(1, 0.01, -0.008).max(0)
		);

	Pan2.ar(walk, LFNoise1.kr(0.2, 0.5, m).fold2(2) - 1) + Pan2.ar(bird, LFNoise0.kr(0.1, 1, m).fold2(2) - 1)
	// some light snowfall
	+ Decay.ar(Dust.ar([20, 20], LFNoise1.kr(0.5, 0.001, 0.001)), 0.004, SinOsc.ar(LFNoise0.kr(80, 2000, 13000)))
}.play;

if(w.notNil, { w.close });
)



jrh

Links to this Page