From 44b7b3c1bd97119bb21d2ee1ce2af5726264e633 Mon Sep 17 00:00:00 2001 From: stigmagit Date: Sat, 31 Oct 2026 10:19:28 +0100 Subject: [PATCH] SYNTIZ (draft): at most three SYNTIZ tracks in a Part On the author's MKII a fourth SYNTIZ track holding a long note overruns the frame interrupt's share and crackles. wave_admit_track refuses SYNTIZ for a fourth track of the Part; a track that is SYNTIZ already stays admitted, and a Part saved with more plays on. Tried on the unit from the author's release branch (package f501a6a4). Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/syntiz/CHANGELOG.json | 9 +++++++++ sdk/drafts/syntiz/README.md | 6 +++++- sdk/drafts/syntiz/TESTING.md | 16 ++++++++++++++++ sdk/drafts/syntiz/machine.c | 17 +++++++++++++++-- 4 files changed, 45 insertions(+), 3 deletions(-) diff --git a/sdk/drafts/syntiz/CHANGELOG.json b/sdk/drafts/syntiz/CHANGELOG.json index 2e423c94cc..4d83da1cd6 100644 --- a/sdk/drafts/syntiz/CHANGELOG.json +++ b/sdk/drafts/syntiz/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "0.1.1-experimental", + "date": "2026-10-31", + "changes": [ + "At most three SYNTIZ tracks in a Part: choosing SYNTIZ for a fourth track is refused, so the unit never crackles from too many SYNTIZ notes at once.", + "A Part saved with more SYNTIZ tracks still plays as it was.", + "The sound is unchanged." + ] + }, { "version": "0.1.0-experimental", "date": "2026-10-28", diff --git a/sdk/drafts/syntiz/README.md b/sdk/drafts/syntiz/README.md index c9fefe0a85..e28ba0b8e4 100644 --- a/sdk/drafts/syntiz/README.md +++ b/sdk/drafts/syntiz/README.md @@ -2,7 +2,11 @@ Status: **draft**. SYNTIZ is an Octatrack track machine with six models, whose sound goes through the track's own filter, AMP envelope, LFOs and effects. All six have played on the author's MKII over USB, and a project -with SYNTIZ tracks came back whole after a power cycle (TESTING.md); no CPU reading on a unit yet. +with SYNTIZ tracks came back whole after a power cycle (TESTING.md). + +At most three SYNTIZ tracks in a Part: choosing SYNTIZ for a fourth track is refused, and that track stays what it +was. On the author's MKII a fourth track holding a long note overran the time the base gives machines in each frame, +and the base dropped renders: a crackle (TESTING.md). A Part saved with more plays on as it was, and may crackle. The engine is original: no code, table or recording of any other product is used. diff --git a/sdk/drafts/syntiz/TESTING.md b/sdk/drafts/syntiz/TESTING.md index e9136ccdd1..43f0e39c53 100644 --- a/sdk/drafts/syntiz/TESTING.md +++ b/sdk/drafts/syntiz/TESTING.md @@ -155,3 +155,19 @@ not hardware evidence. - Reported by the author, playing it with a friend: the six models work "very well". - Power cycle: a project saved with SYNTIZ tracks, the unit switched off and on; reported by the author: everything came back. Over USB afterwards: base `b30d9b09…`, nothing missing. + +## Load on the author's MKII, and the three-track limit (29-30 October 2026) + +- Package `d0af8336` kept on `b30d9b09` (the author's release branch: this draft plus the `ev_trig_muted` question, + which needs `build.py --raise`). Reported by the author: a seven-track test project crackles "like an old record" + while SYNTIZ plays; with long notes three SYNTIZ tracks play clean and a fourth crackles. +- The base's frame guard on the RAM-booted development twin `04e94075`, the same project playing for 120 s: without + SYNTIZ 35.2 % of each frame in the frame interrupt; with its seven SYNTIZ tracks 79.6 %, 6.35 renders dropped a + frame on average, the longest frame 146.5 % (the guard's share is 80 %). +- Three lighter builds were tried on the unit and set aside: shortcuts that keep every sample, a rest between notes, + and a plain output stage without the antiderivative. With long notes none let a fourth track play clean (the + author's listening). Rendering at half rate was rejected by the author on listening examples. +- The limit: `wave_admit_track` admits at most three SYNTIZ tracks in a Part. Package `f501a6a4`, the release branch + with this function, tried and kept on `b30d9b09` over USB; reported by the author: choosing SYNTIZ for a fourth + track is refused. The function, copied from `machine.c`, passed a host check (an empty Part, three tracks, a model + change, another machine's leftover signature, a Part saved with seven). The draft's own package is not built here. diff --git a/sdk/drafts/syntiz/machine.c b/sdk/drafts/syntiz/machine.c index 02d26ba8c2..83138716d5 100644 --- a/sdk/drafts/syntiz/machine.c +++ b/sdk/drafts/syntiz/machine.c @@ -137,10 +137,23 @@ uint32_t wave_track_page(const volatile uint8_t *slot) return page_of(t < 8u ? model_of(part, (unsigned)t) : WAVE_SAW); } +/* At most three SYNTIZ tracks in a Part: on the MK2 a fourth track holding a long note overruns the frame interrupt's + * share, and the base's guard drops renders, a crackle (TESTING.md, 30 October 2026). Choosing SYNTIZ for a fourth + * track is refused, and that track stays what it was. A track that is SYNTIZ already is admitted (a model change), + * and a Part that has more (a project saved before, a copied Part) plays on: the base asks only when a track is picked. */ +#define WAVE_MAX_TRACKS 3u +static unsigned is_wave(const volatile uint8_t *part, unsigned t) +{ + const volatile uint8_t *s = part + SIG + 30u * t; + return part[0x22u + t] == 1u && s[0] == 'W' && s[1] == 'V' && s[2] >= 1u && s[2] <= WAVE_MODELS; +} unsigned wave_admit_track(const volatile uint8_t *part, unsigned track) { - (void)part; - return track < 8u; + if (track >= 8u) return 0; + if (is_wave(part, track)) return 1; + unsigned n = 0; + for (unsigned t = 0; t < 8u; ++t) n += is_wave(part, t); + return n < WAVE_MAX_TRACKS; } /* ---- the render --------------------------------------------------------------------------------------- */