Hydra Code:
let p5 = new P5();
p5.createCanvas(p5.windowWidth - 100, p5.windowHeight - 100, p5.WEBGL, p5.canvas);
s0.init({src: p5.canvas});
src(s0).out();
p5.hide();
p5.angleMode(p5.DEGREES);
p5.colorMode(p5.HSB);
p5.stroke(199, 80, 88);
p5.strokeWeight(3);
p5.noFill();
p5.pixelDensity(1);
let r = p5.width / 3;
let rotationSpeed = 0.8;
let hueShift = 0;
const settings = [0.75, 5, 5];
p5.draw = () => {
p5.clear();
p5.orbitControl();
p5.rotateX(p5.frameCount * rotationSpeed);
p5.rotateY(p5.frameCount * rotationSpeed);
settings[0] = cc[0] || 0.75;
settings[1] = cc[1] ? cc[1] * 10 : 5;
settings[2] = cc[2] ? cc[2] * 10 : 5;
p5.rotateX(65);
p5.beginShape(p5.POINTS);
for (let theta = 0; theta < 180; theta += 2) {
for (let phy = 0; phy < 360; phy += 2) {
let x = r * (1 + settings[0] * p5.sin(settings[1] * theta) * p5.sin(settings[2] * phy))
* p5.sin(theta) * p5.cos(phy);
let y = r * (1 + settings[0] * p5.sin(settings[1] * theta) * p5.sin(settings[2] * phy))
* p5.sin(theta) * p5.sin(phy);
let z = r * (1 + settings[0] * p5.sin(settings[1] * theta) * p5.sin(settings[2] * phy))
* p5.cos(theta);
p5.stroke((hueShift + theta + phy) % 360, 80, 88);
p5.vertex(x, y, z);
}
}
p5.endShape();
hueShift += 0.1;
}
src(s0)
.modulatePixelate(noise(()=>cc[2]*20,()=>cc[0]),20)
.out()
src(s0).modulate(noise(4, 1.5), 0.6).mult(osc(1, 10, 1)).out(o2)
render(o2)
src(o2)
.modulate(src(o1).add(solid(0, 0), -0.5), 0.005)
.blend(src(o0).add(o0).add(o0).add(o0), 0.1)
.out(o2)
render(o2)
hush()
TidalCycle Code:
d1 $ ccv "0 40 80 127" # ccn "0" # s "midi"
d2 $ slow 4 $ rotL 1 $ every 4 (# ccv (fast 2 (range 127 0 saw))) $ ccv (segment 128 (range 127 0 saw)) # ccn "1" # s "midi"
d3 $ slow 4 $ ccv (segment 128 (slow 4 (range 127 0 saw))) # ccn "2" # s "midi"
d4 $ slow 4 $ note "c'maj d'min a'min g'maj" # s "superpiano" # legato 1 # sustain 1.5
d5 $ slow 4 $ note "c3*4 d4*4 a3*8 g3*4" # s "superhammond:5"
# legato 0.5
xfade 4 $ "bd <hh hh*2 hh*4> sd <hh [hh bd]>"
# room 0.2
once $ s "auto:3"
hush
Link to the video.