‹ pakt12pakt14 ›

pakt13


pact13pulse, 01:00, 1.84MB

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

//pakt13
let index;
let rows, cols;
let grad;
function setup() {
  let div= select('#sketch');
  let cnv= createCanvas(div.width, div.height);
  cnv.parent('sketch');
  frameRate(60);
  index= 0;
  rows= 11;
  cols= 11;
  grad= createGraphics(width, height);
  grad.noStroke();
  for(let r= width; r>0; --r) {
    grad.fill(lerpColor(color(0.5*255, 0.6*255, 0.5*255), color(0, 0, 0), r/width));
    grad.ellipse(width*0.5, height*0.5, r*2.0, r*2.0);
  }
  fill(255);
  noStroke();
}
function draw() {
  clear();
  background(0);
  blendMode(DIFFERENCE);
  beginShape(QUADS);
  for(let y= 0; y<=rows; y++) {
    for(let x= 0; x<=cols; x++) {
      let xx= x/rows*width-2;
      let yy= y/cols*height-2;
      let vx= sin(index+(x*y))*(sin((index+x)*0.0015)+sin((index+y)*0.0062)*10);
      let vy= cos(index+(x*y))*(sin((index+y)*0.0325)+sin((index+y)*0.0072)*10);
      vertex(vx-xx, vy-yy);
      vertex(vx+xx, vy-yy);
      vertex(vx+xx, vy+yy);
      vertex(vx-xx, vy+yy);
    }
  }
  endShape();
  blendMode(LIGHTEST);
  image(grad, 0, 0);
  index++;
}


Ndef(\pulse).play
(
Ndef(\pulse, {GVerb.ar(Splay.ar(Resonz.ar(LFPulse.ar(#[121, 232, 343]), LFPulse.ar(#[0.121, 0.232, 0.343]).exprange(LFPulse.ar(#[12.1, 23.2, 34.3]).range(80, 100), LFPulse.ar(#[1.21, 2.32, 3.43].reverse).range(800, 1000)).sum*LFPulse.ar(#[0.121, 0.232, 0.343]).range(0.5, 1), 0.3, 0.15)), 34, 3, 0.2)});
)
Ndef(\pulse).stop