All examples · Audio · As Markdown, for AIs

On the beat

What this example shows

loop: { bar: 3 } makes the first two bars an intro: they play once and the tune goes round bars 3 to 6. Recorded music does the same with loopStart on useMusic or useSound.

onBeat calls on every beat with the beat of the bar and the bar. It goes by the audio clock, not the frames, so the crowd stays in time even when a frame is late, and when the tune goes round the count goes back to bar 3, which is where the tune really is.

P to play or stop.

Starting
Starting
—