Skip to content

Arrange a Track on a Timeline

A timeline is one lane on its own: patterns placed at positions, looping at its end. Use one to arrange a single track without writing sections.

timeline(length) makes a timeline length cycles long. Place patterns with .at(start, duration), then send the timeline to the track:

use "std/instruments" { Sampler, Kit };
let drums = AudioTrack("drums");
drums.set_instrument(Sampler(Kit("CR-78")));
let t = timeline(16);
t.at(0, 8) << [bd _ sd _];
t.at(8, 4) << [bd*4];
t.at(14.5, 1.5) << [cp cp]; // positions need not be whole cycles
drums << t;
PLAY;

Cycles no pattern covers are silent.

Write to the timeline again; the track follows. A timeline has the same layer methods as a section’s lane — see Add Fills to a Song.