‹ pakt17pakt19 ›

pakt18


pact18grey, 01:00, 1.84MB

Built with p5.js and SuperCollider. See /f0blog/pact-februari/

//pakt18
let index;
let a, b, c, d;
let spread;
let n;
function setup() {
  let div= select('#sketch');
  let cnv= createCanvas(div.width, div.height);
  cnv.parent('sketch');
  frameRate(60);
  noFill();
  index= 0;
  n= 50;
}
function draw() {
  spread= sin(index*0.002)*50.0+(sin(index*0.003)*40);
  background(0);
  for (let i= 1; i<n; i++) {
    stroke(255, 255, 255, sin(i/n*PI)*255);
    a= sin(((i*spread)+index)*sin(index*0.0025+(sin(index*0.0050)))*0.005)*0.45+0.5;
    b= sin(((i*spread)+index)*sin(index*0.0024+(sin(index*0.0051)))*0.005)*0.45+0.5;
    c= sin(((i*spread)+index)*sin(index*0.0023+(sin(index*0.0052)))*0.005)*0.45+0.5;
    d= sin(((i*spread)+index)*sin(index*0.0022+(sin(index*0.0053)))*0.005)*0.45+0.5;
    line(a*width, b*height, c*width, d*height);
    line(b*width, a*height, d*width, c*height);
  }
  index++;
}

Ndef(\grey).play
(
Ndef(\grey, {Mix({|i|
  var t= Impulse.ar(SinOsc.ar(0.1+(i*0.125), i/10*2pi+#[0, 0.1], 4, SinOsc.ar(0.01+(i*0.01), 0, 4, 12)));
  Pan2.ar(
    FreeVerb.ar(
      BPF.ar(
        GrayNoise.ar(
          Decay2.ar(
            t,
            TRand.ar(0.005, 0.015, t),
            TRand.ar(0.1, 0.15, t),
            TRand.ar(0.35, 0.5, t)
          )
        ),
        SinOsc.ar(i+1*0.032, #[0, 0.1]+i).exprange(i+1*300, i+1*600),
        SinOsc.ar(i+1*0.025, #[0, 0.1]+i).range(0.1, 1)
      ),
      0.3
    ),
    SinOsc.ar(0.1, #[0, 0.1]+i, 0.9)
  );
}!10)});
)
Ndef(\grey).stop