Last updated: 2026-04-18 · 25 commits

Forest Dream video

This is an interactive music video for the song "forest dream":

https://soundcloud.com/joakimv/forest-dream

The song was made with overtone, so using Quil for the video seemed like an interesting idea.

You walk through a dark forest with your flashlight and encounter drawings from the lyrics.

Controls

arrow keys
move (camera-relative, FPS-style)
mouse
look around
r
reset position
1
drop a tree in front of you
2
drop "badhand" in front of you
3
drop "saw" in front of you
c
clear all dropped things
p
toggle debug overlay

Running

from a shell

Install Java (any recent JDK works) and Leiningen: https://leiningen.org/

Then run:

lein run

from Emacs

Run cider, open core.clj and press C-c C-k to evaluate the file.

via container (no local install)

For lazy friends.

devcontainer (VS Code / Cursor / any devcontainer-aware tool)
open the folder, "Reopen in Container", then lein run in the terminal.
shell script
needs podman or docker. ./run-container.sh (builds on first run).

Both forward X11 + GPU to the host. Works on Linux with Xorg or Xwayland. Pure Wayland may need tweaking.

Assets

Drawings live as SVGs in the project root, and are converted to PNGs for rendering (Processing 4 has some SVG parser quirks, PNGs are more predictable).

To add a new asset:

  1. Save the SVG in the project root
  2. Run ./convert-svg.bb new.svg (fixes scientific notation for Processing 4 compatibility)
  3. Export to PNG: inkscape new.svg --export-type=png --export-filename=new.png --export-dpi=96
  4. Trim transparent borders: magick new.png -trim +repage new.png
  5. Reference it by name in core.clj

PNGs are rendered as billboards — they always face the camera.

Stack

Modernized 2026 from the original 2017 version (Clojure 1.8 / Quil 2.6).

License

Copyright © Joakim Verona 2017

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.