Repository navigation
Conversation
FX words 38..41 hold two SEND FX knobs each (hi / lo half), and the live lock array has one word a step, so a lock on P1 froze P2's value into the step and a clear cleared both. The lock word now says which halves are locked (no mask, no RAM): hi << 8 | lo << 1 both (the stock form, every lock saved before), hi << 8 | 1 the hi half only, lo << 8 | 3 the lo half only, 0xffff none. The file format is unchanged (types 42..45 hi, 46..49 lo). - 0025: the loader merges each lock type into its own half (one-half form when the step has one type); the full rebuild writes only the locked halves (0xff elsewhere); new detour 0x40120968 (1.74 0x401209d4) in the audio interrupt's trig loop, over a trig's lock list: a one-half FX 38..41 entry becomes the locked half merged with the trig array's word (the kit's), written back into the entry. Needs the elekloader area now (1482 B of code). - 0029: FX set lock get answers the knob's half (-1 when only the other half is locked), lock set sets only its half, and the new +0x44 lock clear wrapper (ptr patch 0x401dcc34, 1.74 hash added) clears only its half; a base turn writes only its half into the FX trig array. Design section 2's table renamed to P1..P4 with independent halves; section 12. - Tests: sfu_emu.py TAG halves (new, 10 checks); sfx_emu.py fx38 expects 7e01 (the hi half only) for its type-45-only step. Tests (rytm-emu 1.74, DTEMU_STRICT=1, the Makefile's release set on OS 1.74 with this and the next two changes): halves 10 / 0; 6 of 10 fail without them. Suites: see the last commit of the series. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alves) Sound index 0 (SFX1 hi, SFX2 lo) on tracks 1..12 now uses lock-halves' lock-word encoding (hi << 8 | lo << 1 both, the stock form; hi << 8 | 1 hi only; lo << 8 | 3 lo only; 0xffff none). The file format is stock's: type 41 (hi) + its 0x80 0x80 fine slot (lo), 0xff in an unlocked half. - 0025: new loader detour sfx_fine 0x400090d8 (same on 1.74), the fine slot of a voice track's index 0: coarse + fine both, coarse + 0xff hi only, 0xff + fine lo only (stock drops it); lk_load shared with the FX types. The rebuild (0x400092aa) and incremental save (0x40009454) stubs take a voice track's index 0 too; sfx_play_c (0x40120968, 1.74 0x401209d4) merges a voice track's one-half lock with its trig array word 0. - 0029: Sound set lock get / set through lk_half / lk_put; new +0x44 clear wrapper sfu_s_lclr (ptr 0x401dcbb8, 1.74 0x401dce68; the FX one made generic); the FX set's dead non-38..41 branches removed. - Tests: sfu_emu.py amphalves (12 checks) and ampold (5: a stock-saved project loads into the same words, plays the same and saves back byte for byte). Code: 0025 +142 B, 0029 +24 B, no state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Sound set's write stores the whole kit word into track set + 8's trig array row (0x400a9e58 -> 0x4011f3fa, 0x8000e5b0 + 84 t + 2 k) [code], so turning SFX2 while a SFX1-only step plays replaced the locked SFX1 until the next trig [measured: row 1824 -> 0c30]. sfu_s_write restores the row's other half after the stock write when the row still holds what it wrote (a trig since keeps its word), as fx_write_hi does for FX 38..41. +84 B. - Tests: amphalves +1 check (the partner's base turned while step 5's SFX1-only lock plays: row 1830, the lock kept; the next trigs play the new kit halves). Tests (rytm-emu 1.74, DTEMU_STRICT=1, the Makefile's release set on OS 1.74, this series against dev 95886ee): halves 10 / 0, amphalves 13 / 0, ampold 5 / 0. suites.py --full: sfu 333 / 0 (dev 235 / 0: the new checks); every other suite the same passes and fails as dev, check by check. Elekloader RAM 13432 -> 12228 B spare (0025 1098 -> 1624 B, 0029 10126 -> 10808 B, no state). Lag (12 tracks of 16ths, knobs turning, 122 M instructions/s): mean / max knob latency with a scene edit 460.2 / 941 ms (dev 460.5 / 941), without 26.7 / 48 ms (dev 26.8 / 48); CPU busy the same as dev. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Closing: per-knob locks move into the elekloader core-ar2 work (see #29). Thanks for the review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #29 (draft until the go there).
Topic 3 of the roadmap, trigcondition/sidecar-firmware#66. Rytm mods only, with no host change. It's based on
devand doesn't need #18 / #19. Those only touch the same mod.toml, design.md andsfu_emu.pylines, as text.Why
Some Rytm parameter words hold two knobs, one in each half:
The live lock array has one word a step. So a p-lock on one knob froze its partner's current value into the step, and clearing the lock cleared both. Turning the partner's base value while such a step played also replaced the locked half until the next trig.
What
The lock word now says which halves are locked, with no mask and no RAM:
hi << 8 | lo << 1: both halves (stock's form, so every lock saved before reads the same);hi << 8 | 1: the hi half only;lo << 8 | 3: the lo half only;0xffff: none.The file format is stock's: SEND FX types 42..45 (hi) and 46..49 (lo), and type 41 plus its fine slot for SFX1 / SFX2, with
0xffin an unlocked half.sfu_s_writerestores the row's other half when the row still holds what it wrote, as the FX write already does for 38..41.Each
stub.sis regenerated by its mod'sbuild.sh. The design notes are in 0029 design.md sections 12 and 13. The addresses are 1.73's, and1.74.tomlhas the 1.74 ones.On a stock (unmodded) Rytm: a project with one-half SFX1 / SFX2 locks degrades. A hi-only lock comes back with SFX2 locked to 0, and a lo-only lock is dropped when stock saves the file. SEND FX locks are unaffected, since they have a type per half.
Tests
rytm-emu, OS 1.74,
DTEMU_STRICT=1, the Makefile's release set.tools/emu/suites.py --full,dev(95886ee) vs this branch:sfu_emu.py:halves: 10 / 0, and 6 of the 10 fail without this series;amphalves: 13 / 0;ampold: 5 / 0. A stock-saved project loads into the same words, plays the same, and saves back byte for byte.sfu: 333 / 0, againstdev's 235 / 0. The difference is the new checks.sfx_emu fx38now expects7e01(the hi half only) for its type-45-only step.dev, check by check.devOn top of #25, the CPU busy figure is the same too (0.976 / 0.965), and the elekloader spare goes from 12,704 to 11,496 B. The two branches conflict only in 0025's design.md (two new sections in the same place) and in
stub.s, which is regenerated. Whichever lands second, I'll rebase.The latency pattern has ordinary locks but no one-half ones, so it measures the new trig-loop detour's check on every lock entry (one bit test), not the merge a one-half lock runs. This hasn't been on hardware yet, and the detour in the audio interrupt is what I'd most want checked on a unit.
🤖 Generated with Claude Code