Skip to content

Sample Layer 0.1.0-experimental (Analog Rytm MKII): sample engines, starting with TRANSIENT - #2253

Merged
repeat98 merged 46 commits into
repeat98:mainfrom
chevyone:rytm-sample-layer
Dec 3, 2026
Merged

repeat98 merged 46 commits into
repeat98:mainfrom
chevyone:rytm-sample-layer

Conversation

@chevyone

@chevyone chevyone commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What works: Sample Layer 0.1.0-experimental for the Analog Rytm MKII (OS 1.74) gives each sound's sample an engine. SMPL gets a third page, ENGINE (stock's knobs, stock's waveform, then ENGINE), added through the core's page list so every stock gesture stays as it is; FUNC + SMPL is stock's sample list again. ENGINE shows a centred SAMPLE ENGINE window with the cursor on the sound's engine; UP/DOWN or any knob moves it, YES picks it and goes back to SMPL's first page (the engine's own), NO puts the cursor back. This version offers two engines:

  • SAMPLER: stock, bit for bit.
  • TRANSIENT: one page of its own; SMPL steps from it to ENGINE:
A PCH B DEC C BR (stock) D SMP (stock)
E BAS F WID G SHF H LEV (stock)
  • PCH: right of centre, a snap with a pitch blip of up to +2 semitones; left, a fade-in of up to 40 ms rising from up to 4 semitones low.
  • DEC: the sample's own decay, 4 ms to 3 s; INF is none.
  • BAS / WID: a band the sample passes through, drawn as one curve over E and F.
  • SHF: the sample plays 0 to 30 ms after the analog voice.

The analog machine, the analog filter and the AMP envelope are unchanged. Every screen it draws goes dark with the screen saver.

What it means musically: a sample layered on an analog drum gets its own punch, decay, band and timing: a click landing after the body, a swelled or snapped layer, a flam.

Tested on a unit: build SL24 (plain dev base 6844766f + sample-layer at 230c1b9, sha256 99cf7c7f…a756), Analog Rytm MKII, OS 1.74, RAM-booted on @chevyone's unit on 28 November 2026: the ENGINE page and its window, YES back to the engine's page, SMPL from TRANSIENT's page to ENGINE, and back to SAMPLER, captured over the link; reported working by @chevyone ("Funciona bien"). TRANSIENT's sound and controls are unchanged since SL20, which @chevyone played with kit save and power cycle. The package pinned here (sha256 593a10d8…4799) then ran itself on the same unit beside LFO RND 1.2.0 (SL25, 1 December 2026): the ENGINE page, TRANSIENT's page and LFO RND's page, captured over the link.

Broken or missing:

  • No p-locks on PCH, DEC, BAS, WID or SHF: sound tracks have no free lock word. Mod locks for sound tracks are a base question, asked in the mw_engines proposal on this PR.
  • Storage: 40 of the sound's 56 bits, so it does not link beside Voice DAC (39); Voice DAC is in compatibility.conflicts, so the configurator never offers both.
  • Load: about 1.6 % of the audio block a voice at peak; with 7 voices on TRANSIENT in a busy pattern the load reached 93 % and the UI grew slow (the README says so).
  • Not run: beside other modules.
  • GRANULAR and SLICER are in the source as prototypes, hidden from the list (LIST_ENGINES); a sound saved with one plays as SAMPLER.

