stopwatch (with autostart support)

Displays a stopwatch overlay above the score. Stopwatch overlays may show the main stopwatch time or create their own independent stopwatch.

This cue now supports autostart, meaning it can begin running automatically when the SVG is loaded — in both page and scroll modes — without requiring the playhead to cross.


Syntax

stopwatch(source:<main|new>, hold:<seconds>, scroll:<true|false>,
          offsetX:<pixels>, style:"<css rules>", trig:<auto|edge>)

Arguments

Arg Values Default Behaviour
source "main" / "new" "main" Use global clock or create/reset local stopwatch
hold seconds 0 When >0, overlay fades+removes at timeout
scroll true / false false Follows scrolling score or fixed overlay
offsetX px 0 X-offset from cue location
style CSS Inline CSS, use ; separated
trig "auto" / "edge" "edge" auto means autostart on load

Behaviour


Autostart (NEW)

Autostart activates when:

trig:auto

Example:

stopwatch(source:new,style:"font-size:3em;color:red",trig:auto)

Autostart behaviour:


Autostart Examples

Main stopwatch, always visible

stopwatch(source:main,style:"font-size:2.5em;",trig:auto)

Independent timer with 10s hold

stopwatch(source:new,hold:10,style:"font-size:2em;",trig:auto)

Scrolling stopwatch

stopwatch(source:new,scroll:true,trig:auto)

Stylised overlay

stopwatch(source:new,
          style:"font-size:4em;color:#0ff;text-shadow:0 0 5px #000;",
          trig:auto)

Edge-triggered Examples (non-autostart)

stopwatch(source:new)
stopwatch(source:main,scroll:true)
stopwatch(source:new,hold:8,offsetX:-30)

Developer Notes


Known Limitations

Tip: use ← → or ↑ ↓ to navigate the docs