Skip to content

Render a Song

A song made with arrange() knows its own length, so the render can be exactly as long as the song.

End the project’s src/main.non with the song, song.play(), and a render as long as the song:

use "std/instruments" { Sampler, Kit };
set_project_title("My Song");
let drums = AudioTrack("drums");
drums.set_instrument(Sampler(Kit("CR-78")));
let verse = section(4);
verse[drums] << [bd _ sd _];
let chorus = section(4);
chorus[drums] << [bd sd bd sd];
let song = arrange(#[verse * 2, chorus]);
song.play();
render(master, song.length());

song.play() puts the song on its tracks. render() plays it from the start, for song.length() cycles. In the project folder, run:

Terminal window
resonon run

The mix is in renders/my_song_<date>_<time>/master.wav.

List the tracks beside master:

render(#[drums, master], song.length());

Each track is written as its own WAV, beside master.wav.

The render stops at the song’s last cycle, so a reverb or delay still sounding there is cut. What else a render leaves out is in What a render contains.