💾 Archived View for heavysquare.com › noise › 2020-12-25.sc.txt captured on 2022-06-04 at 00:23:22.

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

s.boot

// lessons
//
// 1. cartesian product is: all({:[x,y], x<-[...], y<-[...]})
// 2. when an example sc code with MouseX and MouseY is to your liking,
//    then generate a grid for same params, simulate dynamics w/ lag
//

(
SynthDef(\fb,
{|out=1,freq=440,amp=1,gate=1,mod=0.5,lag=0.1|
		var env = EnvGen.kr(Env.asr(),gate,doneAction:Done.freeSelf);
		var sig = Splay.ar(SinOscFB.ar(100*SinOscFB.ar(Lag.kr(freq,lag),lag)+120,Lag.kr(mod,lag)*pi) !2);
		Out.ar(out,sig*env*Lag.kr(amp,lag/2));
}).add;
)

(
Pdef(\fbp,Pmono(\fb,
	[\freq,\mod],Pseq(all{:[x,y*pi/10], y<-[1.3,1], x<-(1000,1400..8000)}.scramble,1),
	[\lag,\dur,\amp],Pcollect(
		{|i|[i*0.8,i,0.4+(i/20)]},
		Pwrand([4,2,1],[1,2,4].normalizeSum,inf))
))
)

Pdef(\fbp).record("/tmp/2020-12-25.wav")