Who must act / next step: a Rytm MKII device reviewer or a maintainer reviews this first release. For the owner (@repeat98): the mw_engines proposal above, so the list can become a base table other modules (Loop Sync's LOOPS) add to.

Edge cases

Case Why this change makes it a risk How run Result
SAMPLER plays bit for bit as stock the voice mixer's call is patched for every voice host test of the render on neutral settings; played on the unit pass
SMPL through stock's pages to ENGINE and back a page added to stock's SAMPLE view on the unit, SL22 and SL24, captured pass
YES on ENGINE, then SMPL on TRANSIENT's page the module moves the view's page on the unit, SL24, captured pass
NO on ENGINE, and FUNC + SMPL the list must leave stock's keys alone on the unit, SL23 and SL24 pass (reported)
A stock window (µTIME, RETRIG) over TRANSIENT's page the band is drawn over stock's page on the unit, SL14 pass (reported)
Kit save and power cycle the engine lives in mod storage on the unit, SL20 pass (reported)
A sound saved with a prototype engine GRANULAR and SLICER are hidden reasoned: no released sound can hold one not run: only the author's test kits hold one
The pinned package (593a10d8…) beside LFO RND both add a page through the core and use the sound's storage SL25 on the unit (base 6844766f + the pinned package + LFO RND 1.2.0): both pages, engine change and back, captured pass
Beside Improved AMP and Improved SMPL shared SMPL pages and audio time not run not run: not asked for this release; Voice DAC is declared a conflict
Audio load with TRANSIENT on many voices per-voice DSP in the audio interrupt test build SL21 with a load readout, read over the link while the author played pass: 81-82 % with SAMPLER, 93 % with 7 voices on TRANSIENT, about 1.6 % a voice; the UI grows slow at 93 %

What the guides lacked or got wrong: the Rytm guide does not say that ev_key's pad ids are 0x90–0x9b, unlike is_key_held's bits, nor that sound tracks have no free lock word. They go in a separate Docs: pull request.

Details
  • Hooks: a jsr over stock's call of the voice mixer at 0x4012129a; an ev_amp_record follower (order 60) for each trig; ev_key, ev_enc, ev_draw and ev_tick; core_page_fns for SMPL's pages 4 and 5 and ENGINE (page 16); core_view_pages to add ENGINE to the SAMPLE view; core_params for the hidden TEST ids 447–456 and 458.
  • Storage: sample_layer_eng (20 bits), sample_layer_flt (14), sample_layer_gx (6). All zero is stock's sound.
  • Package: compiled twice with identical bytes in the pinned toolchain image (modwerk-source-tools, sha256:81b0c4b6), exported with package-elemod-recipe at dc42fe1 and pinned in sdk/imports/elekloader-sample-layer-2026-11-28.json.
  • npm run module:doctor -- sample-layer is green; npm run pr:ready was run before marking this ready.

🤖 Generated with Claude Code

…sample alone

A SMPL LAYER page after the SMPL waveform (core_view_pages), with FRQ, RES,
TYP (OFF/LP/BP/HP) and DEC, applied to the sample stream before stock's voice
mixer. Probe SL01 confirmed the stream on a unit; SL02 reported working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chevyone

Copy link
Copy Markdown
Contributor Author

Proposal: SMPL engines, a base list chosen with FUNC + SMPL (owner decision needed)

@repeat98: before Sample Layer goes further, @chevyone would like the SMPL key to work the way SRC does with machines.

  • The gesture: FUNC + SMPL opens a list of sample engines, in the same stylised list as the machine list (SRC again, or FUNC + SRC).
  • The engines:
    • SAMPLER: stock's sample playback.
    • LOOPS: Loop Sync, if @stigmagit agrees.
    • TRANSIENTS: this module.
    • More engines will come later.
  • What changes: each sound keeps its engine, and the SMPL page shows that engine's knobs, as SRC's page follows the machine.

What it means musically: you pick how a track plays its sample the same way you pick its machine. The list is a familiar place, so you don't have to learn one key gesture per module.

What has to be decided, and by whom:

  • @repeat98, the owner: the list belongs in the base. Engines come from separate modules, and a module may not depend on another. So the base should own the list and each module contribute an entry, as mw_fx does for SEND FX. Is that a base hook you would take?
  • @repeat98: FUNC + SMPL changes a stock gesture. On stock it opens the sample list (knob D's). That list stays one press of knob D away, @chevyone's choice. The base would claim the gesture and document it as a change to a stock flow.
  • @stigmagit: Loop Sync as LOOPS. Would you register Loop Sync as the LOOPS engine once the hook exists? Nothing changes in your module until you say so.
  • @npp1993: Improved SMPL. Improved SMPL already shapes the SAMPLE page and its waveform view. Would it belong in SAMPLER, or stay as it is beside the list?

Ran on a unit: nothing of this yet. Only the research below, on OS 1.74's code.

What OS 1.74 shows (research, no code yet)
  • How SRC opens the list. The SRC page view's key handler (0x400d4158) opens the machine list through 0x400d3f1c, either on a second SRC press or on FUNC + SRC. That method builds a MachineListView (0x400def76, vtable 0x401e5ea4). Improved Machine Browser documents its fields.
  • The list is generic. It is stock's list widget (0x40072736 / 0x400784c8). Each item is built by 0x40072fbc with a text and a value, -1 for the dotted section lines, and added by 0x400727f2. A list of engines can be built from the same widget and look the same, with no drawing of our own.
  • The SMPL key. It steps the SAMPLE view's pages (4 and 5) through core-ar2's core_cycle. Pages a module adds through core_view_pages currently draw over the waveform view, as Sample Layer's SMPL LAYER page does in SL02. Engine pages through the base would fix that too.
  • Storage. The engine is per sound: a few bits of the base's sound storage.

If the hook is agreed, Sample Layer becomes the TRANSIENTS engine: its own knobs (a hold and decay for the sample, and a two-knob band filter) on the SMPL page while TRANSIENTS is chosen. Until then this PR stays a draft.

🤖 Generated with Claude Code

@stigmagit

Copy link
Copy Markdown
Contributor

Hi @chevyone, thanks for asking. Yes in principle: once @repeat98 agrees to the hook, I'm open to Loop Sync registering as LOOPS. Three things matter to me:

  1. Loop Sync's settings belong to the sample, not the sound: each sample keeps its own mode and correction, so a SMP lock or a scene that changes the sample stays in time. LOOPS, chosen per sound, would need to keep that.
  2. A sound on LOOPS keeps every stock SAMPLE page knob; Loop Sync only adds its mode and correction.
  3. Projects saved with Loop Sync today open with the same settings, and FUNC + TUN / FIN keep working for people who don't use the list.

When the hook exists, I'll look at the LOOPS entry with you.

FUNC + SMPL opens a list of sample engines for the selected track:
SAMPLER (stock, bit for bit) and TRANSIENTS. With TRANSIENTS, SMPL shows
one page and stays on it:

  A PCH  punch: right a snap with a pitch blip up to +2.5 semitones,
         left a fade-in of up to 40 ms rising from 4 semitones under
  B DEC  the sample's decay, held 10 ms after a trig, 127 INF
  C BR   stock's
  D SMP  stock's
  E BAS  the band's base (a high-pass)
  F WID  the band's width above it (a low-pass), drawn as one band
  G SHF  the sample 0 to 30 ms after the analog voice, taken at each trig
  H LEV  stock's

The band is not drawn while a stock window (micro timing, RETRIG) is on
screen. Settings live in two sound fields (34 bits). Ids 447-451 are
renamed hidden TEST ids.

Played on the author's MKII (build SL14, 27 November 2026). Not done
yet: CPU measurement, tests beside other modules, a sound reset, the
README, TESTING, captures and the tutorial. The new parameters cannot
be p-locked; that needs mod locks on sound tracks in the Rytm base.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chevyone chevyone changed the title Sample Layer 0.1.0-experimental (Analog Rytm MKII): a filter and a decay for the sample alone Sample Layer 0.1.0-experimental (Analog Rytm MKII): sample engines, starting with TRANSIENTS Nov 27, 2026
J E Montoro and others added 2 commits November 27, 2026 00:43
A third engine in the SAMPLE ENGINE list. GRANULAR reads the track's
sample from memory itself (its slot after SMP locks and scenes, through
the slot table Loop Sync reads), and plays a cloud of Hann-windowed
grains in place of stock's sample stream:

  A POS  where in the sample, 0-127
  B SIZ  a grain's length, 4 ms to 1 s
  C DEN  grains a second, 1 to 200
  D SMP  stock's
  E SPR  how far a grain's start strays, 0 to 250 ms
  F PIT  the grains' pitch, -24 to +24 semitones
  G SPD  how fast the position moves: 100 % plays through the sample,
         0 freezes it, negative runs backward (a time stretch)
  H LEV  stock's

A voice holds at most 6 grains, and all voices together 12, as a CPU
budget. The cloud keeps making grains for 10 s after each trig, and AMP
shapes it. Engines share the sound's storage bits (a new 6-bit field,
40 bits in all); choosing another engine starts it from its defaults.
TRANSIENTS' storage layout is unchanged.

Checked on the host only: pitch, the sample's own rate, density, spray,
reverse, an empty slot, and TRANSIENTS unchanged. Not run on a unit,
CPU not measured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SMPL LEV now sets GRANULAR's level. Stock applies LEV in its own sample
render, which the grains replace, so LEV had no effect. The grains now
take the track's LEV as it plays (locks and scenes too), ramped across
each block.

SMPL's second press on GRANULAR opens the waveform page with
GRANULAR's knobs. Each grain shows as a line at its place in the
sample, as tall as it is loud, and the cloud's position as a dotted
line, redrawn at every tick. TRANSIENTS keeps its single page.

Host-checked: LEV 127, 64 and 0. Not run on a unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for building this out and for asking before going further. It's the right question on a machine that's still being unlocked.

Yes to a base-owned list of sample engines, and to a hook at the voice mixer call. Sample Layer and Loop Sync both want it already, and more will follow, so the base should own the mixer call site and the list as a table each engine module adds one entry to, the way effects join the FX list. Please propose both on the Rytm's cumulative base draft (#1934), with the site's address, length and guard, the record size and room. Sample Layer then subscribes instead of patching the mixer call itself, and Loop Sync can add LOOPS beside it.

No to taking FUNC + SMPL. It moves a stock shortcut, and the module guides treat that as more than a minor change. Please find an entry that leaves stock's gestures as they are, for example an engine choice on the SAMPLE page itself, and the base list will use it for every engine.

Small thing while you write the docs: the manifest's presentation and controls still describe the earlier FRQ, RES, TYP page, so update them with TRANSIENTS' knobs.

- The waveform page shows POS as a line at all times, and the grains
  draw there again: the window test, which stock's waveform tripped, is
  skipped on that page.
- Stock's silent playback of the sample stops one block after each
  trig, so its playhead no longer runs from the start and its render is
  saved.
- Grains: 3 a voice and 6 in all, each rendered through the block in
  one go, and none starts while the audio block's load is over 86%.
  The waveform page shows the load (CPU nn%) for testing.
- FUNC + SMPL, or SMPL, closes the SAMPLE ENGINE list and nothing else.
- On TRANSIENTS the SAMPLE view goes back from the waveform to its
  first page.
- Nothing is drawn while the screen saver blanks the screen.

Played on the author's Rytm MKII (SG03 to SG09): the POS line, the load
from 96% down to 91% at most, the list and the TRANSIENTS page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chevyone

Copy link
Copy Markdown
Contributor Author

Proposal: sample engines in the Analog Rytm MKII base (mw_engines)

In short

Each track's sample gets an engine, chosen with FUNC + SMPL from a small list: SAMPLER (stock, bit for bit), then whatever engines the set holds. It works like the send bus's FX list (mw_fx): the base owns the list, the page, the storage and the locks, and an engine is a module that adds one record. Several authors' engines then install side by side, and a musician picks only the ones they want.

Today the list lives inside Sample Layer (repeat98/modwerk#2253), with two engines of its own, TRANSIENTS and GRANULAR. Loop Sync's author (@stigmagit) would add LOOPS, and later VINYL, once the list is shared, as discussed on #2253. Modwerk's rules put a list several modules share in the base, and keep one engine per module.

What musicians get

  • FUNC + SMPL on a sound track opens the list, with the cursor on the track's engine. UP/DOWN or any knob moves the cursor, YES picks, and NO cancels. Any other key closes the list and does its usual job.
  • An engine other than SAMPLER shows its own page in place of SMPL's: A–H with the engine's controls, and stock's SMP and LEV where SAMPLER has them. SMPL stays on that page. The engine is saved with the sound, and choosing another engine starts it from its defaults.
  • P-locks: every engine control can be p-locked, as on the FX track's send page. This is what Sample Layer cannot do on its own today.

The record

Modelled on struct mw_fx:

struct mw_engine {
    unsigned short abi;              /* MW_ENGINE_ABI */
    unsigned short id;               /* engine-ids.json: kept in sounds, never reused, 1-15 */
    unsigned char flags;             /* MW_ENG_READS_SAMPLE: replaces stock's stream (GRANULAR);
                                        else shapes it in place (TRANSIENTS, LOOPS) */
    unsigned char state_words;       /* per-voice state the base lends, in words */
    const char *name;                /* the list's row and the page's title */
    struct mw_fx_control c[8];       /* A-H; a slot set to MW_ENG_STOCK_SMP / _LEV / _BR shows stock's knob */
    void (*reset)(int voice, int *state);
    /* One block per voice whose track plays this engine, before stock's voice mixer: s the voice's
       sample stream (32 frames, Q31, in place), par A-H as they play (a lock, else the knob), hit a trig
       this block, the sample the voice plays (its slot after SMP locks and scenes: data, frames, rate). */
    void (*render)(int voice, int *s, const unsigned char *par, int hit,
                   const struct mw_sample *smp, int *state);
    const char *(*text)(int k, int v);
};

What the base owns

Piece Today in Sample Layer In the base
FUNC + SMPL list ev_key, ev_enc, ev_draw the list, its look matching stock's machine list
Engine page core_page_fns for pages 4 and 5, hidden ids 447–458 one page built from the record, labels from c[]
Storage 40 sound bits (sample_layer_eng, _flt, _gx) an engine id (4 bits) and 8 values a sound, in one block of sound storage every engine shares
P-locks not possible: sound tracks have no free lock word mod locks on sound tracks, saved in lanes stock's loader skips, as locks.c does for the FX track's words 38–41
Audio a jsr over the voice mixer's call at 0x4012129a the same site, owned by the base; it calls each voice's engine
Trig marker ev_amp_record follower hit passed to render
Sample access the slot table at 0x41329e70 and the effective parameters at 0x8000f7a8 (as Loop Sync reads them) struct mw_sample passed to render

Open questions for the owner

  1. Storage: 4 + 8 × 7 = 60 bits is over the sound's 56. Options: values of 6 bits (52 bits), or a sound-scope block of its own for engines. Which do you prefer?
  2. Mod locks on sound tracks: core-ar2 0.8 does this upstream, but the base cannot take it (elekloader/README.md, Beside elekloader's core-ar2). Should the base grow its own, from locks.c?
  3. Improved SMPL (@npp1993) also takes the SMPL key's pages. Should the base page simply not show while an engine other than SAMPLER is chosen, so both live together?
  4. CPU: an engine that reads the sample (GRANULAR) costs per grain. Should the base cap engines with a budget, as mw_fx reports a CPU reading?
  5. A slice table for SLICER: a slicer is only usable when each cut can be moved by hand. With slice 2 selected, START moves the boundary between slices 1 and 2, and END the one between 2 and 3. The slices stay contiguous, and each boundary is one shared point. That needs up to 63 boundaries per sound, at 16 bits each (a 1/65536 share of the sample) — 126 bytes a sound, about 1.5 KB a kit for twelve tracks. No scope today holds it: the sound has 16 bits left, the kit's 64 are taken by the send bus, and the pattern and project scopes would tie the cuts to the wrong thing. Can the base give engines a larger block that travels with the sound (or the kit), and if so, where should it live in the saved kit and project? Fewer bits per boundary (12, a 1/4096 share) would halve it, but at the cost of precision on long samples.

Plan

  1. The base draft gets mw_engines, the list, the page, the storage and the mixer site, without locks.
  2. Sample Layer splits: TRANSIENTS and GRANULAR become one module each, adding a record. Settings move with a migration of their 40 bits.
  3. Loop Sync adds LOOPS when @stigmagit is ready.
  4. Mod locks on sound tracks follow as their own base step.

@chevyone chevyone changed the title Sample Layer 0.1.0-experimental (Analog Rytm MKII): sample engines, starting with TRANSIENTS Sample Layer 0.1.0-experimental (Analog Rytm MKII): sample engines, starting with TRANSIENT Nov 28, 2026
J E Montoro and others added 15 commits November 28, 2026 01:12
…nd the SLICER prototype

The list now offers SAMPLER and TRANSIENT; GRANULAR and SLICER stay in the
source for test builds (LIST_ENGINES). TRANSIENTS is renamed TRANSIENT. The
list is drawn as stock's machine list, every screen goes dark with the screen
saver, and the BAS/WID band lines up with the SHF dial and stays under the
list. README and release notes describe this version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exported with package-elemod-recipe from the pinned toolchain image
(modwerk-source-tools, sha256:81b0c4b6) at 697aa47, compiled twice with
identical bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Import records pin the source-only package at fb40498 (sha256 d6e2fb0a),
compiled twice with identical bytes in the pinned toolchain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… sections

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ntation

The package's bytes are unchanged (package-elemod-recipe --check).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The package's bytes are unchanged (package-elemod-recipe --check).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plain development base 6844766f links with 110,884 bytes of RAM spare,
and 48,360 with Sample Layer (SL20).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… figure

The package's bytes are unchanged (package-elemod-recipe --check).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
About 1.6 % of the audio block a voice at peak (test build SL21 with a
load readout compiled only under SL_LOAD_READOUT).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…igures

The package's bytes are unchanged (package-elemod-recipe --check).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecord

The package's bytes are unchanged (package-elemod-recipe --check).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chevyone
chevyone marked this pull request as ready for review November 28, 2026 02:13

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for narrowing this to TRANSIENT and for the SL20 test record on your unit. The record is clear and the sound is a nice idea.

One thing blocks it, and it's the one from my earlier answer here: the engine list still opens with FUNC + SMPL. That changes a stock shortcut, and the module guides treat that as more than a minor change (Choose how a module hooks in). Please open the engine choice somewhere that leaves stock's gestures alone, for example as a row or knob on the SAMPLE page itself. Then:

  1. Update the manifest (uiClaims, summary, overview, location and steps), the README and the captures to match.
  2. Rerun the menu edge cases from your table on the unit and record the new build.
  3. Run npm run pr:ready and push. That also replaces the red check, which is only left over from the run made while this was a draft.

The base-owned engine list and the mixer hook are still a yes, as agreed. They belong on the Rytm's cumulative base draft (#1934), with the storage layout and slice-table sizes measured there. This release can ship without them, as long as it keeps to stock's gestures.

chevyone and others added 2 commits November 28, 2026 15:03
… SMPL

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@npp1993

npp1993 commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

The base side is fixed in #2515: the Rytm base's lean engine now clears an idle sample voice's output every audio block, as the stock OS does, so TRANSIENT's delay and band tails die away instead of looping. Nothing needs to change in Sample Layer.

Tested on an MKII with Sample Layer from this PR (SHF at its top, DEC INF, a one-shot sample): 2.5 s after the hit the tail was still at -12 dBFS on the current base, and silent (-84 dBFS) with the fix. It ships with the next Rytm base release.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A short update since my review on 1 December, where I said this was ready to merge.

What's new: after your push, a problem turned up in the Rytm base, not in Sample Layer. On the base that's live today, TRANSIENT's delay and band tails can keep looping after a short sample ends. The fix is in #2515 and ships with the next Rytm base release. Nothing in Sample Layer's code needs to change for it.

One small push is still needed. A few lines still describe the old version, as mentioned earlier in this thread:

  1. The import record's release line still says FUNC + SMPL picks the engine. Please describe SMPL's ENGINE page there, as the release notes now do.
  2. The other import record says the pinned package has not run on a unit. Your SL25 run on 1 December used exactly that package, so please say so.
  3. The manifest's hardware notes and test summary (the 'Not run' limitation and 'SL03 to SL24') should mention SL25 beside LFO RND.

Then merge main, run npm run pr:ready and push. Once that's in and the base fix is released, this can merge. The rest of my review from 1 December still stands.

@chevyone

chevyone commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

The stale lines are fixed and main is merged. Pushed at 7aaa59206; pr:ready passes.

  • The import record's release line now says SMPL's ENGINE page picks the engine, as the release notes do.
  • The Elekloader import record now says this exact package ran on the unit in SL25 (1 December), beside LFO RND 1.2.0.
  • The manifest's hardware notes and test summary now cover SL03 to SL25. The 'Not run' line says only LFO RND ran beside it, and that its modifiers on a TRANSIENT track were not heard.
  • Package bytes are unchanged: a clean rebuild matches 593a10d8… (package-elemod-recipe --check). Only the source fingerprint moved (runtimeSourceSha256 → 9dd17866…), because the manifest is part of the module folder.

Nothing new ran on the unit in this push. Thanks @npp1993 for testing the SHF tail on #2515. Once #2515 is merged I'll rebuild, run the same case on my MKII (short one-shot, SHF up, DEC INF, let it end), and record it in TESTING.md with the package SHA-256.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that settles the small push from my last review. The import record now describes SMPL's ENGINE page, the other record says this exact package ran on your unit in SL25, and the manifest's notes cover SL03 to SL25. The checks are green and the package itself is unchanged.

The only thing left is the one you already named: once the Rytm base fix (#2515) is merged and released, rebuild, run the short one-shot with SHF up on your MKII, and record it with the package's SHA-256. Then this can merge. The rest of my review from 2 December still stands.

repeat98 pushed a commit that referenced this pull request Dec 2, 2026
… block, as stock does

The sample voices' trim (LE_TRIM) left a skipped voice's 32 output longs (0x800067f8 + 128 x voice) alone while a
bit a voice (dsz_out) said they still held zeros from an earlier block. That assumed nothing else writes the buffer,
but it is the sample stream stock's voice mixer reads, and a module may shape it in place first: Sample Layer
(#2253) does, from a gate on the mixer's call 0x4012129a, so after a voice went idle its TRANSIENT
delay tail or band ring stayed in the buffer and was read back every block. le_dsg now zeroes the 32 longs in every
block it skips stock's gain loop, the bytes stock's loop writes; dsz_out is gone (le_dsk_total [7] unused).

rytm-emu, a twin module on Sample Layer's site marking idle voice 7 every 1000 blocks: old base 137,812 of 137,812
blocks after the first mark found the stream stale (and its DAC channel kept the marker), fixed base 0.
Release identities plain 8b2663e1, voices dacd67fe, send-bus b37be733 (sizes unchanged); packages, record and
registry follow. Review: no defect; the README's lean-engine section now says which buffers a module may not
shape in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chevyone

chevyone commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

The SHF tail ends on the fixed base. Pushed at aaca3f7f7 with main merged; pr:ready passes.

I ran the case from #2515 on my MKII, RAM-booted as SL27: a plain development base built from base/analog-rytm-mkii-next at 0479d8368 (with #2515), plus the committed package 593a10d8a8f2…. The image is e40662b2…69cc.

  • I set it up by hand: BD with a one-shot sample, the analog body off, TRANSIENT with SHF at its top and DEC INF.
  • The agent played the pad over the link and recorded the USB audio. The sound lasted 3.85 s, then fell to the noise floor (-84 dBFS) within 0.1 s and stayed there to the end of the 8 s take. No stuck loop.
  • My sample was about 3.9 s long, not a short hit. Not run here: an old-base control (Fix: Rytm base: the lean engine clears an idle sample voice's output every block #2515 has one) and SHF with the band on.

This is in TESTING.md (SL27, with the package SHA-256 and the levels) and in the manifest's test summary. Package bytes are unchanged: --check matches 593a10d8…, and only runtimeSourceSha256 moved.

Nothing else is left from my side. It can merge once the Rytm base release with #2515 is out.

chevyone and others added 2 commits December 2, 2026 16:52
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

repeat98 commented Dec 3, 2026

Copy link
Copy Markdown
Owner

@chevyone, thanks for the SL27 run. The SHF tail ending on the fixed base is exactly what we needed to see. Since your push, two things on main changed, one good and one that needs a fix.

What the push needs
  1. Merge main (merge, don't rebase).
  2. Move Sample Layer off id 447: give PCH, and anything else in 445 to 447, an id that no other module uses. Improved FX Routing has 445 to 447, and Voice DAC has 457. Update param:hidden ids … in the manifest and build.json, and the README line. Please don't list audio-in-fx in compatibility.conflicts instead: then musicians couldn't have both, and the two modules have nothing else in common.
  3. Rebuild and re-pin the package. Its bytes change, so 593a10d8… no longer applies.
  4. Run the new package on your MKII, on a base built from main, and record it in TESTING.md with the image's and the package's SHA-256. Please cover the fixed steps, the ENGINE page and TRANSIENT's page with PCH turned, and one run beside Improved FX Routing (LOW MONO on knob F of the FX track's DISTORTION page), since it's now the neighbour that shares this table. Add that as a row in the edge-case table.
  5. Run npm run pr:ready and push.

Generated by Claude Code

chevyone and others added 6 commits December 3, 2026 10:51
…ting's)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Routing)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chevyone

chevyone commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

PCH no longer shares a parameter id with Improved FX Routing, and both run side by side on my MKII. Pushed at 799531551 with main merged; pr:ready passes.

  • What changed: PCH moved from hidden id 447 to 459 (stock's unused CB_8ENV record). Sample Layer now takes 448 to 456, 458 and 459, and nothing in 445 to 447. The manifest, build.json and README say so. audio-in-fx is not in compatibility.conflicts.
  • New package: e112d4380d81…9533, rebuilt and re-pinned in both import records. runtimeSourceSha256 is updated and the vendored catalog is refreshed (elekloader:update).
  • On my MKII (OS 1.74, RAM boot, on a plain development base built from main after Improvement: Analog Rytm MKII base-next into main (idle voice clear, FX lock words, Improved FX Routing 0.3.0) #2554, dev 9c6ab798):
    • SL28, Sample Layer alone, image 29231066…3431: the fixed steps (1, 3, 6 and 10 pass; the Rytm has no tool for the others yet). SMPL reaches ENGINE, DOWN and YES open TRANSIENT's page, and knob A shows PUNCH, moving 0 → +8 → −12 → 0.
    • SL29, beside Improved FX Routing 0.3.1, image 6f250d6d…6ecf: the two link together. PCH turned to +4, then LOW MONO on knob F of the FX track's DISTORTION page to 43Hz. Each kept its own value when I went back and forth. UP and YES then returned to SAMPLER, and LOW MONO went back to OFF.
  • Not run: hearing PCH and LOW MONO together, and a kit save with both.

Recorded in TESTING.md (SL28/SL29, both SHA-256s, two new edge-case rows). Over to you for the old change request.

@repeat98
repeat98 dismissed github-actions[bot]’s stale review December 3, 2026 18:08

Met: the engine choice moved to SMPL's ENGINE page, the follow-ups are done, the base fix is on main, and PCH moved to id 459 (SL28/SL29).

@repeat98 repeat98 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 7995315; this head adds only main (the PR's diff is unchanged). Ready for its first release.

@repeat98
repeat98 enabled auto-merge December 3, 2026 18:08
@repeat98
repeat98 merged commit 8fdedf5 into repeat98:main Dec 3, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants