Automate a Song
A track’s volume, pan and effect parameters are lanes of a section or song, like its notes.
The Arrangement Model explains lanes.
Automate a section
Section titled “Automate a section”Index the section with the track, and send the parameter a value or a signal:
use "std/instruments" { Sampler, Kit };use "std/effects" { Lowpass };use "std/signals" { automation };
let drums = AudioTrack("drums");drums.set_instrument(Sampler(Kit("CR-78")));drums.set_effects(#[Lowpass("lowpass", 800)]);
let verse = section(8);verse[drums] << [bd bd sd bd];verse[drums].volume << -6;
let chorus = verse.clone();chorus[drums].volume << 0;
let song = arrange(#[verse, chorus]);An effect parameter is addressed by the effect’s slot name:
verse[drums].effect("lowpass").parameter("Cutoff").
Automate at a position in the song
Section titled “Automate at a position in the song”Write to a position on the song’s lane, in cycles from the start of the song:
song[drums].volume.at(8, 8) << automation().at(0, -24).at(8, 0); // the chorus swells inThe automation’s own times count from the start of the position.
Related
Section titled “Related”- Audio: Sections — section lanes and parameters
- Draw an Automation Curve — breakpoints and curve shapes
- Arrange a Song from Sections — the song being automated