pakt27
Built with p5.js and SuperCollider. See /f0blog/pact-februari/
//pakt27
let index, n
function setup() {
const div = select('#sketch')
const cnv = createCanvas(div.width, div.height)
cnv.parent('sketch')
frameRate(60)
colorMode(HSB, 255)
noStroke()
index = 0
n = 80
background(0)
}
function draw() {
fill(color(0, 0, 0, 51))
rect(0, 0, width, height)
for (let i = 0; i < n; i++) {
const t = (i / n) * TWO_PI
fill(color((sin(t) * 0.15 + 0.15) * 255, 255, 255, 102))
const c = (sin(index * 0.036 + t) + cos(index * 0.022 - t)) * 0.01
const d = (cos(index * 0.033 + t) + sin(index * 0.02 - t)) * 0.01
const r = sin(t) * 25 + 30
ellipse(
width * 0.5 + sin(index * (d * 0.05) + c + t) * (width * 0.4),
height * 0.5 + cos(index * (c * 0.05) + d + t) * (height * 0.35),
r * 2,
r * 2
)
}
index++
}
Ndef(\sweep).play
(
Ndef(\sweep, {var n= 9; GVerb.ar(Mix({|i|
var t= i/n;
var t2pi= t*2pi;
var f= 2**i*10+100;
var z= LeakDC.ar(VarSaw.ar(SinOsc.ar(i+1*0.005, SinOsc.ar(i+1*SinOsc.ar(0.05, t2pi, 0.2, 0.4), 0, 2pi), f*SinOsc.ar(0.002, t2pi, 0.3, 0.5), f), t, SinOsc.ar(i+1*0.006, t2pi, 0.4, 0.5), i.linlin(0, n-1, 0.4, 0.1)));
Pan2.ar(z, SinOsc.ar(0.015, t2pi, i.linlin(0, n-1, 0.99, 0.2)), 1/n);
}!n), 30, 5, 0.3, 0.8, 10)});
)
Ndef(\sweep).stop