Skip to content

Instantly share code, notes, and snippets.

@dqgorelick
Last active February 26, 2024 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dqgorelick/27167ba6eed02662f2f292bedac3c525 to your computer and use it in GitHub Desktop.
Save dqgorelick/27167ba6eed02662f2f292bedac3c525 to your computer and use it in GitHub Desktop.
Elegy for a Terrestrial Collapse, source
// source code for Elegy for a Terrestrial Collapse, https://youtu.be/LfUB34frkPg
// visuals code (https://hydra.ojack.xyz/)
s0.initScreen() // screengrabs the video source
src(s0)
.modulate(noise(4,0.1),0.01)
.add(noise(2,0.1),0.3)
.color(1,0.8,0.8)
.add(
src(o0).scale(()=> 1.2), ()=> 0.6)
.brightness(()=>-1*mouse.y/height)
.blend(src(o0),0.97)
.modulate(src(o0).color(0,1), () => 0.009) // modulating the Y axis
.modulate(src(o0).color(1,0), () => 0.08/2 - 0.08 * mouse.x/width) // modulating the X axis
.out()
render(o0)
// audio code (https://strudel.cc/), i was sending MIDI to use keyscape pianos, but this works too
"{0 1 2 3 4 5}%<2!3 4 3>"
.off(1/2, n => n.add(7))
.sometimesBy(0.3, n => n.add(14))
.scale("c3:minor").note()
.s("piano").clip(1.5).gain(0.6).room(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment