pakt28
Built with p5.js and SuperCollider. See /f0blog/pact-februari/
//pakt28
let index, n;
function setup() {
let div= select('#sketch');
let cnv= createCanvas(div.width, div.height);
cnv.parent('sketch');
frameRate(60);
colorMode(HSB, 255);
strokeCap(SQUARE);
noFill();
index= 0;
}
function draw() {
n= sin(index*0.0015)*30+35;
background(0);
for(let i= 0; i<n; i++) {
let t= i/n*TWO_PI;
strokeWeight(sin(index*0.0125+t)*5+5.5);
stroke(color((sin(t)*(sin(index*0.01)*0.2)+0.5)*255, (sin(index*0.004)*0.3+0.7)*255, 255));
let a1= (sin(index*(sin(index*0.0025+t)*0.01+0.01))*0.5+0.5)*TWO_PI;
let a2= (sin(a1*index*0.0005+t)*0.5+0.5)*PI;
let r= height*0.475*(1-i/n)*2;
arc(width*0.5, height*0.5, r, r, a2, a1);
}
index++;
}
Ndef(\round).play
(
Ndef(\round, {var n= 28; GVerb.ar(Limiter.ar(LeakDC.ar(Mix({|i|
var z= SinOsc.ar(i.linexp(0, n-1, 70, 1500), LFSaw.ar(i+1*5, 0, 0.5pi), LFSaw.ar(0.2+SinOsc.ar(i+1*0.001, 0, 0.5), i/n, 0.4).max(0))*SinOsc.ar(200+i, 0, SinOsc.ar(0.03, i+1, 0.5, 1))*SinOsc.ar(400+i, 0, SinOsc.ar(0.04, i+2, 0.5, 1))*SinOsc.ar(800+i, 0, SinOsc.ar(0.05, i+3, 0.5, 1));
Pan2.ar(z, i.linlin(0, n-1, -0.925, 0.925), 1/n);
}!n))), 3, 5, 0.2, 0.8, 20, 0.1)});
)
Ndef(\round).stop