pakt05
Built with p5.js and SuperCollider. See /f0blog/pact-februari/
//pakt05
let index, n;
let grad;
function setup() {
let div= select('#sketch');
let cnv= createCanvas(div.width, div.height);
cnv.parent('sketch');
frameRate(60);
noFill();
strokeWeight(1);
index= 0;
n= 100;
grad= createGraphics(width, height);
grad.noStroke();
for(let r= width; r>0; --r) {
grad.fill(lerpColor(color(0.5*255, 0.4*255, 0.3*255), color(0, 0, 0), r/width));
grad.ellipse(width*0.5, height*0.5, r*2.0, r*2.0);
}
stroke(255, 255, 255, 0.8*255);
}
function draw() {
let x= width*0.5;
let y= height*0.5;
let w= width*0.3;
let h= height*0.275;
let spread= sin(index*0.0012)*20;
let speed1= sin(index*0.0013)*0.001+0.005;
let speed2= sin(index*0.0014)*0.001+0.0005;
let speed3= sin(index*0.0015)*0.001+0.014;
let speed4= sin(index*0.0016)*0.001+0.012;
image(grad, 0, 0);
for(let i= 0; i<n; i++) {
let px= x+(sin((index*i*speed1))+sin(index*i*speed2)*w)-i;
let py= y+sin((index+(i*spread))*speed3)*sin((index+i)*speed4)*h+i;
line(px+(n-i), py+(i-n), px, py);
}
index++;
}
Ndef(\noises).play
(
Ndef(\noises, {
var freq= SinOsc.ar(SinOsc.ar((4..0)/150+SinOsc.ar((0..4)/18, 0, 0.8)), SinOsc.ar((0..4)/80+SinOsc.ar((0..4)/20, 0, 0.1), 0, 2pi)).exprange(100, 1000);
var rq= SinOsc.ar(SinOsc.ar((0..4)/6+SinOsc.ar((0..4)/19, 0, 0.7), SinOsc.ar((4..0)/5+SinOsc.ar((4..0)/2, 0, 0.1), 0, 2pi))).exprange(0.4, 4);
Splay.ar(BPF.ar(BPF.ar(ClipNoise.ar(1!5), freq, rq), freq, rq), 0.85);
});
)
Ndef(\noises).stop