Skip to content

Render Visuals to Frames

render(screen, n) renders what is routed to screen for n cycles, as PNG frames. With master beside it, the mix is written too, in sync with the frames.

Route the picture to screen, then render master and screen together:

use "std/instruments" { Sampler, Kit };
use "std/visuals" as gfx;
set_project_title("Frames");
let drums = AudioTrack("drums");
drums.set_instrument(Sampler(Kit("CR-78")));
drums << [bd sd bd sd];
let field = gfx.Noise("field");
let soft = gfx.Blur("soft");
soft.parameter("radius") << drums.rms.smooth(80).range(0, 20);
field >> soft >> screen;
render(#[master, screen], 1);

Then, in the project folder:

Terminal window
resonon run

A level or spectrum bound to the picture reads the render’s own audio, so the frames move with the mix. No window has to be open.

render(screen, 1);

The mix is still rendered to drive the bound levels; it is not written.

The frames are in the render’s folder under renders/, beside master.wav:

renders/
frames_2026-09-30_18-00-00/
master.wav
frames/
frame_00000.png
frame_00001.png
…

There are 60 frames a second, at 1920 × 1080. In the render’s folder, an encoder such as ffmpeg turns them and the mix into a video:

Terminal window
ffmpeg -framerate 60 -i frames/frame_%05d.png -i master.wav -c:v libx264 -pix_fmt yuv420p -c:a aac video.mp4

A section’s screen lane is not rendered yet: render(screen) refuses one. Route a single picture with v >> screen to render it.