From 65ff2372ca4fa7bb5d63e78e561ea3c8a4341efc Mon Sep 17 00:00:00 2001 From: bonamin Date: Wed, 28 Oct 2026 11:10:06 +0200 Subject: [PATCH] docs(api-reference): no gap between melody loops (firmware F-078, 2.5.1) Co-Authored-By: Claude Opus 5.5 --- frontend/src/pages/engineering/developer/ApiReferencePage.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/engineering/developer/ApiReferencePage.jsx b/frontend/src/pages/engineering/developer/ApiReferencePage.jsx index 47ad8d3..c46ed33 100644 --- a/frontend/src/pages/engineering/developer/ApiReferencePage.jsx +++ b/frontend/src/pages/engineering/developer/ApiReferencePage.jsx @@ -133,7 +133,7 @@ const NAMESPACES = [ { message: 'Melody not found locally and this device has no SD card to download it to', condition: 'Needs a download but the build has no SD card / FileManager (agnus)' }, ], example: '// single — play once and stop\n{ "v": 2, "req_id": "a1", "cmd": "playback.play", "contents": { "pid": "westminster", "speed": 400, "mode": "single" } }\n\n// timed — loop for 2 minutes, finish the loop, stop (downloads first if needed)\n{ "v": 2, "cmd": "playback.play", "contents": { "pid": "ABC123", "url": "https://example.com/ABC123.bin", "mode": "timed", "duration": 120000 } }\n\n// interval — play 15 s, pause 5 s, repeat for 3 min total\n{ "v": 2, "cmd": "playback.play", "contents": { "pid": "ABC123", "mode": "interval", "duration": 15000, "pause_duration": 5000, "total_duration": 180000 } }\n\n// infinite — loop until playback.stop\n{ "v": 2, "cmd": "playback.play", "contents": { "pid": "ABC123", "mode": "infinite" } }\n\n// infinite with segments — play 30 s, pause 10 s, forever\n{ "v": 2, "cmd": "playback.play", "contents": { "pid": "ABC123", "mode": "infinite", "duration": 30000, "pause_duration": 10000 } }\n\n// legacy timing (no mode)\n{ "v": 2, "cmd": "playback.play", "contents": { "pid": "ABC123", "segment_duration": 15000, "pause_duration": 5000, "continuous_loop": true } }', - warning: 'Exact timing: (1) timing is checked every 500 ms, so every duration / pause / total boundary is hit up to 0.5 s late. (2) A loop is never cut short (only playback.stop and the overload guard do that); when a segment or the run ends mid-loop, the current loop finishes first. (3) At a segment end status/playback goes "paused" straight away while that loop finishes ringing; at the end of a timed/interval run it goes "stopping", then "idle". "single" goes from "playing" directly to "idle". (4) The bells are then silent for the full pause_duration, counted from that loop end, and status goes back to "playing". (5) total_duration counts from the start, pauses included; if it runs out during a pause, playback stops at once. (6) When the run has no end time (single, infinite, interval with total_duration 0) the engine waits ~0.5 s between loops; timed and interval with a total_duration loop with no gap. Which timing fields are read: mode present → duration (+ pause_duration for "infinite", + pause_duration / total_duration for "interval"); segment_duration and continuous_loop are ignored. mode absent (legacy): continuous_loop false → run for segment_duration, total_duration ignored; continuous_loop true → segment_duration segments with pause_duration gaps, stopping after total_duration if given this command, else segment_duration if given, else the previous total_duration (0 = forever). Never mix the two sets expecting both to apply.', + warning: 'Exact timing: (1) timing is checked every 500 ms, so every duration / pause / total boundary is hit up to 0.5 s late. (2) A loop is never cut short (only playback.stop and the overload guard do that); when a segment or the run ends mid-loop, the current loop finishes first. (3) At a segment end status/playback goes "paused" straight away while that loop finishes ringing; at the end of a timed/interval run it goes "stopping", then "idle". "single" goes from "playing" directly to "idle". (4) The bells are then silent for the full pause_duration, counted from that loop end, and status goes back to "playing". (5) total_duration counts from the start, pauses included; if it runs out during a pause, playback stops at once. (6) No gap between loops: in every looping mode the next loop starts right after the previous one; the last step\'s beat (speed) is the only spacing (firmware 2.5.1+; older builds waited ~0.5 s between loops when the run had no end time). Which timing fields are read: mode present → duration (+ pause_duration for "infinite", + pause_duration / total_duration for "interval"); segment_duration and continuous_loop are ignored. mode absent (legacy): continuous_loop false → run for segment_duration, total_duration ignored; continuous_loop true → segment_duration segments with pause_duration gaps, stopping after total_duration if given this command, else segment_duration if given, else the previous total_duration (0 = forever). Never mix the two sets expecting both to apply.', }, { cmd: 'playback.stop',