From 3591e7ea26ce0e64c69ed1ae570195c1587aa541 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Wed, 2 Dec 2026 20:23:48 +0100 Subject: [PATCH 01/43] Bounce 0.1.0 draft: bounce tracks in place (design, no code yet) Scaffolded with module:new as a system ColdFire module. The README holds the agreed design: DOWN+REC or FUNC+PART > BOUNCE, trig keys 1-8 merge tracks into the active track's take, stock's recorder records one pattern length, the track becomes a Flex machine playing the saved WAV, FX off, one trig, UNDO BOUNCE. TESTING.md lists the open questions to settle on the emulator first. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/LICENSE | 30 ++++++ sdk/drafts/bounce/README.md | 76 +++++++++++++++ sdk/drafts/bounce/TESTING.md | 26 +++++ sdk/drafts/bounce/manifest.py | 78 +++++++++++++++ sdk/drafts/bounce/octamod.module.json | 95 +++++++++++++++++++ sdk/drafts/bounce/qualification.example.json | 84 ++++++++++++++++ .../bounce/resource-impact.example.json | 21 ++++ sdk/drafts/bounce/unit.s | 17 ++++ sdk/drafts/bounce/verify.py | 2 + 9 files changed, 429 insertions(+) create mode 100644 sdk/drafts/bounce/LICENSE create mode 100644 sdk/drafts/bounce/README.md create mode 100644 sdk/drafts/bounce/TESTING.md create mode 100644 sdk/drafts/bounce/manifest.py create mode 100644 sdk/drafts/bounce/octamod.module.json create mode 100644 sdk/drafts/bounce/qualification.example.json create mode 100644 sdk/drafts/bounce/resource-impact.example.json create mode 100644 sdk/drafts/bounce/unit.s create mode 100644 sdk/drafts/bounce/verify.py diff --git a/sdk/drafts/bounce/LICENSE b/sdk/drafts/bounce/LICENSE new file mode 100644 index 0000000000..84c1c7dc2a --- /dev/null +++ b/sdk/drafts/bounce/LICENSE @@ -0,0 +1,30 @@ +MIT License + +Copyright (c) 2026 seniorspiz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +This licence covers this module's own source code and documentation only. It +does not extend to any Elektron Music Machines firmware, which is not +distributed here and remains the property of its copyright holder. Nothing in +this module is endorsed by, supported by, or affiliated with Elektron. +Octatrack and Elektron are trademarks of Elektron Music Machines MAV AB, used +only to identify the hardware this module targets. diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md new file mode 100644 index 0000000000..aacc4c33d5 --- /dev/null +++ b/sdk/drafts/bounce/README.md @@ -0,0 +1,76 @@ +# Bounce + +Version 0.1.0 · by @seniorspiz · a draft: the design below is agreed, no code has run yet. + +## Overview + +Bounce records a track in place, the way bounce or freeze works in a DAW, without setting up the recorder's buffer, length and trigs by hand. It records the active track, and any other tracks you merge in, for exactly one pattern length (in per-track mode, the active track's own length), with their effects. When the take ends, the active track becomes a Flex machine playing the take: its FX are off, its old trigs and locks are replaced by one trig on step 1, and the take is saved as a WAV in the project, so the project saves and reloads unchanged. The other merged tracks are muted with stock's own mute. UNDO BOUNCE brings everything back until the next power cycle or project change. + +Category: **system**. It rewrites a track's Part and pattern when the musician asks, and uses no effect slot, DSP code or knob. + +## Controls + +| Control | What it does | +| --- | --- | +| DOWN held, then REC | Opens BOUNCE for the active track. REC alone stays stock. | +| FUNC+PART > BOUNCE > BOUNCE T*n* | Opens BOUNCE for the active track, from the Part Edit window. | +| Trig keys 1-8, while BOUNCE is open | Add or remove T1-T8 from the merge. The active track always stays in. Stock TRACK keys keep working as stock, so BOUNCE sits beside Track Solo. | +| YES, while BOUNCE is open | Arms the take: it starts on the next step 1. | +| NO, while BOUNCE is open | Closes BOUNCE and changes nothing; cancels an armed take that has not started. | +| FUNC+PART > BOUNCE > UNDO BOUNCE | Restores the last bounce's track machine, FX, trigs, locks and the merged tracks' mutes. | + +While BOUNCE is open, trig keys 1-8 show the merge: the active track's trig key blinks, merged tracks' are fully lit, the others dim. Where a model's trig keys carry a colour channel, the active track also uses it. Closing BOUNCE gives the trig lamps back to stock. + +BOUNCE shows `READY`, `ARMED`, `REC`, `SAVING`, `DONE` or the reason it refuses, as a stock toast does. + +## Usage + +### Quick tutorial: bounce two tracks into one + +1. Select T1 with its TRACK key. Hold DOWN and press REC: BOUNCE opens and T1's lamp blinks. +2. Press trig key 2: it lights fully, so T2 is merged into T1's take. Press YES: BOUNCE reads ARMED. +3. Play the pattern. On step 1 BOUNCE reads REC, and after one pattern SAVING, then DONE. T1 now plays the take on a Flex machine with one trig, and T2 is muted. +4. To go back, FUNC+PART > BOUNCE > UNDO BOUNCE. + +## How it works + +Every piece of work runs on a key press, once a step while a take is armed, or as a card job, never every frame or sample ([Keep the ColdFire cheap](../../../docs/module-guides/README.md#keep-the-coldfire-cheap)). + +| Step | Where it runs | +| --- | --- | +| Check: audio tracks only, the length fits recorder memory, the active track's recorder is free | key press | +| Snapshot the active track's Part bytes, trigs and locks, and every merged track's mute, for UNDO (module memory, not stock's shared undo buffer) | key press | +| One track: set its recorder's source to itself. Several: send the merged tracks to CUE for the take and record CUE | key press | +| Set the length to the pattern's (or the track's) and arm for the next step 1 | key press | +| Record, on the instrument's own tempo, scale and length | stock's recorder | +| See that the take ended | once a step, only while armed | +| Make the active track a Flex machine playing the take, FX1 and FX2 off, one trig on step 1 at full length; mute the merged tracks; restore the CUE routing | one bounded edit | +| Save the take as a WAV in the project and assign it to the Flex slot | a card job after the take | + +It answers `ev_in_use` so it rests while nothing is armed, and contributes its BOUNCE row to the base's `ot_part_menu` table. + +## Compatibility and limitations + +- Audio tracks only. MIDI tracks are refused. +- Merging several tracks uses CUE for the take, so the cue outputs carry the merged tracks while it records. The main outputs are untouched. +- `key:DOWN+REC` and `key:TRIG@BOUNCE` are declared in `compatibility.uiClaims`. Stem Rec takes UP+REC. If Bounce would need the same stock REC key site, DOWN+REC becomes YES+TRACK or waits for a shared key hook on the base draft; the Part Edit row works either way. +- Open questions, to settle on the emulator before the rest is built (TESTING.md): whether CUE carries a track after its FX, how Studio mode's cue and a master track (T8) behave, lengths over RLEN's 64 steps, and where the working Part and pattern bytes live. +- Not tested on any unit or emulator. + +## Tests and measurements + +See [TESTING.md](TESTING.md). + +## Authorship and licences + +Design and code by @seniorspiz, MIT (LICENSE). Track Solo's lamp handling and Stem Rec's recorder window are the nearest patterns; no code is taken from them. + +## Screens and audio + +None yet. + +## Develop + +- Hear it: `npm run module:dev -- bounce` builds it and tries it on your unit over USB; `--watch` does that again on every save. +- Check it: `npm run module:doctor -- --draft bounce`. +- Measure the first build that runs: `npm run device:price -- `. diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md new file mode 100644 index 0000000000..749424287c --- /dev/null +++ b/sdk/drafts/bounce/TESTING.md @@ -0,0 +1,26 @@ +# Bounce testing + +Record what you ran, on which build and which unit, and what you saw. "Not tested" is a valid answer; never write a result you did not observe, and keep emulator runs apart from hardware ones. + +## Open questions, first + +Settle these on the emulator with the developer's own OS 1.40C before building the rest. Each decides part of the design. + +| Question | Why it matters | Result | +| --- | --- | --- | +| Does CUE carry a track after its FX? | Merging bakes the FX in by recording CUE. If CUE is before the FX, record MAIN with the other tracks muted for the take instead. | Not tested | +| Does a track's recorder take its own output after its FX (SRC3 = the track)? | The single-track bounce relies on it. | Not tested | +| Studio mode cue, and a master track on T8 | A take must not record a track twice or miss one. Handle it or refuse with a clear message. | Not tested | +| Does another module already patch the stock site where REC is read with DOWN held? | One owner per stock byte. If Stem Rec's UP+REC detour sits there, use YES+TRACK or propose a shared key hook. | Not tested | +| Does stock do anything with DOWN+REC or YES+TRACK? | A gesture must not move a stock shortcut. | Not tested | +| Lengths over RLEN's 64 steps | The module records with MAX and stops the recorder itself on the last step; the loop must be gapless. | Not tested | +| Working Part and pattern addresses: machine type, Flex slot, FX1/FX2, recorder setup, trig masks and locks of a track | Every write is one of these. | Not tested | +| Which colour channels the trig keys have, MKI and MKII, and how BOUNCE takes and returns their lamps | The merge display, and stock's trig lamps after closing. | Not tested | + +## On the unit + +Not tested. + +## Stock flows + +Not tested. To compare with and without the module: REC alone (grid recording), TRACK + REC1/2/3 sampling, recorder trigs and RLEN, CUE routing and Studio mode, Part Edit's stock rows, Part Reload and Save, project save and reload, stock track mute. diff --git a/sdk/drafts/bounce/manifest.py b/sdk/drafts/bounce/manifest.py new file mode 100644 index 0000000000..4cbeac54af --- /dev/null +++ b/sdk/drafts/bounce/manifest.py @@ -0,0 +1,78 @@ +"""Bounce -- bounce tracks in place into the active track's Flex recording. + +THE SKELETON OF A COLDFIRE MODULE: code the build links and places for +you, reached from stock code by detours you name by SYMBOL. +`npm run module:new` made this draft under sdk/drafts/. It builds as it is: +`npm run module:dev -- ` tries it on your unit over USB, and +`npm run module:doctor -- --draft ` checks it. + +sdk/octatrack/modules/repitch/ is a finished one (one linked unit, detours, +pokes); sdk/octatrack/modules/quantizer/ another (units built from the +author's source, kept under upstream/). sdk/octabam/docs/remixer/MODULES.md +"Declaring a ColdFire module" is the guide; sdk/octabam/docs/remixer/PLACEMENT.md +says where the bytes go; docs/OCTATRACK_API.md lists the hooks. + +Say what the module is, which stock routines it changes, what is measured +and what is inferred. Delete every comment below once answered. +""" + +from remix.schema import Category, Proof, Gate, Detour, Kind, Linked, Module, Poke +from remix.stock_guard import stock_guard + +MODULE = Module( + # `name` MUST equal the directory name. `key` is the build identifier and + # appears in the build report, which other tools parse -- so it is API. + name="bounce", + key="BOUNCE", + kind=Kind.CF_PATCH, # no DSP code, no chooser row + doc="Bounce: record tracks for one pattern into the active track and make it a Flex machine playing the take.", + category=Category.TRACK, author="seniorspiz", author_url="https://github.com/seniorspiz", + proof=Proof.UNTESTED, proof_note="Development scaffold; no module behavior has been verified.", + + # ---- the code: GNU-as units, linked by the build ---------------------- + # ORDER IS LINK ORDER: a unit may reference symbols of units before it. + # `dram=True` puts the unit in the platform runtime (linked with every + # other DRAM unit in the remix, appended behind the loader, depacked at + # boot into the platform's 10 MB reserve at the bottom of the audio + # page arena -- where anything bigger than a few hundred bytes + # belongs; the unit gives up 10 MB of sample memory). `dram=False` places + # it in one of the OS image's free zero runs (~8 KB, shared by everyone) + # for code that must be ROM-resident. Sources are `.s` for m68k-elf-as; + # `cpu="5407"` and "5475" encode this ISA subset identically. + linked=( + Linked("unit", "modules/bounce/unit.s", dram=True), + # Building from someone else's repository? Add it as a submodule + # under modules//upstream and point `source` into it; the + # sources stay theirs and an update is a submodule bump. + # `reference=(addr, sha256)` re-links the unit at the AUTHOR'S own + # address on every build and compares, so a drift from the bytes + # they ratified fails loudly. + ), + + # ---- how stock code reaches it: detours, wired by symbol -------------- + # `site` is a stock instruction; `expect` its bytes (whole instructions, + # asserted before anything is written -- a site that has moved stops + # the build). `kind`: "jmp" for a stub that replays what it displaced + # and jumps on (the common case), "jsr" for a callable that returns, + # "lea" to rewrite a six-byte `lea abs.l,An`'s operand. `pad_to` nops + # the rest of a displaced span longer than six bytes. + detours=( + # Detour(0x400xxxxx, stock_guard(0x400xxxxx, 8, ""), "unit", "my_hook", + # "what this hook is for", kind="jsr", pad_to=None), + ), + + # ---- plain asserted rewrites ------------------------------------------ + pokes=( + # Poke(0x400xxxxx, expect=stock_guard(0x400xxxxx, 2, ""), + # write=bytes.fromhex("6012"), note="bne -> bra: never re-apply"), + ), + + gates=(Gate("modules/bounce/verify.py", remix_arg=False),), + + # A stock pointer array that needs more entries: TableGrow relocates it + # into free space with your symbols appended and repoints every + # reference. + # tables=(TableGrow("...", old=0x400xxxxx, count=16, + # symbols=(("unit", "my_row"),), + # refs=((0x400xxxxx, 0x400xxxxx),)),), +) diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json new file mode 100644 index 0000000000..34fb7df0e6 --- /dev/null +++ b/sdk/drafts/bounce/octamod.module.json @@ -0,0 +1,95 @@ +{ + "schemaVersion": 2, + "id": "bounce", + "key": "BOUNCE", + "name": "Bounce", + "version": "0.1.0", + "category": "system", + "author": { + "github": "seniorspiz", + "credits": [ + "seniorspiz" + ] + }, + "nativeManifest": "manifest.py", + "presentation": { + "label": "Bounce tracks in place", + "family": "Recording", + "summary": "Bounce one or more audio tracks into the active track as a Flex recording, one pattern long, without setting up the recorder by hand.", + "overview": "Bounce records the active track, and any other tracks you pick, for exactly one pattern length (or the track's own length in per-track mode), with their effects. When the take ends, the active track becomes a Flex machine playing it, with its FX off and one trig on step 1, and the take is saved as a WAV in the project so it reloads unchanged. The other merged tracks are muted with stock's mute. UNDO BOUNCE brings everything back until the next power cycle or project change. It uses no effect slot.", + "highlights": [ + "DOWN then REC, or FUNC+PART > BOUNCE, opens BOUNCE for the active track.", + "Press trig keys 1-8 to merge more tracks into the active track's take; their lamps show which are in.", + "Records on the instrument's own tempo and length, starting on the next step 1.", + "The take is saved to the project, the track becomes a Flex machine playing it, and UNDO BOUNCE restores it." + ], + "usage": [ + "Select the track to bounce into, then hold DOWN and press REC (or FUNC+PART > BOUNCE).", + "Press trig keys 1-8 to merge those tracks in; press YES to arm. The take starts on the next step 1.", + "When BOUNCE reads DONE, the track plays the recording. FUNC+PART > BOUNCE > UNDO BOUNCE goes back." + ] + }, + "controls": [], + "compatibility": { + "firmware": "1.40C", + "location": "Audio tracks", + "conflicts": [], + "uiClaims": [ + "key:DOWN+REC", + "key:TRIG@BOUNCE" + ], + "limitations": [ + "Draft: no code yet. The design is in README.md; nothing has run on an emulator or a unit.", + "DOWN+REC is planned; if another module already patches the REC key site it becomes YES+TRACK or waits for a shared hook.", + "Not yet measured: whether CUE carries a track after its FX, Studio mode cue, a master track (T8), lengths over 64 steps." + ], + "effectId": null + }, + "resources": { + "recorded": "Not measured", + "storage": { + "label": "Storage", + "display": "Not measured", + "value": null, + "unit": "unknown", + "method": "unmeasured", + "conditions": "No measurements exist yet. Add exact conditions and source evidence when available.", + "source": "TESTING.md" + }, + "processing": { + "label": "CPU / DSP load", + "display": "Not measured", + "value": null, + "unit": "unknown", + "method": "unmeasured", + "conditions": "No measurements exist yet. Add exact conditions and source evidence when available.", + "source": "TESTING.md" + } + }, + "tests": { + "report": "TESTING.md", + "summary": "No tests have been run. Add tests.qualification with worst-case cycles, exact memory and attributed owner-reviewed hardware evidence before submitting. This scaffold cannot pass publication checks.", + "hardwareStatus": "untested", + "evidenceRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", + "gates": [ + "Worst-case cycles under parameter modulation and maximum load", + "Exact memory region and maximum-instance totals", + "Owner-reviewed real-hardware evidence with actual coverage and limitations" + ] + }, + "license": { + "spdx": "MIT", + "file": "LICENSE", + "declaration": "Original code by seniorspiz under MIT. No Elektron firmware, extracted routines or tables." + }, + "media": [], + "access": { + "location": "Hold DOWN and press REC, or FUNC+PART (Part Edit) > BOUNCE.", + "steps": [ + "Select the destination track with its TRACK key.", + "Hold DOWN, then press REC: BOUNCE opens with the active track blinking.", + "Press trig keys 1-8 to add or remove tracks, then YES to arm; NO closes without changes." + ], + "screenshots": [] + } +} diff --git a/sdk/drafts/bounce/qualification.example.json b/sdk/drafts/bounce/qualification.example.json new file mode 100644 index 0000000000..f24ba06cd4 --- /dev/null +++ b/sdk/drafts/bounce/qualification.example.json @@ -0,0 +1,84 @@ +{ + "moduleVersion": "0.1.0", + "sourceSha256": "REPLACE_WITH_NATIVE_SOURCE_SHA256", + "imageSha256": "REPLACE_WITH_LOCAL_TESTED_IMAGE_SHA256", + "cycles": [ + { + "processor": "dsp", + "worstCase": null, + "maxConfiguration": null, + "maxInstances": null, + "budget": null, + "unit": "cycles/sample", + "method": "emulator", + "conditions": { + "parameterExtremes": "Describe every minimum, maximum and branch boundary tested.", + "parameterModulation": "Describe simultaneous LFOs, p-locks, MIDI CC and scene sweeps; justify each inapplicable mechanism.", + "modeSwitching": "Describe repeated/interrupted mode, bypass and Part changes.", + "maxLoad": "Describe maximum voices/instances, both cores, FX slots, streaming and USB/MIDI load.", + "inputConditions": "Describe silence, impulses, full-scale inputs, feedback and other worst-case signal conditions." + }, + "report": "TESTING.md" + } + ], + "memory": { + "regions": [ + { + "name": "Replace with each code, state, table, buffer, stack/heap and padding allocation", + "space": "dsp-p", + "words": null, + "wordBits": 24, + "bytes": null, + "scope": "shared" + } + ], + "perInstanceBytes": null, + "sharedBytes": null, + "maxInstances": null, + "totalBytes": null, + "conditions": "State exact build options, alignment, accounting convention, allocator/stack bounds and reused stock/shared memory; justify every absent allocation class.", + "report": "TESTING.md" + }, + "hardware": { + "status": "pending", + "model": "MKII", + "testedOn": "YYYY-MM-DD", + "tester": "Your credited tester handle; no email", + "project": { + "name": "Your local stress project", + "sha256": "REPLACE_WITH_PROJECT_FINGERPRINT", + "recipe": "Record generator/tool revision and command, local source template fingerprint, sample recipe, all settings and modifications needed to reproduce this stress project. Keep the project/card/firmware local." + }, + "durationMinutes": null, + "audioTracks": 8, + "midiTracks": null, + "conditions": { + "parameterExtremes": "Describe every minimum, maximum and branch boundary tested.", + "parameterModulation": "Describe simultaneous LFOs, p-locks, MIDI CC and scene sweeps; justify each inapplicable mechanism.", + "modeSwitching": "Describe repeated/interrupted mode, bypass and Part changes.", + "maxLoad": "Describe maximum voices/instances, both cores, FX slots, streaming and USB/MIDI load.", + "inputConditions": "Describe silence, impulses, full-scale inputs, feedback and other worst-case signal conditions." + }, + "checks": { + "audioContinuity": "failed", + "transport": "failed", + "controls": "failed", + "memoryIntegrity": "failed", + "recovery": "failed" + }, + "report": "TESTING.md", + "maxInstances": null + }, + "documentation": { + "tutorial": { + "title": "Quick tutorial", + "steps": [ + "Explain setup and exactly where to select or enable the module.", + "Demonstrate the main controls with a useful example setting.", + "Explain what to hear/observe and how to stop, reset or bypass." + ] + }, + "screenshots": [], + "screenshotStyle": "black-and-white" + } +} diff --git a/sdk/drafts/bounce/resource-impact.example.json b/sdk/drafts/bounce/resource-impact.example.json new file mode 100644 index 0000000000..8f7457a054 --- /dev/null +++ b/sdk/drafts/bounce/resource-impact.example.json @@ -0,0 +1,21 @@ +{ + "conditions": "Describe the active workload, expensive modes, changing controls, instance count, and whether shared/stock allocations are included.", + "cpu": { + "level": null, + "basis": "source-estimate", + "rationale": "Choose minimal, low, moderate or high from source inspection or a documented workload comparison. Explain the ColdFire work and cite the record; do not invent a utilization percentage.", + "source": "TESTING.md" + }, + "dsp": { + "level": null, + "basis": "source-estimate", + "rationale": "Choose a relative demand tier covering the expensive DSP modes and modulation. Minimal needs an explanation of the small or absent added DSP path.", + "source": "TESTING.md" + }, + "memory": { + "level": null, + "basis": "source-estimate", + "rationale": "Choose a relative footprint tier covering code, state, tables and buffers. Distinguish shared reservations and reused stock buffers from extra per-instance memory.", + "source": "TESTING.md" + } +} diff --git a/sdk/drafts/bounce/unit.s b/sdk/drafts/bounce/unit.s new file mode 100644 index 0000000000..886cafcc85 --- /dev/null +++ b/sdk/drafts/bounce/unit.s @@ -0,0 +1,17 @@ +| -- one linked unit. GNU as, ColdFire ISA A+ (m68k-elf-as). +| +| Symbols you `.global` here are what the manifest's Detours name. Absolute +| references to stock code are fine (`jsr (0x40001e50).l`); references to +| your own labels are resolved by the link wherever the build places this, +| so write `lea SYM:l,%a0` for a same-unit address you need as a pointer +| (a bare `lea SYM,%a0` assembles pc-relative -- correct, but four bytes +| shorter than a hand-assembled original if you are matching one). + .text + .global my_hook + +| A "jsr" detour lands here and expects an rts. A "jmp" detour's target +| must first REPLAY the instructions the six-byte jmp displaced, then jump +| back to site+6 (or wherever those instructions would have continued). +my_hook: + nop + rts diff --git a/sdk/drafts/bounce/verify.py b/sdk/drafts/bounce/verify.py new file mode 100644 index 0000000000..b993d5b46c --- /dev/null +++ b/sdk/drafts/bounce/verify.py @@ -0,0 +1,2 @@ +"""Replace with module-specific, meaningful behavior and resource gates.""" +raise SystemExit("[FAIL] Untested development scaffold: implement verification before qualification.") From 77a7d98cbc6be5f48bfde0d62c2b6f37a4e6577b Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Wed, 2 Dec 2026 20:39:07 +0100 Subject: [PATCH 02/43] Bounce: settle the gesture, length and Part questions before code DOWN+REC is free: keys come through the base's module_key bus, and on stock DOWN held + REC only toggles grid recording (emulator run in TESTING.md). CUE carrying a track after its FX is inferred from the DSP mixdown, to be measured. Length, end-of-take and Part fields come from octabam's RLEN PLEN and firmware notes; the machine change must go through stock's transition routine as Part Reload does. T8 is refused while MASTER TRACK is on. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/README.md | 7 +++--- sdk/drafts/bounce/TESTING.md | 36 ++++++++++++++++++++------- sdk/drafts/bounce/octamod.module.json | 6 ++--- 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index aacc4c33d5..d45fa87e63 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -53,8 +53,9 @@ It answers `ev_in_use` so it rests while nothing is armed, and contributes its B - Audio tracks only. MIDI tracks are refused. - Merging several tracks uses CUE for the take, so the cue outputs carry the merged tracks while it records. The main outputs are untouched. -- `key:DOWN+REC` and `key:TRIG@BOUNCE` are declared in `compatibility.uiClaims`. Stem Rec takes UP+REC. If Bounce would need the same stock REC key site, DOWN+REC becomes YES+TRACK or waits for a shared key hook on the base draft; the Part Edit row works either way. -- Open questions, to settle on the emulator before the rest is built (TESTING.md): whether CUE carries a track after its FX, how Studio mode's cue and a master track (T8) behave, lengths over RLEN's 64 steps, and where the working Part and pattern bytes live. +- `key:DOWN+REC` and `key:TRIG@BOUNCE` are declared in `compatibility.uiClaims`. Keys arrive through the base's shared `module_key` bus, so Bounce patches no stock key site. On stock, DOWN held + REC only toggles GRID RECORDING as REC alone does (emulator, TESTING.md); with Bounce, REC alone stays stock. +- With MASTER TRACK on, T8 carries the mix of T1-T7, so T8 cannot be a bounce destination then and is refused. +- Still open (TESTING.md): measuring that CUE carries a track after its FX, SRC3's own-track source, Studio mode cue, and the pattern's trig and lock layout. - Not tested on any unit or emulator. ## Tests and measurements @@ -63,7 +64,7 @@ See [TESTING.md](TESTING.md). ## Authorship and licences -Design and code by @seniorspiz, MIT (LICENSE). Track Solo's lamp handling and Stem Rec's recorder window are the nearest patterns; no code is taken from them. +Design and code by @seniorspiz, MIT (LICENSE). Track Solo's lamp handling and Stem Rec's recorder window are the nearest patterns; no code is taken from them. The recorder length, end-of-take and pattern length findings come from Sam Banks' RLEN PLEN notes in octabam and from octabam's firmware notes (Bryan T, Tim Hastie). ## Screens and audio diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 749424287c..91bf31ede6 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -2,20 +2,38 @@ Record what you ran, on which build and which unit, and what you saw. "Not tested" is a valid answer; never write a result you did not observe, and keep emulator runs apart from hardware ones. +Labels below: **measured** (seen in a run named here), **read** (from a document named here, not re-checked), **inferred** (follows from what is read, not seen), **open**. + ## Open questions, first -Settle these on the emulator with the developer's own OS 1.40C before building the rest. Each decides part of the design. +Settle these before building the rest. Each decides part of the design. Addresses are OS 1.40C (MAIN OS SHA-256 of the `.bin` `34695b60…`); no stock bytes are kept here. | Question | Why it matters | Result | | --- | --- | --- | -| Does CUE carry a track after its FX? | Merging bakes the FX in by recording CUE. If CUE is before the FX, record MAIN with the other tracks muted for the take instead. | Not tested | -| Does a track's recorder take its own output after its FX (SRC3 = the track)? | The single-track bounce relies on it. | Not tested | -| Studio mode cue, and a master track on T8 | A take must not record a track twice or miss one. Handle it or refuse with a clear message. | Not tested | -| Does another module already patch the stock site where REC is read with DOWN held? | One owner per stock byte. If Stem Rec's UP+REC detour sits there, use YES+TRACK or propose a shared key hook. | Not tested | -| Does stock do anything with DOWN+REC or YES+TRACK? | A gesture must not move a stock shortcut. | Not tested | -| Lengths over RLEN's 64 steps | The module records with MAX and stops the recorder itself on the last step; the loop must be gapless. | Not tested | -| Working Part and pattern addresses: machine type, Flex slot, FX1/FX2, recorder setup, trig masks and locks of a track | Every write is one of these. | Not tested | -| Which colour channels the trig keys have, MKI and MKII, and how BOUNCE takes and returns their lamps | The merge display, and stock's trig lamps after closing. | Not tested | +| Does another module already patch the REC key site? | One owner per stock byte. | **Read**, settled: over USB a module reads keys through the base's `module_key` bus ([OCTATRACK_API.md](../../../docs/OCTATRACK_API.md#core-entry-points)) and patches no key site. Stem Rec's REC detour (`0x40048774`) is in card builds only. `modules:compat` finds no clash with `key:DOWN+REC`. | +| Does stock do anything with DOWN+REC? | A gesture must not move a stock shortcut. | **Measured** (emulator, below): DOWN held + REC (the transport record key ○, code `0x29`) does what REC alone does, toggling GRID RECORDING; DOWN adds nothing. With Bounce, REC alone stays stock and only the combination opens BOUNCE (Stem Rec's UP+REC is the same pattern). | +| Does stock do anything with YES+TRACK? | The fallback gesture. | No longer needed. YES alone on the main screen opens stock's ARM ALL popup (octabam `tools/panel/KEYMAP.md`, **read**), so YES+TRACK would be a poor fallback anyway. Not tested. | +| Does CUE carry a track after its FX? | Merging bakes the FX in by recording CUE. | **Inferred, to measure**: core 0's mixdown sums each track's processed block from the voice cores twice per sample, with its cue gain into the CUE bus and with its MAIN gain into MAIN (octabam `docs/firmware/DSP.md`, "Core 0's frame", **read**). MAIN carries the FX, so CUE carries the same post-FX block at its own gain. Confirm with a render: one track with a loud FX, cue send up, recorder on CUE. | +| Does a track's recorder take its own output after its FX (SRC3 = the track)? | The single-track bounce relies on it. | Open. SRC3's value order (count 11) is not mapped yet. | +| Master track (T8) and Studio mode cue | A take must not record a track twice or miss one. | **Read**: with MASTER TRACK on, the mixdown sums slots 0-6 into T8's input and MAIN is slot 7 (DSP.md). Bounce must refuse T8 as a destination, or handle it, while MASTER TRACK is on. Studio mode: open. | +| Lengths: pattern length, per-track length and scale | The take is one pass of the pattern. | **Read** (octabam `modules/rlen-plen/README.md`, Sam Banks): RLEN counts master-clock 16ths and stops at 64, with no per-track scale term; at MAX the take ends at the next recorder trig. Pattern length and scale: record `0x400eb034 + p·0x8ed8 + b·0x9b340` (scale `+0`, length `−1`, a per-track flag `+1` selecting the track record `0x400e21e0 + t·0x91a`, length `+0x50`, scale `+0x51`). So Bounce computes the take's length from the pattern's or the track's length and scale, not from RLEN. | +| How Bounce sees that the take ended | Once a step while armed, nothing otherwise. | **Read**: a fixed-length take's end is posted at `0x40005e8e`, writing the track's LIMIT word (`0x46c7fe24[track]`); a MAX take never posts it (rlen-plen README). The stock arm writes LIMIT at `0x400069d6` (octabam `verify_rec_threshold.py`). | +| Part fields Bounce writes | Every write is one of these. | **Read** (octabam `docs/firmware/PARTS.md`, `tools/hw/ot_project.py`). Working Part `B + 0x8ed80 + p·0x18b2`, `B = 0x400e21e0 + bank·0x9b340`; per track t, RAM offsets: FX1 id `+0x00+t`, FX2 id `+0x08+t`, machine `+0x22+t` (0 STATIC, 1 FLEX, 2 THRU, 3 NEIGHBOR, 4 PICKUP), Flex slot `+0x2ca+5t+1` (`0x80`-`0x87` = recorder buffers 1-8), recorder setup `+0x602+12t` (INAB INCD RLEN TRIG SRC3 LOOP / FIN FOUT AB QREC QPL CD). A bank file's Part record is 9 bytes later. | +| Changing the machine | The engine must switch voices. | **Read**: stock's only path that runs a machine transition is Part Reload (`0x4004aab4`), which calls `0x400972fc(p, track, old machine)` for each track (PARTS.md). Bounce calls it the same way after writing the machine byte; the unsaved bit (`B + 0x95048`) is set as Part paste does. | +| Pattern trigs and locks of a track | UNDO snapshots and clears them. | Open: octabam `docs/firmware/STEP_LOCKS.md` and the 0x8ed8-byte pattern record. The board finding on stock's shared pattern undo buffer (#2485) applies: Bounce keeps its own snapshot. | +| Trig key colours, MKI and MKII | The merge display. | **Read**: each trig key has two LED bits, the odd one its second colour (KEYMAP.md, MKII). How BOUNCE takes and returns their lamps: open (Track Solo filters the transmitted row without changing stock's bitmaps). MKI: open. | + +## Emulator runs + +**2 December 2026, stock gesture probe.** `ot_emu` (octabam `f7d7290`, built on this Mac, arm64), the developer's unmodified MAIN OS from 1.40C, MKII panel, `--rtc host`, an empty staged project, transport stopped, no DSP. Keys through `--live`, a screenshot after each step: + +| Keys | Screen | +| --- | --- | +| REC | the GRID RECORDING icon on; REC again, off | +| DOWN held, REC | the GRID RECORDING icon on, as REC alone | +| DOWN held, T2 | T2 selected, as T2 alone | + +A first run left stock's SET DATE/TIME prompt open, so DOWN edited the date; it is not counted. The screenshots and the probe script stayed outside the repository. ## On the unit diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index 34fb7df0e6..470cb4ff7a 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -39,9 +39,9 @@ "key:TRIG@BOUNCE" ], "limitations": [ - "Draft: no code yet. The design is in README.md; nothing has run on an emulator or a unit.", - "DOWN+REC is planned; if another module already patches the REC key site it becomes YES+TRACK or waits for a shared hook.", - "Not yet measured: whether CUE carries a track after its FX, Studio mode cue, a master track (T8), lengths over 64 steps." + "Draft: no code yet. The design is in README.md; nothing has run on a unit.", + "With MASTER TRACK on, T8 cannot be a bounce destination.", + "Not yet measured: CUE after the FX (inferred from the DSP mixdown), Studio mode cue, MKI lamps." ], "effectId": null }, From 39f48e72751fb6756f685b765cdc77c1f5c7f5e5 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Wed, 2 Dec 2026 20:49:39 +0100 Subject: [PATCH 03/43] Bounce: CUE carries a track after its FX (emulator render) Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/TESTING.md | 11 ++++++++++- sdk/drafts/bounce/octamod.module.json | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 91bf31ede6..34d6193fc3 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -13,7 +13,7 @@ Settle these before building the rest. Each decides part of the design. Addresse | Does another module already patch the REC key site? | One owner per stock byte. | **Read**, settled: over USB a module reads keys through the base's `module_key` bus ([OCTATRACK_API.md](../../../docs/OCTATRACK_API.md#core-entry-points)) and patches no key site. Stem Rec's REC detour (`0x40048774`) is in card builds only. `modules:compat` finds no clash with `key:DOWN+REC`. | | Does stock do anything with DOWN+REC? | A gesture must not move a stock shortcut. | **Measured** (emulator, below): DOWN held + REC (the transport record key ○, code `0x29`) does what REC alone does, toggling GRID RECORDING; DOWN adds nothing. With Bounce, REC alone stays stock and only the combination opens BOUNCE (Stem Rec's UP+REC is the same pattern). | | Does stock do anything with YES+TRACK? | The fallback gesture. | No longer needed. YES alone on the main screen opens stock's ARM ALL popup (octabam `tools/panel/KEYMAP.md`, **read**), so YES+TRACK would be a poor fallback anyway. Not tested. | -| Does CUE carry a track after its FX? | Merging bakes the FX in by recording CUE. | **Inferred, to measure**: core 0's mixdown sums each track's processed block from the voice cores twice per sample, with its cue gain into the CUE bus and with its MAIN gain into MAIN (octabam `docs/firmware/DSP.md`, "Core 0's frame", **read**). MAIN carries the FX, so CUE carries the same post-FX block at its own gain. Confirm with a render: one track with a loud FX, cue send up, recorder on CUE. | +| Does CUE carry a track after its FX? | Merging bakes the FX in by recording CUE. | **Measured in the emulator** (below), not on a unit: with FX1 LO-FI pushed hard, MAIN lost its highs and fell to 3 sample levels, and the CUE bus followed it sample for sample (r = 1.0000, one sample late on the left). CUE carries the track after FX1 and FX2, as core 0's mixdown suggests (octabam `docs/firmware/DSP.md`, "Core 0's frame", **read**). | | Does a track's recorder take its own output after its FX (SRC3 = the track)? | The single-track bounce relies on it. | Open. SRC3's value order (count 11) is not mapped yet. | | Master track (T8) and Studio mode cue | A take must not record a track twice or miss one. | **Read**: with MASTER TRACK on, the mixdown sums slots 0-6 into T8's input and MAIN is slot 7 (DSP.md). Bounce must refuse T8 as a destination, or handle it, while MASTER TRACK is on. Studio mode: open. | | Lengths: pattern length, per-track length and scale | The take is one pass of the pattern. | **Read** (octabam `modules/rlen-plen/README.md`, Sam Banks): RLEN counts master-clock 16ths and stops at 64, with no per-track scale term; at MAX the take ends at the next recorder trig. Pattern length and scale: record `0x400eb034 + p·0x8ed8 + b·0x9b340` (scale `+0`, length `−1`, a per-track flag `+1` selecting the track record `0x400e21e0 + t·0x91a`, length `+0x50`, scale `+0x51`). So Bounce computes the take's length from the pattern's or the track's length and scale, not from RLEN. | @@ -35,6 +35,15 @@ Settle these before building the rest. Each decides part of the design. Addresse A first run left stock's SET DATE/TIME prompt open, so DOWN edited the date; it is not counted. The screenshots and the probe script stayed outside the repository. +**2 December 2026, CUE after FX.** Same `ot_emu` and MAIN OS, with `--dsp --sequencer --internal-clock`, white noise on inputs A and B, 3 seconds per render. T1 THRU on A+B, trigs on steps 1, 5, 9 and 13, FX2 empty, CUE on with T1's cue level 127. Two renders, FX1 NONE and FX1 LO-FI with every FX1 knob at 127. Core 0's output words compared over the second half of each render: + +| Render | MAIN (words 2, 3) | CUE (words 0, 1) against MAIN | +| --- | --- | --- | +| FX1 NONE | flat noise, 16379 sample levels | r = 1.0000 per side (left one sample late) | +| FX1 LO-FI | 94 % of its energy below a quarter of Nyquist, 3 sample levels | r = 1.0000 per side (left one sample late) | + +So the CUE bus is the track after its FX. Not checked: Studio mode, MASTER TRACK, a cue level below 127, a unit. The probe script stayed outside the repository. + ## On the unit Not tested. diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index 470cb4ff7a..c73178ea33 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -41,7 +41,7 @@ "limitations": [ "Draft: no code yet. The design is in README.md; nothing has run on a unit.", "With MASTER TRACK on, T8 cannot be a bounce destination.", - "Not yet measured: CUE after the FX (inferred from the DSP mixdown), Studio mode cue, MKI lamps." + "Not yet measured on a unit: CUE after the FX (seen in the emulator only), Studio mode cue, MKI lamps." ], "effectId": null }, From 01be1faf733977ed0e9b67c4f6ae4f27c6f960ce Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Wed, 2 Dec 2026 20:53:45 +0100 Subject: [PATCH 04/43] Bounce: SRC3 = the track records it after its FX (emulator render) Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/README.md | 2 +- sdk/drafts/bounce/TESTING.md | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index d45fa87e63..e283460959 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -55,7 +55,7 @@ It answers `ev_in_use` so it rests while nothing is armed, and contributes its B - Merging several tracks uses CUE for the take, so the cue outputs carry the merged tracks while it records. The main outputs are untouched. - `key:DOWN+REC` and `key:TRIG@BOUNCE` are declared in `compatibility.uiClaims`. Keys arrive through the base's shared `module_key` bus, so Bounce patches no stock key site. On stock, DOWN held + REC only toggles GRID RECORDING as REC alone does (emulator, TESTING.md); with Bounce, REC alone stays stock. - With MASTER TRACK on, T8 carries the mix of T1-T7, so T8 cannot be a bounce destination then and is refused. -- Still open (TESTING.md): measuring that CUE carries a track after its FX, SRC3's own-track source, Studio mode cue, and the pattern's trig and lock layout. +- Seen in the emulator (TESTING.md): CUE and SRC3 = the track both carry a track after its FX. Still open: the same on a unit, Studio mode cue, whether a take follows the track's LEVEL, and the pattern's trig and lock layout. - Not tested on any unit or emulator. ## Tests and measurements diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 34d6193fc3..a7fbf8733a 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -14,7 +14,7 @@ Settle these before building the rest. Each decides part of the design. Addresse | Does stock do anything with DOWN+REC? | A gesture must not move a stock shortcut. | **Measured** (emulator, below): DOWN held + REC (the transport record key ○, code `0x29`) does what REC alone does, toggling GRID RECORDING; DOWN adds nothing. With Bounce, REC alone stays stock and only the combination opens BOUNCE (Stem Rec's UP+REC is the same pattern). | | Does stock do anything with YES+TRACK? | The fallback gesture. | No longer needed. YES alone on the main screen opens stock's ARM ALL popup (octabam `tools/panel/KEYMAP.md`, **read**), so YES+TRACK would be a poor fallback anyway. Not tested. | | Does CUE carry a track after its FX? | Merging bakes the FX in by recording CUE. | **Measured in the emulator** (below), not on a unit: with FX1 LO-FI pushed hard, MAIN lost its highs and fell to 3 sample levels, and the CUE bus followed it sample for sample (r = 1.0000, one sample late on the left). CUE carries the track after FX1 and FX2, as core 0's mixdown suggests (octabam `docs/firmware/DSP.md`, "Core 0's frame", **read**). | -| Does a track's recorder take its own output after its FX (SRC3 = the track)? | The single-track bounce relies on it. | Open. SRC3's value order (count 11) is not mapped yet. | +| Does a track's recorder take its own output after its FX (SRC3 = the track)? | The single-track bounce relies on it. | **Measured in the emulator** (below), not on a unit: with SRC3 = T1 and FX1 LO-FI, the take played back on a Flex track is T1's crushed output, sample for sample, exactly ten steps later. SRC3's values (**read**, octabam `docs/firmware/PARAM_PAGES.md`, displayed values confirmed on hardware by Bryan T): raw 0 `-`, 1-8 T1-T8, 9 MAIN, 10 CUE. Raw 1 = T1 is measured here; MAIN and CUE are read only. Open: whether the take follows T1's LEVEL (Stem Rec's per-track tap is before the fader; the recorder's own path is not checked). | | Master track (T8) and Studio mode cue | A take must not record a track twice or miss one. | **Read**: with MASTER TRACK on, the mixdown sums slots 0-6 into T8's input and MAIN is slot 7 (DSP.md). Bounce must refuse T8 as a destination, or handle it, while MASTER TRACK is on. Studio mode: open. | | Lengths: pattern length, per-track length and scale | The take is one pass of the pattern. | **Read** (octabam `modules/rlen-plen/README.md`, Sam Banks): RLEN counts master-clock 16ths and stops at 64, with no per-track scale term; at MAX the take ends at the next recorder trig. Pattern length and scale: record `0x400eb034 + p·0x8ed8 + b·0x9b340` (scale `+0`, length `−1`, a per-track flag `+1` selecting the track record `0x400e21e0 + t·0x91a`, length `+0x50`, scale `+0x51`). So Bounce computes the take's length from the pattern's or the track's length and scale, not from RLEN. | | How Bounce sees that the take ended | Once a step while armed, nothing otherwise. | **Read**: a fixed-length take's end is posted at `0x40005e8e`, writing the track's LIMIT word (`0x46c7fe24[track]`); a MAX take never posts it (rlen-plen README). The stock arm writes LIMIT at `0x400069d6` (octabam `verify_rec_threshold.py`). | @@ -44,6 +44,15 @@ A first run left stock's SET DATE/TIME prompt open, so DOWN edited the date; it So the CUE bus is the track after its FX. Not checked: Studio mode, MASTER TRACK, a cue level below 127, a unit. The probe script stayed outside the repository. +**2 December 2026, SRC3 = the track.** Same `ot_emu`, MAIN OS and noise, 120 BPM, pattern 16 steps at 1X. T1 THRU on A+B with PLAY on step 1. T1's recorder: INAB and INCD `-`, SRC3 = T1 (raw 1), RLEN 8, LOOP off, a recorder trig for SRC3 only on step 1. T2 FLEX on recorder buffer 1, FX NONE, PLAY on step 11. Each track's post-FX output read from the read-back (octabam `tools/hw/sos_capture.py`, `readback_tracks`): + +| T1's FX1 | T1's output | T2 playing T1's take | +| --- | --- | --- | +| NONE | flat noise | T1's output 55,125 samples (10 steps) later, gain 0.72, residual 0.02 % | +| LO-FI, every knob 127 | 3 sample levels, 94 % of its energy below a quarter of Nyquist | the same: 94 % below a quarter of Nyquist, residual 0.01 % | + +So SRC3 = the track records it after its FX, the bounce a single track needs. The gain is T2's playback level, not measured further. Not checked: whether the take follows T1's LEVEL, FX2, a unit. The probe script stayed outside the repository. + ## On the unit Not tested. From 0415b9ba658959de7d87769ec28b67efc903b5f4 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Wed, 2 Dec 2026 20:58:55 +0100 Subject: [PATCH 05/43] Bounce: map a track's pattern record for UNDO (emulator dump) Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/README.md | 4 ++-- sdk/drafts/bounce/TESTING.md | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index e283460959..ef085d953c 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -39,7 +39,7 @@ Every piece of work runs on a key press, once a step while a take is armed, or a | Step | Where it runs | | --- | --- | | Check: audio tracks only, the length fits recorder memory, the active track's recorder is free | key press | -| Snapshot the active track's Part bytes, trigs and locks, and every merged track's mute, for UNDO (module memory, not stock's shared undo buffer) | key press | +| Snapshot the active track's Part bytes, its whole pattern record (trigs, locks, conditions, 2,330 bytes) and every merged track's mute, for UNDO (module memory, not stock's shared undo buffer) | key press | | One track: set its recorder's source to itself. Several: send the merged tracks to CUE for the take and record CUE | key press | | Set the length to the pattern's (or the track's) and arm for the next step 1 | key press | | Record, on the instrument's own tempo, scale and length | stock's recorder | @@ -55,7 +55,7 @@ It answers `ev_in_use` so it rests while nothing is armed, and contributes its B - Merging several tracks uses CUE for the take, so the cue outputs carry the merged tracks while it records. The main outputs are untouched. - `key:DOWN+REC` and `key:TRIG@BOUNCE` are declared in `compatibility.uiClaims`. Keys arrive through the base's shared `module_key` bus, so Bounce patches no stock key site. On stock, DOWN held + REC only toggles GRID RECORDING as REC alone does (emulator, TESTING.md); with Bounce, REC alone stays stock. - With MASTER TRACK on, T8 carries the mix of T1-T7, so T8 cannot be a bounce destination then and is refused. -- Seen in the emulator (TESTING.md): CUE and SRC3 = the track both carry a track after its FX. Still open: the same on a unit, Studio mode cue, whether a take follows the track's LEVEL, and the pattern's trig and lock layout. +- Seen in the emulator (TESTING.md): CUE and SRC3 = the track both carry a track after its FX. The pattern's trig and lock layout is mapped. Still open: the same on a unit, Studio mode cue, and whether a take follows the track's LEVEL. - Not tested on any unit or emulator. ## Tests and measurements diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index a7fbf8733a..50caf6080c 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -20,7 +20,7 @@ Settle these before building the rest. Each decides part of the design. Addresse | How Bounce sees that the take ended | Once a step while armed, nothing otherwise. | **Read**: a fixed-length take's end is posted at `0x40005e8e`, writing the track's LIMIT word (`0x46c7fe24[track]`); a MAX take never posts it (rlen-plen README). The stock arm writes LIMIT at `0x400069d6` (octabam `verify_rec_threshold.py`). | | Part fields Bounce writes | Every write is one of these. | **Read** (octabam `docs/firmware/PARTS.md`, `tools/hw/ot_project.py`). Working Part `B + 0x8ed80 + p·0x18b2`, `B = 0x400e21e0 + bank·0x9b340`; per track t, RAM offsets: FX1 id `+0x00+t`, FX2 id `+0x08+t`, machine `+0x22+t` (0 STATIC, 1 FLEX, 2 THRU, 3 NEIGHBOR, 4 PICKUP), Flex slot `+0x2ca+5t+1` (`0x80`-`0x87` = recorder buffers 1-8), recorder setup `+0x602+12t` (INAB INCD RLEN TRIG SRC3 LOOP / FIN FOUT AB QREC QPL CD). A bank file's Part record is 9 bytes later. | | Changing the machine | The engine must switch voices. | **Read**: stock's only path that runs a machine transition is Part Reload (`0x4004aab4`), which calls `0x400972fc(p, track, old machine)` for each track (PARTS.md). Bounce calls it the same way after writing the machine byte; the unsaved bit (`B + 0x95048`) is set as Part paste does. | -| Pattern trigs and locks of a track | UNDO snapshots and clears them. | Open: octabam `docs/firmware/STEP_LOCKS.md` and the 0x8ed8-byte pattern record. The board finding on stock's shared pattern undo buffer (#2485) applies: Bounce keeps its own snapshot. | +| Pattern trigs and locks of a track | UNDO snapshots and clears them. | **Measured in the emulator** (below), on top of octabam `docs/firmware/STEP_LOCKS.md` and `tools/hw/ot_bank.py` (**read**). A track's pattern record is `B + p·0x8ed8 + t·0x91a`, 0x91a bytes: eight 8-byte step masks at `+0x00` (big-endian, step s = byte 7 − (s−1)/8, bit (s−1) mod 8; mask 0 trigs, 2 trigless lock trigs, 4 recorder trigs A B, 5 C D, 6 SRC3; 1, 3 and 7 not decoded), track length `+0x50`, scale `+0x51`, then 64 steps of 32 lock bytes at `+0x59` (`0xff` = no lock; slots 0-5 PLAYBACK, 6-11 LFO, 12-17 AMP, 18-23 FX1, 24-29 FX2), then 0xc0 bytes not decoded. The current bank keeps a battery-backed copy at `0x1001614e` + the same offset, and its working Parts at `0x100a4ece` (PARTS.md), which stock writes beside the bank. So UNDO copies the whole 0x91a-byte record, undecoded bytes (trig conditions, micro timing) included, and writes both copies back, best through stock's track write `0x40029754(src, pattern, track)` as track paste does (**read**; whether it writes the battery copy itself is open). The board finding on stock's shared pattern undo buffer (#2485) applies: Bounce keeps its own snapshot. | | Trig key colours, MKI and MKII | The merge display. | **Read**: each trig key has two LED bits, the odd one its second colour (KEYMAP.md, MKII). How BOUNCE takes and returns their lamps: open (Track Solo filters the transmitted row without changing stock's bitmaps). MKI: open. | ## Emulator runs @@ -53,6 +53,17 @@ So the CUE bus is the track after its FX. Not checked: Studio mode, MASTER TRACK So SRC3 = the track records it after its FX, the bounce a single track needs. The gain is T2's playback level, not measured further. Not checked: whether the take follows T1's LEVEL, FX2, a unit. The probe script stayed outside the repository. +**2 December 2026, a track's pattern record.** Same `ot_emu` and MAIN OS. Known values written into bank 1, pattern A01, T3 of an empty project: trigs on steps 1, 5, 9 and 13, a trigless lock trig on step 3, a recorder trig A B on step 5 and SRC3 on step 9, track length 32, three locks (step 1 FX1 B = `0x55`, step 3 PLAYBACK C = `0x21`, step 13 FX2 F = `0x7f`). Loaded with `--dsp --sequencer`, then the bank's RAM and its battery-backed copy dumped (`--mem-dump`). (Without `--sequencer` the emulator stopped before the project load, and that run is not counted.) + +| Field | Address checked | RAM `0x400e3414` | Battery copy `0x10017382` | +| --- | --- | --- | --- | +| masks 0, 2, 4, 6 | `+0x00`, `+0x10`, `+0x20`, `+0x30` | as written | as written | +| length, scale | `+0x50`, `+0x51` | 32, 1X | 32, 1X | +| the three locks | `+0x59 + (s−1)·32 + slot` | as written | as written | +| the whole record | 0x919 bytes of the file's TRAC data | identical | identical | + +No other audio track carried a trig. The probe script and dumps stayed outside the repository. + ## On the unit Not tested. From 1d4129fd348f61297552393650667b80b0205794 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Wed, 2 Dec 2026 21:08:09 +0100 Subject: [PATCH 06/43] Bounce 0.1.0 prototype: gesture, BOUNCE window, take, Flex switch and UNDO (builds; not yet run) Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/README.md | 15 +- sdk/drafts/bounce/TESTING.md | 6 + sdk/drafts/bounce/bounce.c | 430 ++++++++ sdk/drafts/bounce/generate.py | 45 + sdk/drafts/bounce/manifest.py | 83 +- sdk/drafts/bounce/octamod.module.json | 6 +- sdk/drafts/bounce/runtime.json | 10 + sdk/drafts/bounce/unit.s | 1454 ++++++++++++++++++++++++- 8 files changed, 1963 insertions(+), 86 deletions(-) create mode 100644 sdk/drafts/bounce/bounce.c create mode 100644 sdk/drafts/bounce/generate.py create mode 100644 sdk/drafts/bounce/runtime.json diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index ef085d953c..1c65caae39 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -58,13 +58,25 @@ It answers `ev_in_use` so it rests while nothing is armed, and contributes its B - Seen in the emulator (TESTING.md): CUE and SRC3 = the track both carry a track after its FX. The pattern's trig and lock layout is mapped. Still open: the same on a unit, Studio mode cue, and whether a take follows the track's LEVEL. - Not tested on any unit or emulator. +### What the 0.1.0 prototype does and does not do yet + +The code in `bounce.c` builds (`npm run module:dev -- bounce --build-only`) and has not run anywhere. Against the design above it still lacks: + +- **The WAV.** The take stays in the track's recorder buffer, so it is lost at a power cycle and a project reload does not bring it back. Saving it to the project is the next piece. +- **Passes over 64 master steps.** RLEN counts at most 64 master 16ths (4 bars at 1X), so a longer pass is refused with PASS OVER 64 STEPS. +- **Trig key lamps.** The merge is shown in the BOUNCE window (merged tracks inverted), not yet on the trig keys. +- **The MASTER TRACK check.** T8 is not refused yet while MASTER TRACK is on. +- **PER TRACK mode.** The pass length is the track's own, but QREC PLEN starts the take at the master pattern's start (inferred). +- **Cue levels.** A merged track records at its CUE level; one at 0 is silent in the take. +- **Recording with the sequencer stopped.** YES arms; the take starts with the next pattern start once the sequencer plays (inferred). STOP during the take cancels the bounce. + ## Tests and measurements See [TESTING.md](TESTING.md). ## Authorship and licences -Design and code by @seniorspiz, MIT (LICENSE). Track Solo's lamp handling and Stem Rec's recorder window are the nearest patterns; no code is taken from them. The recorder length, end-of-take and pattern length findings come from Sam Banks' RLEN PLEN notes in octabam and from octabam's firmware notes (Bryan T, Tim Hastie). +Design and code by @seniorspiz, MIT (LICENSE). Track Solo's lamp handling and Stem Rec's recorder window are the nearest patterns; no code is taken from them. The stock addresses and the recorder mailbox word come from octabam's FREE LOOP adapter and firmware notes; the stock text call and the per-step lock index are as Pattern Sample Locks (twwwy) uses them, written anew here. The recorder length, end-of-take and pattern length findings come from Sam Banks' RLEN PLEN notes in octabam and from octabam's firmware notes (Bryan T, Tim Hastie). ## Screens and audio @@ -72,6 +84,7 @@ None yet. ## Develop +- Edit `bounce.c`, then `python3 sdk/drafts/bounce/generate.py` writes `unit.s` (`--check` fails when it is stale). - Hear it: `npm run module:dev -- bounce` builds it and tries it on your unit over USB; `--watch` does that again on every save. - Check it: `npm run module:doctor -- --draft bounce`. - Measure the first build that runs: `npm run device:price -- `. diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 50caf6080c..2b11bb4e50 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -64,6 +64,12 @@ So SRC3 = the track records it after its FX, the bounce a single track needs. Th No other audio track carried a trig. The probe script and dumps stayed outside the repository. +## The 0.1.0 prototype + +**2 December 2026.** `bounce.c` compiled with the pinned ColdFire flags and the shared object guard (`generate.py`), and `npm run module:dev -- bounce --build-only` built the package: 4,100 bytes of code and data, 11,072 bytes of zeroed buffers, 5 hook entries, no stock-code sites. `npm run module:doctor -- --draft bounce`: the experimental lines are green. It has not run in the emulator or on a unit: no behaviour below is claimed for it. + +Read and not yet checked by a run, each needed by the prototype: stock's track write `0x40029754(src, pattern, track)` takes a pattern index and writes the battery copy; Part paste `0x40029a4c` applies a changed FX id and recorder setup to the engine; the recorder mailbox `0x40005178(track, 0xc010, 1)` starts a SRC3 take at QREC's next PLEN boundary; the pattern's scale mode byte is `pattern + 0x8e55`. + ## On the unit Not tested. diff --git a/sdk/drafts/bounce/bounce.c b/sdk/drafts/bounce/bounce.c new file mode 100644 index 0000000000..6d9204646a --- /dev/null +++ b/sdk/drafts/bounce/bounce.c @@ -0,0 +1,430 @@ +/* SPDX-License-Identifier: MIT + * Copyright (c) 2026 seniorspiz + * + * Bounce, OS 1.40C: record tracks for one pattern pass into the active track's + * recorder buffer, then make that track a Flex machine playing the take. + * Prototype: nothing here has run on a unit or in the emulator yet. + * + * DOWN+REC (or FUNC+PART > BOUNCE > BOUNCE TRACK) opens BOUNCE. Trig keys 1-8 + * add or remove tracks to merge; YES arms; NO closes or cancels. + * Arm: the recorder takes the track itself (SRC3 = the track) or, when tracks + * are merged, CUE with exactly those tracks cued; RLEN is one pass in master + * 16ths and QREC is PLEN, so stock starts the take on the next pattern start + * and ends it by itself. Done: the Part gets FLEX on the track's own buffer, + * FX1/FX2 none and its recorder setup back; the pattern record gets one trig + * on step 1 and no locks; merged tracks are muted. UNDO BOUNCE puts the Part + * bytes, the whole pattern record and the mutes back from Bounce's own copy. + * + * Every write goes through stock's own routines where one exists (Part paste, + * track write, the recorder mailbox), so the battery-backed copies follow. + * Addresses: octabam docs/firmware (PARTS.md, STEP_LOCKS.md, RECORDER.md, + * MIDI.md) and modules/free-loop/adapter.c; the text call and the lock index + * as Pattern Sample Locks uses them. TESTING.md says which are measured. */ +#include +#include "modwerk_module.h" +#include "modwerk_events.h" + +#define U8(a) (*(volatile uint8_t *)(uintptr_t)(a)) +#define U32(a) (*(volatile uint32_t *)(uintptr_t)(a)) + +/* ---- state the UI shows (MIDI.md, PSL's native.c, free-loop's adapter.c) ---- */ +#define BANK_PTR 0x46c82456u /* long: the current bank's RAM */ +#define BANK0 0x400e21e0u +#define BANK_STRIDE 0x9b340u +#define CUR_PART 0x100b14cfu /* the current Part, 0..3 */ +#define CUR_PATTERN 0x100b14d0u /* the current pattern, 0..15 */ +#define CUR_TRACK 0x80000000u /* the current audio track, 0..7 */ +#define MIDI_MODE 0x80000012u /* nonzero: MIDI tracks are shown */ +#define TRANSPORT 0x800065b8u /* long: 1 playing */ +#define ROWS 0x46100b18u /* the key matrix: row (code >> 3), bit (code & 7) */ +#define MUTES 0x80000008u /* long: bit 8+t muted, 16+t cued */ +#define MUTES_CS1 0x100b14d4u /* its battery-backed copy */ +#define VOICE 0x800049d8u /* + 0xa8 t: byte 1 nonzero while t's recorder runs */ +#define LIMIT 0x46c7fe24u /* long [t]: the last take's length, written at its stop */ +#define REDRAW 0x46c7c72cu +#define LOCK_INDEX 0x46c7d48cu /* + step: bit t, the track has a lock on that step */ + +/* ---- records (PARTS.md, STEP_LOCKS.md, ot_bank.py) ---- */ +#define PAT_BYTES 0x8ed8u +#define TRK_BYTES 0x91au +#define PART_AT 0x8ed80u +#define PART_BYTES 0x18b2u +#define PAT_LEN 0x8e53u /* pattern length, scale, scale mode (0 normal) */ +#define PAT_SCALE 0x8e54u +#define PAT_MODE 0x8e55u +#define TRK_LEN 0x50u +#define TRK_SCALE 0x51u +#define TRK_LOCKS 0x59u +#define P_FX1 0x00u /* + t */ +#define P_FX2 0x08u +#define P_MACHINE 0x22u /* + t: 0 STATIC 1 FLEX 2 THRU 3 NEIGHBOR 4 PICKUP */ +#define P_SLOTS 0x2cau /* + 5 t: the slot bytes, FLEX at +1 */ +#define P_REC 0x602u /* + 12 t: INAB INCD RLEN TRIG SRC3 LOOP FIN FOUT AB QREC QPL CD */ +#define REC_INAB 0 +#define REC_INCD 1 +#define REC_RLEN 2 +#define REC_SRC3 4 +#define REC_QREC 9 +#define SRC3_CUE 10u +#define QREC_PLEN 0u +#define FLEX 1u + +/* ---- stock routines ---- */ +#define REC_POST 0x40005178u /* (track, word, quantised): the REC keys' mailbox */ +#define PART_PASTE 0x40029a4cu /* (src, part): working Part and CS1, unsaved bit, applied */ +#define TRACK_WRITE 0x40029754u /* (src, pattern, track): track paste's write */ +#define MACHINE_SET 0x400972fcu /* (part, track, old machine): the transition Part Reload runs */ +#define EDITED 0x40027e00u +#define TRACK_PREP 0x4009da20u /* (track): prepare the track's steps again */ +#define MUTE_EVENT 0x400053d8u /* (0x1a, 0, 0, 0, 0, 0): the screen after a mute */ +#define TEXT 0x40012bd8u +#define FONT 0x400ba876u +#define SURFACE 0x400bf10au + +#define K_DOWN 0x20 +#define K_REC 0x29 +#define K_YES 0x31 +#define K_NO 0x32 +#define TAKE_WORD 0xc010u /* start, SRC3 (free-loop's take word) */ +#define STOP_WORD 0x80u + +enum { CLOSED, SELECT, ARMED, RECORDING, MESSAGE }; + +struct slice { /* one track's Part bytes Bounce changes */ + uint8_t fx1, fx2, machine, slots[5], rec[12]; +}; +struct ctx { + uint32_t bank; + uint8_t pattern, part, track, merged; + uint32_t mutes; + struct slice part_bytes; +}; + +static unsigned phase, consumed_lo, consumed_hi, shown_ticks; +static const char *message; +static struct ctx arm; /* the bounce in progress */ +static struct ctx last; /* the last finished bounce, for UNDO */ +static unsigned undo_ready; +static uint8_t record_copy[TRK_BYTES]; /* the track's pattern record as it was (UNDO) */ +static uint8_t record_new[TRK_BYTES]; +static uint8_t part_buf[PART_BYTES]; + +static void call6(uint32_t fn, uint32_t a, uint32_t b, uint32_t c, uint32_t d, uint32_t e, uint32_t f) +{ ((void (*)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t))(uintptr_t)fn)(a, b, c, d, e, f); } +static void call3(uint32_t fn, uint32_t a, uint32_t b, uint32_t c) +{ ((void (*)(uint32_t, uint32_t, uint32_t))(uintptr_t)fn)(a, b, c); } +static void call2(uint32_t fn, uint32_t a, uint32_t b) +{ ((void (*)(uint32_t, uint32_t))(uintptr_t)fn)(a, b); } +static void call1(uint32_t fn, uint32_t a) { ((void (*)(uint32_t))(uintptr_t)fn)(a); } +static void call0(uint32_t fn) { ((void (*)(void))(uintptr_t)fn)(); } + +static void copy(uint8_t *to, const volatile uint8_t *from, unsigned n) { while (n--) *to++ = *from++; } +/* Struct copies by hand: there is no memcpy, and gcc calls it for a struct assignment. */ +static void copy_ctx(struct ctx *to, const struct ctx *from) { copy((uint8_t *)to, (const uint8_t *)from, sizeof *to); } +static void redraw(void) { U32(REDRAW) = 1; } +static unsigned held(unsigned code) { return (U8(ROWS + (code >> 3)) >> (code & 7u)) & 1u; } +static unsigned recording(unsigned t) { return U8(VOICE + 0xa8u * t + 1u) != 0; } +static unsigned bank_ok(uint32_t b) +{ return b >= BANK0 && b <= BANK0 + 15u * BANK_STRIDE && (b - BANK0) % BANK_STRIDE == 0; } + +static uint32_t pattern_at(const struct ctx *c) { return c->bank + c->pattern * PAT_BYTES; } +static uint32_t record_at(const struct ctx *c) { return pattern_at(c) + c->track * TRK_BYTES; } +static uint32_t part_at(const struct ctx *c) { return c->bank + PART_AT + c->part * PART_BYTES; } + +/* The context the UI shows now; 0 when it is not an audio track view. */ +static int current(struct ctx *c) +{ + uint32_t b = U32(BANK_PTR); + unsigned p = U8(CUR_PATTERN), part = U8(CUR_PART), t = U8(CUR_TRACK); + if (!bank_ok(b) || p >= 16u || part >= 4u || t >= 8u || U32(MIDI_MODE)) return 0; + c->bank = b; c->pattern = (uint8_t)p; c->part = (uint8_t)part; c->track = (uint8_t)t; + return 1; +} +static int same_place(const struct ctx *a, const struct ctx *b) +{ return a->bank == b->bank && a->pattern == b->pattern && a->part == b->part; } + +/* One pass of the track, in master 16ths (6 ticks), or 0 when it is not a + * whole number from 1 to 64 (RLEN's range). PER TRACK mode: the track's own + * length and scale (rlen-plen's cave reads the same pair). */ +static unsigned pass_steps(const struct ctx *c) +{ + static const uint8_t ticks[7] = {3, 4, 6, 8, 12, 24, 48}; /* 2X ... 1/8X */ + uint32_t pat = pattern_at(c), rec = record_at(c); + unsigned per_track = U8(pat + PAT_MODE) != 0; + unsigned len = per_track ? U8(rec + TRK_LEN) : U8(pat + PAT_LEN); + unsigned scale = per_track ? U8(rec + TRK_SCALE) : U8(pat + PAT_SCALE); + if (scale > 6u || !len) return 0; + unsigned t = len * ticks[scale]; + if (t % 6u || t / 6u > 64u) return 0; + return t / 6u; +} + +static void read_slice(struct slice *s, uint32_t part, unsigned t) +{ + s->fx1 = U8(part + P_FX1 + t); s->fx2 = U8(part + P_FX2 + t); s->machine = U8(part + P_MACHINE + t); + copy(s->slots, (const volatile uint8_t *)(uintptr_t)(part + P_SLOTS + 5u * t), 5); + copy(s->rec, (const volatile uint8_t *)(uintptr_t)(part + P_REC + 12u * t), 12); +} +static void write_slice(uint8_t *part, const struct slice *s, unsigned t) +{ + part[P_FX1 + t] = s->fx1; part[P_FX2 + t] = s->fx2; part[P_MACHINE + t] = s->machine; + for (unsigned i = 0; i < 5u; ++i) part[P_SLOTS + 5u * t + i] = s->slots[i]; + for (unsigned i = 0; i < 12u; ++i) part[P_REC + 12u * t + i] = s->rec[i]; +} + +/* The mute and cue long and its battery-backed copy, as stock's mute stores it. */ +static void set_mutes(uint32_t value) +{ + uint16_t sr; + __asm__ volatile("move.w %%sr,%0\n\tmove.w #0x2700,%%sr" : "=d"(sr) :: "memory"); + U32(MUTES) = value; U32(MUTES_CS1) = value; + __asm__ volatile("move.w %0,%%sr" :: "d"(sr) : "memory"); + call6(MUTE_EVENT, 0x1a, 0, 0, 0, 0, 0); +} + +/* The lock index of the current pattern, for one track, from its record. */ +static void lock_index(const struct ctx *c) +{ + uint32_t rec = record_at(c); + for (unsigned step = 0; step < 64u; ++step) { + unsigned locked = 0; + for (unsigned slot = 0; slot < 31u && !locked; ++slot) + locked = U8(rec + TRK_LOCKS + 32u * step + slot) != 0xffu; + uint8_t bit = (uint8_t)(1u << c->track), v = U8(LOCK_INDEX + step); + U8(LOCK_INDEX + step) = locked ? (uint8_t)(v | bit) : (uint8_t)(v & ~bit); + } +} + +static void write_record(const struct ctx *c, const uint8_t *src) +{ + call3(TRACK_WRITE, (uint32_t)(uintptr_t)src, c->pattern, c->track); + lock_index(c); + call0(EDITED); + call1(TRACK_PREP, c->track); +} + +static void show(const char *text) { message = text; phase = MESSAGE; shown_ticks = 0; redraw(); } +static void close_view(void) { phase = CLOSED; message = 0; redraw(); } + +/* ---- arm, cancel, finish, undo ---- */ +static void open_select(void) +{ + struct ctx c; + if (phase == ARMED || phase == RECORDING) return; + if (!current(&c)) { show("AUDIO TRACKS ONLY"); return; } + copy_ctx(&arm, &c); arm.merged = (uint8_t)(1u << c.track); + phase = SELECT; message = 0; redraw(); +} + +static void start(void) +{ + struct ctx now; + if (!current(&now) || !same_place(&now, &arm) || now.track != arm.track) { show("TRACK CHANGED"); return; } + unsigned t = arm.track, steps = pass_steps(&arm); + unsigned merge = arm.merged != (uint8_t)(1u << t); + if (!steps) { show("PASS OVER 64 STEPS"); return; } + if (recording(t)) { show("RECORDER BUSY"); return; } + uint32_t part = part_at(&arm); + arm.mutes = U32(MUTES); + read_slice(&arm.part_bytes, part, t); + copy(record_copy, (const volatile uint8_t *)(uintptr_t)record_at(&arm), TRK_BYTES); + + copy(part_buf, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); + uint8_t *r = part_buf + P_REC + 12u * t; + r[REC_INAB] = 0; r[REC_INCD] = 0; r[REC_RLEN] = (uint8_t)(steps - 1u); + r[REC_SRC3] = (uint8_t)(merge ? SRC3_CUE : t + 1u); r[REC_QREC] = QREC_PLEN; + call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, arm.part); + if (merge) set_mutes((arm.mutes & ~0x00ff0000u) | (uint32_t)arm.merged << 16); + U32(LIMIT + 4u * t) = 0; + call3(REC_POST, t, TAKE_WORD, 1); + phase = ARMED; redraw(); +} + +/* Put back the recorder setup (and the cue bits) without any bounce. */ +static void cancel(const char *why) +{ + unsigned t = arm.track; + if (recording(t)) call3(REC_POST, t, STOP_WORD, 0); + struct ctx now; + if (current(&now) && same_place(&now, &arm)) { + uint32_t part = part_at(&arm); + copy(part_buf, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); + for (unsigned i = 0; i < 12u; ++i) part_buf[P_REC + 12u * t + i] = arm.part_bytes.rec[i]; + call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, arm.part); + } + if (U32(MUTES) != arm.mutes) set_mutes(arm.mutes); + show(why); +} + +static void finish(void) +{ + struct ctx now; + unsigned t = arm.track; + if (!current(&now) || !same_place(&now, &arm)) { cancel("PATTERN CHANGED"); return; } + if (!U32(LIMIT + 4u * t)) { cancel("TAKE INCOMPLETE"); return; } + uint32_t part = part_at(&arm); + unsigned old = U8(part + P_MACHINE + t); + copy(part_buf, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); + struct slice s; /* the recorder setup as it was */ + copy((uint8_t *)&s, (const uint8_t *)&arm.part_bytes, sizeof s); + s.machine = FLEX; s.fx1 = 0; s.fx2 = 0; s.slots[FLEX] = (uint8_t)(0x80u + t); + write_slice(part_buf, &s, t); + call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, arm.part); + call3(MACHINE_SET, arm.part, t, old); + + for (unsigned i = 0; i < TRK_BYTES; ++i) record_new[i] = record_copy[i]; + for (unsigned i = 0; i < 64u; ++i) record_new[i] = 0; /* the eight step masks */ + record_new[7] = 1; /* mask 0, step 1 */ + for (unsigned i = 0; i < 64u * 32u; ++i) record_new[TRK_LOCKS + i] = 0xffu; + write_record(&arm, record_new); + + uint32_t mutes = arm.mutes | ((uint32_t)(arm.merged & (uint8_t)~(1u << t)) << 8); + if (U32(MUTES) != mutes) set_mutes(mutes); + copy_ctx(&last, &arm); undo_ready = 1; + show("BOUNCED"); +} + +static void undo(void) +{ + struct ctx now; + if (phase == ARMED || phase == RECORDING) return; + if (!undo_ready) { show("NOTHING TO UNDO"); return; } + if (!current(&now) || !same_place(&now, &last)) { show("UNDO: OPEN ITS PATTERN"); return; } + unsigned t = last.track; + uint32_t part = part_at(&last); + unsigned old = U8(part + P_MACHINE + t); + copy(part_buf, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); + write_slice(part_buf, &last.part_bytes, t); + call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, last.part); + if (old != last.part_bytes.machine) call3(MACHINE_SET, last.part, t, old); + write_record(&last, record_copy); + uint32_t bits = (uint32_t)last.merged << 8; + uint32_t mutes = (U32(MUTES) & ~bits) | (last.mutes & bits); + if (U32(MUTES) != mutes) set_mutes(mutes); + undo_ready = 0; + show("BOUNCE UNDONE"); +} + +/* ---- hooks ---- */ +void module_tick(struct modwerk_runtime_api *api) +{ + if (phase == ARMED) { + if (recording(arm.track)) { phase = RECORDING; redraw(); } + } else if (phase == RECORDING) { + if (!U32(TRANSPORT)) cancel("STOPPED - NO BOUNCE"); + else if (!recording(arm.track)) finish(); + } else if (phase == MESSAGE && ++shown_ticks > 90u) close_view(); + api->value = (uint32_t)phase << 24 | (uint32_t)arm.merged << 16 | undo_ready; +} + +int module_key(int code, int pressed) +{ + if (code < 0 || code >= 64) return 0; + unsigned *consumed = code < 32 ? &consumed_lo : &consumed_hi; + unsigned bit = 1u << ((unsigned)code & 31u); + if (!pressed) { + if (!(*consumed & bit)) return 0; + *consumed &= ~bit; return 1; + } + if (*consumed & bit) return 1; + if (phase == CLOSED) { + if (code != K_REC || !held(K_DOWN)) return 0; + open_select(); + } else if (phase == SELECT) { + if (code < 8) { + if ((unsigned)code != arm.track) arm.merged ^= (uint8_t)(1u << code); + redraw(); + } else if (code == K_YES) start(); + else if (code == K_NO) close_view(); + else { close_view(); return 0; } + } else if (phase == ARMED || phase == RECORDING) { + if (code != K_NO) return 0; + cancel("BOUNCE CANCELLED"); + } else { + close_view(); + if (code != K_YES && code != K_NO) return 0; + } + *consumed |= bit; + return 1; +} + +int module_enc(int encoder, int delta) +{ + (void)encoder; (void)delta; + return phase == SELECT; /* no stock edit under the open window */ +} + +/* ---- drawing: frame[x * 8 + 7 - y / 8], bit y % 8 (hello.c) ---- */ +static void dot(unsigned char *f, unsigned x, unsigned y, unsigned on) +{ + unsigned char *b = &f[x * 8u + 7u - y / 8u], m = (unsigned char)(1u << (y % 8u)); + *b = on ? (unsigned char)(*b | m) : (unsigned char)(*b & ~m); +} +static void fill(unsigned char *f, unsigned x, unsigned y, unsigned w, unsigned h, unsigned on) +{ for (unsigned a = x; a < x + w; ++a) for (unsigned b = y; b < y + h; ++b) dot(f, a, b, on); } +static void invert(unsigned char *f, unsigned x, unsigned y, unsigned w, unsigned h) +{ + for (unsigned a = x; a < x + w; ++a) for (unsigned b = y; b < y + h; ++b) + f[a * 8u + 7u - b / 8u] ^= (unsigned char)(1u << (b % 8u)); +} +static void frame_box(unsigned char *f, unsigned x, unsigned y, unsigned w, unsigned h) +{ + fill(f, x, y, w, 1, 1); fill(f, x, y + h - 1u, w, 1, 1); + fill(f, x, y, 1, h, 1); fill(f, x + w - 1u, y, 1, h, 1); +} +static void text(unsigned char *f, unsigned x, unsigned top, const char *s) +{ + uint32_t surface[7]; + for (unsigned i = 0; i < 7u; ++i) surface[i] = U32(SURFACE + 4u * i); + surface[3] = (uint32_t)(uintptr_t)f; + ((void (*)(uint32_t, void *, int, int, int, const char *))(uintptr_t)TEXT) + (FONT, surface, (int)x, 59 - (int)top, -1, s); +} +static void number(char *at, unsigned v) +{ + if (v >= 10u) *at++ = (char)('0' + v / 10u); + *at++ = (char)('0' + v % 10u); *at = 0; +} +static void append(char *at, const char *s) +{ + while (*at) ++at; + while ((*at++ = *s++)) ; +} + +void module_draw(unsigned char *frame) +{ + if (phase == CLOSED || !frame) return; + fill(frame, 6, 10, 116, 44, 0); + frame_box(frame, 6, 10, 116, 44); + char title[12]; + title[0] = 0; append(title, "BOUNCE T"); + title[8] = (char)('1' + arm.track); title[9] = 0; + text(frame, 10, 13, phase == MESSAGE ? "BOUNCE" : title); + invert(frame, 7, 12, 114, 7); + if (phase == MESSAGE) { text(frame, 10, 27, message ? message : ""); return; } + for (unsigned t = 0; t < 8u; ++t) { + char label[3]; + label[0] = 'T'; label[1] = (char)('1' + t); label[2] = 0; + unsigned x = 10u + 14u * t; + text(frame, x, 22, label); + if (arm.merged & (1u << t)) invert(frame, x - 1u, 21, 12, 7); + } + if (phase == SELECT) { + char line[24]; + line[0] = 0; append(line, "PASS "); + unsigned steps = pass_steps(&arm); + if (steps) { number(line + 5, steps); append(line, " STEPS"); } + else append(line, "OVER 64 STEPS"); + text(frame, 10, 31, line); + text(frame, 10, 38, "TRIG 1-8: MERGE"); + text(frame, 10, 45, "YES: REC NO: CLOSE"); + } else { + text(frame, 10, 31, phase == ARMED ? "WAITS FOR PATTERN START" : "RECORDING ONE PASS"); + text(frame, 10, 45, "NO: CANCEL"); + } +} + +/* ---- FUNC+PART: the base's Part Edit window (ot_part_menu) ---- */ +static const char *const bounce_actions[2] = {"BOUNCE TRACK", "UNDO BOUNCE"}; +static void bounce_choose(unsigned action) { if (action) undo(); else open_select(); } +struct modwerk_part_menu bounce_part_menu = {MODWERK_PART_MENU_ABI, "BOUNCE", 2u, bounce_actions, bounce_choose, 0}; diff --git a/sdk/drafts/bounce/generate.py b/sdk/drafts/bounce/generate.py new file mode 100644 index 0000000000..20893b11e7 --- /dev/null +++ b/sdk/drafts/bounce/generate.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +"""Generate unit.s from bounce.c with the shared ColdFire guard (as Track Solo's generate.py). + + python3 generate.py # write unit.s + python3 generate.py --check # fail when unit.s is stale +""" +from pathlib import Path +import subprocess +import sys +import tempfile + +HERE = Path(__file__).resolve().parent +SDK = next((parent for parent in HERE.parents if (parent / 'sdk/runtime/m68k_codegen.py').is_file()), None) +if SDK is None: + raise RuntimeError('Could not locate the repository SDK runtime tools') +sys.path.insert(0, str(SDK / 'sdk/runtime')) +import m68k_codegen # noqa: E402 + +INCLUDES = ['-I', str(SDK / 'sdk/runtime/loader'), '-I', str(SDK / 'sdk/machines/octatrack/include')] +FLAGS = ['-mcpu=54455', '-msoft-float', '-Os', '-std=c99', '-ffreestanding', + '-fno-builtin', '-fno-common', '-fno-jump-tables', '-fno-zero-initialized-in-bss', + '-fno-asynchronous-unwind-tables', '-fno-unwind-tables', '-fno-ident', + '-fomit-frame-pointer', '-Wall', '-Wextra', '-Werror', *INCLUDES, *m68k_codegen.FLAGS] + +with tempfile.TemporaryDirectory() as tmp: + asm, obj = Path(tmp) / 'unit.s', Path(tmp) / 'unit.o' + subprocess.run(['m68k-elf-gcc', *FLAGS, '-S', str(HERE / 'bounce.c'), '-o', str(asm)], check=True) + # One initialized .text extent, as other ColdFire modules: no .bss to clear. + result = '| Generated by generate.py from bounce.c; edit the C source.\n' + result += asm.read_text().replace('\t.data', '\t.text') + asm.write_text(result) + subprocess.run(['m68k-elf-as', '-mcpu=54455', str(asm), '-o', str(obj)], check=True) + m68k_codegen.check([obj]) + m68k_codegen.check_mcf54455([obj]) + undefined = subprocess.run(['m68k-elf-nm', '-u', str(obj)], check=True, capture_output=True, text=True).stdout.strip() + if undefined: + raise SystemExit(f'unresolved symbols (no C library here):\n{undefined}') + dest = HERE / 'unit.s' + if '--check' in sys.argv: + if not dest.exists() or dest.read_text() != result: + raise SystemExit('unit.s is stale; run generate.py') + print('unit.s matches guarded ColdFire compilation') + else: + dest.write_text(result) + print('Generated unit.s') diff --git a/sdk/drafts/bounce/manifest.py b/sdk/drafts/bounce/manifest.py index 4cbeac54af..783bea3614 100644 --- a/sdk/drafts/bounce/manifest.py +++ b/sdk/drafts/bounce/manifest.py @@ -1,78 +1,29 @@ """Bounce -- bounce tracks in place into the active track's Flex recording. -THE SKELETON OF A COLDFIRE MODULE: code the build links and places for -you, reached from stock code by detours you name by SYMBOL. -`npm run module:new` made this draft under sdk/drafts/. It builds as it is: -`npm run module:dev -- ` tries it on your unit over USB, and -`npm run module:doctor -- --draft ` checks it. - -sdk/octatrack/modules/repitch/ is a finished one (one linked unit, detours, -pokes); sdk/octatrack/modules/quantizer/ another (units built from the -author's source, kept under upstream/). sdk/octabam/docs/remixer/MODULES.md -"Declaring a ColdFire module" is the guide; sdk/octabam/docs/remixer/PLACEMENT.md -says where the bytes go; docs/OCTATRACK_API.md lists the hooks. - -Say what the module is, which stock routines it changes, what is measured -and what is inferred. Delete every comment below once answered. +DOWN+REC (or FUNC+PART > BOUNCE) opens BOUNCE; trig keys 1-8 pick tracks to +merge, YES records one pattern pass with the track's own recorder (SRC3 = the +track) or, merged, with CUE. Stock ends the take; Bounce then makes the track +FLEX on its recorder buffer with one trig on step 1, FX off, merged tracks +muted. UNDO BOUNCE restores the Part bytes, the pattern record and the mutes. + +No stock site is patched: the module reads the base's key, tick, draw and +encoder events and adds a row to the Part Edit window (runtime.json). It +calls stock's recorder mailbox (0x40005178), Part paste (0x40029a4c), track +write (0x40029754) and machine transition (0x400972fc). Read from octabam's +firmware notes and partly measured in the emulator (TESTING.md); the module +itself has not run anywhere yet. bounce.c is the source; generate.py writes +unit.s. """ -from remix.schema import Category, Proof, Gate, Detour, Kind, Linked, Module, Poke -from remix.stock_guard import stock_guard +from remix.schema import Category, Proof, Gate, Kind, Linked, Module MODULE = Module( - # `name` MUST equal the directory name. `key` is the build identifier and - # appears in the build report, which other tools parse -- so it is API. name="bounce", key="BOUNCE", - kind=Kind.CF_PATCH, # no DSP code, no chooser row + kind=Kind.CF_PATCH, doc="Bounce: record tracks for one pattern into the active track and make it a Flex machine playing the take.", category=Category.TRACK, author="seniorspiz", author_url="https://github.com/seniorspiz", - proof=Proof.UNTESTED, proof_note="Development scaffold; no module behavior has been verified.", - - # ---- the code: GNU-as units, linked by the build ---------------------- - # ORDER IS LINK ORDER: a unit may reference symbols of units before it. - # `dram=True` puts the unit in the platform runtime (linked with every - # other DRAM unit in the remix, appended behind the loader, depacked at - # boot into the platform's 10 MB reserve at the bottom of the audio - # page arena -- where anything bigger than a few hundred bytes - # belongs; the unit gives up 10 MB of sample memory). `dram=False` places - # it in one of the OS image's free zero runs (~8 KB, shared by everyone) - # for code that must be ROM-resident. Sources are `.s` for m68k-elf-as; - # `cpu="5407"` and "5475" encode this ISA subset identically. - linked=( - Linked("unit", "modules/bounce/unit.s", dram=True), - # Building from someone else's repository? Add it as a submodule - # under modules//upstream and point `source` into it; the - # sources stay theirs and an update is a submodule bump. - # `reference=(addr, sha256)` re-links the unit at the AUTHOR'S own - # address on every build and compares, so a drift from the bytes - # they ratified fails loudly. - ), - - # ---- how stock code reaches it: detours, wired by symbol -------------- - # `site` is a stock instruction; `expect` its bytes (whole instructions, - # asserted before anything is written -- a site that has moved stops - # the build). `kind`: "jmp" for a stub that replays what it displaced - # and jumps on (the common case), "jsr" for a callable that returns, - # "lea" to rewrite a six-byte `lea abs.l,An`'s operand. `pad_to` nops - # the rest of a displaced span longer than six bytes. - detours=( - # Detour(0x400xxxxx, stock_guard(0x400xxxxx, 8, ""), "unit", "my_hook", - # "what this hook is for", kind="jsr", pad_to=None), - ), - - # ---- plain asserted rewrites ------------------------------------------ - pokes=( - # Poke(0x400xxxxx, expect=stock_guard(0x400xxxxx, 2, ""), - # write=bytes.fromhex("6012"), note="bne -> bra: never re-apply"), - ), - + proof=Proof.UNTESTED, proof_note="Prototype: builds; not yet run in the emulator or on a unit.", + linked=(Linked("bounce", "modules/bounce/unit.s", cpu="5475", dram=True),), gates=(Gate("modules/bounce/verify.py", remix_arg=False),), - - # A stock pointer array that needs more entries: TableGrow relocates it - # into free space with your symbols appended and repoints every - # reference. - # tables=(TableGrow("...", old=0x400xxxxx, count=16, - # symbols=(("unit", "my_row"),), - # refs=((0x400xxxxx, 0x400xxxxx),)),), ) diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index c73178ea33..836ac3a61b 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -39,8 +39,10 @@ "key:TRIG@BOUNCE" ], "limitations": [ - "Draft: no code yet. The design is in README.md; nothing has run on a unit.", - "With MASTER TRACK on, T8 cannot be a bounce destination.", + "Prototype 0.1.0: builds; has not run in the emulator or on a unit.", + "The take is not yet saved as a WAV, so it is lost at a power cycle or project reload.", + "A pass longer than 64 master steps (4 bars at 1X) is refused.", + "With MASTER TRACK on, T8 should not be a bounce destination; the prototype does not refuse it yet.", "Not yet measured on a unit: CUE after the FX (seen in the emulator only), Studio mode cue, MKI lamps." ], "effectId": null diff --git a/sdk/drafts/bounce/runtime.json b/sdk/drafts/bounce/runtime.json new file mode 100644 index 0000000000..fd445f682a --- /dev/null +++ b/sdk/drafts/bounce/runtime.json @@ -0,0 +1,10 @@ +{ + "schema": 1, + "subscribe": [ + {"event": "module_tick", "fn": "module_tick"}, + {"event": "module_draw", "fn": "module_draw"}, + {"event": "module_key", "fn": "module_key"}, + {"event": "module_enc", "fn": "module_enc"} + ], + "contribute": [{"to": "ot_part_menu", "data": "bounce_part_menu", "order": 70}] +} diff --git a/sdk/drafts/bounce/unit.s b/sdk/drafts/bounce/unit.s index 886cafcc85..2f18b11005 100644 --- a/sdk/drafts/bounce/unit.s +++ b/sdk/drafts/bounce/unit.s @@ -1,17 +1,1437 @@ -| -- one linked unit. GNU as, ColdFire ISA A+ (m68k-elf-as). -| -| Symbols you `.global` here are what the manifest's Detours name. Absolute -| references to stock code are fine (`jsr (0x40001e50).l`); references to -| your own labels are resolved by the link wherever the build places this, -| so write `lea SYM:l,%a0` for a same-unit address you need as a pointer -| (a bare `lea SYM,%a0` assembles pc-relative -- correct, but four bytes -| shorter than a hand-assembled original if you are matching one). - .text - .global my_hook - -| A "jsr" detour lands here and expects an rts. A "jmp" detour's target -| must first REPLAY the instructions the six-byte jmp displaced, then jump -| back to site+6 (or wherever those instructions would have continued). -my_hook: - nop - rts +| Generated by generate.py from bounce.c; edit the C source. +#NO_APP + .file "bounce.c" + .text + .align 2 + .type copy, @function +copy: + move.l %a2,-(%sp) + move.l 8(%sp),%a0 + clr.l %d0 + move.l 12(%sp),%a1 +.L2: + cmp.l 16(%sp),%d0 + jne .L3 + move.l (%sp)+,%a2 + rts +.L3: + lea (%a1,%d0.l),%a2 + move.b (%a2),(%a0,%d0.l) + addq.l #1,%d0 + jra .L2 + .size copy, .-copy + .align 2 + .type current, @function +current: + lea (-16,%sp),%sp + movem.l #60,(%sp) + move.l 1187521622,%d3 + move.l 20(%sp),%a0 + move.b 269161680,%d2 + move.b 269161679,%d0 + move.b -2147483648,%d1 + move.w %d0,%a1 + move.l %d3,%d0 + add.l #-1074668000,%d0 + cmp.l #9535680,%d0 + jls .L5 +.L7: + clr.l %d0 +.L4: + movem.l (%sp),#60 + lea (16,%sp),%sp + rts +.L5: + move.l #635712,%d5 + remu.l %d5,%d4:%d0 + tst.l %d4 + jne .L7 + mvz.b %d2,%d0 + lsr.l #4,%d0 + jne .L7 + move.w %a1,%d5 + mvz.b %d5,%d0 + lsr.l #2,%d0 + jne .L7 + mvz.b %d1,%d0 + lsr.l #3,%d0 + jne .L7 + tst.l -2147483630 + jne .L7 + move.b %d2,4(%a0) + move.b %d5,5(%a0) + move.b %d1,6(%a0) + move.l %d3,(%a0) + moveq #1,%d0 + jra .L4 + .size current, .-current + .align 2 + .type same_place, @function +same_place: + move.l 8(%sp),%a0 + move.l 4(%sp),%a1 + move.l (%a0),%d0 + cmp.l (%a1),%d0 + jeq .L9 +.L11: + clr.l %d0 +.L8: + rts +.L9: + mvz.b 4(%a1),%d1 + mvz.b 4(%a0),%d0 + cmp.l %d1,%d0 + jne .L11 + move.b 5(%a1),%d0 + move.b 5(%a0),%d1 + eor.l %d1,%d0 + tst.b %d0 + seq %d0 + mvs.b %d0,%d0 + neg.l %d0 + jra .L8 + .size same_place, .-same_place + .align 2 + .type show, @function +show: + lea (4,%sp),%a0 + moveq #4,%d0 + move.l %d0,phase + moveq #1,%d0 + move.l (%a0),message + clr.l shown_ticks + move.l %d0,1187497772 + rts + .size show, .-show + .align 2 + .type close_view, @function +close_view: + clr.l phase + moveq #1,%d0 + clr.l message + move.l %d0,1187497772 + rts + .size close_view, .-close_view + .align 2 + .type fill, @function +fill: + lea (-24,%sp),%sp + movem.l #124,(%sp) + move.l 36(%sp),%d4 + moveq #1,%d5 + move.l 32(%sp),%d1 + move.l %d1,%d3 + add.l 40(%sp),%d3 + add.l 44(%sp),%d4 +.L15: + cmp.l %d3,%d1 + jcc .L14 + move.l %d1,%d0 + lsl.l #3,%d0 + addq.l #7,%d0 + move.l %d0,20(%sp) + move.l 36(%sp),%d0 + jra .L20 +.L18: + move.l %d0,%d2 + lsr.l #3,%d2 + move.l 20(%sp),%a1 + sub.l %d2,%a1 + moveq #7,%d2 + and.l %d0,%d2 + add.l 28(%sp),%a1 + move.l %d2,%a0 + move.l %d5,%d2 + move.l %a0,%d6 + lsl.l %d6,%d2 + move.b (%a1),%d6 + move.w %d6,%a0 + tst.l 48(%sp) + jeq .L16 + move.l %a0,%d6 + or.l %d6,%d2 +.L17: + move.b %d2,(%a1) + addq.l #1,%d0 +.L20: + cmp.l %d4,%d0 + jcs .L18 + addq.l #1,%d1 + jra .L15 +.L16: + not.l %d2 + move.l %a0,%d6 + and.l %d6,%d2 + jra .L17 +.L14: + movem.l (%sp),#124 + lea (24,%sp),%sp + rts + .size fill, .-fill + .align 2 + .type text, @function +text: + lea (-28,%sp),%sp + move.l %sp,%a1 + move.l #1074524426,%a0 + move.l %sp,%d0 +.L22: + move.l (%a0)+,(%a1)+ + cmp.l #1074524454,%a0 + jne .L22 + move.l 32(%sp),12(%sp) + move.l 44(%sp),-(%sp) + pea -1.w + moveq #59,%d1 + sub.l 48(%sp),%d1 + move.l %d1,-(%sp) + move.l 48(%sp),-(%sp) + move.l %d0,-(%sp) + move.l #1074505846,-(%sp) + jsr 1073818584 + lea (52,%sp),%sp + rts + .size text, .-text + .align 2 + .type append, @function +append: + move.l 4(%sp),%a0 +.L25: + move.b (%a0),%d0 + move.l %a0,%a1 + addq.l #1,%a0 + tst.b %d0 + jne .L25 + clr.l %d0 +.L26: + move.l 8(%sp),%a0 + move.b (%a0,%d0.l),%d1 + move.b %d1,(%a1,%d0.l) + addq.l #1,%d0 + tst.b %d1 + jne .L26 + rts + .size append, .-append + .align 2 + .type write_slice.constprop.0, @function +write_slice.constprop.0: + move.l %a2,-(%sp) + move.l %d2,-(%sp) + move.l 16(%sp),%d0 + move.l 12(%sp),%a1 + lea part_buf,%a0 + move.b (%a1),(%a0,%d0.l) + move.w %d0,%d1 + lea part_buf+8,%a0 + lea (1,%a1),%a2 + move.b (%a2),(%a0,%d0.l) + mulu.w #5,%d1 + lea part_buf+34,%a0 + lea (2,%a1),%a2 + move.b (%a2),(%a0,%d0.l) + move.l %d1,%a0 + clr.l %d1 + add.l #part_buf+714,%a0 +.L30: + lea 3(%a1,%d1.l),%a2 + moveq #5,%d2 + move.b (%a2),(%a0,%d1.l) + addq.l #1,%d1 + cmp.l %d1,%d2 + jne .L30 + mulu.w #12,%d0 + move.l %d0,%a0 + clr.l %d0 + add.l #part_buf+1538,%a0 +.L31: + lea 8(%a1,%d0.l),%a2 + moveq #12,%d1 + move.b (%a2),(%a0,%d0.l) + addq.l #1,%d0 + cmp.l %d0,%d1 + jne .L31 + move.l (%sp)+,%d2 + move.l (%sp)+,%a2 + rts + .size write_slice.constprop.0, .-write_slice.constprop.0 + .align 2 + .type write_record, @function +write_record: + lea (-16,%sp),%sp + movem.l #3084,(%sp) + move.l 20(%sp),%a2 + move.l #1187501196,%a3 + moveq #1,%d2 + mvz.b 6(%a2),%d0 + move.l %d0,-(%sp) + mvz.b 4(%a2),%d0 + move.l %d0,-(%sp) + move.l 32(%sp),-(%sp) + jsr 1073911636 + mvz.b 4(%a2),%d0 + lea (12,%sp),%sp + mvz.b 6(%a2),%d1 + mulu.w #36568,%d0 + mulu.w #2330,%d1 + move.l %d0,%a0 + add.l %d1,%a0 + add.l (%a2),%a0 + lea (89,%a0),%a0 +.L35: + sub.l %a1,%a1 +.L38: + move.b (%a1,%a0.l),%d0 + addq.l #1,%a1 + moveq #31,%d1 + cmp.l %a1,%d1 + jne .L36 + not.l %d0 + tst.b %d0 + sne %d0 + mvs.b %d0,%d0 + neg.l %d0 +.L37: + mvz.b 6(%a2),%d1 + move.l %d2,%d3 + lsl.l %d1,%d3 + move.b (%a3),%d1 + tst.l %d0 + jeq .L39 + or.l %d3,%d1 +.L40: + move.b %d1,(%a3)+ + lea (32,%a0),%a0 + cmp.l #1187501260,%a3 + jne .L35 + jsr 1073905152 + mvz.b 6(%a2),%d0 + movem.l (%sp),#3084 + move.l %d0,20(%sp) + lea (16,%sp),%sp + jmp 1074387488 +.L36: + mvz.b %d0,%d0 + cmp.l #255,%d0 + jeq .L38 + moveq #1,%d0 + jra .L37 +.L39: + move.l %d3,%d0 + not.l %d0 + and.l %d0,%d1 + jra .L40 + .size write_record, .-write_record + .align 2 + .type set_mutes, @function +set_mutes: + move.l 4(%sp),%d0 +#APP +| 179 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 + move.w %sr,%d1 + move.w #0x2700,%sr +| 0 "" 2 +#NO_APP + move.l %d0,-2147483640 + move.l %d0,269161684 +#APP +| 181 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 + move.w %d1,%sr +| 0 "" 2 +#NO_APP + clr.l -(%sp) + clr.l -(%sp) + clr.l -(%sp) + clr.l -(%sp) + clr.l -(%sp) + pea 26.w + jsr 1073763288 + lea (24,%sp),%sp + rts + .size set_mutes, .-set_mutes + .section .rodata.str1.1,"aMS",@progbits,1 +.LC0: + .string "AUDIO TRACKS ONLY" + .text + .align 2 + .type open_select, @function +open_select: + move.l phase,%d0 + subq.l #2,%d0 + lsr.l #1,%d0 + lea (-32,%sp),%sp + move.l %a6,-(%sp) + tst.l %d0 + jeq .L45 + lea (4,%sp),%a6 + move.l %a6,-(%sp) + jsr current + addq.l #4,%sp + tst.l %d0 + jne .L47 + pea .LC0 + jsr show + addq.l #4,%sp +.L45: + move.l (%sp)+,%a6 + lea (32,%sp),%sp + rts +.L47: + pea 32.w + move.l %a6,-(%sp) + pea arm + jsr copy + clr.l message + mvz.b 22(%sp),%d1 + moveq #1,%d0 + lea (12,%sp),%sp + lsl.l %d1,%d0 + move.b %d0,arm+7 + moveq #1,%d0 + move.l %d0,phase + move.l %d0,1187497772 + jra .L45 + .size open_select, .-open_select + .align 2 + .type pass_steps.constprop.0, @function +pass_steps.constprop.0: + mvz.b arm+4,%d0 + move.l %d3,-(%sp) + move.l %d2,-(%sp) + mulu.w #36568,%d0 + add.l arm,%d0 + move.l %d0,%a0 + add.l #36437,%a0 + tst.b (%a0) + jeq .L49 + mvz.b arm+6,%d1 + mulu.w #2330,%d1 + move.l %d1,%a0 + add.l %d0,%a0 + move.b 80(%a0),%d2 + move.b 81(%a0),%d1 +.L50: + mvz.b %d1,%d1 + moveq #6,%d0 + cmp.l %d1,%d0 + jcc .L51 +.L53: + clr.l %d0 +.L48: + move.l (%sp)+,%d2 + move.l (%sp)+,%d3 + rts +.L49: + move.l %d0,%a0 + add.l #36435,%a0 + move.b (%a0),%d2 + add.l #36436,%d0 + move.l %d0,%a0 + move.b (%a0),%d1 + jra .L50 +.L51: + mvz.b %d2,%d0 + tst.b %d2 + jeq .L48 + lea (ticks.0),%a0 + moveq #6,%d3 + mvz.b (%a0,%d1.l),%d1 + mulu.w %d0,%d1 + move.l %d1,%d2 + remu.l %d3,%d0:%d2 + divu.l %d3,%d2 + tst.l %d0 + jne .L53 + cmp.l #389,%d1 + jhi .L48 + move.l %d2,%d0 + jra .L48 + .size pass_steps.constprop.0, .-pass_steps.constprop.0 + .section .rodata.str1.1 +.LC1: + .string "NOTHING TO UNDO" +.LC2: + .string "UNDO: OPEN ITS PATTERN" +.LC3: + .string "BOUNCE UNDONE" + .text + .align 2 + .type bounce_choose, @function +bounce_choose: + lea (-44,%sp),%sp + movem.l #17412,(%sp) + tst.l 48(%sp) + jeq .L58 + move.l phase,%d0 + subq.l #2,%d0 + lsr.l #1,%d0 + jeq .L57 + tst.l undo_ready + jne .L60 + movem.l (%sp),#17412 + move.l #.LC1,%d0 + move.l %d0,48(%sp) + lea (44,%sp),%sp + jra show +.L60: + move.l %sp,%d2 + add.l #12,%d2 + move.l %d2,-(%sp) + jsr current + addq.l #4,%sp + lea show,%a2 + tst.l %d0 + jeq .L61 + pea last + move.l %d2,-(%sp) + jsr same_place + addq.l #8,%sp + tst.l %d0 + jne .L62 +.L61: + pea .LC2 +.L69: + jsr (%a2) + addq.l #4,%sp +.L57: + movem.l (%sp),#17412 + lea (44,%sp),%sp + rts +.L62: + mvz.b last+5,%d0 + mvz.b last+6,%d2 + move.l last,%a0 + add.l #585088,%a0 + mulu.w #6322,%d0 + add.l %d0,%a0 + move.b 34(%a0,%d2.l),%d1 + pea 6322.w + move.l %a0,-(%sp) + pea part_buf + move.w %d1,%a6 + jsr copy + move.l %d2,-(%sp) + pea last+12 + jsr (write_slice.constprop.0) + mvz.b last+5,%d0 + move.l %d0,-(%sp) + pea part_buf + jsr 1073912396 + move.w %a6,%d1 + lea (28,%sp),%sp + mvz.b %d1,%d0 + mvz.b last+14,%d1 + cmp.l %d0,%d1 + jeq .L63 + move.l %d0,-(%sp) + mvz.b last+5,%d0 + move.l %d2,-(%sp) + move.l %d0,-(%sp) + jsr 1074361084 + lea (12,%sp),%sp +.L63: + pea record_copy + pea last + jsr write_record + mvz.b last+7,%d0 + addq.l #8,%sp + move.l #-2147483640,%a0 + move.l (%a0),%d1 + move.l last+8,%d2 + lsl.l #8,%d0 + eor.l %d1,%d2 + and.l %d2,%d0 + eor.l %d1,%d0 + cmp.l (%a0),%d0 + jeq .L64 + move.l %d0,-(%sp) + jsr set_mutes + addq.l #4,%sp +.L64: + clr.l undo_ready + pea .LC3 + jra .L69 +.L58: + movem.l (%sp),#17412 + lea (44,%sp),%sp + jra open_select + .size bounce_choose, .-bounce_choose + .align 2 + .type cancel, @function +cancel: + mvz.b arm+6,%d0 + lea (-36,%sp),%sp + move.l %a6,-(%sp) + move.l %d2,-(%sp) + move.l %d0,%a6 + mulu.w #168,%d0 + move.l 48(%sp),%d1 + move.l %d1,8(%sp) + move.l %d0,%a0 + add.l #-2147464743,%a0 + tst.b (%a0) + jeq .L71 + clr.l -(%sp) + pea 128.w + move.l %a6,-(%sp) + jsr 1073762680 + lea (12,%sp),%sp +.L71: + move.l %sp,%d2 + add.l #12,%d2 + move.l %d2,-(%sp) + jsr current + addq.l #4,%sp + tst.l %d0 + jeq .L72 + pea arm + move.l %d2,-(%sp) + jsr same_place + addq.l #8,%sp + tst.l %d0 + jeq .L72 + mvz.b arm+5,%d2 + pea 6322.w + move.l arm,%a0 + add.l #585088,%a0 + move.w %d2,%d0 + mulu.w #6322,%d0 + pea (%a0,%d0.l) + pea part_buf + jsr copy + move.w %a6,%d1 + lea (12,%sp),%sp + clr.l %d0 + lea arm+20,%a0 + mulu.w #12,%d1 + move.l %d1,%a6 + add.l #part_buf+1538,%a6 +.L73: + lea (%a0,%d0.l),%a1 + moveq #12,%d1 + move.b (%a1),(%a6,%d0.l) + addq.l #1,%d0 + cmp.l %d0,%d1 + jne .L73 + move.l %d2,-(%sp) + pea part_buf + jsr 1073912396 + addq.l #8,%sp +.L72: + move.l arm+8,%d0 + cmp.l -2147483640.l,%d0 + jeq .L74 + move.l %d0,-(%sp) + jsr set_mutes + addq.l #4,%sp +.L74: + move.l 8(%sp),%a1 + move.l %a1,48(%sp) + move.l (%sp)+,%d2 + move.l (%sp)+,%a6 + lea (36,%sp),%sp + jra show + .size cancel, .-cancel + .section .rodata.str1.1 +.LC4: + .string "STOPPED - NO BOUNCE" +.LC5: + .string "PATTERN CHANGED" +.LC6: + .string "TAKE INCOMPLETE" +.LC7: + .string "BOUNCED" + .text + .align 2 + .globl module_tick + .type module_tick, @function +module_tick: + move.l phase,%d0 + moveq #2,%d1 + lea (-72,%sp),%sp + movem.l #19460,(%sp) + cmp.l %d0,%d1 + jne .L86 + mvz.b arm+6,%d0 + mulu.w #168,%d0 + move.l %d0,%a0 + add.l #-2147464743,%a0 + tst.b (%a0) + jeq .L87 + moveq #3,%d0 + moveq #1,%d1 + move.l %d0,phase + move.l %d1,1187497772 +.L87: + move.l phase,%d0 + moveq #24,%d1 + movem.l (%sp),#19460 + lsl.l %d1,%d0 + mvz.b arm+7,%d1 + move.l 76(%sp),%a0 + swap %d1 + clr.w %d1 + or.l undo_ready,%d0 + or.l %d1,%d0 + move.l %d0,(%a0) + lea (72,%sp),%sp + rts +.L86: + moveq #3,%d1 + cmp.l %d0,%d1 + jne .L88 + tst.l -2147457608 + jne .L89 + pea .LC4 +.L107: + jsr cancel + addq.l #4,%sp + jra .L87 +.L89: + move.b arm+6,%d0 + lea arm,%a3 + mvz.b %d0,%d1 + move.w %d0,%a2 + move.w %d1,%d0 + move.l %d1,%a6 + mulu.w #168,%d0 + move.l %d0,%a0 + add.l #-2147464743,%a0 + tst.b (%a0) + jne .L87 + move.l %sp,%d2 + add.l #40,%d2 + move.l %d2,-(%sp) + jsr current + addq.l #4,%sp + tst.l %d0 + jeq .L90 + move.l %a3,-(%sp) + move.l %d2,-(%sp) + jsr same_place + addq.l #8,%sp + tst.l %d0 + jne .L91 +.L90: + pea .LC5 + jra .L107 +.L91: + move.l %a6,%d0 + add.l #296877961,%d0 + lsl.l #2,%d0 + move.l %d0,%a0 + tst.l (%a0) + jne .L93 + pea .LC6 + jra .L107 +.L93: + mvz.b arm+5,%d0 + move.l (%a3),%a0 + add.l #585088,%a0 + lea copy,%a3 + mulu.w #6322,%d0 + add.l %d0,%a0 + move.b 34(%a6,%a0.l),%d0 + move.b %d0,19(%sp) + pea 6322.w + move.l %a0,-(%sp) + pea part_buf + jsr (%a3) + pea 20.w + pea arm+12 + move.l %sp,%d2 + add.l #40,%d2 + move.l %d2,-(%sp) + jsr (%a3) + moveq #1,%d0 + clr.w %d1 + move.b %d0,46(%sp) + move.l %a2,%d0 + add.l #-128,%d0 + move.w %d1,44(%sp) + move.b %d0,48(%sp) + move.l %a6,-(%sp) + move.l %d2,-(%sp) + jsr (write_slice.constprop.0) + mvz.b arm+5,%d0 + lea (32,%sp),%sp + move.l %d0,-(%sp) + pea part_buf + jsr 1073912396 + mvz.b 27(%sp),%d0 + move.l %d0,-(%sp) + mvz.b arm+5,%d0 + move.l %a6,-(%sp) + move.l %d0,-(%sp) + jsr 1074361084 + lea (20,%sp),%sp + clr.l %d0 + lea record_new,%a0 + lea record_copy,%a1 +.L94: + lea (%a1,%d0.l),%a2 + move.b (%a2),(%a0,%d0.l) + addq.l #1,%d0 + cmp.l #2330,%d0 + jne .L94 + clr.l %d0 +.L95: + clr.b %d1 + move.b %d1,(%a0,%d0.l) + addq.l #1,%d0 + moveq #64,%d1 + cmp.l %d0,%d1 + jne .L95 + moveq #1,%d0 + lea record_new+89,%a0 + move.b %d0,record_new+7 + clr.l %d0 +.L96: + st %d1 + addq.l #1,%d0 + move.b %d1,-1(%a0,%d0.l) + cmp.l #2048,%d0 + jne .L96 + pea record_new + pea arm + jsr write_record + addq.l #8,%sp + move.l %a6,%d1 + moveq #1,%d0 + lsl.l %d1,%d0 + move.b arm+7,%d1 + not.l %d0 + and.l %d1,%d0 + mvz.b %d0,%d0 + lsl.l #8,%d0 + or.l arm+8,%d0 + cmp.l -2147483640.l,%d0 + jeq .L97 + move.l %d0,-(%sp) + jsr set_mutes + addq.l #4,%sp +.L97: + pea 32.w + pea arm + pea last + jsr (%a3) + pea .LC7 + moveq #1,%d0 + move.l %d0,undo_ready + jsr show + lea (16,%sp),%sp + jra .L87 +.L88: + subq.l #4,%d0 + tst.l %d0 + jne .L87 + move.l shown_ticks,%d0 + addq.l #1,%d0 + move.l %d0,shown_ticks + moveq #90,%d1 + cmp.l %d0,%d1 + jcc .L87 + jsr close_view + jra .L87 + .size module_tick, .-module_tick + .section .rodata.str1.1 +.LC8: + .string "TRACK CHANGED" +.LC9: + .string "PASS OVER 64 STEPS" +.LC10: + .string "RECORDER BUSY" +.LC11: + .string "BOUNCE CANCELLED" + .text + .align 2 + .globl module_key + .type module_key, @function +module_key: + lea (-76,%sp),%sp + moveq #63,%d1 + movem.l #31868,(%sp) + move.l 80(%sp),%d4 + move.l 84(%sp),%d0 + cmp.l %d4,%d1 + jcs .L109 + moveq #31,%d1 + cmp.l %d4,%d1 + jlt .L110 + move.l consumed_lo,%d1 + lea consumed_lo,%a2 +.L111: + moveq #31,%d2 + moveq #1,%d3 + and.l %d4,%d2 + lsl.l %d2,%d3 + move.l %d1,%d2 + and.l %d3,%d2 + tst.l %d0 + jne .L112 + tst.l %d2 + jeq .L113 + not.l %d3 + and.l %d1,%d3 + move.l %d3,(%a2) +.L114: + moveq #1,%d0 +.L113: + movem.l (%sp),#31868 + lea (76,%sp),%sp + rts +.L110: + move.l consumed_hi,%d1 + lea consumed_hi,%a2 + jra .L111 +.L112: + tst.l %d2 + jne .L114 + move.l phase,%d0 + tst.l %d0 + jne .L116 + moveq #41,%d0 + cmp.l %d4,%d0 + jne .L109 + move.b 1175456540,%d0 + btst #0,%d0 + jeq .L109 + jsr open_select +.L117: + or.l %d3,(%a2) + jra .L114 +.L116: + moveq #1,%d1 + cmp.l %d0,%d1 + jne .L118 + moveq #7,%d1 + cmp.l %d4,%d1 + jlt .L119 + mvz.b arm+6,%d1 + cmp.l %d4,%d1 + jeq .L120 + move.b arm+7,%d1 + lsl.l %d4,%d0 + eor.l %d1,%d0 + move.b %d0,arm+7 +.L120: + moveq #1,%d0 + move.l %d0,1187497772 + jra .L117 +.L119: + moveq #49,%d1 + cmp.l %d4,%d1 + jne .L121 + move.l %sp,%d2 + add.l #44,%d2 + move.l %d2,-(%sp) + jsr current + addq.l #4,%sp + tst.l %d0 + jeq .L122 + pea arm + move.l %d2,-(%sp) + jsr same_place + addq.l #8,%sp + tst.l %d0 + jeq .L122 + move.b arm+6,%d4 + mvz.b 50(%sp),%d0 + mvz.b %d4,%d2 + cmp.l %d0,%d2 + jeq .L123 +.L122: + pea .LC8 +.L144: + jsr show +.L145: + addq.l #4,%sp + jra .L117 +.L123: + jsr (pass_steps.constprop.0) + move.l %d0,%d6 + tst.l %d0 + jne .L125 + pea .LC9 + jra .L144 +.L125: + move.w %d2,%d0 + mulu.w #168,%d0 + move.l %d0,%a0 + add.l #-2147464743,%a0 + tst.b (%a0) + jeq .L126 + pea .LC10 + jra .L144 +.L126: + move.b arm+7,%d0 + lea arm,%a5 + moveq #1,%d5 + move.l (%a5),%a3 + move.l #-2147483640,%a0 + add.l #585088,%a3 + move.l (%a0),arm+8 + lea copy,%a4 + subq.l #1,%d6 + lsl.l %d2,%d5 + move.b %d0,43(%sp) + mvz.b arm+5,%d0 + mulu.w #6322,%d0 + mvz.b %d5,%d5 + add.l %d0,%a3 + lea (%a3,%d2.l),%a0 + move.b (%a0),arm+12 + move.w %d2,%d0 + lea (8,%a0),%a1 + lea (34,%a0),%a0 + move.b (%a1),arm+13 + mulu.w #5,%d0 + move.b (%a0),arm+14 + move.l %d0,%a0 + pea 5.w + lea (714,%a0),%a0 + pea (%a0,%a3.l) + pea arm+15 + jsr (%a4) + move.w %d2,%d0 + pea 12.w + mulu.w #12,%d0 + move.l %d0,%a6 + lea (1538,%a6),%a6 + pea (%a6,%a3.l) + pea arm+20 + jsr (%a4) + mvz.b arm+4,%d0 + pea 2330.w + mvz.b arm+6,%d1 + mulu.w #36568,%d0 + mulu.w #2330,%d1 + add.l %d1,%d0 + add.l (%a5),%d0 + move.l %d0,-(%sp) + pea record_copy + jsr (%a4) + lea (36,%sp),%sp + pea 6322.w + move.l %a3,-(%sp) + pea part_buf + jsr (%a4) + add.l #part_buf,%a6 + lea (12,%sp),%sp + move.b %d6,2(%a6) + mvz.b 43(%sp),%d6 + clr.w (%a6) + cmp.l %d6,%d5 + jne .L131 + addq.l #1,%d4 +.L127: + clr.b %d0 + move.b %d4,4(%a6) + move.b %d0,9(%a6) + mvz.b arm+5,%d0 + move.l %d0,-(%sp) + pea part_buf + jsr 1073912396 + addq.l #8,%sp + cmp.l %d6,%d5 + jeq .L128 + mvz.b arm+7,%d0 + move.l arm+8,%d1 + swap %d0 + clr.w %d0 + and.l #-16711681,%d1 + or.l %d0,%d1 + move.l %d1,-(%sp) + jsr set_mutes + addq.l #4,%sp +.L128: + move.l %d2,%d0 + add.l #296877961,%d0 + lsl.l #2,%d0 + move.l %d0,%a0 + clr.l (%a0) + pea 1.w + move.l #49168,-(%sp) + move.l %d2,-(%sp) + jsr 1073762680 + lea (12,%sp),%sp + moveq #2,%d0 + moveq #1,%d1 + move.l %d0,phase + move.l %d1,1187497772 + jra .L117 +.L131: + moveq #10,%d4 + jra .L127 +.L121: + lea close_view,%a0 + moveq #50,%d0 + cmp.l %d4,%d0 + jne .L129 + jsr (%a0) + jra .L117 +.L129: + jsr (%a0) +.L109: + clr.l %d0 + jra .L113 +.L118: + subq.l #2,%d0 + lsr.l #1,%d0 + jne .L130 + moveq #50,%d0 + cmp.l %d4,%d0 + jne .L109 + pea .LC11 + jsr cancel + jra .L145 +.L130: + jsr close_view + move.l %d4,%a6 + lea (-49,%a6),%a6 + moveq #1,%d1 + cmp.l %a6,%d1 + jcc .L117 + jra .L109 + .size module_key, .-module_key + .align 2 + .globl module_enc + .type module_enc, @function +module_enc: + moveq #1,%d1 + cmp.l phase.l,%d1 + seq %d0 + mvs.b %d0,%d0 + neg.l %d0 + rts + .size module_enc, .-module_enc + .section .rodata.str1.1 +.LC12: + .string "BOUNCE" +.LC13: + .string "" +.LC14: + .string "WAITS FOR PATTERN START" +.LC15: + .string "RECORDING ONE PASS" +.LC16: + .string "BOUNCE T" +.LC17: + .string "PASS " +.LC18: + .string " STEPS" +.LC19: + .string "OVER 64 STEPS" +.LC20: + .string "TRIG 1-8: MERGE" +.LC21: + .string "YES: REC NO: CLOSE" +.LC22: + .string "NO: CANCEL" + .text + .align 2 + .globl module_draw + .type module_draw, @function +module_draw: + lea (-76,%sp),%sp + movem.l #23804,(%sp) + move.l phase,%d3 + move.l 80(%sp),%a6 + tst.l %d3 + jeq .L147 + tst.l %a6 + jeq .L147 + clr.l -(%sp) + pea 44.w + pea 116.w + pea 10.w + pea 6.w + move.l %a6,-(%sp) + lea fill,%a2 + subq.l #4,%d3 + jsr (%a2) + pea 1.w + pea 1.w + pea 116.w + pea 10.w + pea 6.w + move.l %a6,-(%sp) + jsr (%a2) + lea (48,%sp),%sp + pea 1.w + pea 1.w + pea 116.w + pea 53.w + pea 6.w + move.l %a6,-(%sp) + jsr (%a2) + pea 1.w + pea 44.w + pea 1.w + pea 10.w + pea 6.w + move.l %a6,-(%sp) + jsr (%a2) + lea (48,%sp),%sp + pea 1.w + pea 44.w + pea 1.w + pea 10.w + pea 121.w + move.l %a6,-(%sp) + jsr (%a2) + lea append,%a3 + clr.b %d0 + move.b %d0,64(%sp) + pea .LC16 + move.l %sp,%d2 + add.l #68,%d2 + move.l %d2,-(%sp) + jsr (%a3) + move.b arm+6,%d0 + clr.b %d1 + add.l #49,%d0 + move.b %d0,80(%sp) + move.b %d1,81(%sp) + lea (32,%sp),%sp + tst.l %d3 + jeq .L165 + move.l %d2,%d0 +.L149: + move.l %d0,-(%sp) + moveq #1,%d3 + pea 13.w + pea 10.w + move.l %a6,-(%sp) + lea text,%a2 + jsr (%a2) + lea (16,%sp),%sp + moveq #63,%d1 +.L150: + moveq #12,%d0 +.L151: + moveq #7,%d4 + moveq #19,%d6 + and.l %d0,%d4 + move.l %d0,%d2 + lsr.l #3,%d2 + move.l %d1,%a0 + addq.l #1,%d0 + sub.l %d2,%a0 + move.l %d3,%d2 + add.l %a6,%a0 + lsl.l %d4,%d2 + move.b (%a0),%d4 + eor.l %d4,%d2 + move.b %d2,(%a0) + cmp.l %d0,%d6 + jne .L151 + addq.l #8,%d1 + cmp.l #975,%d1 + jne .L150 + moveq #4,%d7 + cmp.l phase.l,%d7 + jne .L166 + move.l message,%d0 + tst.l %d0 + jne .L154 + move.l #.LC13,%d0 +.L154: + move.l %d0,-(%sp) + pea 27.w +.L181: + pea 10.w + move.l %a6,-(%sp) + jsr (%a2) + lea (16,%sp),%sp +.L147: + movem.l (%sp),#23804 + lea (76,%sp),%sp + rts +.L165: + move.l #.LC12,%d0 + jra .L149 +.L166: + move.w #9,%a4 + move.l %sp,%d2 + clr.l %d4 + add.l #52,%d2 + moveq #1,%d3 +.L153: + moveq #84,%d0 + clr.b %d1 + move.b %d0,52(%sp) + move.l %d4,%d0 + add.l #49,%d0 + move.b %d0,53(%sp) + move.b %d1,54(%sp) + move.l %d2,-(%sp) + pea 22.w + pea 1(%a4) + move.l %a6,-(%sp) + jsr (%a2) + mvz.b arm+7,%d0 + lea (16,%sp),%sp + btst %d4,%d0 + jne .L155 +.L159: + addq.l #1,%d4 + lea (14,%a4),%a4 + moveq #8,%d6 + cmp.l %d4,%d6 + jne .L153 + move.l phase,%d0 + moveq #1,%d7 + cmp.l %d0,%d7 + jne .L160 + clr.b %d0 + move.b %d0,52(%sp) + pea .LC17 + move.l %d2,-(%sp) + jsr (%a3) + jsr (pass_steps.constprop.0) + addq.l #8,%sp + tst.l %d0 + jeq .L161 + moveq #9,%d1 + cmp.l %d0,%d1 + jcc .L168 + move.l %d0,%d1 + moveq #10,%d4 + divu.l %d4,%d1 + lea (58,%sp),%a0 + add.l #48,%d1 + move.b %d1,57(%sp) +.L162: + moveq #10,%d6 + remu.l %d6,%d1:%d0 + clr.b %d7 + add.l #48,%d1 + move.b %d1,(%a0) + move.b %d7,1(%a0) + pea .LC18 +.L180: + move.l %d2,-(%sp) + jsr (%a3) + addq.l #4,%sp + move.l %d2,(%sp) + pea 31.w + pea 10.w + move.l %a6,-(%sp) + jsr (%a2) + pea .LC20 + pea 38.w + pea 10.w + move.l %a6,-(%sp) + jsr (%a2) + lea (28,%sp),%sp + move.l #.LC21,(%sp) + pea 45.w + jra .L181 +.L155: + mvz.w %a4,%d0 + moveq #13,%d1 + lsl.l #3,%d0 + addq.l #7,%d0 +.L157: + subq.l #1,%d1 + tst.l %d1 + jeq .L159 + moveq #21,%d5 +.L158: + move.l %d5,%d6 + lsr.l #3,%d6 + move.l %d0,%a0 + move.l %d3,%d7 + sub.l %d6,%a0 + moveq #7,%d6 + add.l %a6,%a0 + and.l %d5,%d6 + addq.l #1,%d5 + lsl.l %d6,%d7 + move.b (%a0),%d6 + eor.l %d7,%d6 + move.b %d6,(%a0) + moveq #28,%d6 + cmp.l %d5,%d6 + jne .L158 + addq.l #8,%d0 + jra .L157 +.L168: + lea (57,%sp),%a0 + jra .L162 +.L161: + pea .LC19 + jra .L180 +.L160: + subq.l #2,%d0 + tst.l %d0 + jne .L169 + move.l #.LC14,%d0 +.L164: + move.l %d0,-(%sp) + pea 31.w + pea 10.w + move.l %a6,-(%sp) + jsr (%a2) + pea .LC22 + pea 45.w + pea 10.w + move.l %a6,-(%sp) + jsr (%a2) + lea (32,%sp),%sp + jra .L147 +.L169: + move.l #.LC15,%d0 + jra .L164 + .size module_draw, .-module_draw + .section .rodata + .type ticks.0, @object + .size ticks.0, 7 +ticks.0: + .base64 "AwQGCAwYMA==" + .globl bounce_part_menu + .text + .align 2 + .type bounce_part_menu, @object + .size bounce_part_menu, 24 +bounce_part_menu: + .long 1 + .long .LC12 + .long 2 + .long bounce_actions + .long bounce_choose + .long 0 + .section .rodata.str1.1 +.LC23: + .string "BOUNCE TRACK" +.LC24: + .string "UNDO BOUNCE" + .section .rodata + .align 2 + .type bounce_actions, @object + .size bounce_actions, 8 +bounce_actions: + .long .LC23 + .long .LC24 + .local part_buf + .comm part_buf,6322,1 + .local record_new + .comm record_new,2330,1 + .local record_copy + .comm record_copy,2330,1 + .local undo_ready + .comm undo_ready,4,2 + .local last + .comm last,32,2 + .local arm + .comm arm,32,2 + .local message + .comm message,4,2 + .local shown_ticks + .comm shown_ticks,4,2 + .local consumed_hi + .comm consumed_hi,4,2 + .local consumed_lo + .comm consumed_lo,4,2 + .local phase + .comm phase,4,2 From ecfbebd98ce2924803db68c91e9bc2aeaf1a3bca Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Wed, 2 Dec 2026 21:31:15 +0100 Subject: [PATCH 07/43] Bounce 0.1.1: first unit run recorded; write the pattern record directly, refuse Modwerk machines, wait for PLAY Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/README.md | 1 + sdk/drafts/bounce/TESTING.md | 13 +- sdk/drafts/bounce/bounce.c | 62 +- sdk/drafts/bounce/unit.s | 1049 ++++++++++++++++++++-------------- 4 files changed, 679 insertions(+), 446 deletions(-) diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index 1c65caae39..e50121ebdf 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -65,6 +65,7 @@ The code in `bounce.c` builds (`npm run module:dev -- bounce --build-only`) and - **The WAV.** The take stays in the track's recorder buffer, so it is lost at a power cycle and a project reload does not bring it back. Saving it to the project is the next piece. - **Passes over 64 master steps.** RLEN counts at most 64 master 16ths (4 bars at 1X), so a longer pass is refused with PASS OVER 64 STEPS. - **Trig key lamps.** The merge is shown in the BOUNCE window (merged tracks inverted), not yet on the trig keys. +- **Modwerk machines.** A track running Grain, POLY8 or another Modwerk machine is refused as the destination: only the base can switch a track off one. Set it to FLEX first. - **The MASTER TRACK check.** T8 is not refused yet while MASTER TRACK is on. - **PER TRACK mode.** The pass length is the track's own, but QREC PLEN starts the take at the master pattern's start (inferred). - **Cue levels.** A merged track records at its CUE level; one at 0 is silent in the take. diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 2b11bb4e50..14734a0067 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -72,7 +72,18 @@ Read and not yet checked by a run, each needed by the prototype: stock's track w ## On the unit -Not tested. +**2 December 2026, prototype 0.1.0 on the developer's MKII.** Release base `ddb56b72…` with 11 kept modules (FM Synth, Sidechain Comp, Recorder Loop, Output Matrix, Quant Live Rec, Bar LED, Grain, ungemach, Resonator, syntiz, USB Audio), OS 1.40C. A RAM trial with `npm run module:dev -- bounce --seconds 900`, never kept; the developer pressed the keys in their own project after a SAVE, its CPU already at 90 % and over in the hours before (the base's `hot` and `shed` incidents). Phases from the trial's readout (`api->value`), the rest as the developer reported it: + +| Step | Seen | +| --- | --- | +| DOWN+REC | the BOUNCE window opens; FUNC+PART shows the BOUNCE row | +| Trig keys 1-8 | the merge toggles in the window; the trig key lamps keep showing the pattern (no lamp code yet) | +| YES with the sequencer stopped | the window went to STOPPED - NO BOUNCE within a second: the recorder started at once instead of waiting for the pattern start, and Bounce cancelled because the transport was stopped | +| YES while playing | armed, recorded about 4 s, BOUNCED: the FX1/FX2 bytes were cleared and the Flex slot pointed at the recorder buffer, but the track stayed Grain (a Modwerk machine signs the track in the Part, and Bounce left the signature), so Grain played the take; the old trigs stayed: stock's track write `0x40029754`, called as `(src, pattern, track)`, left the record unchanged | +| UNDO BOUNCE | an unpleasant sound, then no playback | +| 60 s later | the unit restarted (the trial's tick count reset; the base's log has a new boot with no crash record, after one late frame entry); the kept set came back | + +Fixed in 0.1.1, not yet run: the pattern record is written directly (working and battery-backed copies, as Pattern Sample Locks does), a Modwerk machine track is refused (MODWERK MACHINE: SET FLEX), the machine transition runs only when the machine byte changes, and YES while stopped waits for PLAY. Open: whether the restart was a power cycle or caused by UNDO. ## Stock flows diff --git a/sdk/drafts/bounce/bounce.c b/sdk/drafts/bounce/bounce.c index 6d9204646a..c42e2a0c82 100644 --- a/sdk/drafts/bounce/bounce.c +++ b/sdk/drafts/bounce/bounce.c @@ -3,7 +3,7 @@ * * Bounce, OS 1.40C: record tracks for one pattern pass into the active track's * recorder buffer, then make that track a Flex machine playing the take. - * Prototype: nothing here has run on a unit or in the emulator yet. + * Prototype 0.1.1: the first build ran on one MKII (TESTING.md); this one has not yet. * * DOWN+REC (or FUNC+PART > BOUNCE > BOUNCE TRACK) opens BOUNCE. Trig keys 1-8 * add or remove tracks to merge; YES arms; NO closes or cancels. @@ -72,7 +72,10 @@ /* ---- stock routines ---- */ #define REC_POST 0x40005178u /* (track, word, quantised): the REC keys' mailbox */ #define PART_PASTE 0x40029a4cu /* (src, part): working Part and CS1, unsaved bit, applied */ -#define TRACK_WRITE 0x40029754u /* (src, pattern, track): track paste's write */ +#define CS1_PATTERNS 0x1001614eu /* the current bank's patterns, battery-backed (STEP_LOCKS.md) */ +#define BANK_EDITED 0x9b332u /* bank + this: the next bank write takes it */ +#define PROJ_EDITED 0x100f8598u +#define P_SIG 60u /* + 30 t: a Modwerk machine's two letters and version (modwerk_events.h) */ #define MACHINE_SET 0x400972fcu /* (part, track, old machine): the transition Part Reload runs */ #define EDITED 0x40027e00u #define TRACK_PREP 0x4009da20u /* (track): prepare the track's steps again */ @@ -88,7 +91,7 @@ #define TAKE_WORD 0xc010u /* start, SRC3 (free-loop's take word) */ #define STOP_WORD 0x80u -enum { CLOSED, SELECT, ARMED, RECORDING, MESSAGE }; +enum { CLOSED, SELECT, ARMED, RECORDING, MESSAGE, WAIT_PLAY }; struct slice { /* one track's Part bytes Bounce changes */ uint8_t fx1, fx2, machine, slots[5], rec[12]; @@ -195,14 +198,41 @@ static void lock_index(const struct ctx *c) } } +/* Bytes into the working record and its battery-backed copy, interrupts held + * for one span at a time so the sequencer reads a span wholly old or new. */ +static void write_span(uint32_t work, uint32_t cs1, const uint8_t *src, unsigned n) +{ + uint16_t sr; + __asm__ volatile("move.w %%sr,%0\n\tmove.w #0x2700,%%sr" : "=d"(sr) :: "memory"); + for (unsigned i = 0; i < n; ++i) { U8(work + i) = src[i]; U8(cs1 + i) = src[i]; } + __asm__ volatile("move.w %0,%%sr" :: "d"(sr) : "memory"); +} +/* The whole record: stock's track write (0x40029754) left it unchanged on the + * unit (2 December 2026), so Bounce writes it as Pattern Sample Locks does. */ static void write_record(const struct ctx *c, const uint8_t *src) { - call3(TRACK_WRITE, (uint32_t)(uintptr_t)src, c->pattern, c->track); + uint32_t work = record_at(c), cs1 = CS1_PATTERNS + c->pattern * PAT_BYTES + c->track * TRK_BYTES; + write_span(work, cs1, src, TRK_LOCKS); + for (unsigned step = 0; step < 64u; ++step) + write_span(work + TRK_LOCKS + 32u * step, cs1 + TRK_LOCKS + 32u * step, src + TRK_LOCKS + 32u * step, 32u); + write_span(work + TRK_LOCKS + 64u * 32u, cs1 + TRK_LOCKS + 64u * 32u, src + TRK_LOCKS + 64u * 32u, + TRK_BYTES - TRK_LOCKS - 64u * 32u); lock_index(c); + U32(c->bank + BANK_EDITED) = 1; U32(PROJ_EDITED) = 1; call0(EDITED); call1(TRACK_PREP, c->track); } +/* A Modwerk machine (Grain, POLY8 ...) signs the track in the Part; only the + * base switches a track off one, so Bounce does not bounce into it yet. */ +static unsigned modwerk_machine(uint32_t part, unsigned t) +{ + uint32_t s = part + P_SIG + 30u * t; + unsigned a = U8(s), b = U8(s + 1), v = U8(s + 2); + return a >= 'A' && a <= 'Z' && ((b >= 'A' && b <= 'Z') || (b >= '0' && b <= '9')) && v >= 1u && v <= 9u + && U8(part + P_MACHINE + t) == FLEX; +} + static void show(const char *text) { message = text; phase = MESSAGE; shown_ticks = 0; redraw(); } static void close_view(void) { phase = CLOSED; message = 0; redraw(); } @@ -210,7 +240,7 @@ static void close_view(void) { phase = CLOSED; message = 0; redraw(); } static void open_select(void) { struct ctx c; - if (phase == ARMED || phase == RECORDING) return; + if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY) return; if (!current(&c)) { show("AUDIO TRACKS ONLY"); return; } copy_ctx(&arm, &c); arm.merged = (uint8_t)(1u << c.track); phase = SELECT; message = 0; redraw(); @@ -225,6 +255,7 @@ static void start(void) if (!steps) { show("PASS OVER 64 STEPS"); return; } if (recording(t)) { show("RECORDER BUSY"); return; } uint32_t part = part_at(&arm); + if (modwerk_machine(part, t)) { show("MODWERK MACHINE: SET FLEX"); return; } arm.mutes = U32(MUTES); read_slice(&arm.part_bytes, part, t); copy(record_copy, (const volatile uint8_t *)(uintptr_t)record_at(&arm), TRK_BYTES); @@ -236,8 +267,9 @@ static void start(void) call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, arm.part); if (merge) set_mutes((arm.mutes & ~0x00ff0000u) | (uint32_t)arm.merged << 16); U32(LIMIT + 4u * t) = 0; - call3(REC_POST, t, TAKE_WORD, 1); - phase = ARMED; redraw(); + if (U32(TRANSPORT)) { call3(REC_POST, t, TAKE_WORD, 1); phase = ARMED; } + else phase = WAIT_PLAY; /* stopped: stock started the take at once (unit, 2 December 2026) */ + redraw(); } /* Put back the recorder setup (and the cue bits) without any bounce. */ @@ -270,7 +302,7 @@ static void finish(void) s.machine = FLEX; s.fx1 = 0; s.fx2 = 0; s.slots[FLEX] = (uint8_t)(0x80u + t); write_slice(part_buf, &s, t); call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, arm.part); - call3(MACHINE_SET, arm.part, t, old); + if (old != FLEX) call3(MACHINE_SET, arm.part, t, old); for (unsigned i = 0; i < TRK_BYTES; ++i) record_new[i] = record_copy[i]; for (unsigned i = 0; i < 64u; ++i) record_new[i] = 0; /* the eight step masks */ @@ -287,7 +319,7 @@ static void finish(void) static void undo(void) { struct ctx now; - if (phase == ARMED || phase == RECORDING) return; + if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY) return; if (!undo_ready) { show("NOTHING TO UNDO"); return; } if (!current(&now) || !same_place(&now, &last)) { show("UNDO: OPEN ITS PATTERN"); return; } unsigned t = last.track; @@ -308,13 +340,17 @@ static void undo(void) /* ---- hooks ---- */ void module_tick(struct modwerk_runtime_api *api) { - if (phase == ARMED) { + if (phase == WAIT_PLAY) { + if (U32(TRANSPORT)) { call3(REC_POST, arm.track, TAKE_WORD, 1); phase = ARMED; redraw(); } + } else if (phase == ARMED) { if (recording(arm.track)) { phase = RECORDING; redraw(); } } else if (phase == RECORDING) { if (!U32(TRANSPORT)) cancel("STOPPED - NO BOUNCE"); else if (!recording(arm.track)) finish(); } else if (phase == MESSAGE && ++shown_ticks > 90u) close_view(); - api->value = (uint32_t)phase << 24 | (uint32_t)arm.merged << 16 | undo_ready; + /* The readout: phase, merged tracks, transport, the track's recorder, UNDO ready. */ + api->value = (uint32_t)phase << 24 | (uint32_t)arm.merged << 16 | (U32(TRANSPORT) ? 0x200u : 0) + | (recording(arm.track) ? 0x100u : 0) | undo_ready; } int module_key(int code, int pressed) @@ -337,7 +373,7 @@ int module_key(int code, int pressed) } else if (code == K_YES) start(); else if (code == K_NO) close_view(); else { close_view(); return 0; } - } else if (phase == ARMED || phase == RECORDING) { + } else if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY) { if (code != K_NO) return 0; cancel("BOUNCE CANCELLED"); } else { @@ -419,7 +455,7 @@ void module_draw(unsigned char *frame) text(frame, 10, 38, "TRIG 1-8: MERGE"); text(frame, 10, 45, "YES: REC NO: CLOSE"); } else { - text(frame, 10, 31, phase == ARMED ? "WAITS FOR PATTERN START" : "RECORDING ONE PASS"); + text(frame, 10, 31, phase == WAIT_PLAY ? "PRESS PLAY" : phase == ARMED ? "WAITS FOR PATTERN START" : "RECORDING ONE PASS"); text(frame, 10, 45, "NO: CANCEL"); } } diff --git a/sdk/drafts/bounce/unit.s b/sdk/drafts/bounce/unit.s index 2f18b11005..bdea6be7dd 100644 --- a/sdk/drafts/bounce/unit.s +++ b/sdk/drafts/bounce/unit.s @@ -21,6 +21,18 @@ copy: jra .L2 .size copy, .-copy .align 2 + .type record_at, @function +record_at: + move.l 4(%sp),%a0 + mvz.b 6(%a0),%d0 + mvz.b 4(%a0),%d1 + mulu.w #2330,%d0 + mulu.w #36568,%d1 + add.l %d1,%d0 + add.l (%a0),%d0 + rts + .size record_at, .-record_at + .align 2 .type current, @function current: lea (-16,%sp),%sp @@ -34,36 +46,36 @@ current: move.l %d3,%d0 add.l #-1074668000,%d0 cmp.l #9535680,%d0 - jls .L5 -.L7: + jls .L6 +.L8: clr.l %d0 -.L4: +.L5: movem.l (%sp),#60 lea (16,%sp),%sp rts -.L5: +.L6: move.l #635712,%d5 remu.l %d5,%d4:%d0 tst.l %d4 - jne .L7 + jne .L8 mvz.b %d2,%d0 lsr.l #4,%d0 - jne .L7 + jne .L8 move.w %a1,%d5 mvz.b %d5,%d0 lsr.l #2,%d0 - jne .L7 + jne .L8 mvz.b %d1,%d0 lsr.l #3,%d0 - jne .L7 + jne .L8 tst.l -2147483630 - jne .L7 + jne .L8 move.b %d2,4(%a0) move.b %d5,5(%a0) move.b %d1,6(%a0) move.l %d3,(%a0) moveq #1,%d0 - jra .L4 + jra .L5 .size current, .-current .align 2 .type same_place, @function @@ -72,16 +84,16 @@ same_place: move.l 4(%sp),%a1 move.l (%a0),%d0 cmp.l (%a1),%d0 - jeq .L9 -.L11: + jeq .L10 +.L12: clr.l %d0 -.L8: - rts .L9: + rts +.L10: mvz.b 4(%a1),%d1 mvz.b 4(%a0),%d0 cmp.l %d1,%d0 - jne .L11 + jne .L12 move.b 5(%a1),%d0 move.b 5(%a0),%d1 eor.l %d1,%d0 @@ -89,9 +101,40 @@ same_place: seq %d0 mvs.b %d0,%d0 neg.l %d0 - jra .L8 + jra .L9 .size same_place, .-same_place .align 2 + .type write_span, @function +write_span: + move.l %a3,-(%sp) + move.l %a2,-(%sp) + move.l 20(%sp),%a1 +#APP +| 206 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 + move.w %sr,%d0 + move.w #0x2700,%sr +| 0 "" 2 +#NO_APP + sub.l %a0,%a0 +.L14: + lea (%a1,%a0.l),%a3 + move.l 12(%sp),%a2 + move.b (%a3),(%a2,%a0.l) + move.l 16(%sp),%a2 + move.b (%a3),(%a2,%a0.l) + addq.l #1,%a0 + cmp.l 24(%sp),%a0 + jne .L14 +#APP +| 208 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 + move.w %d0,%sr +| 0 "" 2 +#NO_APP + move.l (%sp)+,%a2 + move.l (%sp)+,%a3 + rts + .size write_span, .-write_span + .align 2 .type show, @function show: lea (4,%sp),%a0 @@ -123,16 +166,16 @@ fill: move.l %d1,%d3 add.l 40(%sp),%d3 add.l 44(%sp),%d4 -.L15: +.L19: cmp.l %d3,%d1 - jcc .L14 + jcc .L18 move.l %d1,%d0 lsl.l #3,%d0 addq.l #7,%d0 move.l %d0,20(%sp) move.l 36(%sp),%d0 - jra .L20 -.L18: + jra .L24 +.L22: move.l %d0,%d2 lsr.l #3,%d2 move.l 20(%sp),%a1 @@ -147,23 +190,23 @@ fill: move.b (%a1),%d6 move.w %d6,%a0 tst.l 48(%sp) - jeq .L16 + jeq .L20 move.l %a0,%d6 or.l %d6,%d2 -.L17: +.L21: move.b %d2,(%a1) addq.l #1,%d0 -.L20: +.L24: cmp.l %d4,%d0 - jcs .L18 + jcs .L22 addq.l #1,%d1 - jra .L15 -.L16: + jra .L19 +.L20: not.l %d2 move.l %a0,%d6 and.l %d6,%d2 - jra .L17 -.L14: + jra .L21 +.L18: movem.l (%sp),#124 lea (24,%sp),%sp rts @@ -175,10 +218,10 @@ text: move.l %sp,%a1 move.l #1074524426,%a0 move.l %sp,%d0 -.L22: +.L26: move.l (%a0)+,(%a1)+ cmp.l #1074524454,%a0 - jne .L22 + jne .L26 move.l 32(%sp),12(%sp) move.l 44(%sp),-(%sp) pea -1.w @@ -196,20 +239,20 @@ text: .type append, @function append: move.l 4(%sp),%a0 -.L25: +.L29: move.b (%a0),%d0 move.l %a0,%a1 addq.l #1,%a0 tst.b %d0 - jne .L25 + jne .L29 clr.l %d0 -.L26: +.L30: move.l 8(%sp),%a0 move.b (%a0,%d0.l),%d1 move.b %d1,(%a1,%d0.l) addq.l #1,%d0 tst.b %d1 - jne .L26 + jne .L30 rts .size append, .-append .align 2 @@ -232,101 +275,200 @@ write_slice.constprop.0: move.l %d1,%a0 clr.l %d1 add.l #part_buf+714,%a0 -.L30: +.L34: lea 3(%a1,%d1.l),%a2 moveq #5,%d2 move.b (%a2),(%a0,%d1.l) addq.l #1,%d1 cmp.l %d1,%d2 - jne .L30 + jne .L34 mulu.w #12,%d0 move.l %d0,%a0 clr.l %d0 add.l #part_buf+1538,%a0 -.L31: +.L35: lea 8(%a1,%d0.l),%a2 moveq #12,%d1 move.b (%a2),(%a0,%d0.l) addq.l #1,%d0 cmp.l %d0,%d1 - jne .L31 + jne .L35 move.l (%sp)+,%d2 move.l (%sp)+,%a2 rts .size write_slice.constprop.0, .-write_slice.constprop.0 .align 2 + .type pass_steps.constprop.0, @function +pass_steps.constprop.0: + mvz.b arm+4,%d0 + lea arm,%a0 + move.l %d3,-(%sp) + move.l %d2,-(%sp) + mulu.w #36568,%d0 + add.l (%a0),%d0 + move.l %d0,%a1 + add.l #36437,%a1 + tst.b (%a1) + jeq .L39 + move.l %a0,-(%sp) + jsr record_at + addq.l #4,%sp + move.l %d0,%a0 + move.b 80(%a0),%d2 + move.b 81(%a0),%d1 +.L40: + mvz.b %d1,%d1 + moveq #6,%d0 + cmp.l %d1,%d0 + jcc .L41 +.L43: + clr.l %d0 +.L38: + move.l (%sp)+,%d2 + move.l (%sp)+,%d3 + rts +.L39: + move.l %d0,%a0 + add.l #36435,%a0 + move.b (%a0),%d2 + add.l #36436,%d0 + move.l %d0,%a0 + move.b (%a0),%d1 + jra .L40 +.L41: + mvz.b %d2,%d0 + tst.b %d2 + jeq .L38 + lea (ticks.0),%a0 + moveq #6,%d3 + mvz.b (%a0,%d1.l),%d1 + mulu.w %d0,%d1 + move.l %d1,%d2 + remu.l %d3,%d0:%d2 + divu.l %d3,%d2 + tst.l %d0 + jne .L43 + cmp.l #389,%d1 + jhi .L38 + move.l %d2,%d0 + jra .L38 + .size pass_steps.constprop.0, .-pass_steps.constprop.0 + .align 2 .type write_record, @function write_record: - lea (-16,%sp),%sp - movem.l #3084,(%sp) - move.l 20(%sp),%a2 - move.l #1187501196,%a3 - moveq #1,%d2 + lea (-44,%sp),%sp + movem.l #31772,(%sp) + move.l 48(%sp),%a2 + move.l #record_at,%d3 + move.l 52(%sp),%a6 + move.l %d3,%a0 + lea write_span,%a4 + sub.l %a3,%a3 + move.l %a2,-(%sp) + jsr (%a0) + mvz.b 4(%a2),%d2 + moveq #89,%d1 + move.l %d0,%a5 + move.l %a5,%d4 mvz.b 6(%a2),%d0 + mulu.w #36568,%d2 + move.l %d1,(%sp) + move.l %a6,-(%sp) + mulu.w #2330,%d0 + add.l #89,%d4 + add.l %d0,%d2 + move.l %d2,%d0 + add.l #268525902,%d0 move.l %d0,-(%sp) - mvz.b 4(%a2),%d0 - move.l %d0,-(%sp) - move.l 32(%sp),-(%sp) - jsr 1073911636 - mvz.b 4(%a2),%d0 - lea (12,%sp),%sp - mvz.b 6(%a2),%d1 - mulu.w #36568,%d0 - mulu.w #2330,%d1 + move.l %a5,-(%sp) + jsr (%a4) + lea (16,%sp),%sp + lea (89,%a6),%a0 + move.l %d2,%a1 + add.l #268525991,%a1 + move.l %a0,40(%sp) +.L48: + pea 32.w + move.l 44(%sp),%a0 + pea (%a0,%a3.l) + pea (%a1,%a3.l) + pea (%a3,%d4.l) + move.l %a1,52(%sp) + jsr (%a4) + lea (16,%sp),%sp + lea (32,%a3),%a3 + move.l 36(%sp),%a1 + cmp.l #2048,%a3 + jne .L48 + pea 193.w + move.l #1187501196,%a3 + pea 2137(%a6) + add.l #268528039,%d2 + move.l %d2,-(%sp) + pea 2137(%a5) + jsr (%a4) + move.l %a2,-(%sp) + move.l %d3,%a0 + moveq #1,%d3 + jsr (%a0) + lea (20,%sp),%sp move.l %d0,%a0 - add.l %d1,%a0 - add.l (%a2),%a0 lea (89,%a0),%a0 -.L35: +.L49: sub.l %a1,%a1 -.L38: - move.b (%a1,%a0.l),%d0 +.L52: + move.b (%a0,%a1.l),%d1 addq.l #1,%a1 - moveq #31,%d1 - cmp.l %a1,%d1 - jne .L36 - not.l %d0 - tst.b %d0 - sne %d0 - mvs.b %d0,%d0 - neg.l %d0 -.L37: - mvz.b 6(%a2),%d1 - move.l %d2,%d3 - lsl.l %d1,%d3 - move.b (%a3),%d1 - tst.l %d0 - jeq .L39 - or.l %d3,%d1 -.L40: - move.b %d1,(%a3)+ + moveq #31,%d0 + cmp.l %a1,%d0 + jne .L50 + not.l %d1 + tst.b %d1 + sne %d1 + mvs.b %d1,%d1 + neg.l %d1 +.L51: + mvz.b 6(%a2),%d0 + move.l %d3,%d2 + lsl.l %d0,%d2 + move.b (%a3),%d0 + tst.l %d1 + jeq .L53 + or.l %d2,%d0 +.L54: + move.b %d0,(%a3)+ lea (32,%a0),%a0 cmp.l #1187501260,%a3 - jne .L35 + jne .L49 + move.l (%a2),%a0 + moveq #1,%d0 + add.l #635698,%a0 + move.l %d0,(%a0) + moveq #1,%d0 + move.l %d0,269452696 jsr 1073905152 mvz.b 6(%a2),%d0 - movem.l (%sp),#3084 - move.l %d0,20(%sp) - lea (16,%sp),%sp + movem.l (%sp),#31772 + move.l %d0,48(%sp) + lea (44,%sp),%sp jmp 1074387488 -.L36: - mvz.b %d0,%d0 - cmp.l #255,%d0 - jeq .L38 - moveq #1,%d0 - jra .L37 -.L39: - move.l %d3,%d0 - not.l %d0 - and.l %d0,%d1 - jra .L40 +.L50: + mvz.b %d1,%d1 + cmp.l #255,%d1 + jeq .L52 + moveq #1,%d1 + jra .L51 +.L53: + not.l %d2 + and.l %d2,%d0 + jra .L54 .size write_record, .-write_record .align 2 .type set_mutes, @function set_mutes: move.l 4(%sp),%d0 #APP -| 179 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 182 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %sr,%d1 move.w #0x2700,%sr | 0 "" 2 @@ -334,7 +476,7 @@ set_mutes: move.l %d0,-2147483640 move.l %d0,269161684 #APP -| 181 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 184 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %d1,%sr | 0 "" 2 #NO_APP @@ -356,96 +498,47 @@ set_mutes: .type open_select, @function open_select: move.l phase,%d0 - subq.l #2,%d0 - lsr.l #1,%d0 + move.l %d0,%d1 + subq.l #2,%d1 + lsr.l #1,%d1 lea (-32,%sp),%sp move.l %a6,-(%sp) + move.l %d2,-(%sp) + tst.l %d1 + jeq .L60 + subq.l #5,%d0 tst.l %d0 - jeq .L45 - lea (4,%sp),%a6 + jeq .L60 + lea (8,%sp),%a6 move.l %a6,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jne .L47 + jne .L62 pea .LC0 jsr show addq.l #4,%sp -.L45: +.L60: + move.l (%sp)+,%d2 move.l (%sp)+,%a6 lea (32,%sp),%sp rts -.L47: +.L62: pea 32.w + moveq #1,%d2 move.l %a6,-(%sp) pea arm jsr copy + move.l %d2,phase clr.l message - mvz.b 22(%sp),%d1 + mvz.b 26(%sp),%d1 moveq #1,%d0 + move.l %d2,1187497772 lea (12,%sp),%sp lsl.l %d1,%d0 move.b %d0,arm+7 - moveq #1,%d0 - move.l %d0,phase - move.l %d0,1187497772 - jra .L45 + jra .L60 .size open_select, .-open_select - .align 2 - .type pass_steps.constprop.0, @function -pass_steps.constprop.0: - mvz.b arm+4,%d0 - move.l %d3,-(%sp) - move.l %d2,-(%sp) - mulu.w #36568,%d0 - add.l arm,%d0 - move.l %d0,%a0 - add.l #36437,%a0 - tst.b (%a0) - jeq .L49 - mvz.b arm+6,%d1 - mulu.w #2330,%d1 - move.l %d1,%a0 - add.l %d0,%a0 - move.b 80(%a0),%d2 - move.b 81(%a0),%d1 -.L50: - mvz.b %d1,%d1 - moveq #6,%d0 - cmp.l %d1,%d0 - jcc .L51 -.L53: - clr.l %d0 -.L48: - move.l (%sp)+,%d2 - move.l (%sp)+,%d3 - rts -.L49: - move.l %d0,%a0 - add.l #36435,%a0 - move.b (%a0),%d2 - add.l #36436,%d0 - move.l %d0,%a0 - move.b (%a0),%d1 - jra .L50 -.L51: - mvz.b %d2,%d0 - tst.b %d2 - jeq .L48 - lea (ticks.0),%a0 - moveq #6,%d3 - mvz.b (%a0,%d1.l),%d1 - mulu.w %d0,%d1 - move.l %d1,%d2 - remu.l %d3,%d0:%d2 - divu.l %d3,%d2 - tst.l %d0 - jne .L53 - cmp.l #389,%d1 - jhi .L48 - move.l %d2,%d0 - jra .L48 - .size pass_steps.constprop.0, .-pass_steps.constprop.0 .section .rodata.str1.1 .LC1: .string "NOTHING TO UNDO" @@ -460,19 +553,23 @@ bounce_choose: lea (-44,%sp),%sp movem.l #17412,(%sp) tst.l 48(%sp) - jeq .L58 + jeq .L67 move.l phase,%d0 - subq.l #2,%d0 - lsr.l #1,%d0 - jeq .L57 + move.l %d0,%d1 + subq.l #2,%d1 + lsr.l #1,%d1 + jeq .L66 + subq.l #5,%d0 + tst.l %d0 + jeq .L66 tst.l undo_ready - jne .L60 + jne .L69 + move.l #.LC1,%d2 + move.l %d2,48(%sp) movem.l (%sp),#17412 - move.l #.LC1,%d0 - move.l %d0,48(%sp) lea (44,%sp),%sp jra show -.L60: +.L69: move.l %sp,%d2 add.l #12,%d2 move.l %d2,-(%sp) @@ -480,34 +577,34 @@ bounce_choose: addq.l #4,%sp lea show,%a2 tst.l %d0 - jeq .L61 + jeq .L70 pea last move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L62 -.L61: + jne .L71 +.L70: pea .LC2 -.L69: +.L81: jsr (%a2) addq.l #4,%sp -.L57: +.L66: movem.l (%sp),#17412 lea (44,%sp),%sp rts -.L62: +.L71: mvz.b last+5,%d0 mvz.b last+6,%d2 move.l last,%a0 add.l #585088,%a0 mulu.w #6322,%d0 add.l %d0,%a0 - move.b 34(%a0,%d2.l),%d1 + move.b 34(%a0,%d2.l),%d0 pea 6322.w move.l %a0,-(%sp) pea part_buf - move.w %d1,%a6 + move.w %d0,%a6 jsr copy move.l %d2,-(%sp) pea last+12 @@ -521,14 +618,14 @@ bounce_choose: mvz.b %d1,%d0 mvz.b last+14,%d1 cmp.l %d0,%d1 - jeq .L63 + jeq .L72 move.l %d0,-(%sp) mvz.b last+5,%d0 move.l %d2,-(%sp) move.l %d0,-(%sp) jsr 1074361084 lea (12,%sp),%sp -.L63: +.L72: pea record_copy pea last jsr write_record @@ -542,15 +639,15 @@ bounce_choose: and.l %d2,%d0 eor.l %d1,%d0 cmp.l (%a0),%d0 - jeq .L64 + jeq .L73 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L64: +.L73: clr.l undo_ready pea .LC3 - jra .L69 -.L58: + jra .L81 +.L67: movem.l (%sp),#17412 lea (44,%sp),%sp jra open_select @@ -569,26 +666,26 @@ cancel: move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L71 + jeq .L83 clr.l -(%sp) pea 128.w move.l %a6,-(%sp) jsr 1073762680 lea (12,%sp),%sp -.L71: +.L83: move.l %sp,%d2 add.l #12,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L72 + jeq .L84 pea arm move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L72 + jeq .L84 mvz.b arm+5,%d2 pea 6322.w move.l arm,%a0 @@ -605,25 +702,25 @@ cancel: mulu.w #12,%d1 move.l %d1,%a6 add.l #part_buf+1538,%a6 -.L73: +.L85: lea (%a0,%d0.l),%a1 moveq #12,%d1 move.b (%a1),(%a6,%d0.l) addq.l #1,%d0 cmp.l %d0,%d1 - jne .L73 + jne .L85 move.l %d2,-(%sp) pea part_buf jsr 1073912396 addq.l #8,%sp -.L72: +.L84: move.l arm+8,%d0 cmp.l -2147483640.l,%d0 - jeq .L74 + jeq .L86 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L74: +.L86: move.l 8(%sp),%a1 move.l %a1,48(%sp) move.l (%sp)+,%d2 @@ -646,158 +743,195 @@ cancel: .type module_tick, @function module_tick: move.l phase,%d0 - moveq #2,%d1 + moveq #5,%d1 lea (-72,%sp),%sp - movem.l #19460,(%sp) + movem.l #19468,(%sp) cmp.l %d0,%d1 - jne .L86 + jne .L98 + tst.l -2147457608 + jeq .L99 mvz.b arm+6,%d0 + pea 1.w + moveq #2,%d2 + move.l #49168,-(%sp) + move.l %d0,-(%sp) + jsr 1073762680 + move.l %d2,phase + lea (12,%sp),%sp + moveq #1,%d0 + move.l %d0,1187497772 +.L99: + mvz.b arm+6,%d0 + moveq #24,%d2 + move.l -2147457608,%d1 mulu.w #168,%d0 + tst.l %d1 + sne %d1 move.l %d0,%a0 add.l #-2147464743,%a0 - tst.b (%a0) - jeq .L87 - moveq #3,%d0 - moveq #1,%d1 - move.l %d0,phase - move.l %d1,1187497772 -.L87: move.l phase,%d0 - moveq #24,%d1 - movem.l (%sp),#19460 - lsl.l %d1,%d0 - mvz.b arm+7,%d1 - move.l 76(%sp),%a0 - swap %d1 - clr.w %d1 + lsl.l %d2,%d0 + mvz.b arm+7,%d2 + mvs.b %d1,%d1 + swap %d2 + clr.w %d2 + neg.l %d1 or.l undo_ready,%d0 + or.l %d2,%d0 + moveq #9,%d2 + lsl.l %d2,%d1 + movem.l (%sp),#19468 + or.l %d1,%d0 + tst.b (%a0) + sne %d1 + move.l 76(%sp),%a0 + mvs.b %d1,%d1 + neg.l %d1 + lsl.l #8,%d1 or.l %d1,%d0 move.l %d0,(%a0) lea (72,%sp),%sp rts -.L86: +.L98: + moveq #2,%d1 + cmp.l %d0,%d1 + jne .L100 + mvz.b arm+6,%d0 + mulu.w #168,%d0 + move.l %d0,%a0 + add.l #-2147464743,%a0 + tst.b (%a0) + jeq .L99 + moveq #3,%d2 + moveq #1,%d0 + move.l %d2,phase + move.l %d0,1187497772 + jra .L99 +.L100: moveq #3,%d1 cmp.l %d0,%d1 - jne .L88 + jne .L101 tst.l -2147457608 - jne .L89 + jne .L102 pea .LC4 -.L107: +.L127: jsr cancel addq.l #4,%sp - jra .L87 -.L89: - move.b arm+6,%d0 + jra .L99 +.L102: + move.b arm+6,%d2 lea arm,%a3 - mvz.b %d0,%d1 - move.w %d0,%a2 - move.w %d1,%d0 - move.l %d1,%a6 + mvz.b %d2,%d0 + move.w %d2,%a2 + move.l %d0,%a6 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jne .L87 + jne .L99 move.l %sp,%d2 add.l #40,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L90 + jeq .L103 move.l %a3,-(%sp) move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L91 -.L90: + jne .L104 +.L103: pea .LC5 - jra .L107 -.L91: + jra .L127 +.L104: move.l %a6,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 tst.l (%a0) - jne .L93 + jne .L106 pea .LC6 - jra .L107 -.L93: + jra .L127 +.L106: mvz.b arm+5,%d0 move.l (%a3),%a0 add.l #585088,%a0 lea copy,%a3 mulu.w #6322,%d0 add.l %d0,%a0 - move.b 34(%a6,%a0.l),%d0 - move.b %d0,19(%sp) + mvz.b 34(%a6,%a0.l),%d2 pea 6322.w move.l %a0,-(%sp) pea part_buf jsr (%a3) pea 20.w pea arm+12 - move.l %sp,%d2 - add.l #40,%d2 - move.l %d2,-(%sp) + move.l %sp,%d3 + add.l #40,%d3 + move.l %d3,-(%sp) jsr (%a3) - moveq #1,%d0 - clr.w %d1 - move.b %d0,46(%sp) + clr.w %d0 + moveq #1,%d1 + move.w %d0,44(%sp) move.l %a2,%d0 add.l #-128,%d0 - move.w %d1,44(%sp) + move.b %d1,46(%sp) move.b %d0,48(%sp) move.l %a6,-(%sp) - move.l %d2,-(%sp) + move.l %d3,-(%sp) jsr (write_slice.constprop.0) mvz.b arm+5,%d0 lea (32,%sp),%sp move.l %d0,-(%sp) pea part_buf jsr 1073912396 - mvz.b 27(%sp),%d0 - move.l %d0,-(%sp) + addq.l #8,%sp + moveq #1,%d0 + cmp.l %d2,%d0 + jeq .L107 mvz.b arm+5,%d0 + move.l %d2,-(%sp) move.l %a6,-(%sp) move.l %d0,-(%sp) jsr 1074361084 - lea (20,%sp),%sp + lea (12,%sp),%sp +.L107: clr.l %d0 lea record_new,%a0 lea record_copy,%a1 -.L94: +.L108: lea (%a1,%d0.l),%a2 move.b (%a2),(%a0,%d0.l) addq.l #1,%d0 cmp.l #2330,%d0 - jne .L94 + jne .L108 clr.l %d0 -.L95: +.L109: clr.b %d1 + moveq #64,%d2 move.b %d1,(%a0,%d0.l) addq.l #1,%d0 - moveq #64,%d1 - cmp.l %d0,%d1 - jne .L95 + cmp.l %d0,%d2 + jne .L109 moveq #1,%d0 lea record_new+89,%a0 move.b %d0,record_new+7 clr.l %d0 -.L96: +.L110: st %d1 addq.l #1,%d0 move.b %d1,-1(%a0,%d0.l) cmp.l #2048,%d0 - jne .L96 + jne .L110 pea record_new pea arm jsr write_record + move.l %a6,%d2 addq.l #8,%sp - move.l %a6,%d1 moveq #1,%d0 - lsl.l %d1,%d0 + lsl.l %d2,%d0 move.b arm+7,%d1 not.l %d0 and.l %d1,%d0 @@ -805,11 +939,11 @@ module_tick: lsl.l #8,%d0 or.l arm+8,%d0 cmp.l -2147483640.l,%d0 - jeq .L97 + jeq .L111 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L97: +.L111: pea 32.w pea arm pea last @@ -819,19 +953,19 @@ module_tick: move.l %d0,undo_ready jsr show lea (16,%sp),%sp - jra .L87 -.L88: + jra .L99 +.L101: subq.l #4,%d0 tst.l %d0 - jne .L87 + jne .L99 move.l shown_ticks,%d0 addq.l #1,%d0 move.l %d0,shown_ticks - moveq #90,%d1 - cmp.l %d0,%d1 - jcc .L87 + moveq #90,%d2 + cmp.l %d0,%d2 + jcc .L99 jsr close_view - jra .L87 + jra .L99 .size module_tick, .-module_tick .section .rodata.str1.1 .LC8: @@ -841,25 +975,27 @@ module_tick: .LC10: .string "RECORDER BUSY" .LC11: + .string "MODWERK MACHINE: SET FLEX" +.LC12: .string "BOUNCE CANCELLED" .text .align 2 .globl module_key .type module_key, @function module_key: - lea (-76,%sp),%sp + lea (-72,%sp),%sp moveq #63,%d1 - movem.l #31868,(%sp) - move.l 80(%sp),%d4 - move.l 84(%sp),%d0 - cmp.l %d4,%d1 - jcs .L109 - moveq #31,%d1 + movem.l #23676,(%sp) + move.l 76(%sp),%d4 + move.l 80(%sp),%d0 cmp.l %d4,%d1 - jlt .L110 + jcs .L129 + moveq #31,%d2 + cmp.l %d4,%d2 + jlt .L130 move.l consumed_lo,%d1 lea consumed_lo,%a2 -.L111: +.L131: moveq #31,%d2 moveq #1,%d3 and.l %d4,%d2 @@ -867,124 +1003,157 @@ module_key: move.l %d1,%d2 and.l %d3,%d2 tst.l %d0 - jne .L112 + jne .L132 tst.l %d2 - jeq .L113 + jeq .L133 not.l %d3 and.l %d1,%d3 move.l %d3,(%a2) -.L114: +.L134: moveq #1,%d0 -.L113: - movem.l (%sp),#31868 - lea (76,%sp),%sp +.L133: + movem.l (%sp),#23676 + lea (72,%sp),%sp rts -.L110: +.L130: move.l consumed_hi,%d1 lea consumed_hi,%a2 - jra .L111 -.L112: + jra .L131 +.L132: tst.l %d2 - jne .L114 + jne .L134 move.l phase,%d0 tst.l %d0 - jne .L116 - moveq #41,%d0 - cmp.l %d4,%d0 - jne .L109 + jne .L136 + moveq #41,%d5 + cmp.l %d4,%d5 + jne .L129 move.b 1175456540,%d0 btst #0,%d0 - jeq .L109 + jeq .L129 jsr open_select -.L117: +.L137: or.l %d3,(%a2) - jra .L114 -.L116: + jra .L134 +.L136: moveq #1,%d1 cmp.l %d0,%d1 - jne .L118 - moveq #7,%d1 - cmp.l %d4,%d1 - jlt .L119 + jne .L138 + moveq #7,%d2 + cmp.l %d4,%d2 + jlt .L139 mvz.b arm+6,%d1 cmp.l %d4,%d1 - jeq .L120 + jeq .L140 move.b arm+7,%d1 lsl.l %d4,%d0 eor.l %d1,%d0 move.b %d0,arm+7 -.L120: - moveq #1,%d0 - move.l %d0,1187497772 - jra .L117 -.L119: - moveq #49,%d1 - cmp.l %d4,%d1 - jne .L121 +.L140: + moveq #1,%d5 + move.l %d5,1187497772 + jra .L137 +.L139: + moveq #49,%d0 + cmp.l %d4,%d0 + jne .L141 move.l %sp,%d2 - add.l #44,%d2 + add.l #40,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L122 + jeq .L142 pea arm move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L122 + jeq .L142 move.b arm+6,%d4 - mvz.b 50(%sp),%d0 + mvz.b 46(%sp),%d0 mvz.b %d4,%d2 cmp.l %d0,%d2 - jeq .L123 -.L122: + jeq .L143 +.L142: pea .LC8 -.L144: +.L169: jsr show -.L145: +.L170: addq.l #4,%sp - jra .L117 -.L123: + jra .L137 +.L143: jsr (pass_steps.constprop.0) move.l %d0,%d6 tst.l %d0 - jne .L125 + jne .L145 pea .LC9 - jra .L144 -.L125: + jra .L169 +.L145: move.w %d2,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L126 + jeq .L146 pea .LC10 - jra .L144 -.L126: - move.b arm+7,%d0 - lea arm,%a5 - moveq #1,%d5 - move.l (%a5),%a3 - move.l #-2147483640,%a0 - add.l #585088,%a3 - move.l (%a0),arm+8 - lea copy,%a4 - subq.l #1,%d6 - lsl.l %d2,%d5 - move.b %d0,43(%sp) + jra .L169 +.L146: mvz.b arm+5,%d0 + lea arm,%a1 + move.l (%a1),%a3 + add.l #585088,%a3 mulu.w #6322,%d0 - mvz.b %d5,%d5 add.l %d0,%a3 + move.w %d2,%d0 + mulu.w #30,%d0 + lea (%a3,%d0.l),%a0 + move.b 60(%a0),%d5 + move.b 61(%a0),%d0 + move.b 62(%a0),%d1 + mvz.b %d5,%d5 + move.l %d5,%a0 + moveq #25,%d5 + lea (-65,%a0),%a0 + cmp.l %a0,%d5 + jcs .L147 + mvz.b %d0,%d0 + move.l %d0,%a0 + lea (-65,%a0),%a0 + cmp.l %a0,%d5 + jcc .L148 + add.l #-48,%d0 + moveq #9,%d5 + cmp.l %d0,%d5 + jcs .L147 +.L148: + subq.l #1,%d1 + mvz.b %d1,%d1 + moveq #8,%d0 + cmp.l %d1,%d0 + jcs .L147 + mvz.b 34(%a3,%d2.l),%d0 + subq.l #1,%d0 + tst.l %d0 + jne .L147 + pea .LC11 + jra .L169 +.L147: + move.l #-2147483640,%a0 + subq.l #1,%d6 + move.l (%a0),arm+8 lea (%a3,%d2.l),%a0 move.b (%a0),arm+12 move.w %d2,%d0 lea (8,%a0),%a1 + move.b arm+7,%d5 lea (34,%a0),%a0 + lea copy,%a4 move.b (%a1),arm+13 mulu.w #5,%d0 + move.b %d5,39(%sp) + moveq #1,%d5 + lsl.l %d2,%d5 move.b (%a0),arm+14 move.l %d0,%a0 pea 5.w @@ -992,21 +1161,18 @@ module_key: pea (%a0,%a3.l) pea arm+15 jsr (%a4) - move.w %d2,%d0 + move.w %d2,%d1 pea 12.w - mulu.w #12,%d0 - move.l %d0,%a6 + mvz.b %d5,%d5 + mulu.w #12,%d1 + move.l %d1,%a6 lea (1538,%a6),%a6 pea (%a6,%a3.l) pea arm+20 jsr (%a4) - mvz.b arm+4,%d0 - pea 2330.w - mvz.b arm+6,%d1 - mulu.w #36568,%d0 - mulu.w #2330,%d1 - add.l %d1,%d0 - add.l (%a5),%d0 + pea arm + jsr record_at + move.l #2330,(%sp) move.l %d0,-(%sp) pea record_copy jsr (%a4) @@ -1018,12 +1184,12 @@ module_key: add.l #part_buf,%a6 lea (12,%sp),%sp move.b %d6,2(%a6) - mvz.b 43(%sp),%d6 + mvz.b 39(%sp),%d6 clr.w (%a6) cmp.l %d6,%d5 - jne .L131 + jne .L155 addq.l #1,%d4 -.L127: +.L149: clr.b %d0 move.b %d4,4(%a6) move.b %d0,9(%a6) @@ -1033,7 +1199,7 @@ module_key: jsr 1073912396 addq.l #8,%sp cmp.l %d6,%d5 - jeq .L128 + jeq .L150 mvz.b arm+7,%d0 move.l arm+8,%d1 swap %d0 @@ -1043,55 +1209,66 @@ module_key: move.l %d1,-(%sp) jsr set_mutes addq.l #4,%sp -.L128: +.L150: move.l %d2,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 clr.l (%a0) + tst.l -2147457608 + jeq .L156 pea 1.w move.l #49168,-(%sp) move.l %d2,-(%sp) jsr 1073762680 lea (12,%sp),%sp moveq #2,%d0 - moveq #1,%d1 +.L151: move.l %d0,phase - move.l %d1,1187497772 - jra .L117 -.L131: + moveq #1,%d0 + move.l %d0,1187497772 + jra .L137 +.L155: moveq #10,%d4 - jra .L127 -.L121: + jra .L149 +.L156: + moveq #5,%d0 + jra .L151 +.L141: lea close_view,%a0 - moveq #50,%d0 - cmp.l %d4,%d0 - jne .L129 + moveq #50,%d1 + cmp.l %d4,%d1 + jne .L152 jsr (%a0) - jra .L117 -.L129: + jra .L137 +.L152: jsr (%a0) -.L109: +.L129: clr.l %d0 - jra .L113 -.L118: - subq.l #2,%d0 - lsr.l #1,%d0 - jne .L130 + jra .L133 +.L138: + move.l %d0,%d1 + subq.l #2,%d1 + lsr.l #1,%d1 + jeq .L153 + subq.l #5,%d0 + tst.l %d0 + jne .L154 +.L153: moveq #50,%d0 cmp.l %d4,%d0 - jne .L109 - pea .LC11 + jne .L129 + pea .LC12 jsr cancel - jra .L145 -.L130: + jra .L170 +.L154: jsr close_view move.l %d4,%a6 lea (-49,%a6),%a6 moveq #1,%d1 cmp.l %a6,%d1 - jcc .L117 - jra .L109 + jcc .L137 + jra .L129 .size module_key, .-module_key .align 2 .globl module_enc @@ -1105,27 +1282,29 @@ module_enc: rts .size module_enc, .-module_enc .section .rodata.str1.1 -.LC12: - .string "BOUNCE" .LC13: - .string "" + .string "BOUNCE" .LC14: - .string "WAITS FOR PATTERN START" + .string "" .LC15: .string "RECORDING ONE PASS" .LC16: - .string "BOUNCE T" + .string "PRESS PLAY" .LC17: - .string "PASS " + .string "WAITS FOR PATTERN START" .LC18: - .string " STEPS" + .string "BOUNCE T" .LC19: - .string "OVER 64 STEPS" + .string "PASS " .LC20: - .string "TRIG 1-8: MERGE" + .string " STEPS" .LC21: - .string "YES: REC NO: CLOSE" + .string "OVER 64 STEPS" .LC22: + .string "TRIG 1-8: MERGE" +.LC23: + .string "YES: REC NO: CLOSE" +.LC24: .string "NO: CANCEL" .text .align 2 @@ -1137,9 +1316,9 @@ module_draw: move.l phase,%d3 move.l 80(%sp),%a6 tst.l %d3 - jeq .L147 + jeq .L172 tst.l %a6 - jeq .L147 + jeq .L172 clr.l -(%sp) pea 44.w pea 116.w @@ -1182,7 +1361,7 @@ module_draw: lea append,%a3 clr.b %d0 move.b %d0,64(%sp) - pea .LC16 + pea .LC18 move.l %sp,%d2 add.l #68,%d2 move.l %d2,-(%sp) @@ -1194,9 +1373,9 @@ module_draw: move.b %d1,81(%sp) lea (32,%sp),%sp tst.l %d3 - jeq .L165 + jeq .L190 move.l %d2,%d0 -.L149: +.L174: move.l %d0,-(%sp) moveq #1,%d3 pea 13.w @@ -1206,9 +1385,9 @@ module_draw: jsr (%a2) lea (16,%sp),%sp moveq #63,%d1 -.L150: +.L175: moveq #12,%d0 -.L151: +.L176: moveq #7,%d4 moveq #19,%d6 and.l %d0,%d4 @@ -1224,39 +1403,39 @@ module_draw: eor.l %d4,%d2 move.b %d2,(%a0) cmp.l %d0,%d6 - jne .L151 + jne .L176 addq.l #8,%d1 cmp.l #975,%d1 - jne .L150 + jne .L175 moveq #4,%d7 cmp.l phase.l,%d7 - jne .L166 + jne .L191 move.l message,%d0 tst.l %d0 - jne .L154 - move.l #.LC13,%d0 -.L154: + jne .L179 + move.l #.LC14,%d0 +.L179: move.l %d0,-(%sp) pea 27.w -.L181: +.L207: pea 10.w move.l %a6,-(%sp) jsr (%a2) lea (16,%sp),%sp -.L147: +.L172: movem.l (%sp),#23804 lea (76,%sp),%sp rts -.L165: - move.l #.LC12,%d0 - jra .L149 -.L166: +.L190: + move.l #.LC13,%d0 + jra .L174 +.L191: move.w #9,%a4 move.l %sp,%d2 clr.l %d4 add.l #52,%d2 moveq #1,%d3 -.L153: +.L178: moveq #84,%d0 clr.b %d1 move.b %d0,52(%sp) @@ -1272,44 +1451,44 @@ module_draw: mvz.b arm+7,%d0 lea (16,%sp),%sp btst %d4,%d0 - jne .L155 -.L159: + jne .L180 +.L184: addq.l #1,%d4 lea (14,%a4),%a4 moveq #8,%d6 cmp.l %d4,%d6 - jne .L153 + jne .L178 move.l phase,%d0 moveq #1,%d7 cmp.l %d0,%d7 - jne .L160 + jne .L185 clr.b %d0 move.b %d0,52(%sp) - pea .LC17 + pea .LC19 move.l %d2,-(%sp) jsr (%a3) jsr (pass_steps.constprop.0) addq.l #8,%sp tst.l %d0 - jeq .L161 + jeq .L186 moveq #9,%d1 cmp.l %d0,%d1 - jcc .L168 + jcc .L193 move.l %d0,%d1 moveq #10,%d4 divu.l %d4,%d1 lea (58,%sp),%a0 add.l #48,%d1 move.b %d1,57(%sp) -.L162: +.L187: moveq #10,%d6 remu.l %d6,%d1:%d0 clr.b %d7 add.l #48,%d1 move.b %d1,(%a0) move.b %d7,1(%a0) - pea .LC18 -.L180: + pea .LC20 +.L206: move.l %d2,-(%sp) jsr (%a3) addq.l #4,%sp @@ -1318,26 +1497,26 @@ module_draw: pea 10.w move.l %a6,-(%sp) jsr (%a2) - pea .LC20 + pea .LC22 pea 38.w pea 10.w move.l %a6,-(%sp) jsr (%a2) lea (28,%sp),%sp - move.l #.LC21,(%sp) + move.l #.LC23,(%sp) pea 45.w - jra .L181 -.L155: + jra .L207 +.L180: mvz.w %a4,%d0 moveq #13,%d1 lsl.l #3,%d0 addq.l #7,%d0 -.L157: +.L182: subq.l #1,%d1 tst.l %d1 - jeq .L159 + jeq .L184 moveq #21,%d5 -.L158: +.L183: move.l %d5,%d6 lsr.l #3,%d6 move.l %d0,%a0 @@ -1353,36 +1532,42 @@ module_draw: move.b %d6,(%a0) moveq #28,%d6 cmp.l %d5,%d6 - jne .L158 + jne .L183 addq.l #8,%d0 - jra .L157 -.L168: + jra .L182 +.L193: lea (57,%sp),%a0 - jra .L162 -.L161: - pea .LC19 - jra .L180 -.L160: + jra .L187 +.L186: + pea .LC21 + jra .L206 +.L185: + moveq #5,%d1 + cmp.l %d0,%d1 + jeq .L194 subq.l #2,%d0 tst.l %d0 - jne .L169 - move.l #.LC14,%d0 -.L164: + jne .L195 + move.l #.LC17,%d0 +.L189: move.l %d0,-(%sp) pea 31.w pea 10.w move.l %a6,-(%sp) jsr (%a2) - pea .LC22 + pea .LC24 pea 45.w pea 10.w move.l %a6,-(%sp) jsr (%a2) lea (32,%sp),%sp - jra .L147 -.L169: + jra .L172 +.L194: + move.l #.LC16,%d0 + jra .L189 +.L195: move.l #.LC15,%d0 - jra .L164 + jra .L189 .size module_draw, .-module_draw .section .rodata .type ticks.0, @object @@ -1396,23 +1581,23 @@ ticks.0: .size bounce_part_menu, 24 bounce_part_menu: .long 1 - .long .LC12 + .long .LC13 .long 2 .long bounce_actions .long bounce_choose .long 0 .section .rodata.str1.1 -.LC23: +.LC25: .string "BOUNCE TRACK" -.LC24: +.LC26: .string "UNDO BOUNCE" .section .rodata .align 2 .type bounce_actions, @object .size bounce_actions, 8 bounce_actions: - .long .LC23 - .long .LC24 + .long .LC25 + .long .LC26 .local part_buf .comm part_buf,6322,1 .local record_new From a865af22e75ba7cc9a5a1d7abcf49916277af252 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Wed, 2 Dec 2026 21:39:02 +0100 Subject: [PATCH 08/43] Bounce: 0.1.1 merges three tracks on the unit Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/TESTING.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 14734a0067..4af850ffe2 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -85,6 +85,15 @@ Read and not yet checked by a run, each needed by the prototype: stock's track w Fixed in 0.1.1, not yet run: the pattern record is written directly (working and battery-backed copies, as Pattern Sample Locks does), a Modwerk machine track is refused (MODWERK MACHINE: SET FLEX), the machine transition runs only when the machine byte changes, and YES while stopped waits for PLAY. Open: whether the restart was a power cycle or caused by UNDO. +**2 December 2026, prototype 0.1.1 on the same MKII**, same base and kept set, a RAM trial never kept, in the developer's own project after a SAVE. Readout phases and the developer's report: + +| Step | Seen | +| --- | --- | +| T2 active, trig keys 3 and 4 merged, YES while stopped | PRESS PLAY; PLAY armed it; the take ran about one second (readout); BOUNCED | +| The result | the three tracks bounced together into T2, which played the take as FLEX ("it worked fine"); the pass was one track's pattern length, not the longest of the three | +| T1 on Grain, YES | MODWERK MACHINE: SET FLEX, nothing changed | +| UNDO BOUNCE | not tried in this run | + ## Stock flows Not tested. To compare with and without the module: REC alone (grid recording), TRACK + REC1/2/3 sampling, recorder trigs and RLEN, CUE routing and Studio mode, Part Edit's stock rows, Part Reload and Save, project save and reload, stock track mute. From 11ef613576ca3bbfa5789a006aeb95c8a878bd64 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Wed, 2 Dec 2026 21:52:15 +0100 Subject: [PATCH 09/43] Bounce 0.2.0: merge where lengths meet, bounce Grain and synth tracks, clip AMP, RESET TRACK Merged tracks record until their passes meet (longest past 64 steps); a Modwerk machine track is bounced as it sounds and finished once FLEX is picked in the chooser; the bounced track gets stock's AMP, FLEX settings and no LFO depth; FUNC+PART > BOUNCE > RESET TRACK makes a fresh STATIC track. UNDO covers both. Built, not yet run. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/README.md | 13 +- sdk/drafts/bounce/TESTING.md | 13 + sdk/drafts/bounce/bounce.c | 277 ++- sdk/drafts/bounce/octamod.module.json | 2 +- sdk/drafts/bounce/unit.s | 2293 ++++++++++++++++--------- 5 files changed, 1677 insertions(+), 921 deletions(-) diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index e50121ebdf..dcb343c01b 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -4,7 +4,7 @@ Version 0.1.0 · by @seniorspiz · a draft: the design below is agreed, no code ## Overview -Bounce records a track in place, the way bounce or freeze works in a DAW, without setting up the recorder's buffer, length and trigs by hand. It records the active track, and any other tracks you merge in, for exactly one pattern length (in per-track mode, the active track's own length), with their effects. When the take ends, the active track becomes a Flex machine playing the take: its FX are off, its old trigs and locks are replaced by one trig on step 1, and the take is saved as a WAV in the project, so the project saves and reloads unchanged. The other merged tracks are muted with stock's own mute. UNDO BOUNCE brings everything back until the next power cycle or project change. +Bounce records a track in place, the way bounce or freeze works in a DAW, without setting up the recorder's buffer, length and trigs by hand. It records the active track, and any other tracks you merge in, for exactly one pattern length (in per-track mode, the track's own length; merged tracks of different lengths, until their lengths meet), with their effects. When the take ends, the active track becomes a Flex machine playing the take: its FX are off, its AMP is stock's (HOLD and REL full, VOL and BAL centred), its LFOs no longer move it, its old trigs and locks are replaced by one trig on step 1, and the take is saved as a WAV in the project, so the project saves and reloads unchanged. The other merged tracks are muted with stock's own mute. A Grain or synth track is bounced as it sounds, so its CPU is free once it plays the take as Flex. RESET TRACK turns any track back into a plain STATIC track. UNDO brings back what the last bounce or reset changed, until the next power cycle or project change. Category: **system**. It rewrites a track's Part and pattern when the musician asks, and uses no effect slot, DSP code or knob. @@ -17,7 +17,9 @@ Category: **system**. It rewrites a track's Part and pattern when the musician a | Trig keys 1-8, while BOUNCE is open | Add or remove T1-T8 from the merge. The active track always stays in. Stock TRACK keys keep working as stock, so BOUNCE sits beside Track Solo. | | YES, while BOUNCE is open | Arms the take: it starts on the next step 1. | | NO, while BOUNCE is open | Closes BOUNCE and changes nothing; cancels an armed take that has not started. | -| FUNC+PART > BOUNCE > UNDO BOUNCE | Restores the last bounce's track machine, FX, trigs, locks and the merged tracks' mutes. | +| FUNC+PART > BOUNCE > RESET TRACK | Asks first, then makes the active track a STATIC track with a fresh project's settings (FX1 FILTER, FX2 DELAY, stock AMP, LFO, playback and recorder setup, its own slots), no trigs and no locks. Its length and scale stay. A Grain or synth track: pick STATIC in the machine chooser first. | +| After bouncing a Grain or synth track | The take is in, and the bottom line reads BOUNCED: T*n* PICK FLEX. Pick FLEX for that track in the machine chooser: Bounce then makes it play the take. Until then the machine plays on unchanged. | +| FUNC+PART > BOUNCE > UNDO | Restores the last bounce's or reset's track: machine, FX, every page, slots, trigs, locks, and the merged tracks' mutes. | While BOUNCE is open, trig keys 1-8 show the merge: the active track's trig key blinks, merged tracks' are fully lit, the others dim. Where a model's trig keys carry a colour channel, the active track also uses it. Closing BOUNCE gives the trig lamps back to stock. @@ -30,7 +32,7 @@ BOUNCE shows `READY`, `ARMED`, `REC`, `SAVING`, `DONE` or the reason it refuses, 1. Select T1 with its TRACK key. Hold DOWN and press REC: BOUNCE opens and T1's lamp blinks. 2. Press trig key 2: it lights fully, so T2 is merged into T1's take. Press YES: BOUNCE reads ARMED. 3. Play the pattern. On step 1 BOUNCE reads REC, and after one pattern SAVING, then DONE. T1 now plays the take on a Flex machine with one trig, and T2 is muted. -4. To go back, FUNC+PART > BOUNCE > UNDO BOUNCE. +4. To go back, FUNC+PART > BOUNCE > UNDO. ## How it works @@ -58,14 +60,15 @@ It answers `ev_in_use` so it rests while nothing is armed, and contributes its B - Seen in the emulator (TESTING.md): CUE and SRC3 = the track both carry a track after its FX. The pattern's trig and lock layout is mapped. Still open: the same on a unit, Studio mode cue, and whether a take follows the track's LEVEL. - Not tested on any unit or emulator. -### What the 0.1.0 prototype does and does not do yet +### What the 0.2.0 prototype does and does not do yet The code in `bounce.c` builds (`npm run module:dev -- bounce --build-only`) and has not run anywhere. Against the design above it still lacks: - **The WAV.** The take stays in the track's recorder buffer, so it is lost at a power cycle and a project reload does not bring it back. Saving it to the project is the next piece. - **Passes over 64 master steps.** RLEN counts at most 64 master 16ths (4 bars at 1X), so a longer pass is refused with PASS OVER 64 STEPS. - **Trig key lamps.** The merge is shown in the BOUNCE window (merged tracks inverted), not yet on the trig keys. -- **Modwerk machines.** A track running Grain, POLY8 or another Modwerk machine is refused as the destination: only the base can switch a track off one. Set it to FLEX first. +- **Modwerk machines.** A Grain or synth track is bounced as it sounds; only the machine chooser switches a track off one (the base runs the machine's own leave), so you pick FLEX there yourself after the take, and STATIC before RESET TRACK. +- **Merged lengths.** The take runs until the merged tracks' passes meet (2 bars and 3 bars: 6 bars). Past 64 master steps it takes the longest pass instead, and the window reads PASS *n* (LONGEST). In PER TRACK mode the bounced track's length becomes the take's, at 1X. - **The MASTER TRACK check.** T8 is not refused yet while MASTER TRACK is on. - **PER TRACK mode.** The pass length is the track's own, but QREC PLEN starts the take at the master pattern's start (inferred). - **Cue levels.** A merged track records at its CUE level; one at 0 is silent in the take. diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 4af850ffe2..a341f09156 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -94,6 +94,19 @@ Fixed in 0.1.1, not yet run: the pattern record is written directly (working and | T1 on Grain, YES | MODWERK MACHINE: SET FLEX, nothing changed | | UNDO BOUNCE | not tried in this run | +The trial's verdict at 900 s was FAIL: the base's frame guard had skipped 16,749 renders on T1, the Grain track, during the trial, so `module:dev` rolled it back. Bounce has no render or frame hook; the skips are T1's machine over the frame on this project (the reason the developer wants to bounce it). Not checked: whether they were there before the trial. + +## The 0.2.0 prototype + +**2 December 2026.** Built (`generate.py`), `npm run module:doctor -- --draft bounce` experimental lines green. Not yet run. New, from the developer's report on 0.1.1: + +- the merge length where the tracks' passes meet, else the longest; +- Grain and synth tracks bounced as they sound, then PICK FLEX in the chooser; +- the bounced track's AMP set to stock's values, its LFO depths to 0 and its FLEX page and setup to stock's, so the take plays as recorded; +- RESET TRACK (FUNC+PART > BOUNCE), with a confirmation, to a fresh project's STATIC track. Its values are those of a fresh project created by OS 1.40C, the same for every track: read from the fresh project in octabam's tree, not from the OS image. + +To run on the unit: a merge of tracks with different per-track lengths; a Grain track bounced, then FLEX picked; AMP and LFO after a bounce; RESET TRACK on a FLEX track and on a Grain track (refused); UNDO after each. + ## Stock flows Not tested. To compare with and without the module: REC alone (grid recording), TRACK + REC1/2/3 sampling, recorder trigs and RLEN, CUE routing and Studio mode, Part Edit's stock rows, Part Reload and Save, project save and reload, stock track mute. diff --git a/sdk/drafts/bounce/bounce.c b/sdk/drafts/bounce/bounce.c index c42e2a0c82..0839803279 100644 --- a/sdk/drafts/bounce/bounce.c +++ b/sdk/drafts/bounce/bounce.c @@ -3,17 +3,22 @@ * * Bounce, OS 1.40C: record tracks for one pattern pass into the active track's * recorder buffer, then make that track a Flex machine playing the take. - * Prototype 0.1.1: the first build ran on one MKII (TESTING.md); this one has not yet. + * Prototype 0.2.0: 0.1.1 ran on one MKII (TESTING.md); this one has not yet. * * DOWN+REC (or FUNC+PART > BOUNCE > BOUNCE TRACK) opens BOUNCE. Trig keys 1-8 * add or remove tracks to merge; YES arms; NO closes or cancels. * Arm: the recorder takes the track itself (SRC3 = the track) or, when tracks * are merged, CUE with exactly those tracks cued; RLEN is one pass in master - * 16ths and QREC is PLEN, so stock starts the take on the next pattern start - * and ends it by itself. Done: the Part gets FLEX on the track's own buffer, - * FX1/FX2 none and its recorder setup back; the pattern record gets one trig - * on step 1 and no locks; merged tracks are muted. UNDO BOUNCE puts the Part - * bytes, the whole pattern record and the mutes back from Bounce's own copy. + * 16ths (merged tracks: where their lengths meet, else the longest) and QREC + * is PLEN, so stock starts the take on the next pattern start and ends it by + * itself. Done: the Part gets FLEX on the track's own buffer with stock's FLEX, + * AMP and no-LFO settings, FX1/FX2 none and its recorder setup back; the + * pattern record gets one trig on step 1 and no locks; merged tracks are muted. + * A Modwerk machine track (Grain, a synth) is bounced as it sounds; then the + * player picks FLEX in the chooser, so the machine leaves through the base, + * and Bounce finishes. RESET TRACK makes a track a stock STATIC track with a + * fresh project's settings, no trigs and no locks. UNDO puts the track's Part + * bytes, its pattern record and the mutes back from Bounce's own copy. * * Every write goes through stock's own routines where one exists (Part paste, * track write, the recorder mailbox), so the battery-backed copies follow. @@ -58,7 +63,15 @@ #define P_FX1 0x00u /* + t */ #define P_FX2 0x08u #define P_MACHINE 0x22u /* + t: 0 STATIC 1 FLEX 2 THRU 3 NEIGHBOR 4 PICKUP */ +#define P_SRC 0x2au /* + 30 t: SRC pages, 6 bytes a machine (STATIC FLEX THRU NEIGHBOR PICKUP) */ +#define P_PAGES 0x11au /* + 24 t: LFO SPD1-3 DEP1-3, AMP ATK HOLD REL VOL BAL XVOL, FX1, FX2 */ +#define P_SETUP 0x1dau /* + 30 t: the machines' SETUP pages */ #define P_SLOTS 0x2cau /* + 5 t: the slot bytes, FLEX at +1 */ +#define P_PAGES2 0x2f2u /* + 30 t: LFO PMTR1-3 WAVE1-3, the other setup pages */ +#define FLEX_DEFAULTS 0x400d320cu /* stock's 12 FLEX bytes (page, then setup), as the base reads them */ +#define BANK_INDEX 0x100b14ceu /* the current bank, for stock's parameter load */ +#define RELOAD_PARAMS 0x40001f18u /* (bank, Part, track): the track's live parameters from its Part */ +#define LOADING 0x80000015u /* nonzero: not now (Grain's guard on the same call) */ #define P_REC 0x602u /* + 12 t: INAB INCD RLEN TRIG SRC3 LOOP FIN FOUT AB QREC QPL CD */ #define REC_INAB 0 #define REC_INCD 1 @@ -67,6 +80,7 @@ #define REC_QREC 9 #define SRC3_CUE 10u #define QREC_PLEN 0u +#define STATIC 0u #define FLEX 1u /* ---- stock routines ---- */ @@ -91,16 +105,38 @@ #define TAKE_WORD 0xc010u /* start, SRC3 (free-loop's take word) */ #define STOP_WORD 0x80u -enum { CLOSED, SELECT, ARMED, RECORDING, MESSAGE, WAIT_PLAY }; +enum { CLOSED, SELECT, ARMED, RECORDING, MESSAGE, WAIT_PLAY, PICK_FLEX, CONFIRM_RESET }; -struct slice { /* one track's Part bytes Bounce changes */ - uint8_t fx1, fx2, machine, slots[5], rec[12]; +/* A track's own bytes in its Part, in this order: what Bounce and RESET TRACK + * change and UNDO puts back (PARTS.md; ot_project.py, ot_spec.py). */ +static const struct { uint16_t at; uint8_t stride, n; } TRACK_BYTES[] = { + {P_FX1, 1, 1}, {P_FX2, 1, 1}, {P_MACHINE, 1, 1}, {P_SRC, 30, 30}, {P_PAGES, 24, 24}, + {P_SETUP, 30, 30}, {P_SLOTS, 5, 5}, {P_PAGES2, 30, 30}, {P_REC, 12, 12}, }; +#define RANGES (sizeof TRACK_BYTES / sizeof *TRACK_BYTES) +/* A fresh project's values for one track, in that order (every track the same + * but its slots, set in reset_track): STATIC, FX1 FILTER, FX2 DELAY. */ +static const uint8_t FRESH[134] = { + 0x04, 0x08, 0x00, + 0x40, 0x00, 0x00, 0x7f, 0x00, 0x4f, 0x40, 0x00, 0x00, 0x7f, 0x00, 0x4f, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x01, 0x7f, 0x40, 0x01, + 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x40, 0x40, 0x7f, 0x00, 0x7f, 0x00, 0x40, 0x00, 0x40, + 0x2f, 0x00, 0x7f, 0x00, 0x7f, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, + 0x00, 0x00, 0x01, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x40, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, +}; +#define AMP_AT 6u /* in P_PAGES: ATK HOLD REL VOL BAL XVOL */ +#define DEP_AT 3u /* in P_PAGES: DEP1-3 */ +static const uint8_t AMP_CLIP[6] = {0x00, 0x7f, 0x7f, 0x40, 0x40, 0x7f}; /* stock's AMP: the clip as recorded */ + struct ctx { uint32_t bank; uint8_t pattern, part, track, merged; uint32_t mutes; - struct slice part_bytes; }; static unsigned phase, consumed_lo, consumed_hi, shown_ticks; @@ -110,6 +146,7 @@ static struct ctx last; /* the last finished bounce, for UNDO */ static unsigned undo_ready; static uint8_t record_copy[TRK_BYTES]; /* the track's pattern record as it was (UNDO) */ static uint8_t record_new[TRK_BYTES]; +static uint8_t part_copy[PART_BYTES]; /* the Part as it was (UNDO; the recorder setup on cancel) */ static uint8_t part_buf[PART_BYTES]; static void call6(uint32_t fn, uint32_t a, uint32_t b, uint32_t c, uint32_t d, uint32_t e, uint32_t f) @@ -146,33 +183,56 @@ static int current(struct ctx *c) static int same_place(const struct ctx *a, const struct ctx *b) { return a->bank == b->bank && a->pattern == b->pattern && a->part == b->part; } -/* One pass of the track, in master 16ths (6 ticks), or 0 when it is not a - * whole number from 1 to 64 (RLEN's range). PER TRACK mode: the track's own - * length and scale (rlen-plen's cave reads the same pair). */ -static unsigned pass_steps(const struct ctx *c) +static unsigned per_track(const struct ctx *c) { return U8(pattern_at(c) + PAT_MODE) != 0; } +/* One pass of track t in ticks (a master 16th is 6), or 0. PER TRACK mode: the + * track's own length and scale (rlen-plen's cave reads the same pair). */ +static unsigned track_ticks(const struct ctx *c, unsigned t) { static const uint8_t ticks[7] = {3, 4, 6, 8, 12, 24, 48}; /* 2X ... 1/8X */ - uint32_t pat = pattern_at(c), rec = record_at(c); - unsigned per_track = U8(pat + PAT_MODE) != 0; - unsigned len = per_track ? U8(rec + TRK_LEN) : U8(pat + PAT_LEN); - unsigned scale = per_track ? U8(rec + TRK_SCALE) : U8(pat + PAT_SCALE); - if (scale > 6u || !len) return 0; - unsigned t = len * ticks[scale]; - if (t % 6u || t / 6u > 64u) return 0; - return t / 6u; + uint32_t pat = pattern_at(c), rec = pat + t * TRK_BYTES; + unsigned len = per_track(c) ? U8(rec + TRK_LEN) : U8(pat + PAT_LEN); + unsigned scale = per_track(c) ? U8(rec + TRK_SCALE) : U8(pat + PAT_SCALE); + return scale > 6u || !len ? 0 : len * ticks[scale]; +} +static unsigned gcd(unsigned a, unsigned b) { while (b) { unsigned r = a % b; a = b; b = r; } return a; } +/* The take, in master 16ths, 1 to 64 (RLEN's range), or 0: where the chosen + * tracks' passes meet, a whole number of 16ths. Past 64, the longest pass, + * rounded up to a 16th, and *longest says so. */ +static unsigned pass_steps(const struct ctx *c, unsigned *longest) +{ + unsigned meet = 6u, most = 0, over = 0; + *longest = 0; + for (unsigned t = 0; t < 8u; ++t) { + if (!(c->merged >> t & 1u)) continue; + unsigned x = track_ticks(c, t); + if (!x) return 0; + if (x > most) most = x; + if (!over) { meet = meet / gcd(meet, x) * x; over = meet > 64u * 6u; } + } + if (!over) return meet / 6u; + *longest = 1; + most = (most + 5u) / 6u; + return most <= 64u ? most : 0; } -static void read_slice(struct slice *s, uint32_t part, unsigned t) +/* Track t's own bytes into the Part image `to`: from a Part image (whole) or from FRESH's order. */ +static void put_track(uint8_t *to, const uint8_t *from, unsigned t, unsigned whole) { - s->fx1 = U8(part + P_FX1 + t); s->fx2 = U8(part + P_FX2 + t); s->machine = U8(part + P_MACHINE + t); - copy(s->slots, (const volatile uint8_t *)(uintptr_t)(part + P_SLOTS + 5u * t), 5); - copy(s->rec, (const volatile uint8_t *)(uintptr_t)(part + P_REC + 12u * t), 12); + unsigned k = 0; + for (unsigned r = 0; r < RANGES; ++r) { + unsigned at = TRACK_BYTES[r].at + TRACK_BYTES[r].stride * t; + for (unsigned i = 0; i < TRACK_BYTES[r].n; ++i, ++k) to[at + i] = whole ? from[at + i] : from[k]; + } } -static void write_slice(uint8_t *part, const struct slice *s, unsigned t) +/* Paste the Part image, then bring the track's machine and live parameters in + * line with it: the transition Part Reload runs when the type changed, else + * stock's parameter load (relive() in the base's machine_registry.c). */ +static void paste(const struct ctx *c, unsigned t, unsigned old) { - part[P_FX1 + t] = s->fx1; part[P_FX2 + t] = s->fx2; part[P_MACHINE + t] = s->machine; - for (unsigned i = 0; i < 5u; ++i) part[P_SLOTS + 5u * t + i] = s->slots[i]; - for (unsigned i = 0; i < 12u; ++i) part[P_REC + 12u * t + i] = s->rec[i]; + call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, c->part); + unsigned now = part_buf[P_MACHINE + t]; + if (old != now) call3(MACHINE_SET, c->part, t, old); + else if ((U8(CUR_PART) & 3u) == c->part && !U8(LOADING)) call3(RELOAD_PARAMS, U8(BANK_INDEX), c->part, t); } /* The mute and cue long and its battery-backed copy, as stock's mute stores it. */ @@ -223,8 +283,9 @@ static void write_record(const struct ctx *c, const uint8_t *src) call1(TRACK_PREP, c->track); } -/* A Modwerk machine (Grain, POLY8 ...) signs the track in the Part; only the - * base switches a track off one, so Bounce does not bounce into it yet. */ +/* A Modwerk machine (Grain, a synth ...) signs the track in the Part. Only the + * base switches a track off one (its leave clears the machine's own bytes), so + * the player picks FLEX or STATIC in the chooser and Bounce waits for it. */ static unsigned modwerk_machine(uint32_t part, unsigned t) { uint32_t s = part + P_SIG + 30u * t; @@ -241,6 +302,7 @@ static void open_select(void) { struct ctx c; if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY) return; + if (phase == PICK_FLEX) phase = CLOSED; /* the take stays in the recorder buffer, nothing else changed */ if (!current(&c)) { show("AUDIO TRACKS ONLY"); return; } copy_ctx(&arm, &c); arm.merged = (uint8_t)(1u << c.track); phase = SELECT; message = 0; redraw(); @@ -250,17 +312,17 @@ static void start(void) { struct ctx now; if (!current(&now) || !same_place(&now, &arm) || now.track != arm.track) { show("TRACK CHANGED"); return; } - unsigned t = arm.track, steps = pass_steps(&arm); + unsigned t = arm.track, longest, steps = pass_steps(&arm, &longest); unsigned merge = arm.merged != (uint8_t)(1u << t); if (!steps) { show("PASS OVER 64 STEPS"); return; } if (recording(t)) { show("RECORDER BUSY"); return; } uint32_t part = part_at(&arm); - if (modwerk_machine(part, t)) { show("MODWERK MACHINE: SET FLEX"); return; } arm.mutes = U32(MUTES); - read_slice(&arm.part_bytes, part, t); + undo_ready = 0; /* Bounce's copy now holds this track */ + copy(part_copy, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); copy(record_copy, (const volatile uint8_t *)(uintptr_t)record_at(&arm), TRK_BYTES); - copy(part_buf, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); + copy(part_buf, part_copy, PART_BYTES); uint8_t *r = part_buf + P_REC + 12u * t; r[REC_INAB] = 0; r[REC_INCD] = 0; r[REC_RLEN] = (uint8_t)(steps - 1u); r[REC_SRC3] = (uint8_t)(merge ? SRC3_CUE : t + 1u); r[REC_QREC] = QREC_PLEN; @@ -281,60 +343,132 @@ static void cancel(const char *why) if (current(&now) && same_place(&now, &arm)) { uint32_t part = part_at(&arm); copy(part_buf, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); - for (unsigned i = 0; i < 12u; ++i) part_buf[P_REC + 12u * t + i] = arm.part_bytes.rec[i]; + for (unsigned i = 0; i < 12u; ++i) part_buf[P_REC + 12u * t + i] = part_copy[P_REC + 12u * t + i]; call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, arm.part); } if (U32(MUTES) != arm.mutes) set_mutes(arm.mutes); show(why); } -static void finish(void) +/* The Part and the record of a FLEX track playing the take, from the Part as + * it is now (a machine track: after the player picked FLEX). */ +static void apply_clip(void) { - struct ctx now; - unsigned t = arm.track; - if (!current(&now) || !same_place(&now, &arm)) { cancel("PATTERN CHANGED"); return; } - if (!U32(LIMIT + 4u * t)) { cancel("TAKE INCOMPLETE"); return; } + unsigned t = arm.track, longest; uint32_t part = part_at(&arm); - unsigned old = U8(part + P_MACHINE + t); + unsigned old = U8(part + P_MACHINE + t), steps = pass_steps(&arm, &longest); copy(part_buf, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); - struct slice s; /* the recorder setup as it was */ - copy((uint8_t *)&s, (const uint8_t *)&arm.part_bytes, sizeof s); - s.machine = FLEX; s.fx1 = 0; s.fx2 = 0; s.slots[FLEX] = (uint8_t)(0x80u + t); - write_slice(part_buf, &s, t); - call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, arm.part); - if (old != FLEX) call3(MACHINE_SET, arm.part, t, old); + for (unsigned i = 0; i < 12u; ++i) part_buf[P_REC + 12u * t + i] = part_copy[P_REC + 12u * t + i]; + part_buf[P_MACHINE + t] = FLEX; part_buf[P_FX1 + t] = 0; part_buf[P_FX2 + t] = 0; + part_buf[P_SLOTS + 5u * t + FLEX] = (uint8_t)(0x80u + t); + for (unsigned k = 0; k < 12u; ++k) /* stock's FLEX page and setup */ + part_buf[(k < 6u ? P_SRC : P_SETUP) + 30u * t + 6u + k % 6u] = U8(FLEX_DEFAULTS + k); + uint8_t *pages = part_buf + P_PAGES + 24u * t; + for (unsigned k = 0; k < 3u; ++k) pages[DEP_AT + k] = 0; /* no LFO moves the clip */ + for (unsigned k = 0; k < 6u; ++k) pages[AMP_AT + k] = AMP_CLIP[k]; + paste(&arm, t, old); for (unsigned i = 0; i < TRK_BYTES; ++i) record_new[i] = record_copy[i]; for (unsigned i = 0; i < 64u; ++i) record_new[i] = 0; /* the eight step masks */ record_new[7] = 1; /* mask 0, step 1 */ for (unsigned i = 0; i < 64u * 32u; ++i) record_new[TRK_LOCKS + i] = 0xffu; + if (per_track(&arm) && steps) { record_new[TRK_LEN] = (uint8_t)steps; record_new[TRK_SCALE] = 2; } /* 1X: one pass */ write_record(&arm, record_new); uint32_t mutes = arm.mutes | ((uint32_t)(arm.merged & (uint8_t)~(1u << t)) << 8); if (U32(MUTES) != mutes) set_mutes(mutes); copy_ctx(&last, &arm); undo_ready = 1; +} + +static void finish(void) +{ + struct ctx now; + unsigned t = arm.track; + if (!current(&now) || !same_place(&now, &arm)) { cancel("PATTERN CHANGED"); return; } + if (!U32(LIMIT + 4u * t)) { cancel("TAKE INCOMPLETE"); return; } + if (modwerk_machine(part_at(&arm), t)) { /* the take is in; the machine plays on until the player picks FLEX */ + uint32_t part = part_at(&arm); + copy(part_buf, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); + for (unsigned i = 0; i < 12u; ++i) part_buf[P_REC + 12u * t + i] = part_copy[P_REC + 12u * t + i]; + call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, arm.part); + if (U32(MUTES) != arm.mutes) set_mutes(arm.mutes); + phase = PICK_FLEX; message = 0; redraw(); + return; + } + apply_clip(); show("BOUNCED"); } +/* After a machine track's take: once the player has picked FLEX for it, finish. */ +static void pick_tick(void) +{ + struct ctx now; + uint32_t part = part_at(&arm); + if (!current(&now) || !same_place(&now, &arm)) { show("TAKE LEFT IN BUFFER"); return; } + unsigned type = U8(part + P_MACHINE + arm.track); + if (type != FLEX) { show("TAKE LEFT IN BUFFER"); return; } /* the player picked another machine */ + if (!modwerk_machine(part, arm.track)) { apply_clip(); show("BOUNCED"); } +} + +/* RESET TRACK: a fresh project's STATIC track, its slots its own, no trigs or locks. */ +static void reset_track(void) +{ + struct ctx c; + if (!current(&c) || c.track != arm.track || !same_place(&c, &arm)) { show("TRACK CHANGED"); return; } + unsigned t = c.track; + uint32_t part = part_at(&c); + if (modwerk_machine(part, t)) { show("PICK STATIC FIRST"); return; } + if (recording(t)) { show("RECORDER BUSY"); return; } + c.merged = (uint8_t)(1u << t); c.mutes = U32(MUTES); + copy(part_copy, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); + copy(record_copy, (const volatile uint8_t *)(uintptr_t)record_at(&c), TRK_BYTES); + unsigned old = part_copy[P_MACHINE + t]; + copy(part_buf, part_copy, PART_BYTES); + put_track(part_buf, FRESH, t, 0); + uint8_t *slots = part_buf + P_SLOTS + 5u * t; + slots[0] = slots[1] = (uint8_t)t; slots[4] = (uint8_t)(0x80u + t); + paste(&c, t, old); + + for (unsigned i = 0; i < TRK_BYTES; ++i) record_new[i] = 0; + for (unsigned i = 0x40u; i < 0x48u; ++i) record_new[i] = 0xaau; /* a fresh pattern's mask 8 */ + record_new[TRK_LEN] = record_copy[TRK_LEN]; record_new[TRK_SCALE] = record_copy[TRK_SCALE]; + record_new[0x53] = 0xffu; + for (unsigned i = 0; i < 64u * 32u; ++i) record_new[TRK_LOCKS + i] = 0xffu; + record_new[TRK_BYTES - 1u] = record_copy[TRK_BYTES - 1u]; /* not this track's (the next record) */ + write_record(&c, record_new); + copy_ctx(&last, &c); undo_ready = 1; + show("TRACK RESET"); +} + +static void open_reset(void) +{ + struct ctx c; + if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY) return; + if (phase == PICK_FLEX) phase = CLOSED; + if (!current(&c)) { show("AUDIO TRACKS ONLY"); return; } + copy_ctx(&arm, &c); arm.merged = (uint8_t)(1u << c.track); + phase = CONFIRM_RESET; message = 0; redraw(); +} + static void undo(void) { struct ctx now; if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY) return; + if (phase == PICK_FLEX) { show("TAKE LEFT IN BUFFER"); return; } if (!undo_ready) { show("NOTHING TO UNDO"); return; } if (!current(&now) || !same_place(&now, &last)) { show("UNDO: OPEN ITS PATTERN"); return; } unsigned t = last.track; uint32_t part = part_at(&last); unsigned old = U8(part + P_MACHINE + t); copy(part_buf, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); - write_slice(part_buf, &last.part_bytes, t); - call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, last.part); - if (old != last.part_bytes.machine) call3(MACHINE_SET, last.part, t, old); + put_track(part_buf, part_copy, t, 1); /* a Modwerk machine's signature too: the base takes it as a paste */ + paste(&last, t, old); write_record(&last, record_copy); uint32_t bits = (uint32_t)last.merged << 8; uint32_t mutes = (U32(MUTES) & ~bits) | (last.mutes & bits); if (U32(MUTES) != mutes) set_mutes(mutes); undo_ready = 0; - show("BOUNCE UNDONE"); + show("UNDONE"); } /* ---- hooks ---- */ @@ -347,7 +481,8 @@ void module_tick(struct modwerk_runtime_api *api) } else if (phase == RECORDING) { if (!U32(TRANSPORT)) cancel("STOPPED - NO BOUNCE"); else if (!recording(arm.track)) finish(); - } else if (phase == MESSAGE && ++shown_ticks > 90u) close_view(); + } else if (phase == PICK_FLEX) pick_tick(); + else if (phase == MESSAGE && ++shown_ticks > 90u) close_view(); /* The readout: phase, merged tracks, transport, the track's recorder, UNDO ready. */ api->value = (uint32_t)phase << 24 | (uint32_t)arm.merged << 16 | (U32(TRANSPORT) ? 0x200u : 0) | (recording(arm.track) ? 0x100u : 0) | undo_ready; @@ -363,9 +498,13 @@ int module_key(int code, int pressed) *consumed &= ~bit; return 1; } if (*consumed & bit) return 1; - if (phase == CLOSED) { + if (phase == CLOSED || phase == PICK_FLEX) { /* PICK FLEX leaves every key to the chooser */ if (code != K_REC || !held(K_DOWN)) return 0; open_select(); + } else if (phase == CONFIRM_RESET) { + if (code == K_YES) reset_track(); + else if (code == K_NO) close_view(); + else return 0; } else if (phase == SELECT) { if (code < 8) { if ((unsigned)code != arm.track) arm.merged ^= (uint8_t)(1u << code); @@ -387,7 +526,7 @@ int module_key(int code, int pressed) int module_enc(int encoder, int delta) { (void)encoder; (void)delta; - return phase == SELECT; /* no stock edit under the open window */ + return phase == SELECT || phase == CONFIRM_RESET; /* no stock edit under the open window */ } /* ---- drawing: frame[x * 8 + 7 - y / 8], bit y % 8 (hello.c) ---- */ @@ -430,14 +569,30 @@ static void append(char *at, const char *s) void module_draw(unsigned char *frame) { if (phase == CLOSED || !frame) return; + if (phase == PICK_FLEX) { /* a strip, so the chooser stays readable */ + char line[24]; + line[0] = 0; append(line, "BOUNCED: T"); line[10] = (char)('1' + arm.track); line[11] = 0; + append(line, " PICK FLEX"); + fill(frame, 0, 56, 128, 8, 0); + text(frame, 2, 57, line); + invert(frame, 0, 56, 128, 8); + return; + } fill(frame, 6, 10, 116, 44, 0); frame_box(frame, 6, 10, 116, 44); char title[12]; title[0] = 0; append(title, "BOUNCE T"); title[8] = (char)('1' + arm.track); title[9] = 0; + if (phase == CONFIRM_RESET) { title[0] = 0; append(title, "RESET T"); title[7] = (char)('1' + arm.track); title[8] = 0; } text(frame, 10, 13, phase == MESSAGE ? "BOUNCE" : title); invert(frame, 7, 12, 114, 7); if (phase == MESSAGE) { text(frame, 10, 27, message ? message : ""); return; } + if (phase == CONFIRM_RESET) { + text(frame, 10, 24, "STOCK STATIC TRACK"); + text(frame, 10, 31, "NO TRIGS, NO LOCKS"); + text(frame, 10, 45, "YES: RESET NO: BACK"); + return; + } for (unsigned t = 0; t < 8u; ++t) { char label[3]; label[0] = 'T'; label[1] = (char)('1' + t); label[2] = 0; @@ -448,8 +603,8 @@ void module_draw(unsigned char *frame) if (phase == SELECT) { char line[24]; line[0] = 0; append(line, "PASS "); - unsigned steps = pass_steps(&arm); - if (steps) { number(line + 5, steps); append(line, " STEPS"); } + unsigned longest, steps = pass_steps(&arm, &longest); + if (steps) { number(line + 5, steps); append(line, longest ? " (LONGEST)" : " STEPS"); } else append(line, "OVER 64 STEPS"); text(frame, 10, 31, line); text(frame, 10, 38, "TRIG 1-8: MERGE"); @@ -461,6 +616,6 @@ void module_draw(unsigned char *frame) } /* ---- FUNC+PART: the base's Part Edit window (ot_part_menu) ---- */ -static const char *const bounce_actions[2] = {"BOUNCE TRACK", "UNDO BOUNCE"}; -static void bounce_choose(unsigned action) { if (action) undo(); else open_select(); } -struct modwerk_part_menu bounce_part_menu = {MODWERK_PART_MENU_ABI, "BOUNCE", 2u, bounce_actions, bounce_choose, 0}; +static const char *const bounce_actions[3] = {"BOUNCE TRACK", "RESET TRACK", "UNDO"}; +static void bounce_choose(unsigned action) { if (action == 2u) undo(); else if (action) open_reset(); else open_select(); } +struct modwerk_part_menu bounce_part_menu = {MODWERK_PART_MENU_ABI, "BOUNCE", 3u, bounce_actions, bounce_choose, 0}; diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index 836ac3a61b..03907d3cd4 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -3,7 +3,7 @@ "id": "bounce", "key": "BOUNCE", "name": "Bounce", - "version": "0.1.0", + "version": "0.2.0", "category": "system", "author": { "github": "seniorspiz", diff --git a/sdk/drafts/bounce/unit.s b/sdk/drafts/bounce/unit.s index bdea6be7dd..85820ec51e 100644 --- a/sdk/drafts/bounce/unit.s +++ b/sdk/drafts/bounce/unit.s @@ -21,18 +21,6 @@ copy: jra .L2 .size copy, .-copy .align 2 - .type record_at, @function -record_at: - move.l 4(%sp),%a0 - mvz.b 6(%a0),%d0 - mvz.b 4(%a0),%d1 - mulu.w #2330,%d0 - mulu.w #36568,%d1 - add.l %d1,%d0 - add.l (%a0),%d0 - rts - .size record_at, .-record_at - .align 2 .type current, @function current: lea (-16,%sp),%sp @@ -46,36 +34,36 @@ current: move.l %d3,%d0 add.l #-1074668000,%d0 cmp.l #9535680,%d0 - jls .L6 -.L8: + jls .L5 +.L7: clr.l %d0 -.L5: +.L4: movem.l (%sp),#60 lea (16,%sp),%sp rts -.L6: +.L5: move.l #635712,%d5 remu.l %d5,%d4:%d0 tst.l %d4 - jne .L8 + jne .L7 mvz.b %d2,%d0 lsr.l #4,%d0 - jne .L8 + jne .L7 move.w %a1,%d5 mvz.b %d5,%d0 lsr.l #2,%d0 - jne .L8 + jne .L7 mvz.b %d1,%d0 lsr.l #3,%d0 - jne .L8 + jne .L7 tst.l -2147483630 - jne .L8 + jne .L7 move.b %d2,4(%a0) move.b %d5,5(%a0) move.b %d1,6(%a0) move.l %d3,(%a0) moveq #1,%d0 - jra .L5 + jra .L4 .size current, .-current .align 2 .type same_place, @function @@ -84,16 +72,16 @@ same_place: move.l 4(%sp),%a1 move.l (%a0),%d0 cmp.l (%a1),%d0 - jeq .L10 -.L12: + jeq .L9 +.L11: clr.l %d0 -.L9: +.L8: rts -.L10: +.L9: mvz.b 4(%a1),%d1 mvz.b 4(%a0),%d0 cmp.l %d1,%d0 - jne .L12 + jne .L11 move.b 5(%a1),%d0 move.b 5(%a0),%d1 eor.l %d1,%d0 @@ -101,7 +89,7 @@ same_place: seq %d0 mvs.b %d0,%d0 neg.l %d0 - jra .L9 + jra .L8 .size same_place, .-same_place .align 2 .type write_span, @function @@ -110,13 +98,13 @@ write_span: move.l %a2,-(%sp) move.l 20(%sp),%a1 #APP -| 206 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 266 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %sr,%d0 move.w #0x2700,%sr | 0 "" 2 #NO_APP sub.l %a0,%a0 -.L14: +.L13: lea (%a1,%a0.l),%a3 move.l 12(%sp),%a2 move.b (%a3),(%a2,%a0.l) @@ -124,9 +112,9 @@ write_span: move.b (%a3),(%a2,%a0.l) addq.l #1,%a0 cmp.l 24(%sp),%a0 - jne .L14 + jne .L13 #APP -| 208 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 268 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %d0,%sr | 0 "" 2 #NO_APP @@ -135,6 +123,58 @@ write_span: rts .size write_span, .-write_span .align 2 + .type modwerk_machine, @function +modwerk_machine: + move.l %d2,-(%sp) + move.w 14(%sp),%d0 + move.l 8(%sp),%a1 + mulu.w #30,%d0 + add.l %d0,%a1 + move.b 60(%a1),%d0 + move.w %d0,%a0 + move.b 61(%a1),%d0 + move.b 62(%a1),%d1 + move.w %a0,%d2 + mvz.b %d2,%d2 + move.l %d2,%a0 + moveq #25,%d2 + lea (-65,%a0),%a0 + cmp.l %a0,%d2 + jcc .L16 +.L19: + clr.l %d0 +.L17: + move.l (%sp)+,%d2 + rts +.L16: + mvz.b %d0,%d0 + moveq #25,%d2 + move.l %d0,%a0 + lea (-65,%a0),%a0 + cmp.l %a0,%d2 + jcc .L18 + add.l #-48,%d0 + moveq #9,%d2 + cmp.l %d0,%d2 + jcs .L19 +.L18: + subq.l #1,%d1 + mvz.b %d1,%d1 + moveq #8,%d0 + cmp.l %d1,%d0 + jcs .L19 + move.l 8(%sp),%a0 + moveq #1,%d2 + move.l 12(%sp),%d1 + move.b 34(%a0,%d1.l),%d0 + eor.l %d2,%d0 + tst.b %d0 + seq %d0 + mvs.b %d0,%d0 + neg.l %d0 + jra .L17 + .size modwerk_machine, .-modwerk_machine + .align 2 .type show, @function show: lea (4,%sp),%a0 @@ -155,6 +195,60 @@ close_view: move.l %d0,1187497772 rts .size close_view, .-close_view + .section .rodata.str1.1,"aMS",@progbits,1 +.LC0: + .string "AUDIO TRACKS ONLY" + .text + .align 2 + .type open_select, @function +open_select: + move.l phase,%d0 + move.l %d0,%d1 + subq.l #2,%d1 + lsr.l #1,%d1 + lea (-12,%sp),%sp + move.l %a6,-(%sp) + move.l %d2,-(%sp) + tst.l %d1 + jeq .L22 + moveq #5,%d1 + cmp.l %d0,%d1 + jeq .L22 + subq.l #6,%d0 + tst.l %d0 + jne .L24 + clr.l phase +.L24: + lea (8,%sp),%a6 + move.l %a6,-(%sp) + jsr current + addq.l #4,%sp + tst.l %d0 + jne .L25 + pea .LC0 + jsr show + addq.l #4,%sp +.L22: + move.l (%sp)+,%d2 + move.l (%sp)+,%a6 + lea (12,%sp),%sp + rts +.L25: + pea 12.w + move.l %a6,-(%sp) + pea arm + jsr copy + clr.l message + mvz.b 26(%sp),%d1 + moveq #1,%d0 + lea (12,%sp),%sp + lsl.l %d1,%d0 + move.b %d0,arm+7 + moveq #1,%d0 + move.l %d0,phase + move.l %d0,1187497772 + jra .L22 + .size open_select, .-open_select .align 2 .type fill, @function fill: @@ -166,16 +260,16 @@ fill: move.l %d1,%d3 add.l 40(%sp),%d3 add.l 44(%sp),%d4 -.L19: +.L30: cmp.l %d3,%d1 - jcc .L18 + jcc .L29 move.l %d1,%d0 lsl.l #3,%d0 addq.l #7,%d0 move.l %d0,20(%sp) move.l 36(%sp),%d0 - jra .L24 -.L22: + jra .L35 +.L33: move.l %d0,%d2 lsr.l #3,%d2 move.l 20(%sp),%a1 @@ -190,38 +284,77 @@ fill: move.b (%a1),%d6 move.w %d6,%a0 tst.l 48(%sp) - jeq .L20 + jeq .L31 move.l %a0,%d6 or.l %d6,%d2 -.L21: +.L32: move.b %d2,(%a1) addq.l #1,%d0 -.L24: +.L35: cmp.l %d4,%d0 - jcs .L22 + jcs .L33 addq.l #1,%d1 - jra .L19 -.L20: + jra .L30 +.L31: not.l %d2 move.l %a0,%d6 and.l %d6,%d2 - jra .L21 -.L18: + jra .L32 +.L29: movem.l (%sp),#124 lea (24,%sp),%sp rts .size fill, .-fill .align 2 + .type invert, @function +invert: + lea (-20,%sp),%sp + movem.l #124,(%sp) + move.l 32(%sp),%d4 + moveq #1,%d5 + move.l 28(%sp),%a0 + move.l %a0,%d3 + add.l 36(%sp),%d3 + add.l 40(%sp),%d4 +.L37: + mvz.w %a0,%d1 + move.l 32(%sp),%d0 + lsl.l #3,%d1 + addq.l #7,%d1 +.L38: + moveq #7,%d6 + and.l %d0,%d6 + move.l %d0,%d2 + lsr.l #3,%d2 + move.l %d1,%a1 + addq.l #1,%d0 + sub.l %d2,%a1 + add.l 24(%sp),%a1 + move.l %d5,%d2 + lsl.l %d6,%d2 + move.b (%a1),%d6 + eor.l %d6,%d2 + move.b %d2,(%a1) + cmp.l %d0,%d4 + jhi .L38 + addq.l #1,%a0 + cmp.l %a0,%d3 + jhi .L37 + movem.l (%sp),#124 + lea (20,%sp),%sp + rts + .size invert, .-invert + .align 2 .type text, @function text: lea (-28,%sp),%sp move.l %sp,%a1 move.l #1074524426,%a0 move.l %sp,%d0 -.L26: +.L42: move.l (%a0)+,(%a1)+ cmp.l #1074524454,%a0 - jne .L26 + jne .L42 move.l 32(%sp),12(%sp) move.l 44(%sp),-(%sp) pea -1.w @@ -239,167 +372,257 @@ text: .type append, @function append: move.l 4(%sp),%a0 -.L29: +.L45: move.b (%a0),%d0 move.l %a0,%a1 addq.l #1,%a0 tst.b %d0 - jne .L29 + jne .L45 clr.l %d0 -.L30: +.L46: move.l 8(%sp),%a0 move.b (%a0,%d0.l),%d1 move.b %d1,(%a1,%d0.l) addq.l #1,%d0 tst.b %d1 - jne .L30 + jne .L46 rts .size append, .-append .align 2 - .type write_slice.constprop.0, @function -write_slice.constprop.0: - move.l %a2,-(%sp) - move.l %d2,-(%sp) - move.l 16(%sp),%d0 - move.l 12(%sp),%a1 - lea part_buf,%a0 - move.b (%a1),(%a0,%d0.l) - move.w %d0,%d1 - lea part_buf+8,%a0 - lea (1,%a1),%a2 - move.b (%a2),(%a0,%d0.l) - mulu.w #5,%d1 - lea part_buf+34,%a0 - lea (2,%a1),%a2 - move.b (%a2),(%a0,%d0.l) - move.l %d1,%a0 + .type put_track.constprop.0, @function +put_track.constprop.0: + lea (-20,%sp),%sp clr.l %d1 - add.l #part_buf+714,%a0 -.L34: - lea 3(%a1,%d1.l),%a2 - moveq #5,%d2 - move.b (%a2),(%a0,%d1.l) + movem.l #3100,(%sp) + lea TRACK_BYTES,%a1 + clr.l %d2 +.L54: + mvz.b 2(%a1),%d0 + mvz.w (%a1),%d3 + move.l 24(%sp),%a3 + sub.l %a0,%a0 + move.l 24(%sp),%a2 + add.l %d2,%a2 + mulu.w 30(%sp),%d0 + add.l %d3,%d0 + mvz.b 3(%a1),%d3 + add.l %d0,%a3 + add.l #part_buf,%d0 +.L50: + cmp.l %a0,%d3 + jhi .L53 + add.l %d3,%d2 addq.l #1,%d1 - cmp.l %d1,%d2 - jne .L34 - mulu.w #12,%d0 - move.l %d0,%a0 + addq.l #4,%a1 + moveq #9,%d0 + cmp.l %d1,%d0 + jne .L54 + movem.l (%sp),#3100 + lea (20,%sp),%sp + rts +.L53: + tst.l 32(%sp) + jeq .L51 + move.b (%a3,%a0.l),%d4 +.L52: + move.b %d4,(%a0,%d0.l) + addq.l #1,%a0 + jra .L50 +.L51: + move.b (%a2,%a0.l),%d4 + jra .L52 + .size put_track.constprop.0, .-put_track.constprop.0 + .align 2 + .type copy.constprop.0, @function +copy.constprop.0: + move.l %a2,-(%sp) + move.l 8(%sp),%a1 clr.l %d0 - add.l #part_buf+1538,%a0 -.L35: - lea 8(%a1,%d0.l),%a2 - moveq #12,%d1 + lea part_buf,%a0 +.L57: + lea (%a1,%d0.l),%a2 move.b (%a2),(%a0,%d0.l) addq.l #1,%d0 - cmp.l %d0,%d1 - jne .L35 - move.l (%sp)+,%d2 + cmp.l #6322,%d0 + jne .L57 move.l (%sp)+,%a2 rts - .size write_slice.constprop.0, .-write_slice.constprop.0 + .size copy.constprop.0, .-copy.constprop.0 + .align 2 + .type set_mutes, @function +set_mutes: + move.l 4(%sp),%d0 +#APP +| 242 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 + move.w %sr,%d1 + move.w #0x2700,%sr +| 0 "" 2 +#NO_APP + move.l %d0,-2147483640 + move.l %d0,269161684 +#APP +| 244 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 + move.w %d1,%sr +| 0 "" 2 +#NO_APP + clr.l -(%sp) + clr.l -(%sp) + clr.l -(%sp) + clr.l -(%sp) + clr.l -(%sp) + pea 26.w + jsr 1073763288 + lea (24,%sp),%sp + rts + .size set_mutes, .-set_mutes .align 2 .type pass_steps.constprop.0, @function pass_steps.constprop.0: + lea (-40,%sp),%sp + moveq #6,%d1 + movem.l #15612,(%sp) + move.l 44(%sp),%a0 + move.l #36437,%a2 + move.l #36435,%a3 + clr.l %d2 + move.l #36436,%a4 + sub.l %a1,%a1 + clr.l %d5 + clr.l (%a0) mvz.b arm+4,%d0 - lea arm,%a0 - move.l %d3,-(%sp) - move.l %d2,-(%sp) + mvz.b arm+7,%d4 mulu.w #36568,%d0 - add.l (%a0),%d0 - move.l %d0,%a1 - add.l #36437,%a1 - tst.b (%a1) - jeq .L39 - move.l %a0,-(%sp) - jsr record_at - addq.l #4,%sp move.l %d0,%a0 - move.b 80(%a0),%d2 - move.b 81(%a0),%d1 -.L40: - mvz.b %d1,%d1 + add.l arm,%a0 + add.l %a0,%a2 + add.l %a0,%a3 + add.l %a0,%a4 + lea (81,%a0),%a0 +.L70: + btst %d5,%d4 + jeq .L61 + tst.b (%a2) + jeq .L62 + move.b -1(%a0),%d6 +.L63: + tst.b (%a2) + jeq .L64 + move.b (%a0),%d3 +.L65: + mvz.b %d3,%d3 moveq #6,%d0 - cmp.l %d1,%d0 - jcc .L41 -.L43: - clr.l %d0 -.L38: - move.l (%sp)+,%d2 - move.l (%sp)+,%d3 - rts -.L39: - move.l %d0,%a0 - add.l #36435,%a0 - move.b (%a0),%d2 - add.l #36436,%d0 - move.l %d0,%a0 - move.b (%a0),%d1 - jra .L40 -.L41: - mvz.b %d2,%d0 - tst.b %d2 - jeq .L38 - lea (ticks.0),%a0 - moveq #6,%d3 - mvz.b (%a0,%d1.l),%d1 - mulu.w %d0,%d1 - move.l %d1,%d2 - remu.l %d3,%d0:%d2 - divu.l %d3,%d2 + cmp.l %d3,%d0 + jcs .L66 + mvz.b %d6,%d0 + tst.b %d6 + jeq .L60 + move.l #ticks.0,%d6 + move.l %d6,%a5 + mvz.b (%a5,%d3.l),%d3 + mulu.w %d3,%d0 tst.l %d0 - jne .L43 - cmp.l #389,%d1 - jhi .L38 - move.l %d2,%d0 - jra .L38 + jeq .L60 + cmp.l %a1,%d0 + jls .L68 + move.l %d0,%a1 +.L68: + tst.l %d2 + jne .L61 + move.l %d0,%d3 + move.l %d1,%d2 +.L69: + remu.l %d3,%d7:%d2 + move.l %d3,%d6 + move.l %d6,%d2 + move.l %d7,%d3 + tst.l %d7 + jne .L69 + divu.l %d6,%d1 + muls.l %d0,%d1 + cmp.l #384,%d1 + shi %d2 + mvs.b %d2,%d2 + neg.l %d2 +.L61: + addq.l #1,%d5 + lea (2330,%a0),%a0 + moveq #8,%d0 + cmp.l %d5,%d0 + jne .L70 + tst.l %d2 + jne .L71 + move.l %d1,%d0 + moveq #6,%d2 + divu.l %d2,%d0 +.L60: + movem.l (%sp),#15612 + lea (40,%sp),%sp + rts +.L62: + move.b (%a3),%d6 + jra .L63 +.L64: + move.b (%a4),%d3 + jra .L65 +.L71: + move.l 44(%sp),%a0 + moveq #1,%d0 + move.l %d0,(%a0) + move.l %a1,%d0 + addq.l #5,%d0 + cmp.l #389,%d0 + jls .L72 +.L66: + clr.l %d0 + jra .L60 +.L72: + moveq #6,%d2 + divu.l %d2,%d0 + jra .L60 .size pass_steps.constprop.0, .-pass_steps.constprop.0 .align 2 .type write_record, @function write_record: - lea (-44,%sp),%sp - movem.l #31772,(%sp) - move.l 48(%sp),%a2 - move.l #record_at,%d3 - move.l 52(%sp),%a6 - move.l %d3,%a0 - lea write_span,%a4 + lea (-40,%sp),%sp + movem.l #31756,(%sp) + move.l 44(%sp),%a2 sub.l %a3,%a3 - move.l %a2,-(%sp) - jsr (%a0) + move.l 48(%sp),%a6 + lea write_span,%a4 mvz.b 4(%a2),%d2 - moveq #89,%d1 - move.l %d0,%a5 - move.l %a5,%d4 mvz.b 6(%a2),%d0 mulu.w #36568,%d2 - move.l %d1,(%sp) - move.l %a6,-(%sp) mulu.w #2330,%d0 - add.l #89,%d4 add.l %d0,%d2 + move.l %d2,%a5 move.l %d2,%d0 + add.l (%a2),%a5 + pea 89.w + move.l %a6,-(%sp) add.l #268525902,%d0 move.l %d0,-(%sp) move.l %a5,-(%sp) jsr (%a4) lea (16,%sp),%sp + move.l %a5,%d3 + add.l #89,%d3 lea (89,%a6),%a0 move.l %d2,%a1 add.l #268525991,%a1 - move.l %a0,40(%sp) -.L48: + move.l %a0,36(%sp) +.L85: pea 32.w - move.l 44(%sp),%a0 + move.l 40(%sp),%a0 pea (%a0,%a3.l) - pea (%a1,%a3.l) - pea (%a3,%d4.l) - move.l %a1,52(%sp) + pea (%a3,%a1.l) + pea (%a3,%d3.l) + move.l %a1,48(%sp) jsr (%a4) lea (16,%sp),%sp lea (32,%a3),%a3 - move.l 36(%sp),%a1 + move.l 32(%sp),%a1 cmp.l #2048,%a3 - jne .L48 + jne .L85 pea 193.w move.l #1187501196,%a3 pea 2137(%a6) @@ -407,39 +630,42 @@ write_record: move.l %d2,-(%sp) pea 2137(%a5) jsr (%a4) - move.l %a2,-(%sp) - move.l %d3,%a0 - moveq #1,%d3 - jsr (%a0) - lea (20,%sp),%sp + mvz.b 4(%a2),%d0 + move.w #1,%a4 + lea (16,%sp),%sp + mvz.b 6(%a2),%d1 + mulu.w #36568,%d0 + mulu.w #2330,%d1 move.l %d0,%a0 + add.l %d1,%a0 + add.l (%a2),%a0 lea (89,%a0),%a0 -.L49: +.L86: sub.l %a1,%a1 -.L52: - move.b (%a0,%a1.l),%d1 +.L89: + move.b (%a0,%a1.l),%d0 addq.l #1,%a1 - moveq #31,%d0 - cmp.l %a1,%d0 - jne .L50 - not.l %d1 - tst.b %d1 - sne %d1 - mvs.b %d1,%d1 - neg.l %d1 -.L51: - mvz.b 6(%a2),%d0 - move.l %d3,%d2 - lsl.l %d0,%d2 - move.b (%a3),%d0 - tst.l %d1 - jeq .L53 - or.l %d2,%d0 -.L54: - move.b %d0,(%a3)+ + moveq #31,%d1 + cmp.l %a1,%d1 + jne .L87 + not.l %d0 + tst.b %d0 + sne %d0 + mvs.b %d0,%d0 + neg.l %d0 +.L88: + mvz.b 6(%a2),%d1 + move.l %a4,%d2 + lsl.l %d1,%d2 + move.b (%a3),%d1 + tst.l %d0 + jeq .L90 + or.l %d2,%d1 +.L91: + move.b %d1,(%a3)+ lea (32,%a0),%a0 cmp.l #1187501260,%a3 - jne .L49 + jne .L86 move.l (%a2),%a0 moveq #1,%d0 add.l #635698,%a0 @@ -448,189 +674,318 @@ write_record: move.l %d0,269452696 jsr 1073905152 mvz.b 6(%a2),%d0 - movem.l (%sp),#31772 - move.l %d0,48(%sp) - lea (44,%sp),%sp + movem.l (%sp),#31756 + move.l %d0,44(%sp) + lea (40,%sp),%sp jmp 1074387488 -.L50: - mvz.b %d1,%d1 - cmp.l #255,%d1 - jeq .L52 - moveq #1,%d1 - jra .L51 -.L53: +.L87: + mvz.b %d0,%d0 + cmp.l #255,%d0 + jeq .L89 + moveq #1,%d0 + jra .L88 +.L90: not.l %d2 - and.l %d2,%d0 - jra .L54 + and.l %d2,%d1 + jra .L91 .size write_record, .-write_record .align 2 - .type set_mutes, @function -set_mutes: - move.l 4(%sp),%d0 -#APP -| 182 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 - move.w %sr,%d1 - move.w #0x2700,%sr -| 0 "" 2 -#NO_APP - move.l %d0,-2147483640 - move.l %d0,269161684 -#APP -| 184 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 - move.w %d1,%sr -| 0 "" 2 -#NO_APP - clr.l -(%sp) - clr.l -(%sp) - clr.l -(%sp) - clr.l -(%sp) - clr.l -(%sp) - pea 26.w - jsr 1073763288 - lea (24,%sp),%sp + .type paste, @function +paste: + lea (-16,%sp),%sp + movem.l #1052,(%sp) + move.l 20(%sp),%a2 + move.l 24(%sp),%d2 + move.l 28(%sp),%d3 + mvz.b 5(%a2),%d0 + move.l %d0,-(%sp) + pea part_buf + jsr 1073912396 + addq.l #8,%sp + lea part_buf,%a0 + mvz.b 34(%a0,%d2.l),%d0 + cmp.l %d0,%d3 + jeq .L97 + move.l %d3,28(%sp) + move.l %d2,24(%sp) + mvz.b 5(%a2),%d0 + movem.l (%sp),#1052 + move.l %d0,20(%sp) + lea (16,%sp),%sp + jmp 1074361084 +.L97: + move.b 269161679,%d0 + move.b 5(%a2),%d1 + moveq #3,%d4 + and.l %d4,%d0 + mvz.b %d1,%d3 + cmp.l %d3,%d0 + jne .L96 + tst.b -2147483627.l + jne .L96 + move.b 269161678,%d0 + move.l %d2,28(%sp) + movem.l (%sp),#1052 + mvs.b %d1,%d1 + move.l %d1,24(%sp) + mvz.b %d0,%d0 + move.l %d0,20(%sp) + lea (16,%sp),%sp + jmp 1073749784 +.L96: + movem.l (%sp),#1052 + lea (16,%sp),%sp rts - .size set_mutes, .-set_mutes - .section .rodata.str1.1,"aMS",@progbits,1 -.LC0: - .string "AUDIO TRACKS ONLY" - .text + .size paste, .-paste .align 2 - .type open_select, @function -open_select: - move.l phase,%d0 - move.l %d0,%d1 - subq.l #2,%d1 - lsr.l #1,%d1 - lea (-32,%sp),%sp - move.l %a6,-(%sp) + .type apply_clip, @function +apply_clip: + link.w %fp,#-44 + mvz.b arm+5,%d0 + movem.l #7292,(%sp) + move.b arm+6,%d4 + lea arm,%a2 + mulu.w #6322,%d0 + move.l (%a2),%a3 + add.l #585088,%a3 + add.l %d0,%a3 + mvz.b %d4,%d2 + move.l %d2,%a4 + lea (34,%a4),%a4 + mvz.b (%a3,%a4.l),%d3 + pea -4(%fp) + jsr (pass_steps.constprop.0) + move.l %a3,-(%sp) + move.l %d0,-12(%fp) + jsr (copy.constprop.0) + move.w %d2,%d0 + addq.l #8,%sp + mulu.w #12,%d0 + move.l %d0,%a1 + move.l %d0,%a0 + add.l #part_copy+1538,%a1 + add.l #part_buf+1538,%a0 + clr.l %d0 +.L100: + lea (%a1,%d0.l),%a3 + moveq #12,%d1 + move.b (%a3),(%a0,%d0.l) + addq.l #1,%d0 + cmp.l %d0,%d1 + jne .L100 + move.w %d2,%d0 + moveq #1,%d5 + lea part_buf,%a1 + add.l #-128,%d4 + clr.b %d6 + clr.l %d1 + mulu.w #5,%d0 + move.b %d5,(%a1,%a4.l) + move.w #474,%a4 + move.b %d6,(%a1,%d2.l) + move.b %d6,8(%a1,%d2.l) + lea (%a1,%d0.l),%a0 + move.w %d2,%d0 + move.b %d4,715(%a0) + mulu.w #30,%d0 + addq.l #6,%d0 +.L102: + move.l %d1,%a3 + moveq #5,%d4 + add.l #1074606604,%a3 + cmp.l %d1,%d4 + jcs .L108 + move.w #42,%a0 +.L101: + move.l %d1,%d5 + moveq #6,%d6 + remu.l %d6,%d4:%d5 + add.l %a1,%a0 + add.l %d0,%a0 + addq.l #1,%d1 + move.b (%a3),(%a0,%d4.l) + moveq #12,%d4 + cmp.l %d1,%d4 + jne .L102 + move.w %d2,%d1 + moveq #127,%d6 + move.l #2139045952,%d5 + mulu.w #24,%d1 + move.l %d1,%a0 + add.l #part_buf+282,%a0 + move.b %d6,11(%a0) + clr.l 3(%a0) + move.l %d5,7(%a0) + move.l %d3,-(%sp) move.l %d2,-(%sp) - tst.l %d1 - jeq .L60 - subq.l #5,%d0 - tst.l %d0 - jeq .L60 - lea (8,%sp),%a6 - move.l %a6,-(%sp) - jsr current - addq.l #4,%sp - tst.l %d0 - jne .L62 - pea .LC0 - jsr show + pea arm + jsr paste + lea (12,%sp),%sp + clr.l %d1 + lea record_new,%a0 + lea record_copy,%a1 +.L103: + lea (%a1,%d1.l),%a3 + move.b (%a3),(%a0,%d1.l) + addq.l #1,%d1 + cmp.l #2330,%d1 + jne .L103 + clr.l %d0 +.L104: + clr.b %d1 + moveq #64,%d4 + move.b %d1,(%a0,%d0.l) + addq.l #1,%d0 + cmp.l %d0,%d4 + jne .L104 + moveq #1,%d5 + clr.l %d0 + lea record_new+89,%a0 + move.b %d5,record_new+7 +.L105: + st %d6 + addq.l #1,%d0 + move.b %d6,-1(%a0,%d0.l) + cmp.l #2048,%d0 + jne .L105 + mvz.b arm+4,%d0 + move.l (%a2),%a0 + add.l #36437,%a0 + mulu.w #36568,%d0 + tst.b (%a0,%d0.l) + jeq .L106 + tst.l -12(%fp) + jeq .L106 + moveq #2,%d0 + lea (-9,%fp),%a0 + move.b (%a0),record_new+80 + move.b %d0,record_new+81 +.L106: + pea record_new + pea arm + jsr write_record + move.b arm+7,%d1 + addq.l #8,%sp + moveq #1,%d0 + lsl.l %d2,%d0 + not.l %d0 + and.l %d1,%d0 + mvz.b %d0,%d0 + lsl.l #8,%d0 + or.l arm+8,%d0 + cmp.l -2147483640.l,%d0 + jeq .L107 + move.l %d0,-(%sp) + jsr set_mutes addq.l #4,%sp -.L60: - move.l (%sp)+,%d2 - move.l (%sp)+,%a6 - lea (32,%sp),%sp - rts -.L62: - pea 32.w - moveq #1,%d2 - move.l %a6,-(%sp) +.L107: + pea 12.w pea arm + pea last jsr copy - move.l %d2,phase - clr.l message - mvz.b 26(%sp),%d1 - moveq #1,%d0 - move.l %d2,1187497772 lea (12,%sp),%sp - lsl.l %d1,%d0 - move.b %d0,arm+7 - jra .L60 - .size open_select, .-open_select + movem.l -44(%fp),#7292 + moveq #1,%d1 + move.l %d1,undo_ready + unlk %fp + rts +.L108: + move.l %a4,%a0 + jra .L101 + .size apply_clip, .-apply_clip .section .rodata.str1.1 .LC1: - .string "NOTHING TO UNDO" + .string "TAKE LEFT IN BUFFER" .LC2: - .string "UNDO: OPEN ITS PATTERN" + .string "NOTHING TO UNDO" .LC3: - .string "BOUNCE UNDONE" + .string "UNDO: OPEN ITS PATTERN" +.LC4: + .string "UNDONE" .text .align 2 .type bounce_choose, @function bounce_choose: - lea (-44,%sp),%sp + lea (-28,%sp),%sp + moveq #2,%d1 + move.l 32(%sp),%d0 movem.l #17412,(%sp) - tst.l 48(%sp) - jeq .L67 + cmp.l %d0,%d1 + jne .L121 move.l phase,%d0 move.l %d0,%d1 subq.l #2,%d1 lsr.l #1,%d1 - jeq .L66 - subq.l #5,%d0 + jeq .L120 + moveq #5,%d1 + cmp.l %d0,%d1 + jeq .L120 + subq.l #6,%d0 tst.l %d0 - jeq .L66 - tst.l undo_ready - jne .L69 - move.l #.LC1,%d2 - move.l %d2,48(%sp) + jne .L123 + move.l #.LC1,%d0 + move.l %d0,32(%sp) +.L143: movem.l (%sp),#17412 - lea (44,%sp),%sp + lea (28,%sp),%sp jra show -.L69: +.L123: + tst.l undo_ready + jne .L124 + move.l #.LC2,%d1 + move.l %d1,32(%sp) + jra .L143 +.L124: move.l %sp,%d2 - add.l #12,%d2 + add.l #16,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp lea show,%a2 tst.l %d0 - jeq .L70 + jeq .L125 pea last move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L71 -.L70: - pea .LC2 -.L81: + jne .L126 +.L125: + pea .LC3 +.L144: jsr (%a2) +.L142: addq.l #4,%sp -.L66: +.L120: movem.l (%sp),#17412 - lea (44,%sp),%sp + lea (28,%sp),%sp rts -.L71: +.L126: mvz.b last+5,%d0 mvz.b last+6,%d2 - move.l last,%a0 + lea last,%a6 + move.l (%a6),%a0 add.l #585088,%a0 mulu.w #6322,%d0 add.l %d0,%a0 move.b 34(%a0,%d2.l),%d0 - pea 6322.w + move.b %d0,15(%sp) move.l %a0,-(%sp) - pea part_buf - move.w %d0,%a6 - jsr copy + jsr (copy.constprop.0) + pea 1.w move.l %d2,-(%sp) - pea last+12 - jsr (write_slice.constprop.0) - mvz.b last+5,%d0 - move.l %d0,-(%sp) - pea part_buf - jsr 1073912396 - move.w %a6,%d1 - lea (28,%sp),%sp - mvz.b %d1,%d0 - mvz.b last+14,%d1 - cmp.l %d0,%d1 - jeq .L72 + pea part_copy + jsr (put_track.constprop.0) + mvz.b 31(%sp),%d0 move.l %d0,-(%sp) - mvz.b last+5,%d0 move.l %d2,-(%sp) - move.l %d0,-(%sp) - jsr 1074361084 - lea (12,%sp),%sp -.L72: + move.l %a6,-(%sp) + jsr paste pea record_copy - pea last + move.l %a6,-(%sp) jsr write_record mvz.b last+7,%d0 - addq.l #8,%sp + lea (36,%sp),%sp move.l #-2147483640,%a0 move.l (%a0),%d1 move.l last+8,%d2 @@ -639,103 +994,144 @@ bounce_choose: and.l %d2,%d0 eor.l %d1,%d0 cmp.l (%a0),%d0 - jeq .L73 + jeq .L127 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L73: +.L127: clr.l undo_ready - pea .LC3 - jra .L81 -.L67: + pea .LC4 + jra .L144 +.L121: + tst.l %d0 + jeq .L129 + move.l phase,%d0 + move.l %d0,%d1 + subq.l #2,%d1 + lsr.l #1,%d1 + jeq .L120 + moveq #5,%d1 + cmp.l %d0,%d1 + jeq .L120 + subq.l #6,%d0 + tst.l %d0 + jne .L131 + clr.l phase +.L131: + move.l %sp,%d2 + add.l #16,%d2 + move.l %d2,-(%sp) + jsr current + addq.l #4,%sp + tst.l %d0 + jne .L132 + pea .LC0 + jsr show + jra .L142 +.L132: + pea 12.w + move.l %d2,-(%sp) + pea arm + jsr copy + clr.l message + mvz.b 34(%sp),%d1 + moveq #1,%d0 + lea (12,%sp),%sp + lsl.l %d1,%d0 + moveq #1,%d1 + move.b %d0,arm+7 + moveq #7,%d0 + move.l %d0,phase + move.l %d1,1187497772 + jra .L120 +.L129: movem.l (%sp),#17412 - lea (44,%sp),%sp + lea (28,%sp),%sp jra open_select .size bounce_choose, .-bounce_choose .align 2 .type cancel, @function cancel: mvz.b arm+6,%d0 - lea (-36,%sp),%sp + lea (-16,%sp),%sp move.l %a6,-(%sp) move.l %d2,-(%sp) move.l %d0,%a6 mulu.w #168,%d0 - move.l 48(%sp),%d1 + move.l 28(%sp),%d1 move.l %d1,8(%sp) move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L83 + jeq .L146 clr.l -(%sp) pea 128.w move.l %a6,-(%sp) jsr 1073762680 lea (12,%sp),%sp -.L83: +.L146: move.l %sp,%d2 add.l #12,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L84 + jeq .L147 pea arm move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L84 - mvz.b arm+5,%d2 - pea 6322.w + jeq .L147 + mvz.b arm+5,%d0 move.l arm,%a0 add.l #585088,%a0 - move.w %d2,%d0 mulu.w #6322,%d0 pea (%a0,%d0.l) - pea part_buf - jsr copy + jsr (copy.constprop.0) move.w %a6,%d1 - lea (12,%sp),%sp + addq.l #4,%sp clr.l %d0 - lea arm+20,%a0 mulu.w #12,%d1 move.l %d1,%a6 + move.l %d1,%a0 add.l #part_buf+1538,%a6 -.L85: + add.l #part_copy+1538,%a0 +.L148: lea (%a0,%d0.l),%a1 moveq #12,%d1 move.b (%a1),(%a6,%d0.l) addq.l #1,%d0 cmp.l %d0,%d1 - jne .L85 - move.l %d2,-(%sp) + jne .L148 + mvz.b arm+5,%d0 + move.l %d0,-(%sp) pea part_buf jsr 1073912396 addq.l #8,%sp -.L84: +.L147: move.l arm+8,%d0 cmp.l -2147483640.l,%d0 - jeq .L86 + jeq .L149 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L86: +.L149: move.l 8(%sp),%a1 - move.l %a1,48(%sp) + move.l %a1,28(%sp) move.l (%sp)+,%d2 move.l (%sp)+,%a6 - lea (36,%sp),%sp + lea (16,%sp),%sp jra show .size cancel, .-cancel .section .rodata.str1.1 -.LC4: - .string "STOPPED - NO BOUNCE" .LC5: - .string "PATTERN CHANGED" + .string "STOPPED - NO BOUNCE" .LC6: - .string "TAKE INCOMPLETE" + .string "PATTERN CHANGED" .LC7: + .string "TAKE INCOMPLETE" +.LC8: .string "BOUNCED" .text .align 2 @@ -744,12 +1140,12 @@ cancel: module_tick: move.l phase,%d0 moveq #5,%d1 - lea (-72,%sp),%sp - movem.l #19468,(%sp) + lea (-28,%sp),%sp + movem.l #17412,(%sp) cmp.l %d0,%d1 - jne .L98 + jne .L161 tst.l -2147457608 - jeq .L99 + jeq .L162 mvz.b arm+6,%d0 pea 1.w moveq #2,%d2 @@ -760,7 +1156,7 @@ module_tick: lea (12,%sp),%sp moveq #1,%d0 move.l %d0,1187497772 -.L99: +.L162: mvz.b arm+6,%d0 moveq #24,%d2 move.l -2147457608,%d1 @@ -780,222 +1176,217 @@ module_tick: or.l %d2,%d0 moveq #9,%d2 lsl.l %d2,%d1 - movem.l (%sp),#19468 + movem.l (%sp),#17412 or.l %d1,%d0 tst.b (%a0) sne %d1 - move.l 76(%sp),%a0 + move.l 32(%sp),%a0 mvs.b %d1,%d1 neg.l %d1 lsl.l #8,%d1 or.l %d1,%d0 move.l %d0,(%a0) - lea (72,%sp),%sp + lea (28,%sp),%sp rts -.L98: +.L161: moveq #2,%d1 cmp.l %d0,%d1 - jne .L100 + jne .L163 mvz.b arm+6,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L99 + jeq .L162 moveq #3,%d2 - moveq #1,%d0 move.l %d2,phase +.L192: + moveq #1,%d0 move.l %d0,1187497772 - jra .L99 -.L100: + jra .L162 +.L163: moveq #3,%d1 cmp.l %d0,%d1 - jne .L101 + jne .L164 tst.l -2147457608 - jne .L102 - pea .LC4 -.L127: + jne .L165 + pea .LC5 +.L194: jsr cancel +.L190: addq.l #4,%sp - jra .L99 -.L102: - move.b arm+6,%d2 - lea arm,%a3 - mvz.b %d2,%d0 - move.w %d2,%a2 - move.l %d0,%a6 + jra .L162 +.L165: + mvz.b arm+6,%d2 + lea arm,%a2 + move.w %d2,%d0 + move.l %d2,%a6 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jne .L99 + jne .L162 move.l %sp,%d2 - add.l #40,%d2 + add.l #16,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L103 - move.l %a3,-(%sp) + jeq .L166 + move.l %a2,-(%sp) move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L104 -.L103: - pea .LC5 - jra .L127 -.L104: + jne .L167 +.L166: + pea .LC6 + jra .L194 +.L167: move.l %a6,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 tst.l (%a0) - jne .L106 - pea .LC6 - jra .L127 -.L106: + jne .L169 + pea .LC7 + jra .L194 +.L169: mvz.b arm+5,%d0 - move.l (%a3),%a0 - add.l #585088,%a0 - lea copy,%a3 - mulu.w #6322,%d0 - add.l %d0,%a0 - mvz.b 34(%a6,%a0.l),%d2 - pea 6322.w - move.l %a0,-(%sp) - pea part_buf - jsr (%a3) - pea 20.w - pea arm+12 - move.l %sp,%d3 - add.l #40,%d3 - move.l %d3,-(%sp) - jsr (%a3) - clr.w %d0 - moveq #1,%d1 - move.w %d0,44(%sp) - move.l %a2,%d0 - add.l #-128,%d0 - move.b %d1,46(%sp) - move.b %d0,48(%sp) + move.l (%a2),%d2 + add.l #585088,%d2 move.l %a6,-(%sp) - move.l %d3,-(%sp) - jsr (write_slice.constprop.0) - mvz.b arm+5,%d0 - lea (32,%sp),%sp - move.l %d0,-(%sp) - pea part_buf - jsr 1073912396 + mulu.w #6322,%d0 + add.l %d0,%d2 + move.l %d2,-(%sp) + jsr modwerk_machine addq.l #8,%sp - moveq #1,%d0 - cmp.l %d2,%d0 - jeq .L107 - mvz.b arm+5,%d0 + tst.l %d0 + jeq .L193 move.l %d2,-(%sp) - move.l %a6,-(%sp) - move.l %d0,-(%sp) - jsr 1074361084 - lea (12,%sp),%sp -.L107: - clr.l %d0 - lea record_new,%a0 - lea record_copy,%a1 -.L108: - lea (%a1,%d0.l),%a2 - move.b (%a2),(%a0,%d0.l) - addq.l #1,%d0 - cmp.l #2330,%d0 - jne .L108 - clr.l %d0 -.L109: - clr.b %d1 - moveq #64,%d2 - move.b %d1,(%a0,%d0.l) - addq.l #1,%d0 - cmp.l %d0,%d2 - jne .L109 - moveq #1,%d0 - lea record_new+89,%a0 - move.b %d0,record_new+7 + jsr (copy.constprop.0) + move.w %a6,%d0 + addq.l #4,%sp + mulu.w #12,%d0 + move.l %d0,%a6 + move.l %d0,%a0 + add.l #part_buf+1538,%a6 + add.l #part_copy+1538,%a0 clr.l %d0 -.L110: - st %d1 +.L171: + lea (%a0,%d0.l),%a1 + moveq #12,%d1 + move.b (%a1),(%a6,%d0.l) addq.l #1,%d0 - move.b %d1,-1(%a0,%d0.l) - cmp.l #2048,%d0 - jne .L110 - pea record_new - pea arm - jsr write_record - move.l %a6,%d2 + cmp.l %d0,%d1 + jne .L171 + mvz.b arm+5,%d0 + move.l %d0,-(%sp) + pea part_buf + jsr 1073912396 addq.l #8,%sp - moveq #1,%d0 - lsl.l %d2,%d0 - move.b arm+7,%d1 - not.l %d0 - and.l %d1,%d0 - mvz.b %d0,%d0 - lsl.l #8,%d0 - or.l arm+8,%d0 + move.l arm+8,%d0 cmp.l -2147483640.l,%d0 - jeq .L111 + jeq .L172 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L111: - pea 32.w - pea arm - pea last - jsr (%a3) - pea .LC7 - moveq #1,%d0 - move.l %d0,undo_ready +.L172: + moveq #6,%d2 + move.l %d2,phase + clr.l message + jra .L192 +.L164: + moveq #6,%d1 + cmp.l %d0,%d1 + jne .L173 + move.b arm+5,%d2 + lea arm,%a2 + move.l (%a2),%a6 + move.b %d2,15(%sp) + move.l %sp,%d2 + add.l #16,%d2 + move.l %d2,-(%sp) + jsr current + addq.l #4,%sp + tst.l %d0 + jeq .L174 + move.l %a2,-(%sp) + move.l %d2,-(%sp) + jsr same_place + addq.l #8,%sp + tst.l %d0 + jne .L175 +.L174: + pea .LC1 +.L191: jsr show - lea (16,%sp),%sp - jra .L99 -.L101: + jra .L190 +.L175: + mvz.b 15(%sp),%d0 + move.l #585088,%a0 + add.l %a6,%a0 + mulu.w #6322,%d0 + add.l %d0,%a0 + mvz.b arm+6,%d0 + mvz.b 34(%a0,%d0.l),%d1 + subq.l #1,%d1 + tst.l %d1 + jne .L174 + move.l %d0,-(%sp) + move.l %a0,-(%sp) + jsr modwerk_machine + addq.l #8,%sp + tst.l %d0 + jne .L162 +.L193: + jsr apply_clip + pea .LC8 + jra .L191 +.L173: subq.l #4,%d0 tst.l %d0 - jne .L99 + jne .L162 move.l shown_ticks,%d0 addq.l #1,%d0 move.l %d0,shown_ticks moveq #90,%d2 cmp.l %d0,%d2 - jcc .L99 + jcc .L162 jsr close_view - jra .L99 + jra .L162 .size module_tick, .-module_tick .section .rodata.str1.1 -.LC8: - .string "TRACK CHANGED" .LC9: - .string "PASS OVER 64 STEPS" + .string "TRACK CHANGED" .LC10: - .string "RECORDER BUSY" + .string "PICK STATIC FIRST" .LC11: - .string "MODWERK MACHINE: SET FLEX" + .string "RECORDER BUSY" .LC12: + .string "TRACK RESET" +.LC13: + .string "PASS OVER 64 STEPS" +.LC14: .string "BOUNCE CANCELLED" .text .align 2 .globl module_key .type module_key, @function module_key: - lea (-72,%sp),%sp + link.w %fp,#-52 moveq #63,%d1 - movem.l #23676,(%sp) - move.l 76(%sp),%d4 - move.l 80(%sp),%d0 + movem.l #3196,(%sp) + move.l 8(%fp),%d4 + move.l 12(%fp),%d0 cmp.l %d4,%d1 - jcs .L129 + jcs .L196 moveq #31,%d2 cmp.l %d4,%d2 - jlt .L130 + jlt .L197 move.l consumed_lo,%d1 lea consumed_lo,%a2 -.L131: +.L198: moveq #31,%d2 moveq #1,%d3 and.l %d4,%d2 @@ -1003,203 +1394,295 @@ module_key: move.l %d1,%d2 and.l %d3,%d2 tst.l %d0 - jne .L132 + jne .L199 tst.l %d2 - jeq .L133 + jeq .L200 not.l %d3 and.l %d1,%d3 move.l %d3,(%a2) -.L134: +.L201: moveq #1,%d0 -.L133: - movem.l (%sp),#23676 - lea (72,%sp),%sp - rts -.L130: + jra .L200 +.L197: move.l consumed_hi,%d1 lea consumed_hi,%a2 - jra .L131 -.L132: + jra .L198 +.L199: tst.l %d2 - jne .L134 + jne .L201 move.l phase,%d0 tst.l %d0 - jne .L136 - moveq #41,%d5 - cmp.l %d4,%d5 - jne .L129 + jeq .L202 + moveq #6,%d1 + cmp.l %d0,%d1 + jne .L203 +.L202: + moveq #41,%d2 + cmp.l %d4,%d2 + jne .L196 move.b 1175456540,%d0 btst #0,%d0 - jeq .L129 + jeq .L196 jsr open_select -.L137: +.L204: or.l %d3,(%a2) - jra .L134 -.L136: - moveq #1,%d1 + jra .L201 +.L203: + moveq #7,%d1 cmp.l %d0,%d1 - jne .L138 - moveq #7,%d2 + jne .L205 + moveq #49,%d2 cmp.l %d4,%d2 - jlt .L139 + jne .L206 + move.l %fp,%d6 + add.l #-12,%d6 + move.l %d6,-(%sp) + jsr current + addq.l #4,%sp + tst.l %d0 + jeq .L218 + move.b -6(%fp),%d5 + mvz.b arm+6,%d0 + mvz.b %d5,%d2 + cmp.l %d2,%d0 + jne .L218 + pea arm + move.l %d6,-(%sp) + jsr same_place + addq.l #8,%sp + tst.l %d0 + jne .L208 +.L218: + pea .LC9 + jra .L254 +.L208: + mvz.b -7(%fp),%d0 + move.l #585088,%a0 + move.l -12(%fp),%a3 + add.l %a3,%a0 + move.l %d2,-(%sp) + mulu.w #6322,%d0 + add.l %a0,%d0 + move.l %d0,-(%sp) + move.l %d0,-22(%fp) + jsr modwerk_machine + addq.l #8,%sp + move.l %d0,%d4 + tst.l %d0 + jeq .L210 + pea .LC10 +.L254: + jsr show +.L255: + addq.l #4,%sp + jra .L204 +.L210: + move.w %d2,%d0 + mulu.w #168,%d0 + move.l %d0,%a0 + add.l #-2147464743,%a0 + tst.b (%a0) + jeq .L211 +.L256: + pea .LC11 + jra .L254 +.L211: + moveq #1,%d0 + lsl.l %d2,%d0 + move.l #-2147483640,%a1 + move.b %d0,-5(%fp) + move.l (%a1),-4(%fp) + pea 6322.w + move.l -22(%fp),-(%sp) + pea part_copy + jsr copy + pea 2330.w + move.w %d2,%d1 + mvz.b -8(%fp),%d0 + mulu.w #36568,%d0 + mulu.w #2330,%d1 + move.l %d0,%a0 + add.l %d1,%a0 + pea (%a0,%a3.l) + pea record_copy + jsr copy + lea part_copy,%a0 + mvz.b 34(%a0,%d2.l),%d0 + move.l %a0,-(%sp) + move.l %d0,%a3 + jsr (copy.constprop.0) + clr.l -(%sp) + move.l %d2,-(%sp) + pea FRESH + jsr (put_track.constprop.0) + lea (36,%sp),%sp + move.w %d2,%d0 + mulu.w #5,%d0 + move.l %d0,%a0 + add.l #part_buf+714,%a0 + move.b %d5,1(%a0) + move.b %d5,(%a0) + add.l #-128,%d5 + move.b %d5,4(%a0) + move.l %a3,(%sp) + move.l %d2,-(%sp) + move.l %d6,-(%sp) + jsr paste + lea (12,%sp),%sp + lea record_new,%a0 + clr.l %d0 + move.l %a0,%d1 +.L212: + clr.b %d2 + move.b %d2,(%a0,%d0.l) + addq.l #1,%d0 + cmp.l #2330,%d0 + jne .L212 + st %d0 + lea record_copy+80,%a1 + move.w (%a1),record_new+80 + move.l #-1431655766,%a0 + move.l %a0,record_new+64 + move.l %a0,record_new+68 + lea record_new+89,%a0 + move.b %d0,record_new+83 +.L213: + st %d2 + addq.l #1,%d4 + move.b %d2,-1(%a0,%d4.l) + cmp.l #2048,%d4 + jne .L213 + lea record_copy+2329,%a0 + move.b (%a0),record_new+2329 + move.l %d1,-(%sp) + move.l %d6,-(%sp) + jsr write_record + pea 12.w + move.l %d6,-(%sp) + pea last + jsr copy + pea .LC12 + moveq #1,%d0 + move.l %d0,undo_ready + jsr show + lea (24,%sp),%sp + jra .L204 +.L206: + moveq #50,%d1 + cmp.l %d4,%d1 + jne .L196 +.L226: + jsr close_view + jra .L204 +.L205: + moveq #1,%d2 + cmp.l %d0,%d2 + jne .L214 + moveq #7,%d1 + cmp.l %d4,%d1 + jlt .L215 mvz.b arm+6,%d1 cmp.l %d4,%d1 - jeq .L140 + jeq .L216 move.b arm+7,%d1 lsl.l %d4,%d0 eor.l %d1,%d0 move.b %d0,arm+7 -.L140: - moveq #1,%d5 - move.l %d5,1187497772 - jra .L137 -.L139: +.L216: + moveq #1,%d2 + move.l %d2,1187497772 + jra .L204 +.L215: moveq #49,%d0 cmp.l %d4,%d0 - jne .L141 - move.l %sp,%d2 - add.l #40,%d2 + jne .L217 + move.l %fp,%d2 + add.l #-12,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L142 + jeq .L218 pea arm move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L142 + jeq .L218 move.b arm+6,%d4 - mvz.b 46(%sp),%d0 - mvz.b %d4,%d2 - cmp.l %d0,%d2 - jeq .L143 -.L142: - pea .LC8 -.L169: - jsr show -.L170: - addq.l #4,%sp - jra .L137 -.L143: + mvz.b -6(%fp),%d2 + mvz.b %d4,%d0 + cmp.l %d2,%d0 + jne .L218 + pea -16(%fp) jsr (pass_steps.constprop.0) - move.l %d0,%d6 + addq.l #4,%sp + move.l %d0,%d5 tst.l %d0 - jne .L145 - pea .LC9 - jra .L169 -.L145: + jne .L221 + pea .LC13 + jra .L254 +.L221: move.w %d2,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L146 - pea .LC10 - jra .L169 -.L146: + jne .L256 + moveq #1,%d0 + subq.l #1,%d5 + lsl.l %d2,%d0 + move.b arm+7,%d1 + move.l #-2147483640,%a1 + move.l (%a1),arm+8 + pea 6322.w + move.l arm,%d6 + move.l %d6,%a0 + add.l #585088,%a0 + lea copy,%a3 + clr.l undo_ready + move.l %d0,-22(%fp) mvz.b arm+5,%d0 - lea arm,%a1 - move.l (%a1),%a3 - add.l #585088,%a3 + move.b %d1,-17(%fp) mulu.w #6322,%d0 - add.l %d0,%a3 - move.w %d2,%d0 - mulu.w #30,%d0 - lea (%a3,%d0.l),%a0 - move.b 60(%a0),%d5 - move.b 61(%a0),%d0 - move.b 62(%a0),%d1 - mvz.b %d5,%d5 - move.l %d5,%a0 - moveq #25,%d5 - lea (-65,%a0),%a0 - cmp.l %a0,%d5 - jcs .L147 - mvz.b %d0,%d0 - move.l %d0,%a0 - lea (-65,%a0),%a0 - cmp.l %a0,%d5 - jcc .L148 - add.l #-48,%d0 - moveq #9,%d5 - cmp.l %d0,%d5 - jcs .L147 -.L148: - subq.l #1,%d1 - mvz.b %d1,%d1 - moveq #8,%d0 - cmp.l %d1,%d0 - jcs .L147 - mvz.b 34(%a3,%d2.l),%d0 - subq.l #1,%d0 - tst.l %d0 - jne .L147 - pea .LC11 - jra .L169 -.L147: - move.l #-2147483640,%a0 - subq.l #1,%d6 - move.l (%a0),arm+8 - lea (%a3,%d2.l),%a0 - move.b (%a0),arm+12 - move.w %d2,%d0 - lea (8,%a0),%a1 - move.b arm+7,%d5 - lea (34,%a0),%a0 - lea copy,%a4 - move.b (%a1),arm+13 - mulu.w #5,%d0 - move.b %d5,39(%sp) - moveq #1,%d5 - lsl.l %d2,%d5 - move.b (%a0),arm+14 + pea (%a0,%d0.l) + pea part_copy + jsr (%a3) + move.w %d2,%d1 + pea 2330.w + mvz.b arm+4,%d0 + mulu.w #36568,%d0 + mulu.w #2330,%d1 move.l %d0,%a0 - pea 5.w - lea (714,%a0),%a0 - pea (%a0,%a3.l) - pea arm+15 - jsr (%a4) + add.l %d1,%a0 + pea (%a0,%d6.l) + pea record_copy + jsr (%a3) + pea part_copy + jsr (copy.constprop.0) + lea (28,%sp),%sp move.w %d2,%d1 - pea 12.w - mvz.b %d5,%d5 + mvz.b -17(%fp),%d6 mulu.w #12,%d1 - move.l %d1,%a6 - lea (1538,%a6),%a6 - pea (%a6,%a3.l) - pea arm+20 - jsr (%a4) - pea arm - jsr record_at - move.l #2330,(%sp) - move.l %d0,-(%sp) - pea record_copy - jsr (%a4) - lea (36,%sp),%sp - pea 6322.w - move.l %a3,-(%sp) - pea part_buf - jsr (%a4) - add.l #part_buf,%a6 - lea (12,%sp),%sp - move.b %d6,2(%a6) - mvz.b 39(%sp),%d6 - clr.w (%a6) + move.l %d1,%a0 + add.l #part_buf+1538,%a0 + move.b %d5,2(%a0) + mvz.b -19(%fp),%d5 + clr.w (%a0) cmp.l %d6,%d5 - jne .L155 + jne .L229 addq.l #1,%d4 -.L149: +.L223: clr.b %d0 - move.b %d4,4(%a6) - move.b %d0,9(%a6) + move.b %d4,4(%a0) + move.b %d0,9(%a0) mvz.b arm+5,%d0 move.l %d0,-(%sp) pea part_buf jsr 1073912396 addq.l #8,%sp cmp.l %d6,%d5 - jeq .L150 + jeq .L224 mvz.b arm+7,%d0 move.l arm+8,%d1 swap %d0 @@ -1209,365 +1692,427 @@ module_key: move.l %d1,-(%sp) jsr set_mutes addq.l #4,%sp -.L150: +.L224: move.l %d2,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 clr.l (%a0) tst.l -2147457608 - jeq .L156 + jeq .L230 pea 1.w move.l #49168,-(%sp) move.l %d2,-(%sp) jsr 1073762680 lea (12,%sp),%sp moveq #2,%d0 -.L151: +.L225: move.l %d0,phase moveq #1,%d0 move.l %d0,1187497772 - jra .L137 -.L155: + jra .L204 +.L229: moveq #10,%d4 - jra .L149 -.L156: + jra .L223 +.L230: moveq #5,%d0 - jra .L151 -.L141: - lea close_view,%a0 + jra .L225 +.L217: moveq #50,%d1 cmp.l %d4,%d1 - jne .L152 - jsr (%a0) - jra .L137 -.L152: - jsr (%a0) -.L129: + jeq .L226 + jsr close_view +.L196: clr.l %d0 - jra .L133 -.L138: +.L200: + movem.l -52(%fp),#3196 + unlk %fp + rts +.L214: move.l %d0,%d1 subq.l #2,%d1 lsr.l #1,%d1 - jeq .L153 + jeq .L227 subq.l #5,%d0 tst.l %d0 - jne .L154 -.L153: - moveq #50,%d0 - cmp.l %d4,%d0 - jne .L129 - pea .LC12 + jne .L228 +.L227: + moveq #50,%d2 + cmp.l %d4,%d2 + jne .L196 + pea .LC14 jsr cancel - jra .L170 -.L154: + jra .L255 +.L228: + add.l #-49,%d4 jsr close_view - move.l %d4,%a6 - lea (-49,%a6),%a6 - moveq #1,%d1 - cmp.l %a6,%d1 - jcc .L137 - jra .L129 + move.l %d4,-22(%fp) + lsr.l #1,%d4 + jne .L196 + jra .L204 .size module_key, .-module_key .align 2 .globl module_enc .type module_enc, @function module_enc: - moveq #1,%d1 - cmp.l phase.l,%d1 + move.l phase,%d1 + move.l %d2,-(%sp) + moveq #7,%d2 + cmp.l %d1,%d2 seq %d0 - mvs.b %d0,%d0 + moveq #1,%d2 + cmp.l %d1,%d2 + seq %d1 + move.l (%sp)+,%d2 neg.l %d0 + neg.l %d1 + or.l %d1,%d0 + mvz.b %d0,%d0 rts .size module_enc, .-module_enc .section .rodata.str1.1 -.LC13: - .string "BOUNCE" -.LC14: - .string "" .LC15: - .string "RECORDING ONE PASS" + .string "BOUNCE" .LC16: - .string "PRESS PLAY" + .string "" .LC17: - .string "WAITS FOR PATTERN START" + .string " (LONGEST)" .LC18: - .string "BOUNCE T" + .string " STEPS" .LC19: - .string "PASS " + .string "RECORDING ONE PASS" .LC20: - .string " STEPS" + .string "PRESS PLAY" .LC21: - .string "OVER 64 STEPS" + .string "WAITS FOR PATTERN START" .LC22: - .string "TRIG 1-8: MERGE" + .string "BOUNCED: T" .LC23: - .string "YES: REC NO: CLOSE" + .string " PICK FLEX" .LC24: + .string "BOUNCE T" +.LC25: + .string "RESET T" +.LC26: + .string "STOCK STATIC TRACK" +.LC27: + .string "NO TRIGS, NO LOCKS" +.LC28: + .string "YES: RESET NO: BACK" +.LC29: + .string "PASS " +.LC30: + .string "OVER 64 STEPS" +.LC31: + .string "TRIG 1-8: MERGE" +.LC32: + .string "YES: REC NO: CLOSE" +.LC33: .string "NO: CANCEL" .text .align 2 .globl module_draw .type module_draw, @function module_draw: - lea (-76,%sp),%sp - movem.l #23804,(%sp) - move.l phase,%d3 - move.l 80(%sp),%a6 - tst.l %d3 - jeq .L172 - tst.l %a6 - jeq .L172 + link.w %fp,#-68 + movem.l #15388,(%sp) + move.l phase,%a5 + tst.l %a5 + jeq .L258 + tst.l 8(%fp) + jeq .L258 + lea append,%a3 + moveq #6,%d0 + lea fill,%a4 + lea text,%a2 + move.l #invert,%d3 + cmp.l %a5,%d0 + jne .L260 + clr.b %d1 + pea .LC22 + move.l %fp,%d2 + add.l #-24,%d2 + move.l %d2,-(%sp) + clr.b %d4 + move.b %d1,-24(%fp) + jsr (%a3) + move.b arm+6,%d0 + move.b %d4,-13(%fp) + pea .LC23 + move.l %d2,-(%sp) + add.l #49,%d0 + move.b %d0,-14(%fp) + jsr (%a3) + clr.l -(%sp) + pea 8.w + pea 128.w + pea 56.w + clr.l -(%sp) + move.l 8(%fp),-(%sp) + jsr (%a4) + lea (36,%sp),%sp + move.l %d2,(%sp) + pea 57.w + pea 2.w + move.l 8(%fp),-(%sp) + jsr (%a2) + pea 8.w + pea 128.w + pea 56.w clr.l -(%sp) + move.l %d3,%a0 + move.l 8(%fp),-(%sp) + jsr (%a0) + lea (36,%sp),%sp +.L258: + movem.l -68(%fp),#15388 + unlk %fp + rts +.L260: + clr.l -(%sp) + moveq #7,%d4 pea 44.w pea 116.w pea 10.w pea 6.w - move.l %a6,-(%sp) - lea fill,%a2 - subq.l #4,%d3 - jsr (%a2) + move.l %fp,%d2 + add.l #-36,%d2 + move.l 8(%fp),-(%sp) + jsr (%a4) pea 1.w pea 1.w pea 116.w pea 10.w pea 6.w - move.l %a6,-(%sp) - jsr (%a2) + move.l 8(%fp),-(%sp) + jsr (%a4) lea (48,%sp),%sp pea 1.w pea 1.w pea 116.w pea 53.w pea 6.w - move.l %a6,-(%sp) - jsr (%a2) + move.l 8(%fp),-(%sp) + jsr (%a4) pea 1.w pea 44.w pea 1.w pea 10.w pea 6.w - move.l %a6,-(%sp) - jsr (%a2) + move.l 8(%fp),-(%sp) + jsr (%a4) lea (48,%sp),%sp pea 1.w pea 44.w pea 1.w pea 10.w pea 121.w - move.l %a6,-(%sp) - jsr (%a2) - lea append,%a3 + move.l 8(%fp),-(%sp) + jsr (%a4) clr.b %d0 - move.b %d0,64(%sp) - pea .LC18 - move.l %sp,%d2 - add.l #68,%d2 + pea .LC24 move.l %d2,-(%sp) + move.b %d0,-36(%fp) jsr (%a3) move.b arm+6,%d0 clr.b %d1 - add.l #49,%d0 - move.b %d0,80(%sp) - move.b %d1,81(%sp) lea (32,%sp),%sp - tst.l %d3 - jeq .L190 - move.l %d2,%d0 -.L174: - move.l %d0,-(%sp) - moveq #1,%d3 + add.l #49,%d0 + move.b %d0,-28(%fp) + move.b %d1,-27(%fp) + cmp.l %a5,%d4 + jne .L261 + pea .LC25 + move.l %d2,-(%sp) + move.b %d1,-36(%fp) + jsr (%a3) + addq.l #8,%sp + move.b arm+6,%d0 + add.l #49,%d0 + move.b %d0,-29(%fp) + clr.b %d0 + move.b %d0,-28(%fp) +.L262: + move.l %d2,-(%sp) pea 13.w pea 10.w - move.l %a6,-(%sp) - lea text,%a2 + move.l 8(%fp),-(%sp) jsr (%a2) - lea (16,%sp),%sp - moveq #63,%d1 -.L175: - moveq #12,%d0 -.L176: - moveq #7,%d4 - moveq #19,%d6 - and.l %d0,%d4 - move.l %d0,%d2 - lsr.l #3,%d2 - move.l %d1,%a0 - addq.l #1,%d0 - sub.l %d2,%a0 - move.l %d3,%d2 - add.l %a6,%a0 - lsl.l %d4,%d2 - move.b (%a0),%d4 - eor.l %d4,%d2 - move.b %d2,(%a0) - cmp.l %d0,%d6 - jne .L176 - addq.l #8,%d1 - cmp.l #975,%d1 - jne .L175 - moveq #4,%d7 - cmp.l phase.l,%d7 - jne .L191 + pea 7.w + pea 114.w + pea 12.w + pea 7.w + move.l %d3,%a0 + move.l 8(%fp),-(%sp) + jsr (%a0) + lea (36,%sp),%sp + move.l phase,%d0 + moveq #4,%d1 + cmp.l %d0,%d1 + jne .L263 move.l message,%d0 tst.l %d0 - jne .L179 - move.l #.LC14,%d0 -.L179: + jne .L264 + move.l #.LC16,%d0 +.L264: move.l %d0,-(%sp) pea 27.w -.L207: +.L291: pea 10.w - move.l %a6,-(%sp) + move.l 8(%fp),-(%sp) jsr (%a2) lea (16,%sp),%sp -.L172: - movem.l (%sp),#23804 - lea (76,%sp),%sp - rts -.L190: - move.l #.LC13,%d0 - jra .L174 -.L191: - move.w #9,%a4 - move.l %sp,%d2 - clr.l %d4 - add.l #52,%d2 - moveq #1,%d3 -.L178: + jra .L258 +.L261: + moveq #4,%d1 + cmp.l %a5,%d1 + jne .L262 + move.l #.LC15,%d2 + jra .L262 +.L263: + subq.l #7,%d0 + tst.l %d0 + jne .L274 + pea .LC26 + pea 24.w + pea 10.w + move.l 8(%fp),-(%sp) + jsr (%a2) + pea .LC27 + pea 31.w + pea 10.w + move.l 8(%fp),-(%sp) + jsr (%a2) + lea (28,%sp),%sp + move.l #.LC28,(%sp) +.L290: + pea 45.w + jra .L291 +.L274: + move.w #10,%a5 + move.l %fp,%d2 + sub.l %a4,%a4 + add.l #-24,%d2 +.L265: moveq #84,%d0 clr.b %d1 - move.b %d0,52(%sp) - move.l %d4,%d0 - add.l #49,%d0 - move.b %d0,53(%sp) - move.b %d1,54(%sp) move.l %d2,-(%sp) pea 22.w - pea 1(%a4) - move.l %a6,-(%sp) + move.l %a5,-(%sp) + move.l 8(%fp),-(%sp) + move.l %a4,%d4 + move.b %d0,-24(%fp) + move.l %a4,%d0 + add.l #49,%d0 + move.b %d0,-23(%fp) + move.b %d1,-22(%fp) jsr (%a2) mvz.b arm+7,%d0 lea (16,%sp),%sp btst %d4,%d0 - jne .L180 -.L184: - addq.l #1,%d4 - lea (14,%a4),%a4 - moveq #8,%d6 - cmp.l %d4,%d6 - jne .L178 + jeq .L266 + pea 7.w + pea 12.w + pea 21.w + pea -1(%a5) + move.l %d3,%a0 + move.l 8(%fp),-(%sp) + jsr (%a0) + lea (20,%sp),%sp +.L266: + addq.l #1,%a4 + lea (14,%a5),%a5 + moveq #8,%d0 + cmp.l %a4,%d0 + jne .L265 move.l phase,%d0 - moveq #1,%d7 - cmp.l %d0,%d7 - jne .L185 - clr.b %d0 - move.b %d0,52(%sp) - pea .LC19 + moveq #1,%d1 + cmp.l %d0,%d1 + jne .L267 + clr.b %d3 + pea .LC29 move.l %d2,-(%sp) + move.b %d3,-24(%fp) jsr (%a3) + pea -40(%fp) jsr (pass_steps.constprop.0) - addq.l #8,%sp + lea (12,%sp),%sp tst.l %d0 - jeq .L186 - moveq #9,%d1 - cmp.l %d0,%d1 - jcc .L193 + jeq .L268 + moveq #9,%d4 + cmp.l %d0,%d4 + jcc .L275 move.l %d0,%d1 moveq #10,%d4 divu.l %d4,%d1 - lea (58,%sp),%a0 + lea (-18,%fp),%a0 add.l #48,%d1 - move.b %d1,57(%sp) -.L187: - moveq #10,%d6 - remu.l %d6,%d1:%d0 - clr.b %d7 + move.b %d1,-19(%fp) +.L269: + moveq #10,%d3 + remu.l %d3,%d1:%d0 + clr.b %d4 add.l #48,%d1 move.b %d1,(%a0) - move.b %d7,1(%a0) - pea .LC20 -.L206: + move.b %d4,1(%a0) + tst.l -40(%fp) + jeq .L276 + move.l #.LC17,%d0 +.L270: + move.l %d0,-(%sp) +.L289: move.l %d2,-(%sp) jsr (%a3) addq.l #4,%sp move.l %d2,(%sp) pea 31.w pea 10.w - move.l %a6,-(%sp) + move.l 8(%fp),-(%sp) jsr (%a2) - pea .LC22 + pea .LC31 pea 38.w pea 10.w - move.l %a6,-(%sp) + move.l 8(%fp),-(%sp) jsr (%a2) lea (28,%sp),%sp - move.l #.LC23,(%sp) - pea 45.w - jra .L207 -.L180: - mvz.w %a4,%d0 - moveq #13,%d1 - lsl.l #3,%d0 - addq.l #7,%d0 -.L182: - subq.l #1,%d1 - tst.l %d1 - jeq .L184 - moveq #21,%d5 -.L183: - move.l %d5,%d6 - lsr.l #3,%d6 - move.l %d0,%a0 - move.l %d3,%d7 - sub.l %d6,%a0 - moveq #7,%d6 - add.l %a6,%a0 - and.l %d5,%d6 - addq.l #1,%d5 - lsl.l %d6,%d7 - move.b (%a0),%d6 - eor.l %d7,%d6 - move.b %d6,(%a0) - moveq #28,%d6 - cmp.l %d5,%d6 - jne .L183 - addq.l #8,%d0 - jra .L182 -.L193: - lea (57,%sp),%a0 - jra .L187 -.L186: - pea .LC21 - jra .L206 -.L185: + move.l #.LC32,(%sp) + jra .L290 +.L275: + lea (-19,%fp),%a0 + jra .L269 +.L276: + move.l #.LC18,%d0 + jra .L270 +.L268: + pea .LC30 + jra .L289 +.L267: moveq #5,%d1 cmp.l %d0,%d1 - jeq .L194 + jeq .L277 subq.l #2,%d0 tst.l %d0 - jne .L195 - move.l #.LC17,%d0 -.L189: + jne .L278 + move.l #.LC21,%d0 +.L272: move.l %d0,-(%sp) pea 31.w pea 10.w - move.l %a6,-(%sp) + move.l 8(%fp),-(%sp) jsr (%a2) - pea .LC24 + pea .LC33 pea 45.w pea 10.w - move.l %a6,-(%sp) + move.l 8(%fp),-(%sp) jsr (%a2) lea (32,%sp),%sp - jra .L172 -.L194: - move.l #.LC16,%d0 - jra .L189 -.L195: - move.l #.LC15,%d0 - jra .L189 + jra .L258 +.L277: + move.l #.LC20,%d0 + jra .L272 +.L278: + move.l #.LC19,%d0 + jra .L272 .size module_draw, .-module_draw .section .rodata .type ticks.0, @object @@ -1581,25 +2126,30 @@ ticks.0: .size bounce_part_menu, 24 bounce_part_menu: .long 1 - .long .LC13 - .long 2 + .long .LC15 + .long 3 .long bounce_actions .long bounce_choose .long 0 .section .rodata.str1.1 -.LC25: +.LC34: .string "BOUNCE TRACK" -.LC26: - .string "UNDO BOUNCE" +.LC35: + .string "RESET TRACK" +.LC36: + .string "UNDO" .section .rodata .align 2 .type bounce_actions, @object - .size bounce_actions, 8 + .size bounce_actions, 12 bounce_actions: - .long .LC25 - .long .LC26 + .long .LC34 + .long .LC35 + .long .LC36 .local part_buf .comm part_buf,6322,1 + .local part_copy + .comm part_copy,6322,1 .local record_new .comm record_new,2330,1 .local record_copy @@ -1607,9 +2157,9 @@ bounce_actions: .local undo_ready .comm undo_ready,4,2 .local last - .comm last,32,2 + .comm last,12,2 .local arm - .comm arm,32,2 + .comm arm,12,2 .local message .comm message,4,2 .local shown_ticks @@ -1620,3 +2170,38 @@ bounce_actions: .comm consumed_lo,4,2 .local phase .comm phase,4,2 + .type FRESH, @object + .size FRESH, 134 +FRESH: + .base64 "BAgAQAAAfwBPQAAAfwBPAEAAAEAAAAAAAAAAQAIBf0ABICAgAAAAAH9/QEB/AH8AQABALwB/AH8AAQAAAAFAAQAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAABAQAAAAAAAAABAAMAAAF/AQAAAAAAAAABAUAACQEAAAD//wA=" + .align 2 + .type TRACK_BYTES, @object + .size TRACK_BYTES, 36 +TRACK_BYTES: + .word 0 + .byte 1 + .byte 1 + .word 8 + .byte 1 + .byte 1 + .word 34 + .byte 1 + .byte 1 + .word 42 + .byte 30 + .byte 30 + .word 282 + .byte 24 + .byte 24 + .word 474 + .byte 30 + .byte 30 + .word 714 + .byte 5 + .byte 5 + .word 754 + .byte 30 + .byte 30 + .word 1538 + .byte 12 + .byte 12 From 53bddea66e7de8cf860eb7620ed424e69a23bfdb Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Wed, 2 Dec 2026 22:55:11 +0100 Subject: [PATCH 10/43] Bounce 0.2.0: take any machine signature version; record the silent T3/T4 run Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/TESTING.md | 8 ++++++++ sdk/drafts/bounce/bounce.c | 4 ++-- sdk/drafts/bounce/unit.s | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index a341f09156..cf2bbf9cbd 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -107,6 +107,14 @@ The trial's verdict at 900 s was FAIL: the base's frame guard had skipped 16,749 To run on the unit: a merge of tracks with different per-track lengths; a Grain track bounced, then FLEX picked; AMP and LFO after a bounce; RESET TRACK on a FLEX track and on a Grain track (refused); UNDO after each. +**2 December 2026, 0.2.0 on the same MKII**, same base and kept set, RAM trials never kept, in the developer's own project after a SAVE. The developer reported that everything listed above worked (merge, Grain bounce with PICK FLEX, AMP and LFO, RESET TRACK, UNDO), except: + +- T3 and T4, both STATIC, had been merged into T2's bounce (so cued for the take, then muted), then unmuted and reset with RESET TRACK. With a new sample loaded they made no sound. Two diagnostic builds (not committed) read their state while the pattern played: STATIC, FX1 FILTER and FX2 DELAY at a fresh project's values, stock AMP, trigs present, not muted, not cued, not soloed, track level 0x72, and the voice started on each trig. Sample preview was silent too, and so was T3 as FLEX with a sample in its Flex slot. They stayed silent after a SAVE and a power cycle (the developer's), and played again after the project was reloaded, which also undid the session. Cause not found: the merge and RESET TRACK are still to be separated. +- After that power cycle, T1 and T2 (the bounced tracks) were silent too: the takes were only in the recorder buffers, which a power cycle empties (no WAV save yet). +- The first 0.2.0 trial was stopped early for the diagnostic build. The diagnostic trials ended clean; the base logged no skipped renders after T1's Grain was bounced. + +Changed since: RESET TRACK and the Grain path take a Modwerk machine signature with any version 1-63 (syntiz signs models 1-15; 0.2.0 took 1-9). Not the cause here: T3 and T4 were STATIC before the merge. + ## Stock flows Not tested. To compare with and without the module: REC alone (grid recording), TRACK + REC1/2/3 sampling, recorder trigs and RLEN, CUE routing and Studio mode, Part Edit's stock rows, Part Reload and Save, project save and reload, stock track mute. diff --git a/sdk/drafts/bounce/bounce.c b/sdk/drafts/bounce/bounce.c index 0839803279..e4051ac7ed 100644 --- a/sdk/drafts/bounce/bounce.c +++ b/sdk/drafts/bounce/bounce.c @@ -290,8 +290,8 @@ static unsigned modwerk_machine(uint32_t part, unsigned t) { uint32_t s = part + P_SIG + 30u * t; unsigned a = U8(s), b = U8(s + 1), v = U8(s + 2); - return a >= 'A' && a <= 'Z' && ((b >= 'A' && b <= 'Z') || (b >= '0' && b <= '9')) && v >= 1u && v <= 9u - && U8(part + P_MACHINE + t) == FLEX; + return a >= 'A' && a <= 'Z' && ((b >= 'A' && b <= 'Z') || (b >= '0' && b <= '9')) && v >= 1u && v <= 63u + && U8(part + P_MACHINE + t) == FLEX; /* syntiz signs models 1-15 */ } static void show(const char *text) { message = text; phase = MESSAGE; shown_ticks = 0; redraw(); } diff --git a/sdk/drafts/bounce/unit.s b/sdk/drafts/bounce/unit.s index 85820ec51e..62d89d7603 100644 --- a/sdk/drafts/bounce/unit.s +++ b/sdk/drafts/bounce/unit.s @@ -160,7 +160,7 @@ modwerk_machine: .L18: subq.l #1,%d1 mvz.b %d1,%d1 - moveq #8,%d0 + moveq #62,%d0 cmp.l %d1,%d0 jcs .L19 move.l 8(%sp),%a0 From 4d1334cf8af5be0bb6b6de7b01c53d2f941fa423 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Wed, 2 Dec 2026 23:26:41 +0100 Subject: [PATCH 11/43] Bounce 0.2.1: RESET TRACK no longer silences the track RESET TRACK's table of fresh values had one zero too many in the Part's second page group (+0x2f2), so every byte after the LFO waves landed one field off and the reset track stayed silent, preview included, until a Part reload. Reproduced in the emulator (RESET TRACK alone; the merge was not the cause) and fixed there; verify.py now compares the table with a fresh project's Part on the developer's computer. Not yet run on a unit. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/README.md | 4 +- sdk/drafts/bounce/TESTING.md | 20 +++++++++- sdk/drafts/bounce/bounce.c | 6 +-- sdk/drafts/bounce/manifest.py | 4 +- sdk/drafts/bounce/octamod.module.json | 2 +- sdk/drafts/bounce/unit.s | 2 +- sdk/drafts/bounce/verify.py | 56 ++++++++++++++++++++++++++- 7 files changed, 82 insertions(+), 12 deletions(-) diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index dcb343c01b..c0c4b9af6c 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -60,9 +60,9 @@ It answers `ev_in_use` so it rests while nothing is armed, and contributes its B - Seen in the emulator (TESTING.md): CUE and SRC3 = the track both carry a track after its FX. The pattern's trig and lock layout is mapped. Still open: the same on a unit, Studio mode cue, and whether a take follows the track's LEVEL. - Not tested on any unit or emulator. -### What the 0.2.0 prototype does and does not do yet +### What the 0.2.1 prototype does and does not do yet -The code in `bounce.c` builds (`npm run module:dev -- bounce --build-only`) and has not run anywhere. Against the design above it still lacks: +0.2.0 ran on one MKII in RAM trials; 0.2.1 fixes RESET TRACK and has run only in the emulator so far ([TESTING.md](TESTING.md)). Against the design above it still lacks: - **The WAV.** The take stays in the track's recorder buffer, so it is lost at a power cycle and a project reload does not bring it back. Saving it to the project is the next piece. - **Passes over 64 master steps.** RLEN counts at most 64 master 16ths (4 bars at 1X), so a longer pass is refused with PASS OVER 64 STEPS. diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index cf2bbf9cbd..d77ae0c907 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -109,12 +109,30 @@ To run on the unit: a merge of tracks with different per-track lengths; a Grain **2 December 2026, 0.2.0 on the same MKII**, same base and kept set, RAM trials never kept, in the developer's own project after a SAVE. The developer reported that everything listed above worked (merge, Grain bounce with PICK FLEX, AMP and LFO, RESET TRACK, UNDO), except: -- T3 and T4, both STATIC, had been merged into T2's bounce (so cued for the take, then muted), then unmuted and reset with RESET TRACK. With a new sample loaded they made no sound. Two diagnostic builds (not committed) read their state while the pattern played: STATIC, FX1 FILTER and FX2 DELAY at a fresh project's values, stock AMP, trigs present, not muted, not cued, not soloed, track level 0x72, and the voice started on each trig. Sample preview was silent too, and so was T3 as FLEX with a sample in its Flex slot. They stayed silent after a SAVE and a power cycle (the developer's), and played again after the project was reloaded, which also undid the session. Cause not found: the merge and RESET TRACK are still to be separated. +- T3 and T4, both STATIC, had been merged into T2's bounce (so cued for the take, then muted), then unmuted and reset with RESET TRACK. With a new sample loaded they made no sound. Two diagnostic builds (not committed) read their state while the pattern played: STATIC, FX1 FILTER and FX2 DELAY at a fresh project's values, stock AMP, trigs present, not muted, not cued, not soloed, track level 0x72, and the voice started on each trig. Sample preview was silent too, and so was T3 as FLEX with a sample in its Flex slot. They stayed silent after a SAVE and a power cycle (the developer's), and played again after the project was reloaded, which also undid the session. Cause found in the emulator, below: RESET TRACK's table of fresh values had one zero too many in the second page group, so the bytes after the LFO waves landed one field off. Fixed in 0.2.1. - After that power cycle, T1 and T2 (the bounced tracks) were silent too: the takes were only in the recorder buffers, which a power cycle empties (no WAV save yet). - The first 0.2.0 trial was stopped early for the diagnostic build. The diagnostic trials ended clean; the base logged no skipped renders after T1's Grain was bounced. Changed since: RESET TRACK and the Grain path take a Modwerk machine signature with any version 1-63 (syntiz signs models 1-15; 0.2.0 took 1-9). Not the cause here: T3 and T4 were STATIC before the merge. +## The 0.2.1 prototype + +**2 December 2026, the silent tracks, emulator.** `ot_emu` (`--interactive --dsp --frame --mount`, MKII panel) on the development twin of the developer's base `4813a3e5…`, Bounce as a RAM trial over the emulated USB link. Fixture: a fresh project, eight tracks on their own generated sounds (octabam `make_test_audio`), trigs on steps 1, 5, 9 and 13, FX off. Levels are each track's RMS in the emulator's per-track output over about 0.5 s of emulated playing, so they compare tracks in one run, nothing more. Not hardware evidence. + +| Build | Steps | T3 | T4 | Others | +| --- | --- | --- | --- | --- | +| none (stock) | play | 94 | 115 | play | +| 0.2.0 | RESET TRACK on T3 (no merge), four trigs on T3, play | **0** | 117 | play | +| 0.2.1 | the same | 90 | 115 | play | +| 0.2.1 | T2 bounced with T3 and T4 merged (BOUNCED; T3 and T4 muted) | 0 (muted) | 0 (muted) | play | +| 0.2.1 | then T3 and T4 unmuted | 91 | 117 | play | +| 0.2.1 | then RESET TRACK on T3 and T4, four trigs each, play | 91 | 113 | play | + +- **Cause, measured.** After 0.2.0's RESET TRACK, T3's Part bytes at `+0x2f2 + 30t` (LFO PMTR and WAVE, then the other setup pages) matched the untouched T2 and T4 up to byte 13, and from byte 14 on were theirs shifted one byte later: `FRESH` had seven zeros where a fresh project has six. Which field silences the voice was not isolated. The merge alone leaves T3 and T4 playing; RESET TRACK alone silences the track. So the developer's case was RESET TRACK. A Part reload rewrote the bytes, which is why reloading the project brought the sound back. +- **Fix.** `FRESH` corrected; after RESET TRACK in 0.2.1, T3's and T4's Part bytes equal T2's in that group. `verify.py` now compares `FRESH`, range by range, with all eight tracks of a fresh project's Part 1 (octabam's `out/fresh/image/NOPROJ`, on the developer's computer; slot bytes excluded); it fails on 0.2.0's table at byte 14 and passes on 0.2.1's. +- **Not tested** in this run: sample preview on a reset track, a reset FLEX track with a sample in its Flex slot, SAVE and power cycle after a reset, UNDO of a reset, and 0.2.1 on a unit. +- **Driving note.** FUNC+PART reopens on the row last used, so a scripted run must read the screen before pressing YES: one run here pressed UNDO instead of RESET TRACK and is not counted. + ## Stock flows Not tested. To compare with and without the module: REC alone (grid recording), TRACK + REC1/2/3 sampling, recorder trigs and RLEN, CUE routing and Studio mode, Part Edit's stock rows, Part Reload and Save, project save and reload, stock track mute. diff --git a/sdk/drafts/bounce/bounce.c b/sdk/drafts/bounce/bounce.c index e4051ac7ed..2aa80c3b75 100644 --- a/sdk/drafts/bounce/bounce.c +++ b/sdk/drafts/bounce/bounce.c @@ -3,7 +3,7 @@ * * Bounce, OS 1.40C: record tracks for one pattern pass into the active track's * recorder buffer, then make that track a Flex machine playing the take. - * Prototype 0.2.0: 0.1.1 ran on one MKII (TESTING.md); this one has not yet. + * Prototype 0.2.1: 0.2.0 ran on one MKII; 0.2.1 fixes RESET TRACK, emulator only (TESTING.md). * * DOWN+REC (or FUNC+PART > BOUNCE > BOUNCE TRACK) opens BOUNCE. Trig keys 1-8 * add or remove tracks to merge; YES arms; NO closes or cancels. @@ -125,8 +125,8 @@ static const uint8_t FRESH[134] = { 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, - 0x00, 0x00, 0x01, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, + 0x00, 0x01, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x40, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, }; #define AMP_AT 6u /* in P_PAGES: ATK HOLD REL VOL BAL XVOL */ diff --git a/sdk/drafts/bounce/manifest.py b/sdk/drafts/bounce/manifest.py index 783bea3614..a9b09dbaba 100644 --- a/sdk/drafts/bounce/manifest.py +++ b/sdk/drafts/bounce/manifest.py @@ -11,7 +11,7 @@ calls stock's recorder mailbox (0x40005178), Part paste (0x40029a4c), track write (0x40029754) and machine transition (0x400972fc). Read from octabam's firmware notes and partly measured in the emulator (TESTING.md); the module -itself has not run anywhere yet. bounce.c is the source; generate.py writes +ran on one MKII in RAM trials (TESTING.md). bounce.c is the source; generate.py writes unit.s. """ @@ -23,7 +23,7 @@ kind=Kind.CF_PATCH, doc="Bounce: record tracks for one pattern into the active track and make it a Flex machine playing the take.", category=Category.TRACK, author="seniorspiz", author_url="https://github.com/seniorspiz", - proof=Proof.UNTESTED, proof_note="Prototype: builds; not yet run in the emulator or on a unit.", + proof=Proof.UNTESTED, proof_note="Prototype: 0.2.0 ran on one MKII in RAM trials; 0.2.1 (RESET TRACK fix) in the emulator only.", linked=(Linked("bounce", "modules/bounce/unit.s", cpu="5475", dram=True),), gates=(Gate("modules/bounce/verify.py", remix_arg=False),), ) diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index 03907d3cd4..a804a29be9 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -3,7 +3,7 @@ "id": "bounce", "key": "BOUNCE", "name": "Bounce", - "version": "0.2.0", + "version": "0.2.1", "category": "system", "author": { "github": "seniorspiz", diff --git a/sdk/drafts/bounce/unit.s b/sdk/drafts/bounce/unit.s index 62d89d7603..ae62295705 100644 --- a/sdk/drafts/bounce/unit.s +++ b/sdk/drafts/bounce/unit.s @@ -2173,7 +2173,7 @@ bounce_actions: .type FRESH, @object .size FRESH, 134 FRESH: - .base64 "BAgAQAAAfwBPQAAAfwBPAEAAAEAAAAAAAAAAQAIBf0ABICAgAAAAAH9/QEB/AH8AQABALwB/AH8AAQAAAAFAAQAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAABAQAAAAAAAAABAAMAAAF/AQAAAAAAAAABAUAACQEAAAD//wA=" + .base64 "BAgAQAAAfwBPQAAAfwBPAEAAAEAAAAAAAAAAQAIBf0ABICAgAAAAAH9/QEB/AH8AQABALwB/AH8AAQAAAAFAAQAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAABAQAAAAAAAAEAAwAAAX8BAAAAAAAAAAABAUAACQEAAAD//wA=" .align 2 .type TRACK_BYTES, @object .size TRACK_BYTES, 36 diff --git a/sdk/drafts/bounce/verify.py b/sdk/drafts/bounce/verify.py index b993d5b46c..47d02fdf6d 100644 --- a/sdk/drafts/bounce/verify.py +++ b/sdk/drafts/bounce/verify.py @@ -1,2 +1,54 @@ -"""Replace with module-specific, meaningful behavior and resource gates.""" -raise SystemExit("[FAIL] Untested development scaffold: implement verification before qualification.") +"""Bounce's gate: RESET TRACK's table is a fresh project's track, byte for byte. + +bounce.c's FRESH holds one track's Part bytes in TRACK_BYTES' order. A byte out +of place shifts every field after it: 0.2.0's table had one extra zero in the +second page group, and a reset track stayed silent, preview included, until a +Part reload (emulator, 2 December 2026). This compares FRESH, and the ranges' +sizes, with every track of a fresh project's bank 1 Part 1, read from +octabam's own fresh image (out/fresh/image/NOPROJ, made by octabam's build from +the developer's OS; nothing of it is in this repository). The slot bytes differ +per track and are set by reset_track, so they are left out. + +Run: python3 verify.py [OCTABAM_DIR] (default: $OCTABAM, then +~/.cache/modwerk-upstream/octabam, then sdk/octabam) +""" +import os, pathlib, re, sys + +HERE = pathlib.Path(__file__).resolve().parent +SRC = (HERE / "bounce.c").read_text() +RANGES = [(int(a, 0) if a.startswith("0x") else None, a, int(s), int(n)) + for a, s, n in re.findall(r"\{(P_\w+|0x[0-9a-f]+), (\d+), (\d+)\}", SRC.split("TRACK_BYTES[] = {", 1)[1].split("};", 1)[0])] +DEFINES = {m[0]: int(m[1], 16) for m in re.findall(r"#define (P_\w+)\s+(0x[0-9a-f]+)u", SRC)} +body = SRC.split("static const uint8_t FRESH[", 1)[1] +size = int(body.split("]", 1)[0]) +FRESH = [int(v, 16) for v in re.findall(r"0x([0-9a-f]{2})", body.split("{", 1)[1].split("};", 1)[0])] + +fails = [] +total = sum(n for *_, n in RANGES) +if len(FRESH) != size or size != total: + fails.append(f"FRESH has {len(FRESH)} bytes, is declared {size}, TRACK_BYTES covers {total}") + +candidates = [sys.argv[1]] if len(sys.argv) > 1 else [os.environ.get("OCTABAM", ""), + str(pathlib.Path.home() / ".cache/modwerk-upstream/octabam"), str(HERE.parents[1] / "octabam")] +bank = next((pathlib.Path(c) / "out/fresh/image/NOPROJ/bank01.work" for c in candidates + if c and (pathlib.Path(c) / "out/fresh/image/NOPROJ/bank01.work").is_file()), None) +if bank is None: + sys.exit("[FAIL] no fresh project: build octabam's fresh image (out/fresh/image/NOPROJ) or pass OCTABAM_DIR") +data = bank.read_bytes() +PART = 0x8eed6 + 9 # ot_project.PART_BASE, then the 9-byte record header: RAM offsets from here + +for t in range(8): + k = 0 + for _, name, stride, n in RANGES: + at = DEFINES[name] + stride * t + want = data[PART + at:PART + at + n] + have = bytes(FRESH[k:k + n]) + if name != "P_SLOTS" and have != want: + first = next(i for i in range(n) if have[i] != want[i]) + fails.append(f"T{t + 1} {name}: byte {first} is {have[first]:#04x}, a fresh project has {want[first]:#04x}" + f"\n fresh {want.hex(' ')}\n FRESH {have.hex(' ')}") + k += n + +if fails: + sys.exit("[FAIL] " + "\n[FAIL] ".join(dict.fromkeys(fails))) +print(f"[PASS] FRESH ({size} bytes) matches all 8 tracks of {bank.parent.name}'s Part 1 outside the slot bytes") From fda086c9cae71e1d8e1caffb2f7d4929cf58b2a3 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 00:46:11 +0100 Subject: [PATCH 12/43] Bounce 0.3.0: save the take as a WAV; refuse T8 as master track and cue level 0 After the bounce, stock's SAVE THIS RECORDING (the chain SAVE ALL RECORDINGS runs) writes the take as B-YYMMDD-HHMM.wav with its .ot, never over an existing file, and assigns the track's buffer to it, so it reloads once the project is saved. YES now refuses T8 while MASTER TRACK is on and a merge with a track at cue level 0. Emulator: the WAV and .ot on the card, one pass long; the refusals; PER TRACK lengths, and the take starting on the track's own step 1. Release notes, thumbnail and README brought up to date. Not yet run on a unit. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/CHANGELOG.json | 34 + sdk/drafts/bounce/README.md | 43 +- sdk/drafts/bounce/TESTING.md | 16 + sdk/drafts/bounce/bounce.c | 108 +- sdk/drafts/bounce/manifest.py | 4 +- sdk/drafts/bounce/octamod.module.json | 2 +- sdk/drafts/bounce/presentation/thumbnail.svg | 19 + sdk/drafts/bounce/unit.s | 1209 +++++++++++------- 8 files changed, 927 insertions(+), 508 deletions(-) create mode 100644 sdk/drafts/bounce/CHANGELOG.json create mode 100644 sdk/drafts/bounce/presentation/thumbnail.svg diff --git a/sdk/drafts/bounce/CHANGELOG.json b/sdk/drafts/bounce/CHANGELOG.json new file mode 100644 index 0000000000..2f8781b181 --- /dev/null +++ b/sdk/drafts/bounce/CHANGELOG.json @@ -0,0 +1,34 @@ +[ + { + "version": "0.3.0-experimental", + "date": "2026-12-03", + "changes": [ + "The take is saved as a WAV (B-YYMMDD-HHMM) and the track's buffer points to it, so it reloads once you save the project.", + "Refuses T8 while MASTER TRACK is on, and a merge with a track whose cue level is 0, with the reason on screen.", + "Emulator only so far; not yet run on a unit." + ] + }, + { + "version": "0.2.1-experimental", + "date": "2026-12-02", + "changes": [ + "RESET TRACK no longer leaves the track silent until a Part reload." + ] + }, + { + "version": "0.2.0-experimental", + "date": "2026-12-02", + "changes": [ + "Merged tracks record until their lengths meet; Grain and synth tracks are bounced as they sound, then you pick FLEX.", + "The bounced track gets stock AMP, no LFO depth and stock FLEX settings, so it plays the take as recorded.", + "New: FUNC+PART > BOUNCE > RESET TRACK makes a track a fresh STATIC track. UNDO covers it too." + ] + }, + { + "version": "0.1.1-experimental", + "date": "2026-12-02", + "changes": [ + "First run on a unit: DOWN+REC opens BOUNCE, trig keys merge tracks, YES records one pass and the track plays it as FLEX." + ] + } +] diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index c0c4b9af6c..6d28a6c468 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -1,10 +1,10 @@ # Bounce -Version 0.1.0 · by @seniorspiz · a draft: the design below is agreed, no code has run yet. +Version 0.3.0 · by @seniorspiz · a draft: 0.2.0 ran on one MKII in RAM trials; 0.3.0 has run in the emulator only ([TESTING.md](TESTING.md)). ## Overview -Bounce records a track in place, the way bounce or freeze works in a DAW, without setting up the recorder's buffer, length and trigs by hand. It records the active track, and any other tracks you merge in, for exactly one pattern length (in per-track mode, the track's own length; merged tracks of different lengths, until their lengths meet), with their effects. When the take ends, the active track becomes a Flex machine playing the take: its FX are off, its AMP is stock's (HOLD and REL full, VOL and BAL centred), its LFOs no longer move it, its old trigs and locks are replaced by one trig on step 1, and the take is saved as a WAV in the project, so the project saves and reloads unchanged. The other merged tracks are muted with stock's own mute. A Grain or synth track is bounced as it sounds, so its CPU is free once it plays the take as Flex. RESET TRACK turns any track back into a plain STATIC track. UNDO brings back what the last bounce or reset changed, until the next power cycle or project change. +Bounce records a track in place, the way bounce or freeze works in a DAW, without setting up the recorder's buffer, length and trigs by hand. It records the active track, and any other tracks you merge in, for exactly one pattern length (in per-track mode, the track's own length; merged tracks of different lengths, until their lengths meet), with their effects. When the take ends, the active track becomes a Flex machine playing the take: its FX are off, its AMP is stock's (HOLD and REL full, VOL and BAL centred), its LFOs no longer move it, its old trigs and locks are replaced by one trig on step 1, and the take is saved as a WAV (`B-YYMMDD-HHMM`) where SAVE SAMPLES TO says, with the track's recorder buffer assigned to it, so once you save the project the take reloads with it. The other merged tracks are muted with stock's own mute. A Grain or synth track is bounced as it sounds, so its CPU is free once it plays the take as Flex. RESET TRACK turns any track back into a plain STATIC track. UNDO brings back what the last bounce or reset changed, until the next power cycle or project change. Category: **system**. It rewrites a track's Part and pattern when the musician asks, and uses no effect slot, DSP code or knob. @@ -15,24 +15,22 @@ Category: **system**. It rewrites a track's Part and pattern when the musician a | DOWN held, then REC | Opens BOUNCE for the active track. REC alone stays stock. | | FUNC+PART > BOUNCE > BOUNCE T*n* | Opens BOUNCE for the active track, from the Part Edit window. | | Trig keys 1-8, while BOUNCE is open | Add or remove T1-T8 from the merge. The active track always stays in. Stock TRACK keys keep working as stock, so BOUNCE sits beside Track Solo. | -| YES, while BOUNCE is open | Arms the take: it starts on the next step 1. | -| NO, while BOUNCE is open | Closes BOUNCE and changes nothing; cancels an armed take that has not started. | +| YES, while BOUNCE is open | Arms the take: it starts with the next pattern start. Refused, with the reason, when the pass is over 64 steps, T8 is merged or chosen while MASTER TRACK is on, a merged track's cue level is 0, or the recorder is busy. | +| NO, while BOUNCE is open | Closes BOUNCE and changes nothing; cancels an armed or running take. | | FUNC+PART > BOUNCE > RESET TRACK | Asks first, then makes the active track a STATIC track with a fresh project's settings (FX1 FILTER, FX2 DELAY, stock AMP, LFO, playback and recorder setup, its own slots), no trigs and no locks. Its length and scale stay. A Grain or synth track: pick STATIC in the machine chooser first. | | After bouncing a Grain or synth track | The take is in, and the bottom line reads BOUNCED: T*n* PICK FLEX. Pick FLEX for that track in the machine chooser: Bounce then makes it play the take. Until then the machine plays on unchanged. | | FUNC+PART > BOUNCE > UNDO | Restores the last bounce's or reset's track: machine, FX, every page, slots, trigs, locks, and the merged tracks' mutes. | -While BOUNCE is open, trig keys 1-8 show the merge: the active track's trig key blinks, merged tracks' are fully lit, the others dim. Where a model's trig keys carry a colour channel, the active track also uses it. Closing BOUNCE gives the trig lamps back to stock. - -BOUNCE shows `READY`, `ARMED`, `REC`, `SAVING`, `DONE` or the reason it refuses, as a stock toast does. +BOUNCE shows the merge as inverted track names (the trig key lamps stay stock's: see the limits below), then PRESS PLAY, WAITS FOR PATTERN START or RECORDING ONE PASS, and at the end BOUNCED, SAVED AS with the file's name, or the reason it refused. While stock writes the WAV, its own screens show. ## Usage ### Quick tutorial: bounce two tracks into one -1. Select T1 with its TRACK key. Hold DOWN and press REC: BOUNCE opens and T1's lamp blinks. -2. Press trig key 2: it lights fully, so T2 is merged into T1's take. Press YES: BOUNCE reads ARMED. -3. Play the pattern. On step 1 BOUNCE reads REC, and after one pattern SAVING, then DONE. T1 now plays the take on a Flex machine with one trig, and T2 is muted. -4. To go back, FUNC+PART > BOUNCE > UNDO. +1. Select T1 with its TRACK key. Hold DOWN and press REC: BOUNCE opens with T1 inverted. +2. Press trig key 2: T2 is inverted too, so it is merged into T1's take. Press YES: BOUNCE reads WAITS FOR PATTERN START (PRESS PLAY when stopped). +3. Play the pattern. At the pattern start BOUNCE reads RECORDING ONE PASS; after one pass the take is saved and BOUNCE reads BOUNCED, SAVED AS B1-…. T1 now plays the take on a Flex machine with one trig, and T2 is muted. +4. Save the project to keep the take's link. To go back, FUNC+PART > BOUNCE > UNDO. ## How it works @@ -40,14 +38,14 @@ Every piece of work runs on a key press, once a step while a take is armed, or a | Step | Where it runs | | --- | --- | -| Check: audio tracks only, the length fits recorder memory, the active track's recorder is free | key press | +| Check: audio tracks only, the pass fits RLEN (64 master steps), MASTER TRACK and T8, the merged tracks' cue levels, the active track's recorder is free | key press | | Snapshot the active track's Part bytes, its whole pattern record (trigs, locks, conditions, 2,330 bytes) and every merged track's mute, for UNDO (module memory, not stock's shared undo buffer) | key press | | One track: set its recorder's source to itself. Several: send the merged tracks to CUE for the take and record CUE | key press | | Set the length to the pattern's (or the track's) and arm for the next step 1 | key press | | Record, on the instrument's own tempo, scale and length | stock's recorder | | See that the take ended | once a step, only while armed | | Make the active track a Flex machine playing the take, FX1 and FX2 off, one trig on step 1 at full length; mute the merged tracks; restore the CUE routing | one bounded edit | -| Save the take as a WAV in the project and assign it to the Flex slot | a card job after the take | +| Save the take as a WAV and assign the track's recorder buffer to it: stock's SAVE THIS RECORDING with ASSIGN TO SELF (the chain stock's SAVE ALL RECORDINGS runs), a name that is free, and stock's done callback | stock's card job after the take | It answers `ev_in_use` so it rests while nothing is armed, and contributes its BOUNCE row to the base's `ot_part_menu` table. @@ -57,22 +55,21 @@ It answers `ev_in_use` so it rests while nothing is armed, and contributes its B - Merging several tracks uses CUE for the take, so the cue outputs carry the merged tracks while it records. The main outputs are untouched. - `key:DOWN+REC` and `key:TRIG@BOUNCE` are declared in `compatibility.uiClaims`. Keys arrive through the base's shared `module_key` bus, so Bounce patches no stock key site. On stock, DOWN held + REC only toggles GRID RECORDING as REC alone does (emulator, TESTING.md); with Bounce, REC alone stays stock. - With MASTER TRACK on, T8 carries the mix of T1-T7, so T8 cannot be a bounce destination then and is refused. -- Seen in the emulator (TESTING.md): CUE and SRC3 = the track both carry a track after its FX. The pattern's trig and lock layout is mapped. Still open: the same on a unit, Studio mode cue, and whether a take follows the track's LEVEL. -- Not tested on any unit or emulator. +- Seen in the emulator (TESTING.md): CUE and SRC3 = the track both carry a track after its FX. The pattern's trig and lock layout is mapped. Still open: the same on a unit, Studio mode cue, MAIN TO CUE, and whether a take follows the track's LEVEL. +- The WAV is never deleted by Bounce: UNDO gives the track its old settings back and leaves the file on the card and the buffer's link to it. A later recording into the same buffer replaces the take in the buffer, as stock does. +- 0.2.0 ran on one MKII; 0.3.0 has run in the emulator only (TESTING.md). -### What the 0.2.1 prototype does and does not do yet +### What the 0.3.0 prototype does and does not do yet -0.2.0 ran on one MKII in RAM trials; 0.2.1 fixes RESET TRACK and has run only in the emulator so far ([TESTING.md](TESTING.md)). Against the design above it still lacks: +0.2.0 ran on one MKII in RAM trials; 0.3.0 adds the WAV and the refusals below and has run only in the emulator so far ([TESTING.md](TESTING.md)). Its limits: -- **The WAV.** The take stays in the track's recorder buffer, so it is lost at a power cycle and a project reload does not bring it back. Saving it to the project is the next piece. +- **The WAV needs a project save.** The file is written at once, but the project names it only after you save the project, as with stock's SAVE THIS RECORDING. A power cycle before that leaves the WAV on the card and the buffer empty. - **Passes over 64 master steps.** RLEN counts at most 64 master 16ths (4 bars at 1X), so a longer pass is refused with PASS OVER 64 STEPS. -- **Trig key lamps.** The merge is shown in the BOUNCE window (merged tracks inverted), not yet on the trig keys. +- **Trig key lamps.** The merge shows in the BOUNCE window only. Stock redraws the trig lamps every step, so lighting them needs a lamp hook in the base that several modules can share; Bounce does not patch that stock site on its own. - **Modwerk machines.** A Grain or synth track is bounced as it sounds; only the machine chooser switches a track off one (the base runs the machine's own leave), so you pick FLEX there yourself after the take, and STATIC before RESET TRACK. - **Merged lengths.** The take runs until the merged tracks' passes meet (2 bars and 3 bars: 6 bars). Past 64 master steps it takes the longest pass instead, and the window reads PASS *n* (LONGEST). In PER TRACK mode the bounced track's length becomes the take's, at 1X. -- **The MASTER TRACK check.** T8 is not refused yet while MASTER TRACK is on. -- **PER TRACK mode.** The pass length is the track's own, but QREC PLEN starts the take at the master pattern's start (inferred). -- **Cue levels.** A merged track records at its CUE level; one at 0 is silent in the take. -- **Recording with the sequencer stopped.** YES arms; the take starts with the next pattern start once the sequencer plays (inferred). STOP during the take cancels the bounce. +- **Cue levels.** A merged track records at its cue level, so one at 0 is refused (T*n* CUE LEVEL IS 0). Other cue levels are taken as they are. +- **Recording with the sequencer stopped.** YES shows PRESS PLAY; the take starts with the next pattern start once the sequencer plays. STOP during the take cancels the bounce. ## Tests and measurements diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index d77ae0c907..ace4fbcbea 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -133,6 +133,22 @@ Changed since: RESET TRACK and the Grain path take a Modwerk machine signature w - **Not tested** in this run: sample preview on a reset track, a reset FLEX track with a sample in its Flex slot, SAVE and power cycle after a reset, UNDO of a reset, and 0.2.1 on a unit. - **Driving note.** FUNC+PART reopens on the row last used, so a scripted run must read the screen before pressing YES: one run here pressed UNDO instead of RESET TRACK and is not counted. +## The 0.3.0 prototype + +**3 December 2026, emulator only.** Same `ot_emu` setup as 0.2.1 (above), now with `--card-rw` so the card image keeps what the firmware writes; the card was read back with octabam's `emu_card.extract_image`. The fixture adds pattern A02 in PER TRACK mode (T1 16 steps, T2 12 steps, 1X). Not hardware evidence. + +| What | Steps | Seen | +| --- | --- | --- | +| WAV save | T1 bounced alone on A01 | BOUNCED, SAVED AS / `B1-261203-0036`; on the card `AUDIO/B1-261203-0036.wav` (RIFF, 2 channels, 44,100 Hz, 16 bit, 88,200 frames = one 16-step pass at 120 BPM, peak 8,320) and its 832-byte `.ot`; T1's sample name on the main page became the file's; T1 then played at its level before the bounce (251 against 246) | +| Name taken | T1 bounced again in the same minute | `B1-261203-0036-2.wav`; the first file left as it was | +| Cue level 0 | T2's cue level set to 0 (MIDI CC 47, channel 2), T2 merged into T1, YES | T2 CUE LEVEL IS 0, nothing armed; cue level put back to 108 | +| MASTER TRACK | CONTROL > AUDIO > TRACK 8 MASTER (`0x80000034` = 1); BOUNCE on T8, YES; then BOUNCE on T1 with T8 merged, YES | T8 IS THE MASTER TRACK both times, nothing armed | +| PER TRACK length | A02, BOUNCE on T2; then T1 merged | PASS 12 STEPS; PASS 48 STEPS (where 16 and 12 meet) | +| PER TRACK start | A02, T2 left with one trig on step 1, bounced three times at different moments | each take 66,150 frames (12 steps), the hit at frame 0 and nowhere else: the take starts on the track's own step 1, not on the master pattern's (a chance match would be 1 in 27) | +| UNDO | UNDO after the third T2 bounce | UNDONE; T2's Flex slot stayed the recorder buffer, as the bounce before it left it | + +The emulator's clock stood at 00:36 throughout, so every name has that minute. Not tested: a save onto a full card (stock shows its own error and never calls back; Bounce gives up after a while and the take stays in the buffer), SAVE SAMPLES TO = PROJECT, a project save and reload after a bounce, a power cycle, studio cue mode, MAIN TO CUE, and everything on a unit. + ## Stock flows Not tested. To compare with and without the module: REC alone (grid recording), TRACK + REC1/2/3 sampling, recorder trigs and RLEN, CUE routing and Studio mode, Part Edit's stock rows, Part Reload and Save, project save and reload, stock track mute. diff --git a/sdk/drafts/bounce/bounce.c b/sdk/drafts/bounce/bounce.c index 2aa80c3b75..0c2b13eedf 100644 --- a/sdk/drafts/bounce/bounce.c +++ b/sdk/drafts/bounce/bounce.c @@ -3,7 +3,7 @@ * * Bounce, OS 1.40C: record tracks for one pattern pass into the active track's * recorder buffer, then make that track a Flex machine playing the take. - * Prototype 0.2.1: 0.2.0 ran on one MKII; 0.2.1 fixes RESET TRACK, emulator only (TESTING.md). + * Prototype 0.3.0: 0.2.0 ran on one MKII; 0.2.1 and 0.3.0 in the emulator only (TESTING.md). * * DOWN+REC (or FUNC+PART > BOUNCE > BOUNCE TRACK) opens BOUNCE. Trig keys 1-8 * add or remove tracks to merge; YES arms; NO closes or cancels. @@ -14,6 +14,8 @@ * itself. Done: the Part gets FLEX on the track's own buffer with stock's FLEX, * AMP and no-LFO settings, FX1/FX2 none and its recorder setup back; the * pattern record gets one trig on step 1 and no locks; merged tracks are muted. + * Then stock's SAVE THIS RECORDING writes the take as B-YYMMDD-HHMM.wav + * and assigns the buffer to it, as SAVE ALL RECORDINGS does. * A Modwerk machine track (Grain, a synth) is bounced as it sounds; then the * player picks FLEX in the chooser, so the machine leaves through the base, * and Bounce finishes. RESET TRACK makes a track a stock STATIC track with a @@ -98,6 +100,28 @@ #define FONT 0x400ba876u #define SURFACE 0x400bf10au +/* ---- the take's WAV: stock's SAVE THIS RECORDING, save and assign to self (octabam + * docs/firmware/SAMPLE_SAVE.md; the same chain as stock's SAVE ALL RECORDINGS, + * 0x4003108c, as octabam's buffer-saver drives it, measured there on a MKII) ---- */ +#define SAVE_KIND 0x460be9e8u /* long: the object's kind, 1 FLEX */ +#define SAVE_OBJ 0x460be9ecu /* long: the object, recorder buffer n = 128 + n */ +#define SAVE_NAME 0x460be9f0u /* the file name, no extension */ +#define SAVE_MODE 0x460bcfc8u /* long: 2 save, then assign the buffer to the file, no menu */ +#define SAVE_DONE_A 0x46c8d194u /* done callbacks: A after the WAV (mode 0) */ +#define SAVE_DONE_B 0x46c8d198u /* B after the assignment (modes 1, 2), (result): < 0 failed */ +#define SAVE_GO 0x40024288u /* (1): the naming keyboard's confirm, without the keyboard */ +#define POOL_READY 0x46105408u /* nonzero once the sample pool is up (the WAV writer's guard) */ +#define SLOT_STATE 0x46c922c4u /* + 44 id: the slot's state, +16 its length in frames */ +#define CLOCK_NAME 0x400819fcu /* (): "YYMMDD-HHMM", stock's recording name */ +#define SPRINTF 0x40013a08u +#define SAVE_TO 0x800000a4u /* long: SAVE SAMPLES TO, nonzero = the project's folder */ +#define PROJ_DIR_OK 0x40024eecu /* (): nonzero when the project has a folder of its own */ +#define PROJ_DIR 0x40025230u /* (0, 0): the project's folder */ +#define SET_DIR 0x100f8480u /* the set's folder */ +#define FILE_EXISTS 0x46c823fau /* long: the file-exists test, (path) */ +#define MASTER_TRACK 0x80000034u /* nonzero: T8 is the master track (STORAGE.md) */ +#define CUE_LEVEL 0x80000c51u /* + 2t: the track's cue level (MIDI.md, CC 47) */ + #define K_DOWN 0x20 #define K_REC 0x29 #define K_YES 0x31 @@ -105,7 +129,7 @@ #define TAKE_WORD 0xc010u /* start, SRC3 (free-loop's take word) */ #define STOP_WORD 0x80u -enum { CLOSED, SELECT, ARMED, RECORDING, MESSAGE, WAIT_PLAY, PICK_FLEX, CONFIRM_RESET }; +enum { CLOSED, SELECT, ARMED, RECORDING, MESSAGE, WAIT_PLAY, PICK_FLEX, CONFIRM_RESET, SAVING }; /* A track's own bytes in its Part, in this order: what Bounce and RESET TRACK * change and UNDO puts back (PARTS.md; ot_project.py, ot_spec.py). */ @@ -140,7 +164,7 @@ struct ctx { }; static unsigned phase, consumed_lo, consumed_hi, shown_ticks; -static const char *message; +static const char *message, *message2; /* a second line, or 0 */ static struct ctx arm; /* the bounce in progress */ static struct ctx last; /* the last finished bounce, for UNDO */ static unsigned undo_ready; @@ -148,6 +172,10 @@ static uint8_t record_copy[TRK_BYTES]; /* the track's pattern record as it was static uint8_t record_new[TRK_BYTES]; static uint8_t part_copy[PART_BYTES]; /* the Part as it was (UNDO; the recorder setup on cancel) */ static uint8_t part_buf[PART_BYTES]; +static char note[32]; /* a message built at run time */ +static volatile int saved_result, saved_in; +static uint32_t saved_ticks, prev_done_a, prev_done_b, prev_mode; +static char wav_name[24], wav_base[24], wav_path[160]; static void call6(uint32_t fn, uint32_t a, uint32_t b, uint32_t c, uint32_t d, uint32_t e, uint32_t f) { ((void (*)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t))(uintptr_t)fn)(a, b, c, d, e, f); } @@ -294,14 +322,16 @@ static unsigned modwerk_machine(uint32_t part, unsigned t) && U8(part + P_MACHINE + t) == FLEX; /* syntiz signs models 1-15 */ } -static void show(const char *text) { message = text; phase = MESSAGE; shown_ticks = 0; redraw(); } +static void number(char *at, unsigned v); +static void append(char *at, const char *s); +static void show(const char *text) { message2 = 0; message = text; phase = MESSAGE; shown_ticks = 0; redraw(); } static void close_view(void) { phase = CLOSED; message = 0; redraw(); } /* ---- arm, cancel, finish, undo ---- */ static void open_select(void) { struct ctx c; - if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY) return; + if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY || phase == SAVING) return; if (phase == PICK_FLEX) phase = CLOSED; /* the take stays in the recorder buffer, nothing else changed */ if (!current(&c)) { show("AUDIO TRACKS ONLY"); return; } copy_ctx(&arm, &c); arm.merged = (uint8_t)(1u << c.track); @@ -315,6 +345,12 @@ static void start(void) unsigned t = arm.track, longest, steps = pass_steps(&arm, &longest); unsigned merge = arm.merged != (uint8_t)(1u << t); if (!steps) { show("PASS OVER 64 STEPS"); return; } + if (U8(MASTER_TRACK) && (arm.merged & 0x80u)) { show("T8 IS THE MASTER TRACK"); return; } + for (unsigned m = 0; merge && m < 8u; ++m) + if ((arm.merged >> m & 1u) && !U8(CUE_LEVEL + 2u * m)) { /* the take is the CUE bus */ + note[0] = 0; append(note, "T"); number(note + 1, m + 1u); append(note, " CUE LEVEL IS 0"); + show(note); return; + } if (recording(t)) { show("RECORDER BUSY"); return; } uint32_t part = part_at(&arm); arm.mutes = U32(MUTES); @@ -380,6 +416,50 @@ static void apply_clip(void) copy_ctx(&last, &arm); undo_ready = 1; } +/* The WAV. Stock names it B-YYMMDD-HHMM (-2 .. -99 while that file + * exists: nothing is overwritten), writes it and its .ot where SAVE SAMPLES TO + * says, assigns the buffer to it and calls saved(). A project SAVE then keeps + * the path, and a reload fills the buffer again. */ +typedef int (*printf_fn)(char *, const char *, ...); +static void saved(int result) { saved_result = result; saved_in = 1; } +static void save_done_restore(void) +{ + if (U32(SAVE_DONE_B) == (uint32_t)(uintptr_t)saved) { U32(SAVE_DONE_B) = prev_done_b; U32(SAVE_DONE_A) = prev_done_a; } + if (U32(SAVE_MODE) == 2u) U32(SAVE_MODE) = prev_mode; +} +static void save_take(void) +{ + unsigned t = arm.track; + if (!U32(POOL_READY) || (int32_t)U32(SLOT_STATE + 44u * (128u + t) + 16u) <= 0) { show("BOUNCED, NOT SAVED"); return; } + printf_fn pf = (printf_fn)(uintptr_t)SPRINTF; + pf(wav_base, "B%d-%s", (int)(t + 1u), ((const char *(*)(void))(uintptr_t)CLOCK_NAME)()); + int (*exists)(const char *) = (int (*)(const char *))(uintptr_t)U32(FILE_EXISTS); + for (int k = 1; k <= 99; ++k) { + if (k == 1) pf(wav_name, "%s", wav_base); else pf(wav_name, "%s-%d", wav_base, k); + if (U32(SAVE_TO) && ((int (*)(void))(uintptr_t)PROJ_DIR_OK)()) + pf(wav_path, "%s/%s.wav", ((const char *(*)(int, int))(uintptr_t)PROJ_DIR)(0, 0), wav_name); + else pf(wav_path, "%s/AUDIO/%s.wav", (const char *)(uintptr_t)SET_DIR, wav_name); + if (!exists || !exists(wav_path)) break; + if (k == 99) { show("BOUNCED, NOT SAVED"); return; } + } + pf((char *)(uintptr_t)SAVE_NAME, "%s", wav_name); + U32(SAVE_KIND) = 1; U32(SAVE_OBJ) = 128u + t; + prev_mode = U32(SAVE_MODE); prev_done_a = U32(SAVE_DONE_A); prev_done_b = U32(SAVE_DONE_B); + U32(SAVE_MODE) = 2; U32(SAVE_DONE_A) = 0; U32(SAVE_DONE_B) = (uint32_t)(uintptr_t)saved; + saved_in = 0; saved_ticks = 0; phase = SAVING; redraw(); + call1(SAVE_GO, 1); +} +/* Once a tick while SAVING: stock's answer, or none (a failed write shows + * stock's own error and never calls back). */ +static void saving_tick(void) +{ + if (saved_in) { + save_done_restore(); + if (saved_result < 0) show("SAVE FAILED: IN BUFFER"); + else { show("BOUNCED, SAVED AS"); message2 = wav_name; } + } else if (++saved_ticks > 6000u) { save_done_restore(); phase = CLOSED; redraw(); } +} + static void finish(void) { struct ctx now; @@ -396,7 +476,7 @@ static void finish(void) return; } apply_clip(); - show("BOUNCED"); + save_take(); } /* After a machine track's take: once the player has picked FLEX for it, finish. */ @@ -407,7 +487,7 @@ static void pick_tick(void) if (!current(&now) || !same_place(&now, &arm)) { show("TAKE LEFT IN BUFFER"); return; } unsigned type = U8(part + P_MACHINE + arm.track); if (type != FLEX) { show("TAKE LEFT IN BUFFER"); return; } /* the player picked another machine */ - if (!modwerk_machine(part, arm.track)) { apply_clip(); show("BOUNCED"); } + if (!modwerk_machine(part, arm.track)) { apply_clip(); save_take(); } } /* RESET TRACK: a fresh project's STATIC track, its slots its own, no trigs or locks. */ @@ -443,7 +523,7 @@ static void reset_track(void) static void open_reset(void) { struct ctx c; - if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY) return; + if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY || phase == SAVING) return; if (phase == PICK_FLEX) phase = CLOSED; if (!current(&c)) { show("AUDIO TRACKS ONLY"); return; } copy_ctx(&arm, &c); arm.merged = (uint8_t)(1u << c.track); @@ -453,7 +533,7 @@ static void open_reset(void) static void undo(void) { struct ctx now; - if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY) return; + if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY || phase == SAVING) return; if (phase == PICK_FLEX) { show("TAKE LEFT IN BUFFER"); return; } if (!undo_ready) { show("NOTHING TO UNDO"); return; } if (!current(&now) || !same_place(&now, &last)) { show("UNDO: OPEN ITS PATTERN"); return; } @@ -482,6 +562,7 @@ void module_tick(struct modwerk_runtime_api *api) if (!U32(TRANSPORT)) cancel("STOPPED - NO BOUNCE"); else if (!recording(arm.track)) finish(); } else if (phase == PICK_FLEX) pick_tick(); + else if (phase == SAVING) saving_tick(); else if (phase == MESSAGE && ++shown_ticks > 90u) close_view(); /* The readout: phase, merged tracks, transport, the track's recorder, UNDO ready. */ api->value = (uint32_t)phase << 24 | (uint32_t)arm.merged << 16 | (U32(TRANSPORT) ? 0x200u : 0) @@ -498,6 +579,7 @@ int module_key(int code, int pressed) *consumed &= ~bit; return 1; } if (*consumed & bit) return 1; + if (phase == SAVING) return 0; /* stock's save owns the screen */ if (phase == CLOSED || phase == PICK_FLEX) { /* PICK FLEX leaves every key to the chooser */ if (code != K_REC || !held(K_DOWN)) return 0; open_select(); @@ -568,7 +650,7 @@ static void append(char *at, const char *s) void module_draw(unsigned char *frame) { - if (phase == CLOSED || !frame) return; + if (phase == CLOSED || phase == SAVING || !frame) return; if (phase == PICK_FLEX) { /* a strip, so the chooser stays readable */ char line[24]; line[0] = 0; append(line, "BOUNCED: T"); line[10] = (char)('1' + arm.track); line[11] = 0; @@ -586,7 +668,11 @@ void module_draw(unsigned char *frame) if (phase == CONFIRM_RESET) { title[0] = 0; append(title, "RESET T"); title[7] = (char)('1' + arm.track); title[8] = 0; } text(frame, 10, 13, phase == MESSAGE ? "BOUNCE" : title); invert(frame, 7, 12, 114, 7); - if (phase == MESSAGE) { text(frame, 10, 27, message ? message : ""); return; } + if (phase == MESSAGE) { + text(frame, 10, 27, message ? message : ""); + if (message2) text(frame, 10, 35, message2); + return; + } if (phase == CONFIRM_RESET) { text(frame, 10, 24, "STOCK STATIC TRACK"); text(frame, 10, 31, "NO TRIGS, NO LOCKS"); diff --git a/sdk/drafts/bounce/manifest.py b/sdk/drafts/bounce/manifest.py index a9b09dbaba..f12e262ce3 100644 --- a/sdk/drafts/bounce/manifest.py +++ b/sdk/drafts/bounce/manifest.py @@ -4,7 +4,7 @@ merge, YES records one pattern pass with the track's own recorder (SRC3 = the track) or, merged, with CUE. Stock ends the take; Bounce then makes the track FLEX on its recorder buffer with one trig on step 1, FX off, merged tracks -muted. UNDO BOUNCE restores the Part bytes, the pattern record and the mutes. +muted, and stock saves the take as a WAV assigned to the buffer. UNDO restores the Part bytes, the pattern record and the mutes. No stock site is patched: the module reads the base's key, tick, draw and encoder events and adds a row to the Part Edit window (runtime.json). It @@ -23,7 +23,7 @@ kind=Kind.CF_PATCH, doc="Bounce: record tracks for one pattern into the active track and make it a Flex machine playing the take.", category=Category.TRACK, author="seniorspiz", author_url="https://github.com/seniorspiz", - proof=Proof.UNTESTED, proof_note="Prototype: 0.2.0 ran on one MKII in RAM trials; 0.2.1 (RESET TRACK fix) in the emulator only.", + proof=Proof.UNTESTED, proof_note="Prototype: 0.2.0 ran on one MKII in RAM trials; 0.2.1 and 0.3.0 (WAV save, refusals) in the emulator only.", linked=(Linked("bounce", "modules/bounce/unit.s", cpu="5475", dram=True),), gates=(Gate("modules/bounce/verify.py", remix_arg=False),), ) diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index a804a29be9..64e2bdfed4 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -3,7 +3,7 @@ "id": "bounce", "key": "BOUNCE", "name": "Bounce", - "version": "0.2.1", + "version": "0.3.0-experimental", "category": "system", "author": { "github": "seniorspiz", diff --git a/sdk/drafts/bounce/presentation/thumbnail.svg b/sdk/drafts/bounce/presentation/thumbnail.svg new file mode 100644 index 0000000000..ca558a524c --- /dev/null +++ b/sdk/drafts/bounce/presentation/thumbnail.svg @@ -0,0 +1,19 @@ + +Bounce — tracks recorded in place into one Flex take +A conceptual diagram: the trigs of three tracks on the left run together into one recording on the right, one pattern pass long, which the active track then plays as a Flex machine from a WAV saved on the card. It illustrates the idea, not a measured screen. + + + +T1T2T3 + + + + +ONE PASSFLEX + WAVMERGED TRACKS + diff --git a/sdk/drafts/bounce/unit.s b/sdk/drafts/bounce/unit.s index ae62295705..ba1be0b619 100644 --- a/sdk/drafts/bounce/unit.s +++ b/sdk/drafts/bounce/unit.s @@ -98,7 +98,7 @@ write_span: move.l %a2,-(%sp) move.l 20(%sp),%a1 #APP -| 266 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 294 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %sr,%d0 move.w #0x2700,%sr | 0 "" 2 @@ -114,7 +114,7 @@ write_span: cmp.l 24(%sp),%a0 jne .L13 #APP -| 268 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 296 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %d0,%sr | 0 "" 2 #NO_APP @@ -181,6 +181,7 @@ show: moveq #4,%d0 move.l %d0,phase moveq #1,%d0 + clr.l message2 move.l (%a0),message clr.l shown_ticks move.l %d0,1187497772 @@ -203,23 +204,20 @@ close_view: .type open_select, @function open_select: move.l phase,%d0 - move.l %d0,%d1 - subq.l #2,%d1 - lsr.l #1,%d1 + moveq #8,%d1 lea (-12,%sp),%sp move.l %a6,-(%sp) - move.l %d2,-(%sp) - tst.l %d1 - jeq .L22 - moveq #5,%d1 cmp.l %d0,%d1 + jcs .L23 + move.l #-301,%d1 + btst %d0,%d1 jeq .L22 subq.l #6,%d0 tst.l %d0 - jne .L24 + jne .L23 clr.l phase -.L24: - lea (8,%sp),%a6 +.L23: + lea (4,%sp),%a6 move.l %a6,-(%sp) jsr current addq.l #4,%sp @@ -229,7 +227,6 @@ open_select: jsr show addq.l #4,%sp .L22: - move.l (%sp)+,%d2 move.l (%sp)+,%a6 lea (12,%sp),%sp rts @@ -239,7 +236,7 @@ open_select: pea arm jsr copy clr.l message - mvz.b 26(%sp),%d1 + mvz.b 22(%sp),%d1 moveq #1,%d0 lea (12,%sp),%sp lsl.l %d1,%d0 @@ -250,6 +247,142 @@ open_select: jra .L22 .size open_select, .-open_select .align 2 + .type saved, @function +saved: + lea (4,%sp),%a0 + moveq #1,%d0 + move.l (%a0),saved_result + move.l %d0,saved_in + rts + .size saved, .-saved + .section .rodata.str1.1 +.LC1: + .string "BOUNCED, NOT SAVED" +.LC2: + .string "B%d-%s" +.LC3: + .string "%s" +.LC4: + .string "%s/%s.wav" +.LC5: + .string "%s/AUDIO/%s.wav" +.LC6: + .string "%s-%d" + .text + .align 2 + .type save_take, @function +save_take: + lea (-12,%sp),%sp + movem.l #1036,(%sp) + tst.l 1175475208 + jeq .L31 + mvz.b arm+6,%d3 + move.w %d3,%d0 + mulu.w #44,%d0 + move.l %d0,%a0 + add.l #1187592404,%a0 + tst.l (%a0) + jgt .L32 +.L31: + pea .LC1 + jsr show + addq.l #4,%sp +.L30: + movem.l (%sp),#1036 + lea (12,%sp),%sp + rts +.L32: + jsr 1074272764 + move.l #1073822216,%d2 + move.l %d3,%a0 + move.l %d0,-(%sp) + pea 1(%a0) + pea .LC2 + pea wav_base + move.l %d2,%a0 + jsr (%a0) + move.l 1187521530,%a2 + pea wav_base + pea .LC3 + pea wav_name + move.l %d2,%a0 + moveq #1,%d2 + jsr (%a0) + lea (28,%sp),%sp +.L37: + tst.l -2147483484 + jeq .L34 + jsr 1073893100 + tst.l %d0 + jeq .L34 + clr.l -(%sp) + clr.l -(%sp) + jsr 1073893936 + pea wav_name + move.l %d0,-(%sp) + pea .LC4 + pea wav_path + jsr 1073822216 + lea (24,%sp),%sp +.L35: + tst.l %a2 + jeq .L36 + pea wav_path + jsr (%a2) + addq.l #4,%sp + tst.l %d0 + jeq .L36 + moveq #99,%d0 + cmp.l %d2,%d0 + jeq .L31 + addq.l #1,%d2 + move.l %d2,-(%sp) + pea wav_base + pea .LC6 + pea wav_name + jsr 1073822216 + lea (16,%sp),%sp + jra .L37 +.L34: + pea wav_name + move.l #269452416,-(%sp) + pea .LC5 + pea wav_path + jsr 1073822216 + lea (16,%sp),%sp + jra .L35 +.L36: + pea wav_name + pea .LC3 + move.l #1175185904,-(%sp) + jsr 1073822216 + add.l #128,%d3 + moveq #1,%d0 + move.l %d0,1175185896 + move.l #1175179208,%a0 + move.l %d3,1175185900 + moveq #2,%d0 + move.l (%a0),prev_mode + move.l #1187565972,%a0 + move.l (%a0),prev_done_a + move.l #1187565976,%a0 + move.l (%a0),prev_done_b + move.l %d0,1175179208 + moveq #8,%d0 + clr.l 1187565972 + lea saved,%a0 + move.l %a0,1187565976 + move.l %d0,phase + moveq #1,%d0 + clr.l saved_in + clr.l saved_ticks + move.l %d0,1187497772 + pea 1.w + jsr 1073889928 + lea (16,%sp),%sp + jra .L30 + .size save_take, .-save_take + .align 2 .type fill, @function fill: lea (-24,%sp),%sp @@ -260,16 +393,16 @@ fill: move.l %d1,%d3 add.l 40(%sp),%d3 add.l 44(%sp),%d4 -.L30: +.L57: cmp.l %d3,%d1 - jcc .L29 + jcc .L56 move.l %d1,%d0 lsl.l #3,%d0 addq.l #7,%d0 move.l %d0,20(%sp) move.l 36(%sp),%d0 - jra .L35 -.L33: + jra .L62 +.L60: move.l %d0,%d2 lsr.l #3,%d2 move.l 20(%sp),%a1 @@ -284,23 +417,23 @@ fill: move.b (%a1),%d6 move.w %d6,%a0 tst.l 48(%sp) - jeq .L31 + jeq .L58 move.l %a0,%d6 or.l %d6,%d2 -.L32: +.L59: move.b %d2,(%a1) addq.l #1,%d0 -.L35: +.L62: cmp.l %d4,%d0 - jcs .L33 + jcs .L60 addq.l #1,%d1 - jra .L30 -.L31: + jra .L57 +.L58: not.l %d2 move.l %a0,%d6 and.l %d6,%d2 - jra .L32 -.L29: + jra .L59 +.L56: movem.l (%sp),#124 lea (24,%sp),%sp rts @@ -316,12 +449,12 @@ invert: move.l %a0,%d3 add.l 36(%sp),%d3 add.l 40(%sp),%d4 -.L37: +.L64: mvz.w %a0,%d1 move.l 32(%sp),%d0 lsl.l #3,%d1 addq.l #7,%d1 -.L38: +.L65: moveq #7,%d6 and.l %d0,%d6 move.l %d0,%d2 @@ -336,10 +469,10 @@ invert: eor.l %d6,%d2 move.b %d2,(%a1) cmp.l %d0,%d4 - jhi .L38 + jhi .L65 addq.l #1,%a0 cmp.l %a0,%d3 - jhi .L37 + jhi .L64 movem.l (%sp),#124 lea (20,%sp),%sp rts @@ -351,10 +484,10 @@ text: move.l %sp,%a1 move.l #1074524426,%a0 move.l %sp,%d0 -.L42: +.L69: move.l (%a0)+,(%a1)+ cmp.l #1074524454,%a0 - jne .L42 + jne .L69 move.l 32(%sp),12(%sp) move.l 44(%sp),-(%sp) pea -1.w @@ -372,23 +505,42 @@ text: .type append, @function append: move.l 4(%sp),%a0 -.L45: +.L72: move.b (%a0),%d0 move.l %a0,%a1 addq.l #1,%a0 tst.b %d0 - jne .L45 + jne .L72 clr.l %d0 -.L46: +.L73: move.l 8(%sp),%a0 move.b (%a0,%d0.l),%d1 move.b %d1,(%a1,%d0.l) addq.l #1,%d0 tst.b %d1 - jne .L46 + jne .L73 rts .size append, .-append .align 2 + .type save_done_restore, @function +save_done_restore: + move.l #1187565976,%a0 + move.l #saved,%d0 + cmp.l (%a0),%d0 + jne .L77 + move.l prev_done_b,(%a0) + lea prev_done_a,%a0 + move.l (%a0),1187565972 +.L77: + move.l #1175179208,%a0 + moveq #2,%d0 + cmp.l (%a0),%d0 + jne .L76 + move.l prev_mode,(%a0) +.L76: + rts + .size save_done_restore, .-save_done_restore + .align 2 .type put_track.constprop.0, @function put_track.constprop.0: lea (-20,%sp),%sp @@ -396,7 +548,7 @@ put_track.constprop.0: movem.l #3100,(%sp) lea TRACK_BYTES,%a1 clr.l %d2 -.L54: +.L84: mvz.b 2(%a1),%d0 mvz.w (%a1),%d3 move.l 24(%sp),%a3 @@ -408,29 +560,29 @@ put_track.constprop.0: mvz.b 3(%a1),%d3 add.l %d0,%a3 add.l #part_buf,%d0 -.L50: +.L80: cmp.l %a0,%d3 - jhi .L53 + jhi .L83 add.l %d3,%d2 addq.l #1,%d1 addq.l #4,%a1 moveq #9,%d0 cmp.l %d1,%d0 - jne .L54 + jne .L84 movem.l (%sp),#3100 lea (20,%sp),%sp rts -.L53: +.L83: tst.l 32(%sp) - jeq .L51 + jeq .L81 move.b (%a3,%a0.l),%d4 -.L52: +.L82: move.b %d4,(%a0,%d0.l) addq.l #1,%a0 - jra .L50 -.L51: + jra .L80 +.L81: move.b (%a2,%a0.l),%d4 - jra .L52 + jra .L82 .size put_track.constprop.0, .-put_track.constprop.0 .align 2 .type copy.constprop.0, @function @@ -439,12 +591,12 @@ copy.constprop.0: move.l 8(%sp),%a1 clr.l %d0 lea part_buf,%a0 -.L57: +.L87: lea (%a1,%d0.l),%a2 move.b (%a2),(%a0,%d0.l) addq.l #1,%d0 cmp.l #6322,%d0 - jne .L57 + jne .L87 move.l (%sp)+,%a2 rts .size copy.constprop.0, .-copy.constprop.0 @@ -453,7 +605,7 @@ copy.constprop.0: set_mutes: move.l 4(%sp),%d0 #APP -| 242 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 270 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %sr,%d1 move.w #0x2700,%sr | 0 "" 2 @@ -461,7 +613,7 @@ set_mutes: move.l %d0,-2147483640 move.l %d0,269161684 #APP -| 244 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 272 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %d1,%sr | 0 "" 2 #NO_APP @@ -498,87 +650,87 @@ pass_steps.constprop.0: add.l %a0,%a3 add.l %a0,%a4 lea (81,%a0),%a0 -.L70: +.L100: btst %d5,%d4 - jeq .L61 + jeq .L91 tst.b (%a2) - jeq .L62 + jeq .L92 move.b -1(%a0),%d6 -.L63: +.L93: tst.b (%a2) - jeq .L64 + jeq .L94 move.b (%a0),%d3 -.L65: +.L95: mvz.b %d3,%d3 moveq #6,%d0 cmp.l %d3,%d0 - jcs .L66 + jcs .L96 mvz.b %d6,%d0 tst.b %d6 - jeq .L60 + jeq .L90 move.l #ticks.0,%d6 move.l %d6,%a5 mvz.b (%a5,%d3.l),%d3 mulu.w %d3,%d0 tst.l %d0 - jeq .L60 + jeq .L90 cmp.l %a1,%d0 - jls .L68 + jls .L98 move.l %d0,%a1 -.L68: +.L98: tst.l %d2 - jne .L61 + jne .L91 move.l %d0,%d3 move.l %d1,%d2 -.L69: +.L99: remu.l %d3,%d7:%d2 move.l %d3,%d6 move.l %d6,%d2 move.l %d7,%d3 tst.l %d7 - jne .L69 + jne .L99 divu.l %d6,%d1 muls.l %d0,%d1 cmp.l #384,%d1 shi %d2 mvs.b %d2,%d2 neg.l %d2 -.L61: +.L91: addq.l #1,%d5 lea (2330,%a0),%a0 moveq #8,%d0 cmp.l %d5,%d0 - jne .L70 + jne .L100 tst.l %d2 - jne .L71 + jne .L101 move.l %d1,%d0 moveq #6,%d2 divu.l %d2,%d0 -.L60: +.L90: movem.l (%sp),#15612 lea (40,%sp),%sp rts -.L62: +.L92: move.b (%a3),%d6 - jra .L63 -.L64: + jra .L93 +.L94: move.b (%a4),%d3 - jra .L65 -.L71: + jra .L95 +.L101: move.l 44(%sp),%a0 moveq #1,%d0 move.l %d0,(%a0) move.l %a1,%d0 addq.l #5,%d0 cmp.l #389,%d0 - jls .L72 -.L66: + jls .L102 +.L96: clr.l %d0 - jra .L60 -.L72: + jra .L90 +.L102: moveq #6,%d2 divu.l %d2,%d0 - jra .L60 + jra .L90 .size pass_steps.constprop.0, .-pass_steps.constprop.0 .align 2 .type write_record, @function @@ -610,7 +762,7 @@ write_record: move.l %d2,%a1 add.l #268525991,%a1 move.l %a0,36(%sp) -.L85: +.L115: pea 32.w move.l 40(%sp),%a0 pea (%a0,%a3.l) @@ -622,7 +774,7 @@ write_record: lea (32,%a3),%a3 move.l 32(%sp),%a1 cmp.l #2048,%a3 - jne .L85 + jne .L115 pea 193.w move.l #1187501196,%a3 pea 2137(%a6) @@ -640,32 +792,32 @@ write_record: add.l %d1,%a0 add.l (%a2),%a0 lea (89,%a0),%a0 -.L86: +.L116: sub.l %a1,%a1 -.L89: +.L119: move.b (%a0,%a1.l),%d0 addq.l #1,%a1 moveq #31,%d1 cmp.l %a1,%d1 - jne .L87 + jne .L117 not.l %d0 tst.b %d0 sne %d0 mvs.b %d0,%d0 neg.l %d0 -.L88: +.L118: mvz.b 6(%a2),%d1 move.l %a4,%d2 lsl.l %d1,%d2 move.b (%a3),%d1 tst.l %d0 - jeq .L90 + jeq .L120 or.l %d2,%d1 -.L91: +.L121: move.b %d1,(%a3)+ lea (32,%a0),%a0 cmp.l #1187501260,%a3 - jne .L86 + jne .L116 move.l (%a2),%a0 moveq #1,%d0 add.l #635698,%a0 @@ -678,16 +830,16 @@ write_record: move.l %d0,44(%sp) lea (40,%sp),%sp jmp 1074387488 -.L87: +.L117: mvz.b %d0,%d0 cmp.l #255,%d0 - jeq .L89 + jeq .L119 moveq #1,%d0 - jra .L88 -.L90: + jra .L118 +.L120: not.l %d2 and.l %d2,%d1 - jra .L91 + jra .L121 .size write_record, .-write_record .align 2 .type paste, @function @@ -705,7 +857,7 @@ paste: lea part_buf,%a0 mvz.b 34(%a0,%d2.l),%d0 cmp.l %d0,%d3 - jeq .L97 + jeq .L127 move.l %d3,28(%sp) move.l %d2,24(%sp) mvz.b 5(%a2),%d0 @@ -713,16 +865,16 @@ paste: move.l %d0,20(%sp) lea (16,%sp),%sp jmp 1074361084 -.L97: +.L127: move.b 269161679,%d0 move.b 5(%a2),%d1 moveq #3,%d4 and.l %d4,%d0 mvz.b %d1,%d3 cmp.l %d3,%d0 - jne .L96 + jne .L126 tst.b -2147483627.l - jne .L96 + jne .L126 move.b 269161678,%d0 move.l %d2,28(%sp) movem.l (%sp),#1052 @@ -732,7 +884,7 @@ paste: move.l %d0,20(%sp) lea (16,%sp),%sp jmp 1073749784 -.L96: +.L126: movem.l (%sp),#1052 lea (16,%sp),%sp rts @@ -766,13 +918,13 @@ apply_clip: add.l #part_copy+1538,%a1 add.l #part_buf+1538,%a0 clr.l %d0 -.L100: +.L130: lea (%a1,%d0.l),%a3 moveq #12,%d1 move.b (%a3),(%a0,%d0.l) addq.l #1,%d0 cmp.l %d0,%d1 - jne .L100 + jne .L130 move.w %d2,%d0 moveq #1,%d5 lea part_buf,%a1 @@ -789,14 +941,14 @@ apply_clip: move.b %d4,715(%a0) mulu.w #30,%d0 addq.l #6,%d0 -.L102: +.L132: move.l %d1,%a3 moveq #5,%d4 add.l #1074606604,%a3 cmp.l %d1,%d4 - jcs .L108 + jcs .L138 move.w #42,%a0 -.L101: +.L131: move.l %d1,%d5 moveq #6,%d6 remu.l %d6,%d4:%d5 @@ -806,7 +958,7 @@ apply_clip: move.b (%a3),(%a0,%d4.l) moveq #12,%d4 cmp.l %d1,%d4 - jne .L102 + jne .L132 move.w %d2,%d1 moveq #127,%d6 move.l #2139045952,%d5 @@ -824,43 +976,43 @@ apply_clip: clr.l %d1 lea record_new,%a0 lea record_copy,%a1 -.L103: +.L133: lea (%a1,%d1.l),%a3 move.b (%a3),(%a0,%d1.l) addq.l #1,%d1 cmp.l #2330,%d1 - jne .L103 + jne .L133 clr.l %d0 -.L104: +.L134: clr.b %d1 moveq #64,%d4 move.b %d1,(%a0,%d0.l) addq.l #1,%d0 cmp.l %d0,%d4 - jne .L104 + jne .L134 moveq #1,%d5 clr.l %d0 lea record_new+89,%a0 move.b %d5,record_new+7 -.L105: +.L135: st %d6 addq.l #1,%d0 move.b %d6,-1(%a0,%d0.l) cmp.l #2048,%d0 - jne .L105 + jne .L135 mvz.b arm+4,%d0 move.l (%a2),%a0 add.l #36437,%a0 mulu.w #36568,%d0 tst.b (%a0,%d0.l) - jeq .L106 + jeq .L136 tst.l -12(%fp) - jeq .L106 + jeq .L136 moveq #2,%d0 lea (-9,%fp),%a0 move.b (%a0),record_new+80 move.b %d0,record_new+81 -.L106: +.L136: pea record_new pea arm jsr write_record @@ -874,11 +1026,11 @@ apply_clip: lsl.l #8,%d0 or.l arm+8,%d0 cmp.l -2147483640.l,%d0 - jeq .L107 + jeq .L137 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L107: +.L137: pea 12.w pea arm pea last @@ -889,18 +1041,18 @@ apply_clip: move.l %d1,undo_ready unlk %fp rts -.L108: +.L138: move.l %a4,%a0 - jra .L101 + jra .L131 .size apply_clip, .-apply_clip .section .rodata.str1.1 -.LC1: +.LC7: .string "TAKE LEFT IN BUFFER" -.LC2: +.LC8: .string "NOTHING TO UNDO" -.LC3: +.LC9: .string "UNDO: OPEN ITS PATTERN" -.LC4: +.LC10: .string "UNDONE" .text .align 2 @@ -911,31 +1063,30 @@ bounce_choose: move.l 32(%sp),%d0 movem.l #17412,(%sp) cmp.l %d0,%d1 - jne .L121 + jne .L151 move.l phase,%d0 - move.l %d0,%d1 - subq.l #2,%d1 - lsr.l #1,%d1 - jeq .L120 - moveq #5,%d1 + moveq #8,%d1 cmp.l %d0,%d1 - jeq .L120 + jcs .L152 + move.l #-301,%d1 + btst %d0,%d1 + jeq .L150 subq.l #6,%d0 tst.l %d0 - jne .L123 - move.l #.LC1,%d0 + jne .L152 + move.l #.LC7,%d0 move.l %d0,32(%sp) -.L143: +.L173: movem.l (%sp),#17412 lea (28,%sp),%sp jra show -.L123: +.L152: tst.l undo_ready - jne .L124 - move.l #.LC2,%d1 + jne .L154 + move.l #.LC8,%d1 move.l %d1,32(%sp) - jra .L143 -.L124: + jra .L173 +.L154: move.l %sp,%d2 add.l #16,%d2 move.l %d2,-(%sp) @@ -943,24 +1094,24 @@ bounce_choose: addq.l #4,%sp lea show,%a2 tst.l %d0 - jeq .L125 + jeq .L155 pea last move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L126 -.L125: - pea .LC3 -.L144: + jne .L156 +.L155: + pea .LC9 +.L174: jsr (%a2) -.L142: +.L172: addq.l #4,%sp -.L120: +.L150: movem.l (%sp),#17412 lea (28,%sp),%sp rts -.L126: +.L156: mvz.b last+5,%d0 mvz.b last+6,%d2 lea last,%a6 @@ -994,41 +1145,40 @@ bounce_choose: and.l %d2,%d0 eor.l %d1,%d0 cmp.l (%a0),%d0 - jeq .L127 + jeq .L157 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L127: +.L157: clr.l undo_ready - pea .LC4 - jra .L144 -.L121: + pea .LC10 + jra .L174 +.L151: tst.l %d0 - jeq .L129 + jeq .L159 move.l phase,%d0 - move.l %d0,%d1 - subq.l #2,%d1 - lsr.l #1,%d1 - jeq .L120 - moveq #5,%d1 + moveq #8,%d1 cmp.l %d0,%d1 - jeq .L120 + jcs .L160 + move.l #-301,%d1 + btst %d0,%d1 + jeq .L150 subq.l #6,%d0 tst.l %d0 - jne .L131 + jne .L160 clr.l phase -.L131: +.L160: move.l %sp,%d2 add.l #16,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jne .L132 + jne .L162 pea .LC0 jsr show - jra .L142 -.L132: + jra .L172 +.L162: pea 12.w move.l %d2,-(%sp) pea arm @@ -1043,8 +1193,8 @@ bounce_choose: moveq #7,%d0 move.l %d0,phase move.l %d1,1187497772 - jra .L120 -.L129: + jra .L150 +.L159: movem.l (%sp),#17412 lea (28,%sp),%sp jra open_select @@ -1063,26 +1213,26 @@ cancel: move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L146 + jeq .L176 clr.l -(%sp) pea 128.w move.l %a6,-(%sp) jsr 1073762680 lea (12,%sp),%sp -.L146: +.L176: move.l %sp,%d2 add.l #12,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L147 + jeq .L177 pea arm move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L147 + jeq .L177 mvz.b arm+5,%d0 move.l arm,%a0 add.l #585088,%a0 @@ -1097,26 +1247,26 @@ cancel: move.l %d1,%a0 add.l #part_buf+1538,%a6 add.l #part_copy+1538,%a0 -.L148: +.L178: lea (%a0,%d0.l),%a1 moveq #12,%d1 move.b (%a1),(%a6,%d0.l) addq.l #1,%d0 cmp.l %d0,%d1 - jne .L148 + jne .L178 mvz.b arm+5,%d0 move.l %d0,-(%sp) pea part_buf jsr 1073912396 addq.l #8,%sp -.L147: +.L177: move.l arm+8,%d0 cmp.l -2147483640.l,%d0 - jeq .L149 + jeq .L179 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L149: +.L179: move.l 8(%sp),%a1 move.l %a1,28(%sp) move.l (%sp)+,%d2 @@ -1125,14 +1275,16 @@ cancel: jra show .size cancel, .-cancel .section .rodata.str1.1 -.LC5: +.LC11: .string "STOPPED - NO BOUNCE" -.LC6: +.LC12: .string "PATTERN CHANGED" -.LC7: +.LC13: .string "TAKE INCOMPLETE" -.LC8: - .string "BOUNCED" +.LC14: + .string "SAVE FAILED: IN BUFFER" +.LC15: + .string "BOUNCED, SAVED AS" .text .align 2 .globl module_tick @@ -1143,9 +1295,9 @@ module_tick: lea (-28,%sp),%sp movem.l #17412,(%sp) cmp.l %d0,%d1 - jne .L161 + jne .L191 tst.l -2147457608 - jeq .L162 + jeq .L192 mvz.b arm+6,%d0 pea 1.w moveq #2,%d2 @@ -1156,7 +1308,7 @@ module_tick: lea (12,%sp),%sp moveq #1,%d0 move.l %d0,1187497772 -.L162: +.L192: mvz.b arm+6,%d0 moveq #24,%d2 move.l -2147457608,%d1 @@ -1188,35 +1340,35 @@ module_tick: move.l %d0,(%a0) lea (28,%sp),%sp rts -.L161: +.L191: moveq #2,%d1 cmp.l %d0,%d1 - jne .L163 + jne .L193 mvz.b arm+6,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L162 + jeq .L192 moveq #3,%d2 move.l %d2,phase -.L192: +.L224: moveq #1,%d0 move.l %d0,1187497772 - jra .L162 -.L163: + jra .L192 +.L193: moveq #3,%d1 cmp.l %d0,%d1 - jne .L164 + jne .L194 tst.l -2147457608 - jne .L165 - pea .LC5 -.L194: + jne .L195 + pea .LC11 +.L226: jsr cancel -.L190: +.L223: addq.l #4,%sp - jra .L162 -.L165: + jra .L192 +.L195: mvz.b arm+6,%d2 lea arm,%a2 move.w %d2,%d0 @@ -1225,33 +1377,33 @@ module_tick: move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jne .L162 + jne .L192 move.l %sp,%d2 add.l #16,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L166 + jeq .L196 move.l %a2,-(%sp) move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L167 -.L166: - pea .LC6 - jra .L194 -.L167: + jne .L197 +.L196: + pea .LC12 + jra .L226 +.L197: move.l %a6,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 tst.l (%a0) - jne .L169 - pea .LC7 - jra .L194 -.L169: + jne .L199 + pea .LC13 + jra .L226 +.L199: mvz.b arm+5,%d0 move.l (%a2),%d2 add.l #585088,%d2 @@ -1262,7 +1414,7 @@ module_tick: jsr modwerk_machine addq.l #8,%sp tst.l %d0 - jeq .L193 + jeq .L225 move.l %d2,-(%sp) jsr (copy.constprop.0) move.w %a6,%d0 @@ -1273,13 +1425,13 @@ module_tick: add.l #part_buf+1538,%a6 add.l #part_copy+1538,%a0 clr.l %d0 -.L171: +.L201: lea (%a0,%d0.l),%a1 moveq #12,%d1 move.b (%a1),(%a6,%d0.l) addq.l #1,%d0 cmp.l %d0,%d1 - jne .L171 + jne .L201 mvz.b arm+5,%d0 move.l %d0,-(%sp) pea part_buf @@ -1287,19 +1439,19 @@ module_tick: addq.l #8,%sp move.l arm+8,%d0 cmp.l -2147483640.l,%d0 - jeq .L172 + jeq .L202 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L172: +.L202: moveq #6,%d2 move.l %d2,phase clr.l message - jra .L192 -.L164: + jra .L224 +.L194: moveq #6,%d1 cmp.l %d0,%d1 - jne .L173 + jne .L203 move.b arm+5,%d2 lea arm,%a2 move.l (%a2),%a6 @@ -1310,19 +1462,18 @@ module_tick: jsr current addq.l #4,%sp tst.l %d0 - jeq .L174 + jeq .L204 move.l %a2,-(%sp) move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L175 -.L174: - pea .LC1 -.L191: + jne .L205 +.L204: + pea .LC7 jsr show - jra .L190 -.L175: + jra .L223 +.L205: mvz.b 15(%sp),%d0 move.l #585088,%a0 add.l %a6,%a0 @@ -1332,42 +1483,76 @@ module_tick: mvz.b 34(%a0,%d0.l),%d1 subq.l #1,%d1 tst.l %d1 - jne .L174 + jne .L204 move.l %d0,-(%sp) move.l %a0,-(%sp) jsr modwerk_machine addq.l #8,%sp tst.l %d0 - jne .L162 -.L193: + jne .L192 +.L225: jsr apply_clip - pea .LC8 - jra .L191 -.L173: + jsr save_take + jra .L192 +.L203: + moveq #8,%d1 + cmp.l %d0,%d1 + jne .L207 + tst.l saved_in + jeq .L208 + jsr save_done_restore + lea show,%a0 + tst.l saved_result + jge .L209 + pea .LC14 + jsr (%a0) + jra .L223 +.L209: + pea .LC15 + move.l #wav_name,%d2 + jsr (%a0) + move.l %d2,message2 + jra .L223 +.L208: + move.l saved_ticks,%d0 + addq.l #1,%d0 + move.l %d0,saved_ticks + cmp.l #6000,%d0 + jls .L192 + jsr save_done_restore + clr.l phase + jra .L224 +.L207: subq.l #4,%d0 tst.l %d0 - jne .L162 + jne .L192 move.l shown_ticks,%d0 addq.l #1,%d0 move.l %d0,shown_ticks moveq #90,%d2 cmp.l %d0,%d2 - jcc .L162 + jcc .L192 jsr close_view - jra .L162 + jra .L192 .size module_tick, .-module_tick .section .rodata.str1.1 -.LC9: +.LC16: .string "TRACK CHANGED" -.LC10: +.LC17: .string "PICK STATIC FIRST" -.LC11: +.LC18: .string "RECORDER BUSY" -.LC12: +.LC19: .string "TRACK RESET" -.LC13: +.LC20: .string "PASS OVER 64 STEPS" -.LC14: +.LC21: + .string "T8 IS THE MASTER TRACK" +.LC22: + .string "T" +.LC23: + .string " CUE LEVEL IS 0" +.LC24: .string "BOUNCE CANCELLED" .text .align 2 @@ -1376,17 +1561,17 @@ module_tick: module_key: link.w %fp,#-52 moveq #63,%d1 - movem.l #3196,(%sp) + movem.l #3324,(%sp) move.l 8(%fp),%d4 move.l 12(%fp),%d0 cmp.l %d4,%d1 - jcs .L196 + jcs .L228 moveq #31,%d2 cmp.l %d4,%d2 - jlt .L197 + jlt .L229 move.l consumed_lo,%d1 lea consumed_lo,%a2 -.L198: +.L230: moveq #31,%d2 moveq #1,%d3 and.l %d4,%d2 @@ -1394,68 +1579,74 @@ module_key: move.l %d1,%d2 and.l %d3,%d2 tst.l %d0 - jne .L199 + jne .L231 tst.l %d2 - jeq .L200 + jeq .L232 not.l %d3 and.l %d1,%d3 move.l %d3,(%a2) -.L201: +.L233: moveq #1,%d0 - jra .L200 -.L197: +.L232: + movem.l -52(%fp),#3324 + unlk %fp + rts +.L229: move.l consumed_hi,%d1 lea consumed_hi,%a2 - jra .L198 -.L199: + jra .L230 +.L231: tst.l %d2 - jne .L201 + jne .L233 move.l phase,%d0 + moveq #8,%d1 + cmp.l %d0,%d1 + jeq .L228 tst.l %d0 - jeq .L202 + jeq .L234 moveq #6,%d1 cmp.l %d0,%d1 - jne .L203 -.L202: + jne .L235 +.L234: moveq #41,%d2 cmp.l %d4,%d2 - jne .L196 + jne .L228 move.b 1175456540,%d0 btst #0,%d0 - jeq .L196 + jeq .L228 jsr open_select -.L204: +.L236: or.l %d3,(%a2) - jra .L201 -.L203: + jra .L233 +.L235: moveq #7,%d1 cmp.l %d0,%d1 - jne .L205 + jne .L237 moveq #49,%d2 cmp.l %d4,%d2 - jne .L206 + jne .L238 move.l %fp,%d6 add.l #-12,%d6 move.l %d6,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L218 + jeq .L250 move.b -6(%fp),%d5 mvz.b arm+6,%d0 mvz.b %d5,%d2 cmp.l %d2,%d0 - jne .L218 + jne .L250 pea arm move.l %d6,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L208 -.L218: - pea .LC9 - jra .L254 -.L208: + jne .L240 +.L250: + pea .LC16 + jra .L300 +.L240: mvz.b -7(%fp),%d0 move.l #585088,%a0 move.l -12(%fp),%a3 @@ -1464,36 +1655,36 @@ module_key: mulu.w #6322,%d0 add.l %a0,%d0 move.l %d0,-(%sp) - move.l %d0,-22(%fp) + move.l %d0,-20(%fp) jsr modwerk_machine addq.l #8,%sp move.l %d0,%d4 tst.l %d0 - jeq .L210 - pea .LC10 -.L254: + jeq .L242 + pea .LC17 +.L300: jsr show -.L255: +.L301: addq.l #4,%sp - jra .L204 -.L210: + jra .L236 +.L242: move.w %d2,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L211 -.L256: - pea .LC11 - jra .L254 -.L211: + jeq .L243 +.L302: + pea .LC18 + jra .L300 +.L243: moveq #1,%d0 lsl.l %d2,%d0 move.l #-2147483640,%a1 move.b %d0,-5(%fp) move.l (%a1),-4(%fp) pea 6322.w - move.l -22(%fp),-(%sp) + move.l -20(%fp),-(%sp) pea part_copy jsr copy pea 2330.w @@ -1507,9 +1698,8 @@ module_key: pea record_copy jsr copy lea part_copy,%a0 - mvz.b 34(%a0,%d2.l),%d0 + mvz.b 34(%a0,%d2.l),%d7 move.l %a0,-(%sp) - move.l %d0,%a3 jsr (copy.constprop.0) clr.l -(%sp) move.l %d2,-(%sp) @@ -1524,7 +1714,7 @@ module_key: move.b %d5,(%a0) add.l #-128,%d5 move.b %d5,4(%a0) - move.l %a3,(%sp) + move.l %d7,(%sp) move.l %d2,-(%sp) move.l %d6,-(%sp) jsr paste @@ -1532,12 +1722,12 @@ module_key: lea record_new,%a0 clr.l %d0 move.l %a0,%d1 -.L212: +.L244: clr.b %d2 move.b %d2,(%a0,%d0.l) addq.l #1,%d0 cmp.l #2330,%d0 - jne .L212 + jne .L244 st %d0 lea record_copy+80,%a1 move.w (%a1),record_new+80 @@ -1546,12 +1736,12 @@ module_key: move.l %a0,record_new+68 lea record_new+89,%a0 move.b %d0,record_new+83 -.L213: +.L245: st %d2 addq.l #1,%d4 move.b %d2,-1(%a0,%d4.l) cmp.l #2048,%d4 - jne .L213 + jne .L245 lea record_copy+2329,%a0 move.b (%a0),record_new+2329 move.l %d1,-(%sp) @@ -1561,128 +1751,135 @@ module_key: move.l %d6,-(%sp) pea last jsr copy - pea .LC12 + pea .LC19 moveq #1,%d0 move.l %d0,undo_ready jsr show lea (24,%sp),%sp - jra .L204 -.L206: + jra .L236 +.L238: moveq #50,%d1 cmp.l %d4,%d1 - jne .L196 -.L226: + jne .L228 +.L264: jsr close_view - jra .L204 -.L205: - moveq #1,%d2 - cmp.l %d0,%d2 - jne .L214 + jra .L236 +.L237: + moveq #1,%d1 + cmp.l %d0,%d1 + jne .L246 moveq #7,%d1 cmp.l %d4,%d1 - jlt .L215 + jlt .L247 mvz.b arm+6,%d1 cmp.l %d4,%d1 - jeq .L216 + jeq .L248 move.b arm+7,%d1 lsl.l %d4,%d0 eor.l %d1,%d0 move.b %d0,arm+7 -.L216: +.L248: moveq #1,%d2 move.l %d2,1187497772 - jra .L204 -.L215: + jra .L236 +.L247: moveq #49,%d0 cmp.l %d4,%d0 - jne .L217 - move.l %fp,%d2 - add.l #-12,%d2 - move.l %d2,-(%sp) + jne .L249 + move.l %fp,%d4 + add.l #-12,%d4 + move.l %d4,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L218 + jeq .L250 pea arm - move.l %d2,-(%sp) + move.l %d4,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L218 - move.b arm+6,%d4 - mvz.b -6(%fp),%d2 - mvz.b %d4,%d0 - cmp.l %d2,%d0 - jne .L218 + jeq .L250 + move.b arm+6,%d6 + mvz.b -6(%fp),%d0 + mvz.b %d6,%d4 + cmp.l %d0,%d4 + jne .L250 pea -16(%fp) jsr (pass_steps.constprop.0) addq.l #4,%sp - move.l %d0,%d5 + move.l %d0,%d7 tst.l %d0 - jne .L221 - pea .LC13 - jra .L254 -.L221: - move.w %d2,%d0 + jne .L253 + pea .LC20 + jra .L300 +.L253: + move.b arm+7,%d5 + tst.b -2147483596.l + jne .L254 +.L257: + moveq #1,%d0 + lsl.l %d4,%d0 + mvz.b %d5,%d5 + mvz.b %d0,%d0 + move.l %d0,-20(%fp) + cmp.l %d5,%d0 + jne .L259 +.L256: + move.w %d4,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jne .L256 - moveq #1,%d0 - subq.l #1,%d5 - lsl.l %d2,%d0 - move.b arm+7,%d1 + jne .L302 + mvz.b arm+5,%d0 move.l #-2147483640,%a1 + subq.l #1,%d7 move.l (%a1),arm+8 + move.l #585088,%a0 + mulu.w #6322,%d0 pea 6322.w - move.l arm,%d6 - move.l %d6,%a0 - add.l #585088,%a0 - lea copy,%a3 + move.l #copy,%d2 clr.l undo_ready - move.l %d0,-22(%fp) - mvz.b arm+5,%d0 - move.b %d1,-17(%fp) - mulu.w #6322,%d0 + move.l arm,%a3 + add.l %a3,%a0 pea (%a0,%d0.l) + move.l %d2,%a0 pea part_copy - jsr (%a3) - move.w %d2,%d1 + jsr (%a0) pea 2330.w + move.w %d4,%d1 mvz.b arm+4,%d0 + move.l %d2,%a1 mulu.w #36568,%d0 mulu.w #2330,%d1 move.l %d0,%a0 add.l %d1,%a0 - pea (%a0,%d6.l) + pea (%a0,%a3.l) pea record_copy - jsr (%a3) + jsr (%a1) pea part_copy jsr (copy.constprop.0) lea (28,%sp),%sp - move.w %d2,%d1 - mvz.b -17(%fp),%d6 + move.w %d4,%d1 mulu.w #12,%d1 move.l %d1,%a0 add.l #part_buf+1538,%a0 - move.b %d5,2(%a0) - mvz.b -19(%fp),%d5 clr.w (%a0) - cmp.l %d6,%d5 - jne .L229 - addq.l #1,%d4 -.L223: + move.b %d7,2(%a0) + cmp.l -20(%fp),%d5 + jne .L267 + addq.l #1,%d6 +.L261: clr.b %d0 - move.b %d4,4(%a0) + move.b %d6,4(%a0) move.b %d0,9(%a0) mvz.b arm+5,%d0 move.l %d0,-(%sp) pea part_buf jsr 1073912396 addq.l #8,%sp - cmp.l %d6,%d5 - jeq .L224 + cmp.l -20(%fp),%d5 + jeq .L262 mvz.b arm+7,%d0 move.l arm+8,%d1 swap %d0 @@ -1692,64 +1889,100 @@ module_key: move.l %d1,-(%sp) jsr set_mutes addq.l #4,%sp -.L224: - move.l %d2,%d0 +.L262: + move.l %d4,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 clr.l (%a0) tst.l -2147457608 - jeq .L230 + jeq .L268 pea 1.w move.l #49168,-(%sp) - move.l %d2,-(%sp) + move.l %d4,-(%sp) jsr 1073762680 lea (12,%sp),%sp moveq #2,%d0 -.L225: +.L263: move.l %d0,phase moveq #1,%d0 move.l %d0,1187497772 - jra .L204 -.L229: - moveq #10,%d4 - jra .L223 -.L230: + jra .L236 +.L254: + tst.b %d5 + jge .L257 + pea .LC21 + jra .L300 +.L258: + move.l %d1,%d2 + moveq #8,%d0 + cmp.l %d1,%d0 + jeq .L256 +.L259: + move.l %d2,%d1 + addq.l #1,%d1 + btst %d2,%d5 + jeq .L258 + mvz.w %d2,%d0 + add.l %d0,%d0 + move.l %d0,%a0 + add.l #-2147480495,%a0 + tst.b (%a0) + jne .L258 + clr.b %d1 + pea .LC22 + move.l #note,%d4 + move.l %d4,-(%sp) + lea append,%a3 + add.l #49,%d2 + move.b %d1,note + jsr (%a3) + move.b %d2,note+1 + clr.b %d2 + pea .LC23 + move.l %d4,-(%sp) + move.b %d2,note+2 + jsr (%a3) + move.l %d4,-(%sp) + jsr show + lea (20,%sp),%sp + jra .L236 +.L267: + moveq #10,%d6 + jra .L261 +.L268: moveq #5,%d0 - jra .L225 -.L217: + jra .L263 +.L249: moveq #50,%d1 cmp.l %d4,%d1 - jeq .L226 + jeq .L264 jsr close_view -.L196: +.L228: clr.l %d0 -.L200: - movem.l -52(%fp),#3196 - unlk %fp - rts -.L214: + jra .L232 +.L246: move.l %d0,%d1 subq.l #2,%d1 lsr.l #1,%d1 - jeq .L227 + jeq .L265 subq.l #5,%d0 tst.l %d0 - jne .L228 -.L227: + jne .L266 +.L265: moveq #50,%d2 cmp.l %d4,%d2 - jne .L196 - pea .LC14 + jne .L228 + pea .LC24 jsr cancel - jra .L255 -.L228: + jra .L301 +.L266: add.l #-49,%d4 jsr close_view - move.l %d4,-22(%fp) + move.l %d4,-20(%fp) lsr.l #1,%d4 - jne .L196 - jra .L204 + jne .L228 + jra .L236 .size module_key, .-module_key .align 2 .globl module_enc @@ -1771,43 +2004,43 @@ module_enc: rts .size module_enc, .-module_enc .section .rodata.str1.1 -.LC15: +.LC25: .string "BOUNCE" -.LC16: +.LC26: .string "" -.LC17: +.LC27: .string " (LONGEST)" -.LC18: +.LC28: .string " STEPS" -.LC19: +.LC29: .string "RECORDING ONE PASS" -.LC20: +.LC30: .string "PRESS PLAY" -.LC21: +.LC31: .string "WAITS FOR PATTERN START" -.LC22: +.LC32: .string "BOUNCED: T" -.LC23: +.LC33: .string " PICK FLEX" -.LC24: +.LC34: .string "BOUNCE T" -.LC25: +.LC35: .string "RESET T" -.LC26: +.LC36: .string "STOCK STATIC TRACK" -.LC27: +.LC37: .string "NO TRIGS, NO LOCKS" -.LC28: +.LC38: .string "YES: RESET NO: BACK" -.LC29: +.LC39: .string "PASS " -.LC30: +.LC40: .string "OVER 64 STEPS" -.LC31: +.LC41: .string "TRIG 1-8: MERGE" -.LC32: +.LC42: .string "YES: REC NO: CLOSE" -.LC33: +.LC43: .string "NO: CANCEL" .text .align 2 @@ -1815,33 +2048,36 @@ module_enc: .type module_draw, @function module_draw: link.w %fp,#-68 + moveq #-9,%d1 movem.l #15388,(%sp) move.l phase,%a5 - tst.l %a5 - jeq .L258 + move.l %a5,%d0 + and.l %d1,%d0 + tst.l %d0 + jeq .L304 tst.l 8(%fp) - jeq .L258 + jeq .L304 lea append,%a3 - moveq #6,%d0 + moveq #6,%d4 lea fill,%a4 lea text,%a2 move.l #invert,%d3 - cmp.l %a5,%d0 - jne .L260 - clr.b %d1 - pea .LC22 + cmp.l %a5,%d4 + jne .L306 + clr.b %d0 + pea .LC32 move.l %fp,%d2 add.l #-24,%d2 move.l %d2,-(%sp) - clr.b %d4 - move.b %d1,-24(%fp) + move.b %d0,-24(%fp) jsr (%a3) move.b arm+6,%d0 - move.b %d4,-13(%fp) - pea .LC23 + clr.b %d1 + pea .LC33 move.l %d2,-(%sp) add.l #49,%d0 move.b %d0,-14(%fp) + move.b %d1,-13(%fp) jsr (%a3) clr.l -(%sp) pea 8.w @@ -1864,11 +2100,11 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a0) lea (36,%sp),%sp -.L258: +.L304: movem.l -68(%fp),#15388 unlk %fp rts -.L260: +.L306: clr.l -(%sp) moveq #7,%d4 pea 44.w @@ -1910,7 +2146,7 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a4) clr.b %d0 - pea .LC24 + pea .LC34 move.l %d2,-(%sp) move.b %d0,-36(%fp) jsr (%a3) @@ -1921,8 +2157,8 @@ module_draw: move.b %d0,-28(%fp) move.b %d1,-27(%fp) cmp.l %a5,%d4 - jne .L261 - pea .LC25 + jne .L307 + pea .LC35 move.l %d2,-(%sp) move.b %d1,-36(%fp) jsr (%a3) @@ -1932,7 +2168,7 @@ module_draw: move.b %d0,-29(%fp) clr.b %d0 move.b %d0,-28(%fp) -.L262: +.L308: move.l %d2,-(%sp) pea 13.w pea 10.w @@ -1949,51 +2185,60 @@ module_draw: move.l phase,%d0 moveq #4,%d1 cmp.l %d0,%d1 - jne .L263 + jne .L309 move.l message,%d0 tst.l %d0 - jne .L264 - move.l #.LC16,%d0 -.L264: + jne .L310 + move.l #.LC26,%d0 +.L310: move.l %d0,-(%sp) pea 27.w -.L291: pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (16,%sp),%sp - jra .L258 -.L261: + move.l message2,%d0 + tst.l %d0 + jeq .L304 + move.l %d0,-(%sp) + pea 35.w +.L340: + pea 10.w + move.l 8(%fp),-(%sp) + jsr (%a2) + lea (16,%sp),%sp + jra .L304 +.L307: moveq #4,%d1 cmp.l %a5,%d1 - jne .L262 - move.l #.LC15,%d2 - jra .L262 -.L263: + jne .L308 + move.l #.LC25,%d2 + jra .L308 +.L309: subq.l #7,%d0 tst.l %d0 - jne .L274 - pea .LC26 + jne .L320 + pea .LC36 pea 24.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) - pea .LC27 + pea .LC37 pea 31.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (28,%sp),%sp - move.l #.LC28,(%sp) -.L290: + move.l #.LC38,(%sp) +.L339: pea 45.w - jra .L291 -.L274: + jra .L340 +.L320: move.w #10,%a5 move.l %fp,%d2 sub.l %a4,%a4 add.l #-24,%d2 -.L265: +.L311: moveq #84,%d0 clr.b %d1 move.l %d2,-(%sp) @@ -2010,7 +2255,7 @@ module_draw: mvz.b arm+7,%d0 lea (16,%sp),%sp btst %d4,%d0 - jeq .L266 + jeq .L312 pea 7.w pea 12.w pea 21.w @@ -2019,18 +2264,18 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a0) lea (20,%sp),%sp -.L266: +.L312: addq.l #1,%a4 lea (14,%a5),%a5 moveq #8,%d0 cmp.l %a4,%d0 - jne .L265 + jne .L311 move.l phase,%d0 moveq #1,%d1 cmp.l %d0,%d1 - jne .L267 + jne .L313 clr.b %d3 - pea .LC29 + pea .LC39 move.l %d2,-(%sp) move.b %d3,-24(%fp) jsr (%a3) @@ -2038,17 +2283,17 @@ module_draw: jsr (pass_steps.constprop.0) lea (12,%sp),%sp tst.l %d0 - jeq .L268 + jeq .L314 moveq #9,%d4 cmp.l %d0,%d4 - jcc .L275 + jcc .L321 move.l %d0,%d1 moveq #10,%d4 divu.l %d4,%d1 lea (-18,%fp),%a0 add.l #48,%d1 move.b %d1,-19(%fp) -.L269: +.L315: moveq #10,%d3 remu.l %d3,%d1:%d0 clr.b %d4 @@ -2056,11 +2301,11 @@ module_draw: move.b %d1,(%a0) move.b %d4,1(%a0) tst.l -40(%fp) - jeq .L276 - move.l #.LC17,%d0 -.L270: + jeq .L322 + move.l #.LC27,%d0 +.L316: move.l %d0,-(%sp) -.L289: +.L338: move.l %d2,-(%sp) jsr (%a3) addq.l #4,%sp @@ -2069,50 +2314,50 @@ module_draw: pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) - pea .LC31 + pea .LC41 pea 38.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (28,%sp),%sp - move.l #.LC32,(%sp) - jra .L290 -.L275: + move.l #.LC42,(%sp) + jra .L339 +.L321: lea (-19,%fp),%a0 - jra .L269 -.L276: - move.l #.LC18,%d0 - jra .L270 -.L268: - pea .LC30 - jra .L289 -.L267: + jra .L315 +.L322: + move.l #.LC28,%d0 + jra .L316 +.L314: + pea .LC40 + jra .L338 +.L313: moveq #5,%d1 cmp.l %d0,%d1 - jeq .L277 + jeq .L323 subq.l #2,%d0 tst.l %d0 - jne .L278 - move.l #.LC21,%d0 -.L272: + jne .L324 + move.l #.LC31,%d0 +.L318: move.l %d0,-(%sp) pea 31.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) - pea .LC33 + pea .LC43 pea 45.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (32,%sp),%sp - jra .L258 -.L277: - move.l #.LC20,%d0 - jra .L272 -.L278: - move.l #.LC19,%d0 - jra .L272 + jra .L304 +.L323: + move.l #.LC30,%d0 + jra .L318 +.L324: + move.l #.LC29,%d0 + jra .L318 .size module_draw, .-module_draw .section .rodata .type ticks.0, @object @@ -2126,26 +2371,46 @@ ticks.0: .size bounce_part_menu, 24 bounce_part_menu: .long 1 - .long .LC15 + .long .LC25 .long 3 .long bounce_actions .long bounce_choose .long 0 .section .rodata.str1.1 -.LC34: +.LC44: .string "BOUNCE TRACK" -.LC35: +.LC45: .string "RESET TRACK" -.LC36: +.LC46: .string "UNDO" .section .rodata .align 2 .type bounce_actions, @object .size bounce_actions, 12 bounce_actions: - .long .LC34 - .long .LC35 - .long .LC36 + .long .LC44 + .long .LC45 + .long .LC46 + .local wav_path + .comm wav_path,160,1 + .local wav_base + .comm wav_base,24,1 + .local wav_name + .comm wav_name,24,1 + .local prev_mode + .comm prev_mode,4,2 + .local prev_done_b + .comm prev_done_b,4,2 + .local prev_done_a + .comm prev_done_a,4,2 + .local saved_ticks + .comm saved_ticks,4,2 + .local saved_in + .comm saved_in,4,2 + .local saved_result + .comm saved_result,4,2 + .local note + .comm note,32,1 .local part_buf .comm part_buf,6322,1 .local part_copy @@ -2160,6 +2425,8 @@ bounce_actions: .comm last,12,2 .local arm .comm arm,12,2 + .local message2 + .comm message2,4,2 .local message .comm message,4,2 .local shown_ticks From 0c0dcbe2a3ca1a20dbcaa1948061454ed31424dd Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 18:53:30 +0100 Subject: [PATCH 13/43] Bounce In Place 0.4.0: trig keys 1-8 light the merge; rename; texts match 0.3.0 and 0.4.0 The track you bounce into lights red and merged tracks green, in stock's steady LED bytes for keys 1-8, only while BOUNCE is open or armed; stock's last drawing comes back on close. No stock site patched. Emulator: lamps, a full bounce and UNDO after a bounce, a merge and RESET TRACK (no restart). README, manifest and TESTING no longer claim ev_in_use resting: the module has no frame code to rest. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/CHANGELOG.json | 9 + sdk/drafts/bounce/README.md | 24 +- sdk/drafts/bounce/TESTING.md | 26 +- sdk/drafts/bounce/bounce.c | 46 +- sdk/drafts/bounce/manifest.py | 9 +- sdk/drafts/bounce/octamod.module.json | 25 +- sdk/drafts/bounce/unit.s | 1016 ++++++++++++++----------- 7 files changed, 672 insertions(+), 483 deletions(-) diff --git a/sdk/drafts/bounce/CHANGELOG.json b/sdk/drafts/bounce/CHANGELOG.json index 2f8781b181..6c16bafcf5 100644 --- a/sdk/drafts/bounce/CHANGELOG.json +++ b/sdk/drafts/bounce/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "0.4.0-experimental", + "date": "2026-12-03", + "changes": [ + "Renamed Bounce In Place.", + "While BOUNCE is open or armed, trig keys 1-8 light up: the track you bounce into red, merged tracks green.", + "0.3.0 ran on its developer's MKII and worked as reported." + ] + }, { "version": "0.3.0-experimental", "date": "2026-12-03", diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index 6d28a6c468..b1562e3030 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -1,10 +1,10 @@ -# Bounce +# Bounce In Place -Version 0.3.0 · by @seniorspiz · a draft: 0.2.0 ran on one MKII in RAM trials; 0.3.0 has run in the emulator only ([TESTING.md](TESTING.md)). +Version 0.4.0 · by @seniorspiz · a draft: 0.3.0 ran on its developer's MKII in a RAM trial; 0.4.0's trig key lamps have run in the emulator only ([TESTING.md](TESTING.md)). ## Overview -Bounce records a track in place, the way bounce or freeze works in a DAW, without setting up the recorder's buffer, length and trigs by hand. It records the active track, and any other tracks you merge in, for exactly one pattern length (in per-track mode, the track's own length; merged tracks of different lengths, until their lengths meet), with their effects. When the take ends, the active track becomes a Flex machine playing the take: its FX are off, its AMP is stock's (HOLD and REL full, VOL and BAL centred), its LFOs no longer move it, its old trigs and locks are replaced by one trig on step 1, and the take is saved as a WAV (`B-YYMMDD-HHMM`) where SAVE SAMPLES TO says, with the track's recorder buffer assigned to it, so once you save the project the take reloads with it. The other merged tracks are muted with stock's own mute. A Grain or synth track is bounced as it sounds, so its CPU is free once it plays the take as Flex. RESET TRACK turns any track back into a plain STATIC track. UNDO brings back what the last bounce or reset changed, until the next power cycle or project change. +Bounce In Place records a track in place, the way bounce or freeze works in a DAW, without setting up the recorder's buffer, length and trigs by hand. It records the active track, and any other tracks you merge in, for exactly one pattern length (in per-track mode, the track's own length; merged tracks of different lengths, until their lengths meet), with their effects. When the take ends, the active track becomes a Flex machine playing the take: its FX are off, its AMP is stock's (HOLD and REL full, VOL and BAL centred), its LFOs no longer move it, its old trigs and locks are replaced by one trig on step 1, and the take is saved as a WAV (`B-YYMMDD-HHMM`) where SAVE SAMPLES TO says, with the track's recorder buffer assigned to it, so once you save the project the take reloads with it. The other merged tracks are muted with stock's own mute. A Grain or synth track is bounced as it sounds, so its CPU is free once it plays the take as Flex. RESET TRACK turns any track back into a plain STATIC track. UNDO brings back what the last bounce or reset changed, until the next power cycle or project change. Category: **system**. It rewrites a track's Part and pattern when the musician asks, and uses no effect slot, DSP code or knob. @@ -21,7 +21,7 @@ Category: **system**. It rewrites a track's Part and pattern when the musician a | After bouncing a Grain or synth track | The take is in, and the bottom line reads BOUNCED: T*n* PICK FLEX. Pick FLEX for that track in the machine chooser: Bounce then makes it play the take. Until then the machine plays on unchanged. | | FUNC+PART > BOUNCE > UNDO | Restores the last bounce's or reset's track: machine, FX, every page, slots, trigs, locks, and the merged tracks' mutes. | -BOUNCE shows the merge as inverted track names (the trig key lamps stay stock's: see the limits below), then PRESS PLAY, WAITS FOR PATTERN START or RECORDING ONE PASS, and at the end BOUNCED, SAVED AS with the file's name, or the reason it refused. While stock writes the WAV, its own screens show. +BOUNCE shows the merge as inverted track names and on trig keys 1-8 (the track you bounce into red, merged tracks green, the rest dark) until the take ends, then PRESS PLAY, WAITS FOR PATTERN START or RECORDING ONE PASS, and at the end BOUNCED, SAVED AS with the file's name, or the reason it refused. While stock writes the WAV, its own screens show. ## Usage @@ -43,11 +43,12 @@ Every piece of work runs on a key press, once a step while a take is armed, or a | One track: set its recorder's source to itself. Several: send the merged tracks to CUE for the take and record CUE | key press | | Set the length to the pattern's (or the track's) and arm for the next step 1 | key press | | Record, on the instrument's own tempo, scale and length | stock's recorder | -| See that the take ended | once a step, only while armed | +| See that the take ended | the UI tick, a few compares, only while armed | +| Light trig keys 1-8 with the merge: stock's steady LED bytes for those keys, put back as stock last drew them when the window closes | the UI tick, only while BOUNCE is open or armed | | Make the active track a Flex machine playing the take, FX1 and FX2 off, one trig on step 1 at full length; mute the merged tracks; restore the CUE routing | one bounded edit | | Save the take as a WAV and assign the track's recorder buffer to it: stock's SAVE THIS RECORDING with ASSIGN TO SELF (the chain stock's SAVE ALL RECORDINGS runs), a name that is free, and stock's done callback | stock's card job after the take | -It answers `ev_in_use` so it rests while nothing is armed, and contributes its BOUNCE row to the base's `ot_part_menu` table. +It has no code in the frame interrupt (no detour, no `rests` hook), so there is nothing for `ev_in_use` to rest. Its UI tick compares its phase and returns while BOUNCE is closed. It contributes its BOUNCE row to the base's `ot_part_menu` table. ## Compatibility and limitations @@ -57,15 +58,16 @@ It answers `ev_in_use` so it rests while nothing is armed, and contributes its B - With MASTER TRACK on, T8 carries the mix of T1-T7, so T8 cannot be a bounce destination then and is refused. - Seen in the emulator (TESTING.md): CUE and SRC3 = the track both carry a track after its FX. The pattern's trig and lock layout is mapped. Still open: the same on a unit, Studio mode cue, MAIN TO CUE, and whether a take follows the track's LEVEL. - The WAV is never deleted by Bounce: UNDO gives the track its old settings back and leaves the file on the card and the buffer's link to it. A later recording into the same buffer replaces the take in the buffer, as stock does. -- 0.2.0 ran on one MKII; 0.3.0 has run in the emulator only (TESTING.md). +- The trig key lamps are written in stock's steady LED bytes for keys 1-8 only while BOUNCE is open or armed, and patch no stock site. Another module that lights trig keys 1-8 at the same moment would be overdrawn until BOUNCE closes; none does today. +- 0.3.0 ran on its developer's MKII; 0.4.0 has run in the emulator only (TESTING.md). -### What the 0.3.0 prototype does and does not do yet +### What the 0.4.0 prototype does and does not do yet -0.2.0 ran on one MKII in RAM trials; 0.3.0 adds the WAV and the refusals below and has run only in the emulator so far ([TESTING.md](TESTING.md)). Its limits: +0.3.0 ran on its developer's MKII in a RAM trial; 0.4.0 adds the trig key lamps ([TESTING.md](TESTING.md)). Its limits: - **The WAV needs a project save.** The file is written at once, but the project names it only after you save the project, as with stock's SAVE THIS RECORDING. A power cycle before that leaves the WAV on the card and the buffer empty. - **Passes over 64 master steps.** RLEN counts at most 64 master 16ths (4 bars at 1X), so a longer pass is refused with PASS OVER 64 STEPS. -- **Trig key lamps.** The merge shows in the BOUNCE window only. Stock redraws the trig lamps every step, so lighting them needs a lamp hook in the base that several modules can share; Bounce does not patch that stock site on its own. +- **Trig key lamps.** While the sequencer plays, stock redraws the trig keys each step; Bounce redraws its lamps on the next UI tick, so a key may flicker for up to 1/60 s. - **Modwerk machines.** A Grain or synth track is bounced as it sounds; only the machine chooser switches a track off one (the base runs the machine's own leave), so you pick FLEX there yourself after the take, and STATIC before RESET TRACK. - **Merged lengths.** The take runs until the merged tracks' passes meet (2 bars and 3 bars: 6 bars). Past 64 master steps it takes the longest pass instead, and the window reads PASS *n* (LONGEST). In PER TRACK mode the bounced track's length becomes the take's, at 1X. - **Cue levels.** A merged track records at its cue level, so one at 0 is refused (T*n* CUE LEVEL IS 0). Other cue levels are taken as they are. @@ -77,7 +79,7 @@ See [TESTING.md](TESTING.md). ## Authorship and licences -Design and code by @seniorspiz, MIT (LICENSE). Track Solo's lamp handling and Stem Rec's recorder window are the nearest patterns; no code is taken from them. The stock addresses and the recorder mailbox word come from octabam's FREE LOOP adapter and firmware notes; the stock text call and the per-step lock index are as Pattern Sample Locks (twwwy) uses them, written anew here. The recorder length, end-of-take and pattern length findings come from Sam Banks' RLEN PLEN notes in octabam and from octabam's firmware notes (Bryan T, Tim Hastie). +Design and code by @seniorspiz, MIT (LICENSE). Track Solo's LED level handling and Stem Rec's recorder window are the nearest patterns; no code is taken from them. The stock addresses and the recorder mailbox word come from octabam's FREE LOOP adapter and firmware notes; the stock text call and the per-step lock index are as Pattern Sample Locks (twwwy) uses them, written anew here. The recorder length, end-of-take and pattern length findings come from Sam Banks' RLEN PLEN notes in octabam and from octabam's firmware notes (Bryan T, Tim Hastie). ## Screens and audio diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index ace4fbcbea..8cca94e8f7 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -1,4 +1,4 @@ -# Bounce testing +# Bounce In Place testing Record what you ran, on which build and which unit, and what you saw. "Not tested" is a valid answer; never write a result you did not observe, and keep emulator runs apart from hardware ones. @@ -83,7 +83,7 @@ Read and not yet checked by a run, each needed by the prototype: stock's track w | UNDO BOUNCE | an unpleasant sound, then no playback | | 60 s later | the unit restarted (the trial's tick count reset; the base's log has a new boot with no crash record, after one late frame entry); the kept set came back | -Fixed in 0.1.1, not yet run: the pattern record is written directly (working and battery-backed copies, as Pattern Sample Locks does), a Modwerk machine track is refused (MODWERK MACHINE: SET FLEX), the machine transition runs only when the machine byte changes, and YES while stopped waits for PLAY. Open: whether the restart was a power cycle or caused by UNDO. +Fixed in 0.1.1, not yet run: the pattern record is written directly (working and battery-backed copies, as Pattern Sample Locks does), a Modwerk machine track is refused (MODWERK MACHINE: SET FLEX), the machine transition runs only when the machine byte changes, and YES while stopped waits for PLAY. Open: whether the restart was a power cycle or caused by UNDO. 0.4.0 in the emulator: UNDO after a bounce, a merge and RESET TRACK, and UNDO with nothing to undo, ran without a restart (below); still to run on the unit, several times each. **2 December 2026, prototype 0.1.1 on the same MKII**, same base and kept set, a RAM trial never kept, in the developer's own project after a SAVE. Readout phases and the developer's report: @@ -149,6 +149,28 @@ Changed since: RESET TRACK and the Grain path take a Modwerk machine signature w The emulator's clock stood at 00:36 throughout, so every name has that minute. Not tested: a save onto a full card (stock shows its own error and never calls back; Bounce gives up after a while and the take stays in the buffer), SAVE SAMPLES TO = PROJECT, a project save and reload after a bounce, a power cycle, studio cue mode, MAIN TO CUE, and everything on a unit. +**3 December 2026, 0.3.0 on the developer's MKII**, a RAM trial never kept. The developer reported that it "worked totally fine". Which steps they ran, and on which base, is not recorded: this is their report, not a test record. + +## The 0.4.0 prototype + +**3 December 2026, emulator only.** It is the same `ot_emu` setup as 0.3.0, and the package was built from this commit's `bounce.c` (`module:dev --build-only`). The LED bitmaps were read with `mem:0x460ba98c:36`: the steady bytes, the bytes last sent to the panel at `+0x11`, and the timed bytes at `+0x22`. This is not hardware evidence. + +| What | Steps | Seen | +| --- | --- | --- | +| Lamps, stopped | T1 active, DOWN+REC; then trig key 3 | steady and sent row 0: `00` before, `01` (key 1 red) once open, `21` (key 1 red, key 3 green) after trig key 3; the screen showed T1 and T3 inverted | +| Lamps, playing | PLAY, then DOWN+REC, trig key 3; eight readings 0.25 s apart; YES (armed), four more | `21` in 11 of 12 readings; one, just after YES, showed stock's running light (`0c`) in both the steady and the sent byte: stock drew a step before Bounce's next tick. On a unit that is at most one UI tick (1/60 s); not yet seen by eye | +| Lamps back | NO while armed (BOUNCE CANCELLED); PLAY while open closes BOUNCE | stock's running light again on the next readings (`c0`, `03`, `0c`); `00` once stopped | +| Full bounce | T1 alone, playing | phases WAIT, ARMED, RECORDING, SAVING, then BOUNCED, SAVED AS `B1-261203-1848`; afterwards stock's running light on the lamps | +| UNDO after a bounce | FUNC+PART > BOUNCE > UNDO | UNDONE; T1 sounding again (stem level 215) | +| UNDO with nothing to undo | the same again | NOTHING TO UNDO | +| UNDO after a merge | T1 with T3 merged, bounced; then UNDO | after the bounce T3 at 0 (muted); after UNDO T3 at 82, T1 at 215, as before | +| UNDO after RESET TRACK | T2: RESET TRACK, YES; then UNDO, then UNDO again | RESET T2 asked first, TRACK RESET, T2 at 0 (no trigs); UNDONE, T2 at 161 as before; then NOTHING TO UNDO | +| No restart | the whole run | the trial's tick count rose steadily (1,469 to 4,543), the slot stayed running | + +The stem levels vary by run: three readings in a row, with nothing changed, gave 212, 298 and 212 for T1, every track rising together. Compare a track against the others in the same reading, not across readings. + +Not tested in 0.4.0: the lamps on a unit (MKII or MKI), by eye; another module lighting trig keys 1-8 at the same time; everything still open from 0.3.0. + ## Stock flows Not tested. To compare with and without the module: REC alone (grid recording), TRACK + REC1/2/3 sampling, recorder trigs and RLEN, CUE routing and Studio mode, Part Edit's stock rows, Part Reload and Save, project save and reload, stock track mute. diff --git a/sdk/drafts/bounce/bounce.c b/sdk/drafts/bounce/bounce.c index 0c2b13eedf..f00b4423bd 100644 --- a/sdk/drafts/bounce/bounce.c +++ b/sdk/drafts/bounce/bounce.c @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: MIT * Copyright (c) 2026 seniorspiz * - * Bounce, OS 1.40C: record tracks for one pattern pass into the active track's + * Bounce In Place, OS 1.40C: record tracks for one pattern pass into the active track's * recorder buffer, then make that track a Flex machine playing the take. - * Prototype 0.3.0: 0.2.0 ran on one MKII; 0.2.1 and 0.3.0 in the emulator only (TESTING.md). + * Prototype 0.4.0: 0.3.0 ran on one MKII; 0.4.0 (the trig key lamps) in the emulator only (TESTING.md). * * DOWN+REC (or FUNC+PART > BOUNCE > BOUNCE TRACK) opens BOUNCE. Trig keys 1-8 * add or remove tracks to merge; YES arms; NO closes or cancels. @@ -122,6 +122,16 @@ #define MASTER_TRACK 0x80000034u /* nonzero: T8 is the master track (STORAGE.md) */ #define CUE_LEVEL 0x80000c51u /* + 2t: the track's cue level (MIDI.md, CC 47) */ +/* ---- the trig key lamps (octabam docs/firmware/PANEL.md section 8, KEYMAP.md "LED colours"): + * trig key n is LED id 2(n-1) red, 2(n-1)+1 green, eight ids a bitmap byte. The panel shows + * STEADY ^ TIMED; set_led's countdowns own TIMED, stock's drawers STEADY. ---- */ +#define LED_LOCK 0x460ba9c0u /* the LED semaphore set_led takes */ +#define LED_STEADY 0x460ba98cu +#define LED_TIMED 0x460ba9aeu +#define LED_FLUSH 0x400136a8u /* (): sends the rows that changed; with LED_LOCK held */ +#define LOCK_TAKE 0x400009f4u +#define LOCK_GIVE 0x40000ab4u + #define K_DOWN 0x20 #define K_REC 0x29 #define K_YES 0x31 @@ -551,6 +561,37 @@ static void undo(void) show("UNDONE"); } +/* ---- the trig key lamps: while BOUNCE is open or armed, keys 1-8 show the merge (the track + * red, merged tracks green, the rest dark). Stock's steady bytes are kept as stock last drew + * them and put back when the window closes; stock's own drawing comes back on its next pass. + * Nothing runs while the lamps are stock's. ---- */ +static uint8_t lamps_on, lamp_stock[2], lamp_mine[2]; + +static void lamps(void) +{ + unsigned want = phase == SELECT || phase == WAIT_PLAY || phase == ARMED || phase == RECORDING; + if (!want && !lamps_on) return; + unsigned changed = 0; + call1(LOCK_TAKE, LED_LOCK); + for (unsigned r = 0; r < 2u; ++r) { + uint8_t now = U8(LED_STEADY + r), v = 0; + if (!lamps_on || now != lamp_mine[r]) lamp_stock[r] = now; /* stock drew since */ + if (want) { + for (unsigned k = 0; k < 4u; ++k) { + unsigned t = r * 4u + k; + if (t == arm.track) v |= (uint8_t)(1u << (2u * k)); + else if (arm.merged & (1u << t)) v |= (uint8_t)(2u << (2u * k)); + } + v ^= U8(LED_TIMED + r); /* a stock flash on these keys must not invert them */ + } else v = lamp_stock[r]; + if (v != now) { U8(LED_STEADY + r) = v; changed = 1; } + lamp_mine[r] = v; + } + if (changed) call0(LED_FLUSH); + call1(LOCK_GIVE, LED_LOCK); + lamps_on = (uint8_t)want; +} + /* ---- hooks ---- */ void module_tick(struct modwerk_runtime_api *api) { @@ -564,6 +605,7 @@ void module_tick(struct modwerk_runtime_api *api) } else if (phase == PICK_FLEX) pick_tick(); else if (phase == SAVING) saving_tick(); else if (phase == MESSAGE && ++shown_ticks > 90u) close_view(); + lamps(); /* The readout: phase, merged tracks, transport, the track's recorder, UNDO ready. */ api->value = (uint32_t)phase << 24 | (uint32_t)arm.merged << 16 | (U32(TRANSPORT) ? 0x200u : 0) | (recording(arm.track) ? 0x100u : 0) | undo_ready; diff --git a/sdk/drafts/bounce/manifest.py b/sdk/drafts/bounce/manifest.py index f12e262ce3..18ab4647bb 100644 --- a/sdk/drafts/bounce/manifest.py +++ b/sdk/drafts/bounce/manifest.py @@ -1,17 +1,18 @@ -"""Bounce -- bounce tracks in place into the active track's Flex recording. +"""Bounce In Place -- bounce tracks in place into the active track's Flex recording. DOWN+REC (or FUNC+PART > BOUNCE) opens BOUNCE; trig keys 1-8 pick tracks to merge, YES records one pattern pass with the track's own recorder (SRC3 = the track) or, merged, with CUE. Stock ends the take; Bounce then makes the track FLEX on its recorder buffer with one trig on step 1, FX off, merged tracks muted, and stock saves the take as a WAV assigned to the buffer. UNDO restores the Part bytes, the pattern record and the mutes. +While BOUNCE is open or armed, trig keys 1-8 show the merge in stock's steady LED bytes. No stock site is patched: the module reads the base's key, tick, draw and encoder events and adds a row to the Part Edit window (runtime.json). It calls stock's recorder mailbox (0x40005178), Part paste (0x40029a4c), track write (0x40029754) and machine transition (0x400972fc). Read from octabam's firmware notes and partly measured in the emulator (TESTING.md); the module -ran on one MKII in RAM trials (TESTING.md). bounce.c is the source; generate.py writes +0.3.0 ran on one MKII in a RAM trial (TESTING.md). bounce.c is the source; generate.py writes unit.s. """ @@ -21,9 +22,9 @@ name="bounce", key="BOUNCE", kind=Kind.CF_PATCH, - doc="Bounce: record tracks for one pattern into the active track and make it a Flex machine playing the take.", + doc="Bounce In Place: record tracks for one pattern into the active track and make it a Flex machine playing the take.", category=Category.TRACK, author="seniorspiz", author_url="https://github.com/seniorspiz", - proof=Proof.UNTESTED, proof_note="Prototype: 0.2.0 ran on one MKII in RAM trials; 0.2.1 and 0.3.0 (WAV save, refusals) in the emulator only.", + proof=Proof.UNTESTED, proof_note="Prototype: 0.3.0 ran on one MKII in a RAM trial (developer's report); 0.4.0 (trig key lamps) in the emulator only.", linked=(Linked("bounce", "modules/bounce/unit.s", cpu="5475", dram=True),), gates=(Gate("modules/bounce/verify.py", remix_arg=False),), ) diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index 64e2bdfed4..301a128830 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -2,8 +2,8 @@ "schemaVersion": 2, "id": "bounce", "key": "BOUNCE", - "name": "Bounce", - "version": "0.3.0-experimental", + "name": "Bounce In Place", + "version": "0.4.0-experimental", "category": "system", "author": { "github": "seniorspiz", @@ -15,18 +15,18 @@ "presentation": { "label": "Bounce tracks in place", "family": "Recording", - "summary": "Bounce one or more audio tracks into the active track as a Flex recording, one pattern long, without setting up the recorder by hand.", - "overview": "Bounce records the active track, and any other tracks you pick, for exactly one pattern length (or the track's own length in per-track mode), with their effects. When the take ends, the active track becomes a Flex machine playing it, with its FX off and one trig on step 1, and the take is saved as a WAV in the project so it reloads unchanged. The other merged tracks are muted with stock's mute. UNDO BOUNCE brings everything back until the next power cycle or project change. It uses no effect slot.", + "summary": "Bounce one or more audio tracks into the active track as a Flex recording, one pattern long, saved as a WAV, without setting up the recorder by hand.", + "overview": "Bounce In Place records the active track, and any other tracks you pick, for exactly one pattern length (in per-track mode the track's own length; merged tracks until their lengths meet), with their effects. When the take ends, the active track becomes a Flex machine playing it, with its FX off, stock AMP and one trig on step 1, and the take is saved as a WAV (B-YYMMDD-HHMM) with the track's buffer assigned to it, so it reloads once you save the project. The other merged tracks are muted with stock's mute. RESET TRACK makes a track a fresh STATIC track. UNDO brings back the last bounce or reset until the next power cycle or project change. It uses no effect slot.", "highlights": [ "DOWN then REC, or FUNC+PART > BOUNCE, opens BOUNCE for the active track.", - "Press trig keys 1-8 to merge more tracks into the active track's take; their lamps show which are in.", + "Press trig keys 1-8 to merge more tracks into the active track's take; the keys light the track red and merged tracks green.", "Records on the instrument's own tempo and length, starting on the next step 1.", "The take is saved to the project, the track becomes a Flex machine playing it, and UNDO BOUNCE restores it." ], "usage": [ "Select the track to bounce into, then hold DOWN and press REC (or FUNC+PART > BOUNCE).", "Press trig keys 1-8 to merge those tracks in; press YES to arm. The take starts on the next step 1.", - "When BOUNCE reads DONE, the track plays the recording. FUNC+PART > BOUNCE > UNDO BOUNCE goes back." + "When BOUNCE reads BOUNCED, SAVED AS, the track plays the recording. FUNC+PART > BOUNCE > UNDO goes back." ] }, "controls": [], @@ -39,11 +39,12 @@ "key:TRIG@BOUNCE" ], "limitations": [ - "Prototype 0.1.0: builds; has not run in the emulator or on a unit.", - "The take is not yet saved as a WAV, so it is lost at a power cycle or project reload.", + "Experimental: 0.3.0 ran on its developer's MKII in a RAM trial and worked as reported; 0.4.0's trig key lamps have run in the emulator only.", + "The WAV is saved at once, but the track only keeps pointing to it after you save the project (as stock's own SAVE THIS RECORDING).", "A pass longer than 64 master steps (4 bars at 1X) is refused.", - "With MASTER TRACK on, T8 should not be a bounce destination; the prototype does not refuse it yet.", - "Not yet measured on a unit: CUE after the FX (seen in the emulator only), Studio mode cue, MKI lamps." + "Refuses T8 while MASTER TRACK is on, and a merged track whose cue level is 0.", + "Bounces only while the sequencer plays; UNDO lasts until the next power cycle or project change.", + "Not yet tested: a full card, Studio cue mode, MAIN TO CUE, an MKI." ], "effectId": null }, @@ -70,7 +71,7 @@ }, "tests": { "report": "TESTING.md", - "summary": "No tests have been run. Add tests.qualification with worst-case cycles, exact memory and attributed owner-reviewed hardware evidence before submitting. This scaffold cannot pass publication checks.", + "summary": "0.3.0 ran on one MKII in RAM trials (the developer's own tests); 0.2.1-0.4.0 in the emulator (TESTING.md). No release record yet: test procedure, CPU price and package lifecycle are still to run on the unit.", "hardwareStatus": "untested", "evidenceRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", "gates": [ @@ -89,7 +90,7 @@ "location": "Hold DOWN and press REC, or FUNC+PART (Part Edit) > BOUNCE.", "steps": [ "Select the destination track with its TRACK key.", - "Hold DOWN, then press REC: BOUNCE opens with the active track blinking.", + "Hold DOWN, then press REC: BOUNCE opens with the active track inverted and its trig key red.", "Press trig keys 1-8 to add or remove tracks, then YES to arm; NO closes without changes." ], "screenshots": [] diff --git a/sdk/drafts/bounce/unit.s b/sdk/drafts/bounce/unit.s index ba1be0b619..c03c9a41f9 100644 --- a/sdk/drafts/bounce/unit.s +++ b/sdk/drafts/bounce/unit.s @@ -98,7 +98,7 @@ write_span: move.l %a2,-(%sp) move.l 20(%sp),%a1 #APP -| 294 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 304 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %sr,%d0 move.w #0x2700,%sr | 0 "" 2 @@ -114,7 +114,7 @@ write_span: cmp.l 24(%sp),%a0 jne .L13 #APP -| 296 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 306 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %d0,%sr | 0 "" 2 #NO_APP @@ -255,133 +255,6 @@ saved: move.l %d0,saved_in rts .size saved, .-saved - .section .rodata.str1.1 -.LC1: - .string "BOUNCED, NOT SAVED" -.LC2: - .string "B%d-%s" -.LC3: - .string "%s" -.LC4: - .string "%s/%s.wav" -.LC5: - .string "%s/AUDIO/%s.wav" -.LC6: - .string "%s-%d" - .text - .align 2 - .type save_take, @function -save_take: - lea (-12,%sp),%sp - movem.l #1036,(%sp) - tst.l 1175475208 - jeq .L31 - mvz.b arm+6,%d3 - move.w %d3,%d0 - mulu.w #44,%d0 - move.l %d0,%a0 - add.l #1187592404,%a0 - tst.l (%a0) - jgt .L32 -.L31: - pea .LC1 - jsr show - addq.l #4,%sp -.L30: - movem.l (%sp),#1036 - lea (12,%sp),%sp - rts -.L32: - jsr 1074272764 - move.l #1073822216,%d2 - move.l %d3,%a0 - move.l %d0,-(%sp) - pea 1(%a0) - pea .LC2 - pea wav_base - move.l %d2,%a0 - jsr (%a0) - move.l 1187521530,%a2 - pea wav_base - pea .LC3 - pea wav_name - move.l %d2,%a0 - moveq #1,%d2 - jsr (%a0) - lea (28,%sp),%sp -.L37: - tst.l -2147483484 - jeq .L34 - jsr 1073893100 - tst.l %d0 - jeq .L34 - clr.l -(%sp) - clr.l -(%sp) - jsr 1073893936 - pea wav_name - move.l %d0,-(%sp) - pea .LC4 - pea wav_path - jsr 1073822216 - lea (24,%sp),%sp -.L35: - tst.l %a2 - jeq .L36 - pea wav_path - jsr (%a2) - addq.l #4,%sp - tst.l %d0 - jeq .L36 - moveq #99,%d0 - cmp.l %d2,%d0 - jeq .L31 - addq.l #1,%d2 - move.l %d2,-(%sp) - pea wav_base - pea .LC6 - pea wav_name - jsr 1073822216 - lea (16,%sp),%sp - jra .L37 -.L34: - pea wav_name - move.l #269452416,-(%sp) - pea .LC5 - pea wav_path - jsr 1073822216 - lea (16,%sp),%sp - jra .L35 -.L36: - pea wav_name - pea .LC3 - move.l #1175185904,-(%sp) - jsr 1073822216 - add.l #128,%d3 - moveq #1,%d0 - move.l %d0,1175185896 - move.l #1175179208,%a0 - move.l %d3,1175185900 - moveq #2,%d0 - move.l (%a0),prev_mode - move.l #1187565972,%a0 - move.l (%a0),prev_done_a - move.l #1187565976,%a0 - move.l (%a0),prev_done_b - move.l %d0,1175179208 - moveq #8,%d0 - clr.l 1187565972 - lea saved,%a0 - move.l %a0,1187565976 - move.l %d0,phase - moveq #1,%d0 - clr.l saved_in - clr.l saved_ticks - move.l %d0,1187497772 - pea 1.w - jsr 1073889928 - lea (16,%sp),%sp - jra .L30 - .size save_take, .-save_take .align 2 .type fill, @function fill: @@ -393,16 +266,16 @@ fill: move.l %d1,%d3 add.l 40(%sp),%d3 add.l 44(%sp),%d4 -.L57: +.L31: cmp.l %d3,%d1 - jcc .L56 + jcc .L30 move.l %d1,%d0 lsl.l #3,%d0 addq.l #7,%d0 move.l %d0,20(%sp) move.l 36(%sp),%d0 - jra .L62 -.L60: + jra .L36 +.L34: move.l %d0,%d2 lsr.l #3,%d2 move.l 20(%sp),%a1 @@ -417,23 +290,23 @@ fill: move.b (%a1),%d6 move.w %d6,%a0 tst.l 48(%sp) - jeq .L58 + jeq .L32 move.l %a0,%d6 or.l %d6,%d2 -.L59: +.L33: move.b %d2,(%a1) addq.l #1,%d0 -.L62: +.L36: cmp.l %d4,%d0 - jcs .L60 + jcs .L34 addq.l #1,%d1 - jra .L57 -.L58: + jra .L31 +.L32: not.l %d2 move.l %a0,%d6 and.l %d6,%d2 - jra .L59 -.L56: + jra .L33 +.L30: movem.l (%sp),#124 lea (24,%sp),%sp rts @@ -449,12 +322,12 @@ invert: move.l %a0,%d3 add.l 36(%sp),%d3 add.l 40(%sp),%d4 -.L64: +.L38: mvz.w %a0,%d1 move.l 32(%sp),%d0 lsl.l #3,%d1 addq.l #7,%d1 -.L65: +.L39: moveq #7,%d6 and.l %d0,%d6 move.l %d0,%d2 @@ -469,10 +342,10 @@ invert: eor.l %d6,%d2 move.b %d2,(%a1) cmp.l %d0,%d4 - jhi .L65 + jhi .L39 addq.l #1,%a0 cmp.l %a0,%d3 - jhi .L64 + jhi .L38 movem.l (%sp),#124 lea (20,%sp),%sp rts @@ -484,10 +357,10 @@ text: move.l %sp,%a1 move.l #1074524426,%a0 move.l %sp,%d0 -.L69: +.L43: move.l (%a0)+,(%a1)+ cmp.l #1074524454,%a0 - jne .L69 + jne .L43 move.l 32(%sp),12(%sp) move.l 44(%sp),-(%sp) pea -1.w @@ -505,20 +378,20 @@ text: .type append, @function append: move.l 4(%sp),%a0 -.L72: +.L46: move.b (%a0),%d0 move.l %a0,%a1 addq.l #1,%a0 tst.b %d0 - jne .L72 + jne .L46 clr.l %d0 -.L73: +.L47: move.l 8(%sp),%a0 move.b (%a0,%d0.l),%d1 move.b %d1,(%a1,%d0.l) addq.l #1,%d0 tst.b %d1 - jne .L73 + jne .L47 rts .size append, .-append .align 2 @@ -527,17 +400,17 @@ save_done_restore: move.l #1187565976,%a0 move.l #saved,%d0 cmp.l (%a0),%d0 - jne .L77 + jne .L51 move.l prev_done_b,(%a0) lea prev_done_a,%a0 move.l (%a0),1187565972 -.L77: +.L51: move.l #1175179208,%a0 moveq #2,%d0 cmp.l (%a0),%d0 - jne .L76 + jne .L50 move.l prev_mode,(%a0) -.L76: +.L50: rts .size save_done_restore, .-save_done_restore .align 2 @@ -548,7 +421,7 @@ put_track.constprop.0: movem.l #3100,(%sp) lea TRACK_BYTES,%a1 clr.l %d2 -.L84: +.L58: mvz.b 2(%a1),%d0 mvz.w (%a1),%d3 move.l 24(%sp),%a3 @@ -560,29 +433,29 @@ put_track.constprop.0: mvz.b 3(%a1),%d3 add.l %d0,%a3 add.l #part_buf,%d0 -.L80: +.L54: cmp.l %a0,%d3 - jhi .L83 + jhi .L57 add.l %d3,%d2 addq.l #1,%d1 addq.l #4,%a1 moveq #9,%d0 cmp.l %d1,%d0 - jne .L84 + jne .L58 movem.l (%sp),#3100 lea (20,%sp),%sp rts -.L83: +.L57: tst.l 32(%sp) - jeq .L81 + jeq .L55 move.b (%a3,%a0.l),%d4 -.L82: +.L56: move.b %d4,(%a0,%d0.l) addq.l #1,%a0 - jra .L80 -.L81: + jra .L54 +.L55: move.b (%a2,%a0.l),%d4 - jra .L82 + jra .L56 .size put_track.constprop.0, .-put_track.constprop.0 .align 2 .type copy.constprop.0, @function @@ -591,12 +464,12 @@ copy.constprop.0: move.l 8(%sp),%a1 clr.l %d0 lea part_buf,%a0 -.L87: +.L61: lea (%a1,%d0.l),%a2 move.b (%a2),(%a0,%d0.l) addq.l #1,%d0 cmp.l #6322,%d0 - jne .L87 + jne .L61 move.l (%sp)+,%a2 rts .size copy.constprop.0, .-copy.constprop.0 @@ -605,7 +478,7 @@ copy.constprop.0: set_mutes: move.l 4(%sp),%d0 #APP -| 270 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 280 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %sr,%d1 move.w #0x2700,%sr | 0 "" 2 @@ -613,7 +486,7 @@ set_mutes: move.l %d0,-2147483640 move.l %d0,269161684 #APP -| 272 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 282 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %d1,%sr | 0 "" 2 #NO_APP @@ -650,87 +523,87 @@ pass_steps.constprop.0: add.l %a0,%a3 add.l %a0,%a4 lea (81,%a0),%a0 -.L100: +.L74: btst %d5,%d4 - jeq .L91 + jeq .L65 tst.b (%a2) - jeq .L92 + jeq .L66 move.b -1(%a0),%d6 -.L93: +.L67: tst.b (%a2) - jeq .L94 + jeq .L68 move.b (%a0),%d3 -.L95: +.L69: mvz.b %d3,%d3 moveq #6,%d0 cmp.l %d3,%d0 - jcs .L96 + jcs .L70 mvz.b %d6,%d0 tst.b %d6 - jeq .L90 + jeq .L64 move.l #ticks.0,%d6 move.l %d6,%a5 mvz.b (%a5,%d3.l),%d3 mulu.w %d3,%d0 tst.l %d0 - jeq .L90 + jeq .L64 cmp.l %a1,%d0 - jls .L98 + jls .L72 move.l %d0,%a1 -.L98: +.L72: tst.l %d2 - jne .L91 + jne .L65 move.l %d0,%d3 move.l %d1,%d2 -.L99: +.L73: remu.l %d3,%d7:%d2 move.l %d3,%d6 move.l %d6,%d2 move.l %d7,%d3 tst.l %d7 - jne .L99 + jne .L73 divu.l %d6,%d1 muls.l %d0,%d1 cmp.l #384,%d1 shi %d2 mvs.b %d2,%d2 neg.l %d2 -.L91: +.L65: addq.l #1,%d5 lea (2330,%a0),%a0 moveq #8,%d0 cmp.l %d5,%d0 - jne .L100 + jne .L74 tst.l %d2 - jne .L101 + jne .L75 move.l %d1,%d0 moveq #6,%d2 divu.l %d2,%d0 -.L90: +.L64: movem.l (%sp),#15612 lea (40,%sp),%sp rts -.L92: +.L66: move.b (%a3),%d6 - jra .L93 -.L94: + jra .L67 +.L68: move.b (%a4),%d3 - jra .L95 -.L101: + jra .L69 +.L75: move.l 44(%sp),%a0 moveq #1,%d0 move.l %d0,(%a0) move.l %a1,%d0 addq.l #5,%d0 cmp.l #389,%d0 - jls .L102 -.L96: + jls .L76 +.L70: clr.l %d0 - jra .L90 -.L102: + jra .L64 +.L76: moveq #6,%d2 divu.l %d2,%d0 - jra .L90 + jra .L64 .size pass_steps.constprop.0, .-pass_steps.constprop.0 .align 2 .type write_record, @function @@ -762,7 +635,7 @@ write_record: move.l %d2,%a1 add.l #268525991,%a1 move.l %a0,36(%sp) -.L115: +.L89: pea 32.w move.l 40(%sp),%a0 pea (%a0,%a3.l) @@ -774,7 +647,7 @@ write_record: lea (32,%a3),%a3 move.l 32(%sp),%a1 cmp.l #2048,%a3 - jne .L115 + jne .L89 pea 193.w move.l #1187501196,%a3 pea 2137(%a6) @@ -792,32 +665,32 @@ write_record: add.l %d1,%a0 add.l (%a2),%a0 lea (89,%a0),%a0 -.L116: +.L90: sub.l %a1,%a1 -.L119: +.L93: move.b (%a0,%a1.l),%d0 addq.l #1,%a1 moveq #31,%d1 cmp.l %a1,%d1 - jne .L117 + jne .L91 not.l %d0 tst.b %d0 sne %d0 mvs.b %d0,%d0 neg.l %d0 -.L118: +.L92: mvz.b 6(%a2),%d1 move.l %a4,%d2 lsl.l %d1,%d2 move.b (%a3),%d1 tst.l %d0 - jeq .L120 + jeq .L94 or.l %d2,%d1 -.L121: +.L95: move.b %d1,(%a3)+ lea (32,%a0),%a0 cmp.l #1187501260,%a3 - jne .L116 + jne .L90 move.l (%a2),%a0 moveq #1,%d0 add.l #635698,%a0 @@ -830,17 +703,144 @@ write_record: move.l %d0,44(%sp) lea (40,%sp),%sp jmp 1074387488 -.L117: +.L91: mvz.b %d0,%d0 cmp.l #255,%d0 - jeq .L119 + jeq .L93 moveq #1,%d0 - jra .L118 -.L120: + jra .L92 +.L94: not.l %d2 and.l %d2,%d1 - jra .L121 + jra .L95 .size write_record, .-write_record + .section .rodata.str1.1 +.LC1: + .string "BOUNCED, NOT SAVED" +.LC2: + .string "B%d-%s" +.LC3: + .string "%s" +.LC4: + .string "%s/%s.wav" +.LC5: + .string "%s/AUDIO/%s.wav" +.LC6: + .string "%s-%d" + .text + .align 2 + .type save_take, @function +save_take: + lea (-12,%sp),%sp + movem.l #1036,(%sp) + tst.l 1175475208 + jeq .L101 + mvz.b arm+6,%d3 + move.w %d3,%d0 + mulu.w #44,%d0 + move.l %d0,%a0 + add.l #1187592404,%a0 + tst.l (%a0) + jgt .L102 +.L101: + pea .LC1 + jsr show + addq.l #4,%sp +.L100: + movem.l (%sp),#1036 + lea (12,%sp),%sp + rts +.L102: + jsr 1074272764 + move.l #1073822216,%d2 + move.l %d3,%a0 + move.l %d0,-(%sp) + pea 1(%a0) + pea .LC2 + pea wav_base + move.l %d2,%a0 + jsr (%a0) + move.l 1187521530,%a2 + pea wav_base + pea .LC3 + pea wav_name + move.l %d2,%a0 + moveq #1,%d2 + jsr (%a0) + lea (28,%sp),%sp +.L107: + tst.l -2147483484 + jeq .L104 + jsr 1073893100 + tst.l %d0 + jeq .L104 + clr.l -(%sp) + clr.l -(%sp) + jsr 1073893936 + pea wav_name + move.l %d0,-(%sp) + pea .LC4 + pea wav_path + jsr 1073822216 + lea (24,%sp),%sp +.L105: + tst.l %a2 + jeq .L106 + pea wav_path + jsr (%a2) + addq.l #4,%sp + tst.l %d0 + jeq .L106 + moveq #99,%d0 + cmp.l %d2,%d0 + jeq .L101 + addq.l #1,%d2 + move.l %d2,-(%sp) + pea wav_base + pea .LC6 + pea wav_name + jsr 1073822216 + lea (16,%sp),%sp + jra .L107 +.L104: + pea wav_name + move.l #269452416,-(%sp) + pea .LC5 + pea wav_path + jsr 1073822216 + lea (16,%sp),%sp + jra .L105 +.L106: + pea wav_name + pea .LC3 + move.l #1175185904,-(%sp) + jsr 1073822216 + add.l #128,%d3 + moveq #1,%d0 + move.l %d0,1175185896 + move.l #1175179208,%a0 + move.l %d3,1175185900 + moveq #2,%d0 + move.l (%a0),prev_mode + move.l #1187565972,%a0 + move.l (%a0),prev_done_a + move.l #1187565976,%a0 + move.l (%a0),prev_done_b + move.l %d0,1175179208 + moveq #8,%d0 + clr.l 1187565972 + lea saved,%a0 + move.l %a0,1187565976 + move.l %d0,phase + moveq #1,%d0 + clr.l saved_in + clr.l saved_ticks + move.l %d0,1187497772 + pea 1.w + jsr 1073889928 + lea (16,%sp),%sp + jra .L100 + .size save_take, .-save_take .align 2 .type paste, @function paste: @@ -1292,8 +1292,8 @@ cancel: module_tick: move.l phase,%d0 moveq #5,%d1 - lea (-28,%sp),%sp - movem.l #17412,(%sp) + lea (-64,%sp),%sp + movem.l #23804,(%sp) cmp.l %d0,%d1 jne .L191 tst.l -2147457608 @@ -1302,15 +1302,90 @@ module_tick: pea 1.w moveq #2,%d2 move.l #49168,-(%sp) + moveq #1,%d6 move.l %d0,-(%sp) jsr 1073762680 move.l %d2,phase + move.l %d6,1187497772 lea (12,%sp),%sp - moveq #1,%d0 - move.l %d0,1187497772 .L192: + move.w #1,%a6 + moveq #1,%d4 +.L213: + move.l #1175169472,-(%sp) + jsr 1073744372 + clr.l %d3 + lea lamp_stock,%a3 + lea lamp_mine,%a2 + lea lamps_on,%a0 + clr.l %d0 + move.b (%a0),51(%sp) + addq.l #4,%sp +.L223: + move.l %d0,%a4 + add.l #1175169420,%a4 + move.b (%a4),%d1 + tst.b 47(%sp) + jeq .L215 + mvz.b (%a2,%d0.l),%d5 + mvz.b %d1,%d2 + cmp.l %d2,%d5 + jeq .L216 +.L215: + move.b %d1,(%a3,%d0.l) +.L216: + tst.l %d4 + jeq .L217 + mvz.b arm+6,%d2 + move.l %d0,%d6 + sub.l %a0,%a0 + lsl.l #2,%d6 + mvz.b arm+7,%d5 + move.l %d2,48(%sp) + clr.b %d2 + move.l %d6,%a1 +.L220: + cmp.l 48(%sp),%a1 + jne .L218 + moveq #1,%d7 + move.l %a0,%d6 + lsl.l %d6,%d7 + or.l %d7,%d2 +.L219: + addq.l #1,%a1 + addq.l #2,%a0 + moveq #8,%d6 + cmp.l %a0,%d6 + jne .L220 + move.l %d0,%a0 + add.l #1175169454,%a0 + move.b (%a0),%d5 + eor.l %d5,%d2 +.L221: + mvz.b %d1,%d1 + mvz.b %d2,%d5 + cmp.l %d1,%d5 + jeq .L222 + move.b %d2,(%a4) + moveq #1,%d3 +.L222: + move.b %d2,(%a2,%d0.l) + subq.l #1,%d0 + tst.l %d0 + jne .L225 + tst.l %d3 + jeq .L224 + jsr 1073821352 +.L224: + move.l #1175169472,-(%sp) + jsr 1073744564 + move.w %a6,%d0 + addq.l #4,%sp + move.b %d0,lamps_on +.L214: mvz.b arm+6,%d0 moveq #24,%d2 + moveq #9,%d6 move.l -2147457608,%d1 mulu.w #168,%d0 tst.l %d1 @@ -1324,25 +1399,24 @@ module_tick: swap %d2 clr.w %d2 neg.l %d1 + lsl.l %d6,%d1 or.l undo_ready,%d0 or.l %d2,%d0 - moveq #9,%d2 - lsl.l %d2,%d1 - movem.l (%sp),#17412 + movem.l (%sp),#23804 or.l %d1,%d0 tst.b (%a0) sne %d1 - move.l 32(%sp),%a0 + move.l 68(%sp),%a0 mvs.b %d1,%d1 neg.l %d1 lsl.l #8,%d1 or.l %d1,%d0 move.l %d0,(%a0) - lea (28,%sp),%sp + lea (64,%sp),%sp rts .L191: - moveq #2,%d1 - cmp.l %d0,%d1 + moveq #2,%d7 + cmp.l %d0,%d7 jne .L193 mvz.b arm+6,%d0 mulu.w #168,%d0 @@ -1350,88 +1424,92 @@ module_tick: add.l #-2147464743,%a0 tst.b (%a0) jeq .L192 - moveq #3,%d2 - move.l %d2,phase -.L224: - moveq #1,%d0 - move.l %d0,1187497772 + moveq #3,%d0 + moveq #1,%d1 + move.l %d0,phase + move.l %d1,1187497772 jra .L192 .L193: - moveq #3,%d1 - cmp.l %d0,%d1 + moveq #3,%d2 + cmp.l %d0,%d2 jne .L194 tst.l -2147457608 jne .L195 pea .LC11 -.L226: +.L251: jsr cancel -.L223: +.L252: addq.l #4,%sp +.L196: + move.l phase,%d0 + moveq #3,%d6 + cmp.l %d0,%d6 + jcs .L212 + tst.l %d0 + jeq .L211 jra .L192 .L195: mvz.b arm+6,%d2 lea arm,%a2 move.w %d2,%d0 - move.l %d2,%a6 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) jne .L192 - move.l %sp,%d2 - add.l #16,%d2 - move.l %d2,-(%sp) + move.l %sp,%d3 + add.l #52,%d3 + move.l %d3,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L196 + jeq .L197 move.l %a2,-(%sp) - move.l %d2,-(%sp) + move.l %d3,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L197 -.L196: - pea .LC12 - jra .L226 + jne .L198 .L197: - move.l %a6,%d0 + pea .LC12 + jra .L251 +.L198: + move.l %d2,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 tst.l (%a0) - jne .L199 + jne .L200 pea .LC13 - jra .L226 -.L199: + jra .L251 +.L200: mvz.b arm+5,%d0 - move.l (%a2),%d2 - add.l #585088,%d2 - move.l %a6,-(%sp) - mulu.w #6322,%d0 - add.l %d0,%d2 + move.l (%a2),%d3 + add.l #585088,%d3 move.l %d2,-(%sp) + mulu.w #6322,%d0 + add.l %d0,%d3 + move.l %d3,-(%sp) jsr modwerk_machine addq.l #8,%sp tst.l %d0 - jeq .L225 - move.l %d2,-(%sp) + jeq .L250 + mulu.w #12,%d2 + move.l %d3,-(%sp) jsr (copy.constprop.0) - move.w %a6,%d0 addq.l #4,%sp - mulu.w #12,%d0 - move.l %d0,%a6 - move.l %d0,%a0 - add.l #part_buf+1538,%a6 - add.l #part_copy+1538,%a0 clr.l %d0 -.L201: - lea (%a0,%d0.l),%a1 + move.l %d2,%a1 + move.l %d2,%a0 + add.l #part_copy+1538,%a1 + add.l #part_buf+1538,%a0 +.L202: + lea (%a1,%d0.l),%a2 moveq #12,%d1 - move.b (%a1),(%a6,%d0.l) + move.b (%a2),(%a0,%d0.l) addq.l #1,%d0 cmp.l %d0,%d1 - jne .L201 + jne .L202 mvz.b arm+5,%d0 move.l %d0,-(%sp) pea part_buf @@ -1439,101 +1517,129 @@ module_tick: addq.l #8,%sp move.l arm+8,%d0 cmp.l -2147483640.l,%d0 - jeq .L202 + jeq .L203 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L202: +.L203: moveq #6,%d2 + moveq #1,%d6 move.l %d2,phase clr.l message - jra .L224 + move.l %d6,1187497772 + jra .L196 .L194: - moveq #6,%d1 - cmp.l %d0,%d1 - jne .L203 - move.b arm+5,%d2 + moveq #6,%d7 + cmp.l %d0,%d7 + jne .L204 lea arm,%a2 - move.l (%a2),%a6 - move.b %d2,15(%sp) - move.l %sp,%d2 - add.l #16,%d2 - move.l %d2,-(%sp) + move.l %sp,%d4 + add.l #52,%d4 + move.l (%a2),%d2 + move.l %d4,-(%sp) + move.b arm+5,%d3 jsr current addq.l #4,%sp tst.l %d0 - jeq .L204 + jeq .L205 move.l %a2,-(%sp) - move.l %d2,-(%sp) + move.l %d4,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L205 -.L204: + jne .L206 +.L205: pea .LC7 jsr show - jra .L223 -.L205: - mvz.b 15(%sp),%d0 - move.l #585088,%a0 - add.l %a6,%a0 - mulu.w #6322,%d0 - add.l %d0,%a0 + jra .L252 +.L206: + mvz.b %d3,%d3 mvz.b arm+6,%d0 + move.l %d2,%a0 + add.l #585088,%a0 + mulu.w #6322,%d3 + add.l %d3,%a0 mvz.b 34(%a0,%d0.l),%d1 subq.l #1,%d1 tst.l %d1 - jne .L204 + jne .L205 move.l %d0,-(%sp) move.l %a0,-(%sp) jsr modwerk_machine addq.l #8,%sp tst.l %d0 - jne .L192 -.L225: + jne .L196 +.L250: jsr apply_clip jsr save_take - jra .L192 -.L203: - moveq #8,%d1 - cmp.l %d0,%d1 - jne .L207 + jra .L196 +.L204: + moveq #8,%d6 + cmp.l %d0,%d6 + jne .L208 tst.l saved_in - jeq .L208 + jeq .L209 jsr save_done_restore lea show,%a0 tst.l saved_result - jge .L209 + jge .L210 pea .LC14 jsr (%a0) - jra .L223 -.L209: + jra .L252 +.L210: pea .LC15 - move.l #wav_name,%d2 + move.l #wav_name,%d7 jsr (%a0) - move.l %d2,message2 - jra .L223 -.L208: + move.l %d7,message2 + jra .L252 +.L209: move.l saved_ticks,%d0 addq.l #1,%d0 move.l %d0,saved_ticks cmp.l #6000,%d0 - jls .L192 + jls .L211 jsr save_done_restore clr.l phase - jra .L224 -.L207: + moveq #1,%d0 + move.l %d0,1187497772 +.L211: + tst.b lamps_on.l + jeq .L214 + clr.l %d4 + sub.l %a6,%a6 + jra .L213 +.L208: subq.l #4,%d0 tst.l %d0 - jne .L192 + jne .L196 move.l shown_ticks,%d0 addq.l #1,%d0 move.l %d0,shown_ticks moveq #90,%d2 cmp.l %d0,%d2 - jcc .L192 + jcc .L211 jsr close_view + jra .L196 +.L212: + subq.l #5,%d0 + tst.l %d0 + jne .L211 jra .L192 +.L225: + moveq #1,%d0 + jra .L223 +.L218: + move.l %a1,%d7 + btst %d7,%d5 + jeq .L219 + moveq #2,%d6 + move.l %a0,%d7 + lsl.l %d7,%d6 + or.l %d6,%d2 + jra .L219 +.L217: + move.b (%a3,%d0.l),%d2 + jra .L221 .size module_tick, .-module_tick .section .rodata.str1.1 .LC16: @@ -1565,13 +1671,13 @@ module_key: move.l 8(%fp),%d4 move.l 12(%fp),%d0 cmp.l %d4,%d1 - jcs .L228 + jcs .L254 moveq #31,%d2 cmp.l %d4,%d2 - jlt .L229 + jlt .L255 move.l consumed_lo,%d1 lea consumed_lo,%a2 -.L230: +.L256: moveq #31,%d2 moveq #1,%d3 and.l %d4,%d2 @@ -1579,74 +1685,74 @@ module_key: move.l %d1,%d2 and.l %d3,%d2 tst.l %d0 - jne .L231 + jne .L257 tst.l %d2 - jeq .L232 + jeq .L258 not.l %d3 and.l %d1,%d3 move.l %d3,(%a2) -.L233: +.L259: moveq #1,%d0 -.L232: +.L258: movem.l -52(%fp),#3324 unlk %fp rts -.L229: +.L255: move.l consumed_hi,%d1 lea consumed_hi,%a2 - jra .L230 -.L231: + jra .L256 +.L257: tst.l %d2 - jne .L233 + jne .L259 move.l phase,%d0 moveq #8,%d1 cmp.l %d0,%d1 - jeq .L228 + jeq .L254 tst.l %d0 - jeq .L234 + jeq .L260 moveq #6,%d1 cmp.l %d0,%d1 - jne .L235 -.L234: + jne .L261 +.L260: moveq #41,%d2 cmp.l %d4,%d2 - jne .L228 + jne .L254 move.b 1175456540,%d0 btst #0,%d0 - jeq .L228 + jeq .L254 jsr open_select -.L236: +.L262: or.l %d3,(%a2) - jra .L233 -.L235: + jra .L259 +.L261: moveq #7,%d1 cmp.l %d0,%d1 - jne .L237 + jne .L263 moveq #49,%d2 cmp.l %d4,%d2 - jne .L238 + jne .L264 move.l %fp,%d6 add.l #-12,%d6 move.l %d6,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L250 + jeq .L276 move.b -6(%fp),%d5 mvz.b arm+6,%d0 mvz.b %d5,%d2 cmp.l %d2,%d0 - jne .L250 + jne .L276 pea arm move.l %d6,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L240 -.L250: + jne .L266 +.L276: pea .LC16 - jra .L300 -.L240: + jra .L326 +.L266: mvz.b -7(%fp),%d0 move.l #585088,%a0 move.l -12(%fp),%a3 @@ -1660,24 +1766,24 @@ module_key: addq.l #8,%sp move.l %d0,%d4 tst.l %d0 - jeq .L242 + jeq .L268 pea .LC17 -.L300: +.L326: jsr show -.L301: +.L327: addq.l #4,%sp - jra .L236 -.L242: + jra .L262 +.L268: move.w %d2,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L243 -.L302: + jeq .L269 +.L328: pea .LC18 - jra .L300 -.L243: + jra .L326 +.L269: moveq #1,%d0 lsl.l %d2,%d0 move.l #-2147483640,%a1 @@ -1722,12 +1828,12 @@ module_key: lea record_new,%a0 clr.l %d0 move.l %a0,%d1 -.L244: +.L270: clr.b %d2 move.b %d2,(%a0,%d0.l) addq.l #1,%d0 cmp.l #2330,%d0 - jne .L244 + jne .L270 st %d0 lea record_copy+80,%a1 move.w (%a1),record_new+80 @@ -1736,12 +1842,12 @@ module_key: move.l %a0,record_new+68 lea record_new+89,%a0 move.b %d0,record_new+83 -.L245: +.L271: st %d2 addq.l #1,%d4 move.b %d2,-1(%a0,%d4.l) cmp.l #2048,%d4 - jne .L245 + jne .L271 lea record_copy+2329,%a0 move.b (%a0),record_new+2329 move.l %d1,-(%sp) @@ -1756,81 +1862,81 @@ module_key: move.l %d0,undo_ready jsr show lea (24,%sp),%sp - jra .L236 -.L238: + jra .L262 +.L264: moveq #50,%d1 cmp.l %d4,%d1 - jne .L228 -.L264: + jne .L254 +.L290: jsr close_view - jra .L236 -.L237: + jra .L262 +.L263: moveq #1,%d1 cmp.l %d0,%d1 - jne .L246 + jne .L272 moveq #7,%d1 cmp.l %d4,%d1 - jlt .L247 + jlt .L273 mvz.b arm+6,%d1 cmp.l %d4,%d1 - jeq .L248 + jeq .L274 move.b arm+7,%d1 lsl.l %d4,%d0 eor.l %d1,%d0 move.b %d0,arm+7 -.L248: +.L274: moveq #1,%d2 move.l %d2,1187497772 - jra .L236 -.L247: + jra .L262 +.L273: moveq #49,%d0 cmp.l %d4,%d0 - jne .L249 + jne .L275 move.l %fp,%d4 add.l #-12,%d4 move.l %d4,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L250 + jeq .L276 pea arm move.l %d4,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L250 + jeq .L276 move.b arm+6,%d6 mvz.b -6(%fp),%d0 mvz.b %d6,%d4 cmp.l %d0,%d4 - jne .L250 + jne .L276 pea -16(%fp) jsr (pass_steps.constprop.0) addq.l #4,%sp move.l %d0,%d7 tst.l %d0 - jne .L253 + jne .L279 pea .LC20 - jra .L300 -.L253: + jra .L326 +.L279: move.b arm+7,%d5 tst.b -2147483596.l - jne .L254 -.L257: + jne .L280 +.L283: moveq #1,%d0 lsl.l %d4,%d0 mvz.b %d5,%d5 mvz.b %d0,%d0 move.l %d0,-20(%fp) cmp.l %d5,%d0 - jne .L259 -.L256: + jne .L285 +.L282: move.w %d4,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jne .L302 + jne .L328 mvz.b arm+5,%d0 move.l #-2147483640,%a1 subq.l #1,%d7 @@ -1867,9 +1973,9 @@ module_key: clr.w (%a0) move.b %d7,2(%a0) cmp.l -20(%fp),%d5 - jne .L267 + jne .L293 addq.l #1,%d6 -.L261: +.L287: clr.b %d0 move.b %d6,4(%a0) move.b %d0,9(%a0) @@ -1879,7 +1985,7 @@ module_key: jsr 1073912396 addq.l #8,%sp cmp.l -20(%fp),%d5 - jeq .L262 + jeq .L288 mvz.b arm+7,%d0 move.l arm+8,%d1 swap %d0 @@ -1889,46 +1995,46 @@ module_key: move.l %d1,-(%sp) jsr set_mutes addq.l #4,%sp -.L262: +.L288: move.l %d4,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 clr.l (%a0) tst.l -2147457608 - jeq .L268 + jeq .L294 pea 1.w move.l #49168,-(%sp) move.l %d4,-(%sp) jsr 1073762680 lea (12,%sp),%sp moveq #2,%d0 -.L263: +.L289: move.l %d0,phase moveq #1,%d0 move.l %d0,1187497772 - jra .L236 -.L254: + jra .L262 +.L280: tst.b %d5 - jge .L257 + jge .L283 pea .LC21 - jra .L300 -.L258: + jra .L326 +.L284: move.l %d1,%d2 moveq #8,%d0 cmp.l %d1,%d0 - jeq .L256 -.L259: + jeq .L282 +.L285: move.l %d2,%d1 addq.l #1,%d1 btst %d2,%d5 - jeq .L258 + jeq .L284 mvz.w %d2,%d0 add.l %d0,%d0 move.l %d0,%a0 add.l #-2147480495,%a0 tst.b (%a0) - jne .L258 + jne .L284 clr.b %d1 pea .LC22 move.l #note,%d4 @@ -1946,43 +2052,43 @@ module_key: move.l %d4,-(%sp) jsr show lea (20,%sp),%sp - jra .L236 -.L267: + jra .L262 +.L293: moveq #10,%d6 - jra .L261 -.L268: + jra .L287 +.L294: moveq #5,%d0 - jra .L263 -.L249: + jra .L289 +.L275: moveq #50,%d1 cmp.l %d4,%d1 - jeq .L264 + jeq .L290 jsr close_view -.L228: +.L254: clr.l %d0 - jra .L232 -.L246: + jra .L258 +.L272: move.l %d0,%d1 subq.l #2,%d1 lsr.l #1,%d1 - jeq .L265 + jeq .L291 subq.l #5,%d0 tst.l %d0 - jne .L266 -.L265: + jne .L292 +.L291: moveq #50,%d2 cmp.l %d4,%d2 - jne .L228 + jne .L254 pea .LC24 jsr cancel - jra .L301 -.L266: + jra .L327 +.L292: add.l #-49,%d4 jsr close_view move.l %d4,-20(%fp) lsr.l #1,%d4 - jne .L228 - jra .L236 + jne .L254 + jra .L262 .size module_key, .-module_key .align 2 .globl module_enc @@ -2054,16 +2160,16 @@ module_draw: move.l %a5,%d0 and.l %d1,%d0 tst.l %d0 - jeq .L304 + jeq .L330 tst.l 8(%fp) - jeq .L304 + jeq .L330 lea append,%a3 moveq #6,%d4 lea fill,%a4 lea text,%a2 move.l #invert,%d3 cmp.l %a5,%d4 - jne .L306 + jne .L332 clr.b %d0 pea .LC32 move.l %fp,%d2 @@ -2100,11 +2206,11 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a0) lea (36,%sp),%sp -.L304: +.L330: movem.l -68(%fp),#15388 unlk %fp rts -.L306: +.L332: clr.l -(%sp) moveq #7,%d4 pea 44.w @@ -2157,7 +2263,7 @@ module_draw: move.b %d0,-28(%fp) move.b %d1,-27(%fp) cmp.l %a5,%d4 - jne .L307 + jne .L333 pea .LC35 move.l %d2,-(%sp) move.b %d1,-36(%fp) @@ -2168,7 +2274,7 @@ module_draw: move.b %d0,-29(%fp) clr.b %d0 move.b %d0,-28(%fp) -.L308: +.L334: move.l %d2,-(%sp) pea 13.w pea 10.w @@ -2185,12 +2291,12 @@ module_draw: move.l phase,%d0 moveq #4,%d1 cmp.l %d0,%d1 - jne .L309 + jne .L335 move.l message,%d0 tst.l %d0 - jne .L310 + jne .L336 move.l #.LC26,%d0 -.L310: +.L336: move.l %d0,-(%sp) pea 27.w pea 10.w @@ -2199,25 +2305,25 @@ module_draw: lea (16,%sp),%sp move.l message2,%d0 tst.l %d0 - jeq .L304 + jeq .L330 move.l %d0,-(%sp) pea 35.w -.L340: +.L366: pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (16,%sp),%sp - jra .L304 -.L307: + jra .L330 +.L333: moveq #4,%d1 cmp.l %a5,%d1 - jne .L308 + jne .L334 move.l #.LC25,%d2 - jra .L308 -.L309: + jra .L334 +.L335: subq.l #7,%d0 tst.l %d0 - jne .L320 + jne .L346 pea .LC36 pea 24.w pea 10.w @@ -2230,15 +2336,15 @@ module_draw: jsr (%a2) lea (28,%sp),%sp move.l #.LC38,(%sp) -.L339: +.L365: pea 45.w - jra .L340 -.L320: + jra .L366 +.L346: move.w #10,%a5 move.l %fp,%d2 sub.l %a4,%a4 add.l #-24,%d2 -.L311: +.L337: moveq #84,%d0 clr.b %d1 move.l %d2,-(%sp) @@ -2255,7 +2361,7 @@ module_draw: mvz.b arm+7,%d0 lea (16,%sp),%sp btst %d4,%d0 - jeq .L312 + jeq .L338 pea 7.w pea 12.w pea 21.w @@ -2264,16 +2370,16 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a0) lea (20,%sp),%sp -.L312: +.L338: addq.l #1,%a4 lea (14,%a5),%a5 moveq #8,%d0 cmp.l %a4,%d0 - jne .L311 + jne .L337 move.l phase,%d0 moveq #1,%d1 cmp.l %d0,%d1 - jne .L313 + jne .L339 clr.b %d3 pea .LC39 move.l %d2,-(%sp) @@ -2283,17 +2389,17 @@ module_draw: jsr (pass_steps.constprop.0) lea (12,%sp),%sp tst.l %d0 - jeq .L314 + jeq .L340 moveq #9,%d4 cmp.l %d0,%d4 - jcc .L321 + jcc .L347 move.l %d0,%d1 moveq #10,%d4 divu.l %d4,%d1 lea (-18,%fp),%a0 add.l #48,%d1 move.b %d1,-19(%fp) -.L315: +.L341: moveq #10,%d3 remu.l %d3,%d1:%d0 clr.b %d4 @@ -2301,11 +2407,11 @@ module_draw: move.b %d1,(%a0) move.b %d4,1(%a0) tst.l -40(%fp) - jeq .L322 + jeq .L348 move.l #.LC27,%d0 -.L316: +.L342: move.l %d0,-(%sp) -.L338: +.L364: move.l %d2,-(%sp) jsr (%a3) addq.l #4,%sp @@ -2321,25 +2427,25 @@ module_draw: jsr (%a2) lea (28,%sp),%sp move.l #.LC42,(%sp) - jra .L339 -.L321: + jra .L365 +.L347: lea (-19,%fp),%a0 - jra .L315 -.L322: + jra .L341 +.L348: move.l #.LC28,%d0 - jra .L316 -.L314: + jra .L342 +.L340: pea .LC40 - jra .L338 -.L313: + jra .L364 +.L339: moveq #5,%d1 cmp.l %d0,%d1 - jeq .L323 + jeq .L349 subq.l #2,%d0 tst.l %d0 - jne .L324 + jne .L350 move.l #.LC31,%d0 -.L318: +.L344: move.l %d0,-(%sp) pea 31.w pea 10.w @@ -2351,13 +2457,13 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a2) lea (32,%sp),%sp - jra .L304 -.L323: + jra .L330 +.L349: move.l #.LC30,%d0 - jra .L318 -.L324: + jra .L344 +.L350: move.l #.LC29,%d0 - jra .L318 + jra .L344 .size module_draw, .-module_draw .section .rodata .type ticks.0, @object @@ -2391,6 +2497,12 @@ bounce_actions: .long .LC44 .long .LC45 .long .LC46 + .local lamp_mine + .comm lamp_mine,2,1 + .local lamp_stock + .comm lamp_stock,2,1 + .local lamps_on + .comm lamps_on,1,1 .local wav_path .comm wav_path,160,1 .local wav_base From fb9d789e2617a5cd1f939b696c90aa8e831e2744 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 19:00:20 +0100 Subject: [PATCH 14/43] Bounce In Place 0.4.0: a failed WAV save says NOT SAVED: TAKE IN BUFFER until a key Stock's error, no answer within 30 s (a full card), no free name or the pool not ready all show NOT SAVED: TAKE IN BUFFER / SAVE IT IN AUDIO EDITOR and keep it on screen; the track still plays the take from its buffer. Records the developer's 0.3.0 unit report. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/CHANGELOG.json | 3 +- sdk/drafts/bounce/README.md | 1 + sdk/drafts/bounce/TESTING.md | 4 +- sdk/drafts/bounce/bounce.c | 16 +- sdk/drafts/bounce/octamod.module.json | 3 +- sdk/drafts/bounce/unit.s | 340 +++++++++++++------------- 6 files changed, 194 insertions(+), 173 deletions(-) diff --git a/sdk/drafts/bounce/CHANGELOG.json b/sdk/drafts/bounce/CHANGELOG.json index 6c16bafcf5..374afdf979 100644 --- a/sdk/drafts/bounce/CHANGELOG.json +++ b/sdk/drafts/bounce/CHANGELOG.json @@ -5,7 +5,8 @@ "changes": [ "Renamed Bounce In Place.", "While BOUNCE is open or armed, trig keys 1-8 light up: the track you bounce into red, merged tracks green.", - "0.3.0 ran on its developer's MKII and worked as reported." + "If the WAV can't be saved (a full card), BOUNCE says so until you press a key: the take stays in the buffer, save it in the Audio Editor.", + "0.3.0 ran on its developer's MKII: bounce, merge, WAV save, RESET TRACK and UNDO worked." ] }, { diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index b1562e3030..26b135143c 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -65,6 +65,7 @@ It has no code in the frame interrupt (no detour, no `rests` hook), so there is 0.3.0 ran on its developer's MKII in a RAM trial; 0.4.0 adds the trig key lamps ([TESTING.md](TESTING.md)). Its limits: +- **A full card.** When the WAV can't be written (stock shows its own error, or no answer comes within 30 s), BOUNCE reads NOT SAVED: TAKE IN BUFFER / SAVE IT IN AUDIO EDITOR until you press a key. The track still plays the take from its recorder buffer: free some space, then save it from the Audio Editor (AED) before a power cycle empties the buffer. - **The WAV needs a project save.** The file is written at once, but the project names it only after you save the project, as with stock's SAVE THIS RECORDING. A power cycle before that leaves the WAV on the card and the buffer empty. - **Passes over 64 master steps.** RLEN counts at most 64 master 16ths (4 bars at 1X), so a longer pass is refused with PASS OVER 64 STEPS. - **Trig key lamps.** While the sequencer plays, stock redraws the trig keys each step; Bounce redraws its lamps on the next UI tick, so a key may flicker for up to 1/60 s. diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 8cca94e8f7..b11cd1a1a4 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -149,7 +149,7 @@ Changed since: RESET TRACK and the Grain path take a Modwerk machine signature w The emulator's clock stood at 00:36 throughout, so every name has that minute. Not tested: a save onto a full card (stock shows its own error and never calls back; Bounce gives up after a while and the take stays in the buffer), SAVE SAMPLES TO = PROJECT, a project save and reload after a bounce, a power cycle, studio cue mode, MAIN TO CUE, and everything on a unit. -**3 December 2026, 0.3.0 on the developer's MKII**, a RAM trial never kept. The developer reported that it "worked totally fine". Which steps they ran, and on which base, is not recorded: this is their report, not a test record. +**3 December 2026, 0.3.0 on the developer's MKII**, a RAM trial never kept. The developer reported that it "worked totally fine", and that they tried everything listed for 0.3.0 but a full card: bouncing one track and merged tracks, the WAV save, RESET TRACK and UNDO. The base and the exact steps are not recorded: this is their report, not a test record. ## The 0.4.0 prototype @@ -169,6 +169,8 @@ The emulator's clock stood at 00:36 throughout, so every name has that minute. N The stem levels vary by run: three readings in a row, with nothing changed, gave 212, 298 and 212 for T1, every track rising together. Compare a track against the others in the same reading, not across readings. +Changed after this run, built but not run: every save that fails (stock's error, no answer within 30 s, which a full card gives, no free name, the pool not ready) now shows NOT SAVED: TAKE IN BUFFER / SAVE IT IN AUDIO EDITOR until a key, instead of a short message or closing silently after 100 s. The developer's suggestion, 3 December 2026. + Not tested in 0.4.0: the lamps on a unit (MKII or MKI), by eye; another module lighting trig keys 1-8 at the same time; everything still open from 0.3.0. ## Stock flows diff --git a/sdk/drafts/bounce/bounce.c b/sdk/drafts/bounce/bounce.c index f00b4423bd..2e324f8ffa 100644 --- a/sdk/drafts/bounce/bounce.c +++ b/sdk/drafts/bounce/bounce.c @@ -334,7 +334,11 @@ static unsigned modwerk_machine(uint32_t part, unsigned t) static void number(char *at, unsigned v); static void append(char *at, const char *s); -static void show(const char *text) { message2 = 0; message = text; phase = MESSAGE; shown_ticks = 0; redraw(); } +static unsigned sticky; /* the message stays until a key */ +static void show(const char *text) { message2 = 0; sticky = 0; message = text; phase = MESSAGE; shown_ticks = 0; redraw(); } +/* The take is in the recorder buffer and the track plays it, but no WAV was written (a full + * card, most likely): it stays until a key, so the player saves it in the Audio Editor. */ +static void not_saved(void) { show("NOT SAVED: TAKE IN BUFFER"); message2 = "SAVE IT IN AUDIO EDITOR"; sticky = 1; } static void close_view(void) { phase = CLOSED; message = 0; redraw(); } /* ---- arm, cancel, finish, undo ---- */ @@ -440,7 +444,7 @@ static void save_done_restore(void) static void save_take(void) { unsigned t = arm.track; - if (!U32(POOL_READY) || (int32_t)U32(SLOT_STATE + 44u * (128u + t) + 16u) <= 0) { show("BOUNCED, NOT SAVED"); return; } + if (!U32(POOL_READY) || (int32_t)U32(SLOT_STATE + 44u * (128u + t) + 16u) <= 0) { not_saved(); return; } printf_fn pf = (printf_fn)(uintptr_t)SPRINTF; pf(wav_base, "B%d-%s", (int)(t + 1u), ((const char *(*)(void))(uintptr_t)CLOCK_NAME)()); int (*exists)(const char *) = (int (*)(const char *))(uintptr_t)U32(FILE_EXISTS); @@ -450,7 +454,7 @@ static void save_take(void) pf(wav_path, "%s/%s.wav", ((const char *(*)(int, int))(uintptr_t)PROJ_DIR)(0, 0), wav_name); else pf(wav_path, "%s/AUDIO/%s.wav", (const char *)(uintptr_t)SET_DIR, wav_name); if (!exists || !exists(wav_path)) break; - if (k == 99) { show("BOUNCED, NOT SAVED"); return; } + if (k == 99) { not_saved(); return; } } pf((char *)(uintptr_t)SAVE_NAME, "%s", wav_name); U32(SAVE_KIND) = 1; U32(SAVE_OBJ) = 128u + t; @@ -465,9 +469,9 @@ static void saving_tick(void) { if (saved_in) { save_done_restore(); - if (saved_result < 0) show("SAVE FAILED: IN BUFFER"); + if (saved_result < 0) not_saved(); else { show("BOUNCED, SAVED AS"); message2 = wav_name; } - } else if (++saved_ticks > 6000u) { save_done_restore(); phase = CLOSED; redraw(); } + } else if (++saved_ticks > 1800u) { save_done_restore(); not_saved(); } /* 30 s: a full card, stock's own error shown */ } static void finish(void) @@ -604,7 +608,7 @@ void module_tick(struct modwerk_runtime_api *api) else if (!recording(arm.track)) finish(); } else if (phase == PICK_FLEX) pick_tick(); else if (phase == SAVING) saving_tick(); - else if (phase == MESSAGE && ++shown_ticks > 90u) close_view(); + else if (phase == MESSAGE && !sticky && ++shown_ticks > 90u) close_view(); lamps(); /* The readout: phase, merged tracks, transport, the track's recorder, UNDO ready. */ api->value = (uint32_t)phase << 24 | (uint32_t)arm.merged << 16 | (U32(TRANSPORT) ? 0x200u : 0) diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index 301a128830..bf7ff3ad4a 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -39,8 +39,9 @@ "key:TRIG@BOUNCE" ], "limitations": [ - "Experimental: 0.3.0 ran on its developer's MKII in a RAM trial and worked as reported; 0.4.0's trig key lamps have run in the emulator only.", + "Experimental: 0.3.0 ran on its developer's MKII in a RAM trial (bounce, merge, WAV save, RESET TRACK, UNDO worked, as reported); 0.4.0's trig key lamps have run in the emulator only.", "The WAV is saved at once, but the track only keeps pointing to it after you save the project (as stock's own SAVE THIS RECORDING).", + "A full card: BOUNCE says NOT SAVED and the take stays in the recorder buffer; save it from the Audio Editor.", "A pass longer than 64 master steps (4 bars at 1X) is refused.", "Refuses T8 while MASTER TRACK is on, and a merged track whose cue level is 0.", "Bounces only while the sequencer plays; UNDO lasts until the next power cycle or project change.", diff --git a/sdk/drafts/bounce/unit.s b/sdk/drafts/bounce/unit.s index c03c9a41f9..e8ac879c36 100644 --- a/sdk/drafts/bounce/unit.s +++ b/sdk/drafts/bounce/unit.s @@ -182,11 +182,30 @@ show: move.l %d0,phase moveq #1,%d0 clr.l message2 + clr.l sticky move.l (%a0),message clr.l shown_ticks move.l %d0,1187497772 rts .size show, .-show + .section .rodata.str1.1,"aMS",@progbits,1 +.LC0: + .string "NOT SAVED: TAKE IN BUFFER" +.LC1: + .string "SAVE IT IN AUDIO EDITOR" + .text + .align 2 + .type not_saved, @function +not_saved: + pea .LC0 + jsr show + addq.l #4,%sp + move.l #.LC1,%d0 + move.l %d0,message2 + moveq #1,%d0 + move.l %d0,sticky + rts + .size not_saved, .-not_saved .align 2 .type close_view, @function close_view: @@ -196,8 +215,8 @@ close_view: move.l %d0,1187497772 rts .size close_view, .-close_view - .section .rodata.str1.1,"aMS",@progbits,1 -.LC0: + .section .rodata.str1.1 +.LC2: .string "AUDIO TRACKS ONLY" .text .align 2 @@ -208,29 +227,29 @@ open_select: lea (-12,%sp),%sp move.l %a6,-(%sp) cmp.l %d0,%d1 - jcs .L23 + jcs .L24 move.l #-301,%d1 btst %d0,%d1 - jeq .L22 + jeq .L23 subq.l #6,%d0 tst.l %d0 - jne .L23 + jne .L24 clr.l phase -.L23: +.L24: lea (4,%sp),%a6 move.l %a6,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jne .L25 - pea .LC0 + jne .L26 + pea .LC2 jsr show addq.l #4,%sp -.L22: +.L23: move.l (%sp)+,%a6 lea (12,%sp),%sp rts -.L25: +.L26: pea 12.w move.l %a6,-(%sp) pea arm @@ -244,7 +263,7 @@ open_select: moveq #1,%d0 move.l %d0,phase move.l %d0,1187497772 - jra .L22 + jra .L23 .size open_select, .-open_select .align 2 .type saved, @function @@ -266,16 +285,16 @@ fill: move.l %d1,%d3 add.l 40(%sp),%d3 add.l 44(%sp),%d4 -.L31: +.L32: cmp.l %d3,%d1 - jcc .L30 + jcc .L31 move.l %d1,%d0 lsl.l #3,%d0 addq.l #7,%d0 move.l %d0,20(%sp) move.l 36(%sp),%d0 - jra .L36 -.L34: + jra .L37 +.L35: move.l %d0,%d2 lsr.l #3,%d2 move.l 20(%sp),%a1 @@ -290,23 +309,23 @@ fill: move.b (%a1),%d6 move.w %d6,%a0 tst.l 48(%sp) - jeq .L32 + jeq .L33 move.l %a0,%d6 or.l %d6,%d2 -.L33: +.L34: move.b %d2,(%a1) addq.l #1,%d0 -.L36: +.L37: cmp.l %d4,%d0 - jcs .L34 + jcs .L35 addq.l #1,%d1 - jra .L31 -.L32: + jra .L32 +.L33: not.l %d2 move.l %a0,%d6 and.l %d6,%d2 - jra .L33 -.L30: + jra .L34 +.L31: movem.l (%sp),#124 lea (24,%sp),%sp rts @@ -322,12 +341,12 @@ invert: move.l %a0,%d3 add.l 36(%sp),%d3 add.l 40(%sp),%d4 -.L38: +.L39: mvz.w %a0,%d1 move.l 32(%sp),%d0 lsl.l #3,%d1 addq.l #7,%d1 -.L39: +.L40: moveq #7,%d6 and.l %d0,%d6 move.l %d0,%d2 @@ -342,10 +361,10 @@ invert: eor.l %d6,%d2 move.b %d2,(%a1) cmp.l %d0,%d4 - jhi .L39 + jhi .L40 addq.l #1,%a0 cmp.l %a0,%d3 - jhi .L38 + jhi .L39 movem.l (%sp),#124 lea (20,%sp),%sp rts @@ -357,10 +376,10 @@ text: move.l %sp,%a1 move.l #1074524426,%a0 move.l %sp,%d0 -.L43: +.L44: move.l (%a0)+,(%a1)+ cmp.l #1074524454,%a0 - jne .L43 + jne .L44 move.l 32(%sp),12(%sp) move.l 44(%sp),-(%sp) pea -1.w @@ -378,20 +397,20 @@ text: .type append, @function append: move.l 4(%sp),%a0 -.L46: +.L47: move.b (%a0),%d0 move.l %a0,%a1 addq.l #1,%a0 tst.b %d0 - jne .L46 + jne .L47 clr.l %d0 -.L47: +.L48: move.l 8(%sp),%a0 move.b (%a0,%d0.l),%d1 move.b %d1,(%a1,%d0.l) addq.l #1,%d0 tst.b %d1 - jne .L47 + jne .L48 rts .size append, .-append .align 2 @@ -400,17 +419,17 @@ save_done_restore: move.l #1187565976,%a0 move.l #saved,%d0 cmp.l (%a0),%d0 - jne .L51 + jne .L52 move.l prev_done_b,(%a0) lea prev_done_a,%a0 move.l (%a0),1187565972 -.L51: +.L52: move.l #1175179208,%a0 moveq #2,%d0 cmp.l (%a0),%d0 - jne .L50 + jne .L51 move.l prev_mode,(%a0) -.L50: +.L51: rts .size save_done_restore, .-save_done_restore .align 2 @@ -421,7 +440,7 @@ put_track.constprop.0: movem.l #3100,(%sp) lea TRACK_BYTES,%a1 clr.l %d2 -.L58: +.L59: mvz.b 2(%a1),%d0 mvz.w (%a1),%d3 move.l 24(%sp),%a3 @@ -433,29 +452,29 @@ put_track.constprop.0: mvz.b 3(%a1),%d3 add.l %d0,%a3 add.l #part_buf,%d0 -.L54: +.L55: cmp.l %a0,%d3 - jhi .L57 + jhi .L58 add.l %d3,%d2 addq.l #1,%d1 addq.l #4,%a1 moveq #9,%d0 cmp.l %d1,%d0 - jne .L58 + jne .L59 movem.l (%sp),#3100 lea (20,%sp),%sp rts -.L57: +.L58: tst.l 32(%sp) - jeq .L55 + jeq .L56 move.b (%a3,%a0.l),%d4 -.L56: +.L57: move.b %d4,(%a0,%d0.l) addq.l #1,%a0 - jra .L54 -.L55: + jra .L55 +.L56: move.b (%a2,%a0.l),%d4 - jra .L56 + jra .L57 .size put_track.constprop.0, .-put_track.constprop.0 .align 2 .type copy.constprop.0, @function @@ -464,12 +483,12 @@ copy.constprop.0: move.l 8(%sp),%a1 clr.l %d0 lea part_buf,%a0 -.L61: +.L62: lea (%a1,%d0.l),%a2 move.b (%a2),(%a0,%d0.l) addq.l #1,%d0 cmp.l #6322,%d0 - jne .L61 + jne .L62 move.l (%sp)+,%a2 rts .size copy.constprop.0, .-copy.constprop.0 @@ -523,87 +542,87 @@ pass_steps.constprop.0: add.l %a0,%a3 add.l %a0,%a4 lea (81,%a0),%a0 -.L74: +.L75: btst %d5,%d4 - jeq .L65 - tst.b (%a2) jeq .L66 + tst.b (%a2) + jeq .L67 move.b -1(%a0),%d6 -.L67: +.L68: tst.b (%a2) - jeq .L68 + jeq .L69 move.b (%a0),%d3 -.L69: +.L70: mvz.b %d3,%d3 moveq #6,%d0 cmp.l %d3,%d0 - jcs .L70 + jcs .L71 mvz.b %d6,%d0 tst.b %d6 - jeq .L64 + jeq .L65 move.l #ticks.0,%d6 move.l %d6,%a5 mvz.b (%a5,%d3.l),%d3 mulu.w %d3,%d0 tst.l %d0 - jeq .L64 + jeq .L65 cmp.l %a1,%d0 - jls .L72 + jls .L73 move.l %d0,%a1 -.L72: +.L73: tst.l %d2 - jne .L65 + jne .L66 move.l %d0,%d3 move.l %d1,%d2 -.L73: +.L74: remu.l %d3,%d7:%d2 move.l %d3,%d6 move.l %d6,%d2 move.l %d7,%d3 tst.l %d7 - jne .L73 + jne .L74 divu.l %d6,%d1 muls.l %d0,%d1 cmp.l #384,%d1 shi %d2 mvs.b %d2,%d2 neg.l %d2 -.L65: +.L66: addq.l #1,%d5 lea (2330,%a0),%a0 moveq #8,%d0 cmp.l %d5,%d0 - jne .L74 - tst.l %d2 jne .L75 + tst.l %d2 + jne .L76 move.l %d1,%d0 moveq #6,%d2 divu.l %d2,%d0 -.L64: +.L65: movem.l (%sp),#15612 lea (40,%sp),%sp rts -.L66: +.L67: move.b (%a3),%d6 - jra .L67 -.L68: + jra .L68 +.L69: move.b (%a4),%d3 - jra .L69 -.L75: + jra .L70 +.L76: move.l 44(%sp),%a0 moveq #1,%d0 move.l %d0,(%a0) move.l %a1,%d0 addq.l #5,%d0 cmp.l #389,%d0 - jls .L76 -.L70: + jls .L77 +.L71: clr.l %d0 - jra .L64 -.L76: + jra .L65 +.L77: moveq #6,%d2 divu.l %d2,%d0 - jra .L64 + jra .L65 .size pass_steps.constprop.0, .-pass_steps.constprop.0 .align 2 .type write_record, @function @@ -635,7 +654,7 @@ write_record: move.l %d2,%a1 add.l #268525991,%a1 move.l %a0,36(%sp) -.L89: +.L90: pea 32.w move.l 40(%sp),%a0 pea (%a0,%a3.l) @@ -647,7 +666,7 @@ write_record: lea (32,%a3),%a3 move.l 32(%sp),%a1 cmp.l #2048,%a3 - jne .L89 + jne .L90 pea 193.w move.l #1187501196,%a3 pea 2137(%a6) @@ -665,32 +684,32 @@ write_record: add.l %d1,%a0 add.l (%a2),%a0 lea (89,%a0),%a0 -.L90: +.L91: sub.l %a1,%a1 -.L93: +.L94: move.b (%a0,%a1.l),%d0 addq.l #1,%a1 moveq #31,%d1 cmp.l %a1,%d1 - jne .L91 + jne .L92 not.l %d0 tst.b %d0 sne %d0 mvs.b %d0,%d0 neg.l %d0 -.L92: +.L93: mvz.b 6(%a2),%d1 move.l %a4,%d2 lsl.l %d1,%d2 move.b (%a3),%d1 tst.l %d0 - jeq .L94 + jeq .L95 or.l %d2,%d1 -.L95: +.L96: move.b %d1,(%a3)+ lea (32,%a0),%a0 cmp.l #1187501260,%a3 - jne .L90 + jne .L91 move.l (%a2),%a0 moveq #1,%d0 add.l #635698,%a0 @@ -703,29 +722,27 @@ write_record: move.l %d0,44(%sp) lea (40,%sp),%sp jmp 1074387488 -.L91: +.L92: mvz.b %d0,%d0 cmp.l #255,%d0 - jeq .L93 + jeq .L94 moveq #1,%d0 - jra .L92 -.L94: + jra .L93 +.L95: not.l %d2 and.l %d2,%d1 - jra .L95 + jra .L96 .size write_record, .-write_record .section .rodata.str1.1 -.LC1: - .string "BOUNCED, NOT SAVED" -.LC2: - .string "B%d-%s" .LC3: - .string "%s" + .string "B%d-%s" .LC4: - .string "%s/%s.wav" + .string "%s" .LC5: - .string "%s/AUDIO/%s.wav" + .string "%s/%s.wav" .LC6: + .string "%s/AUDIO/%s.wav" +.LC7: .string "%s-%d" .text .align 2 @@ -734,35 +751,31 @@ save_take: lea (-12,%sp),%sp movem.l #1036,(%sp) tst.l 1175475208 - jeq .L101 + jeq .L102 mvz.b arm+6,%d3 move.w %d3,%d0 mulu.w #44,%d0 move.l %d0,%a0 add.l #1187592404,%a0 tst.l (%a0) - jgt .L102 -.L101: - pea .LC1 - jsr show - addq.l #4,%sp -.L100: + jgt .L103 +.L102: movem.l (%sp),#1036 lea (12,%sp),%sp - rts -.L102: + jra not_saved +.L103: jsr 1074272764 move.l #1073822216,%d2 move.l %d3,%a0 move.l %d0,-(%sp) pea 1(%a0) - pea .LC2 + pea .LC3 pea wav_base move.l %d2,%a0 jsr (%a0) move.l 1187521530,%a2 pea wav_base - pea .LC3 + pea .LC4 pea wav_name move.l %d2,%a0 moveq #1,%d2 @@ -779,7 +792,7 @@ save_take: jsr 1073893936 pea wav_name move.l %d0,-(%sp) - pea .LC4 + pea .LC5 pea wav_path jsr 1073822216 lea (24,%sp),%sp @@ -793,11 +806,11 @@ save_take: jeq .L106 moveq #99,%d0 cmp.l %d2,%d0 - jeq .L101 + jeq .L102 addq.l #1,%d2 move.l %d2,-(%sp) pea wav_base - pea .LC6 + pea .LC7 pea wav_name jsr 1073822216 lea (16,%sp),%sp @@ -805,14 +818,14 @@ save_take: .L104: pea wav_name move.l #269452416,-(%sp) - pea .LC5 + pea .LC6 pea wav_path jsr 1073822216 lea (16,%sp),%sp jra .L105 .L106: pea wav_name - pea .LC3 + pea .LC4 move.l #1175185904,-(%sp) jsr 1073822216 add.l #128,%d3 @@ -838,8 +851,9 @@ save_take: move.l %d0,1187497772 pea 1.w jsr 1073889928 - lea (16,%sp),%sp - jra .L100 + movem.l 16(%sp),#1036 + lea (28,%sp),%sp + rts .size save_take, .-save_take .align 2 .type paste, @function @@ -1046,13 +1060,13 @@ apply_clip: jra .L131 .size apply_clip, .-apply_clip .section .rodata.str1.1 -.LC7: - .string "TAKE LEFT IN BUFFER" .LC8: - .string "NOTHING TO UNDO" + .string "TAKE LEFT IN BUFFER" .LC9: - .string "UNDO: OPEN ITS PATTERN" + .string "NOTHING TO UNDO" .LC10: + .string "UNDO: OPEN ITS PATTERN" +.LC11: .string "UNDONE" .text .align 2 @@ -1074,7 +1088,7 @@ bounce_choose: subq.l #6,%d0 tst.l %d0 jne .L152 - move.l #.LC7,%d0 + move.l #.LC8,%d0 move.l %d0,32(%sp) .L173: movem.l (%sp),#17412 @@ -1083,7 +1097,7 @@ bounce_choose: .L152: tst.l undo_ready jne .L154 - move.l #.LC8,%d1 + move.l #.LC9,%d1 move.l %d1,32(%sp) jra .L173 .L154: @@ -1102,7 +1116,7 @@ bounce_choose: tst.l %d0 jne .L156 .L155: - pea .LC9 + pea .LC10 .L174: jsr (%a2) .L172: @@ -1151,7 +1165,7 @@ bounce_choose: addq.l #4,%sp .L157: clr.l undo_ready - pea .LC10 + pea .LC11 jra .L174 .L151: tst.l %d0 @@ -1175,7 +1189,7 @@ bounce_choose: addq.l #4,%sp tst.l %d0 jne .L162 - pea .LC0 + pea .LC2 jsr show jra .L172 .L162: @@ -1275,14 +1289,12 @@ cancel: jra show .size cancel, .-cancel .section .rodata.str1.1 -.LC11: - .string "STOPPED - NO BOUNCE" .LC12: - .string "PATTERN CHANGED" + .string "STOPPED - NO BOUNCE" .LC13: - .string "TAKE INCOMPLETE" + .string "PATTERN CHANGED" .LC14: - .string "SAVE FAILED: IN BUFFER" + .string "TAKE INCOMPLETE" .LC15: .string "BOUNCED, SAVED AS" .text @@ -1435,19 +1447,12 @@ module_tick: jne .L194 tst.l -2147457608 jne .L195 - pea .LC11 -.L251: - jsr cancel + pea .LC12 .L252: + jsr cancel +.L249: addq.l #4,%sp -.L196: - move.l phase,%d0 - moveq #3,%d6 - cmp.l %d0,%d6 - jcs .L212 - tst.l %d0 - jeq .L211 - jra .L192 + jra .L196 .L195: mvz.b arm+6,%d2 lea arm,%a2 @@ -1471,8 +1476,8 @@ module_tick: tst.l %d0 jne .L198 .L197: - pea .LC12 - jra .L251 + pea .LC13 + jra .L252 .L198: move.l %d2,%d0 add.l #296877961,%d0 @@ -1480,8 +1485,8 @@ module_tick: move.l %d0,%a0 tst.l (%a0) jne .L200 - pea .LC13 - jra .L251 + pea .LC14 + jra .L252 .L200: mvz.b arm+5,%d0 move.l (%a2),%d3 @@ -1527,7 +1532,19 @@ module_tick: move.l %d2,phase clr.l message move.l %d6,1187497772 - jra .L196 +.L196: + move.l phase,%d0 + moveq #3,%d6 + cmp.l %d0,%d6 + jcs .L212 + tst.l %d0 + jne .L192 +.L211: + tst.b lamps_on.l + jeq .L214 + clr.l %d4 + sub.l %a6,%a6 + jra .L213 .L194: moveq #6,%d7 cmp.l %d0,%d7 @@ -1549,9 +1566,9 @@ module_tick: tst.l %d0 jne .L206 .L205: - pea .LC7 + pea .LC8 jsr show - jra .L252 + jra .L249 .L206: mvz.b %d3,%d3 mvz.b arm+6,%d0 @@ -1580,38 +1597,31 @@ module_tick: tst.l saved_in jeq .L209 jsr save_done_restore - lea show,%a0 tst.l saved_result jge .L210 - pea .LC14 - jsr (%a0) - jra .L252 +.L251: + jsr not_saved + jra .L196 .L210: pea .LC15 move.l #wav_name,%d7 - jsr (%a0) + jsr show move.l %d7,message2 - jra .L252 + jra .L249 .L209: move.l saved_ticks,%d0 addq.l #1,%d0 move.l %d0,saved_ticks - cmp.l #6000,%d0 + cmp.l #1800,%d0 jls .L211 jsr save_done_restore - clr.l phase - moveq #1,%d0 - move.l %d0,1187497772 -.L211: - tst.b lamps_on.l - jeq .L214 - clr.l %d4 - sub.l %a6,%a6 - jra .L213 + jra .L251 .L208: subq.l #4,%d0 tst.l %d0 jne .L196 + tst.l sticky + jne .L211 move.l shown_ticks,%d0 addq.l #1,%d0 move.l %d0,shown_ticks @@ -2503,6 +2513,8 @@ bounce_actions: .comm lamp_stock,2,1 .local lamps_on .comm lamps_on,1,1 + .local sticky + .comm sticky,4,2 .local wav_path .comm wav_path,160,1 .local wav_base From 9f17972c1ad122cce55a568352dbd68f6929e15f Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 19:07:01 +0100 Subject: [PATCH 15/43] Bounce In Place 0.4.0: tappable trig keys yellow, tracks in the take green T8 stays dark while MASTER TRACK is on. The developer's request. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/CHANGELOG.json | 2 +- sdk/drafts/bounce/README.md | 2 +- sdk/drafts/bounce/TESTING.md | 2 + sdk/drafts/bounce/bounce.c | 8 +- sdk/drafts/bounce/octamod.module.json | 4 +- sdk/drafts/bounce/unit.s | 395 +++++++++++++------------- 6 files changed, 211 insertions(+), 202 deletions(-) diff --git a/sdk/drafts/bounce/CHANGELOG.json b/sdk/drafts/bounce/CHANGELOG.json index 374afdf979..82870f14da 100644 --- a/sdk/drafts/bounce/CHANGELOG.json +++ b/sdk/drafts/bounce/CHANGELOG.json @@ -4,7 +4,7 @@ "date": "2026-12-03", "changes": [ "Renamed Bounce In Place.", - "While BOUNCE is open or armed, trig keys 1-8 light up: the track you bounce into red, merged tracks green.", + "While BOUNCE is open or armed, trig keys 1-8 light up: yellow for tracks you can add, green for the tracks in the take.", "If the WAV can't be saved (a full card), BOUNCE says so until you press a key: the take stays in the buffer, save it in the Audio Editor.", "0.3.0 ran on its developer's MKII: bounce, merge, WAV save, RESET TRACK and UNDO worked." ] diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index 26b135143c..b8e34cfe52 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -21,7 +21,7 @@ Category: **system**. It rewrites a track's Part and pattern when the musician a | After bouncing a Grain or synth track | The take is in, and the bottom line reads BOUNCED: T*n* PICK FLEX. Pick FLEX for that track in the machine chooser: Bounce then makes it play the take. Until then the machine plays on unchanged. | | FUNC+PART > BOUNCE > UNDO | Restores the last bounce's or reset's track: machine, FX, every page, slots, trigs, locks, and the merged tracks' mutes. | -BOUNCE shows the merge as inverted track names and on trig keys 1-8 (the track you bounce into red, merged tracks green, the rest dark) until the take ends, then PRESS PLAY, WAITS FOR PATTERN START or RECORDING ONE PASS, and at the end BOUNCED, SAVED AS with the file's name, or the reason it refused. While stock writes the WAV, its own screens show. +BOUNCE shows the merge as inverted track names and on trig keys 1-8 (every track you can tap yellow, the tracks in the take green; T8 dark while MASTER TRACK is on) until the take ends, then PRESS PLAY, WAITS FOR PATTERN START or RECORDING ONE PASS, and at the end BOUNCED, SAVED AS with the file's name, or the reason it refused. While stock writes the WAV, its own screens show. ## Usage diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index b11cd1a1a4..464b6cbe24 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -171,6 +171,8 @@ The stem levels vary by run: three readings in a row, with nothing changed, gave Changed after this run, built but not run: every save that fails (stock's error, no answer within 30 s, which a full card gives, no free name, the pool not ready) now shows NOT SAVED: TAKE IN BUFFER / SAVE IT IN AUDIO EDITOR until a key, instead of a short message or closing silently after 100 s. The developer's suggestion, 3 December 2026. +Changed after this run, built but not run: the colours. At the developer's request (3 December 2026) every key that can be tapped lights yellow (the trig keys have no white) and the tracks in the take green, the active one included; key 8 stays dark while MASTER TRACK is on. + Not tested in 0.4.0: the lamps on a unit (MKII or MKI), by eye; another module lighting trig keys 1-8 at the same time; everything still open from 0.3.0. ## Stock flows diff --git a/sdk/drafts/bounce/bounce.c b/sdk/drafts/bounce/bounce.c index 2e324f8ffa..1ba616e104 100644 --- a/sdk/drafts/bounce/bounce.c +++ b/sdk/drafts/bounce/bounce.c @@ -565,8 +565,8 @@ static void undo(void) show("UNDONE"); } -/* ---- the trig key lamps: while BOUNCE is open or armed, keys 1-8 show the merge (the track - * red, merged tracks green, the rest dark). Stock's steady bytes are kept as stock last drew +/* ---- the trig key lamps: while BOUNCE is open or armed, keys 1-8 show the merge (tappable + * yellow, the tracks in the take green, T8 dark while MASTER TRACK is on). Stock's steady bytes are kept as stock last drew * them and put back when the window closes; stock's own drawing comes back on its next pass. * Nothing runs while the lamps are stock's. ---- */ static uint8_t lamps_on, lamp_stock[2], lamp_mine[2]; @@ -583,8 +583,8 @@ static void lamps(void) if (want) { for (unsigned k = 0; k < 4u; ++k) { unsigned t = r * 4u + k; - if (t == arm.track) v |= (uint8_t)(1u << (2u * k)); - else if (arm.merged & (1u << t)) v |= (uint8_t)(2u << (2u * k)); + if (t == arm.track || (arm.merged & (1u << t))) v |= (uint8_t)(2u << (2u * k)); /* in: green */ + else if (t != 7u || !U8(MASTER_TRACK)) v |= (uint8_t)(3u << (2u * k)); /* tappable: yellow */ } v ^= U8(LED_TIMED + r); /* a stock flash on these keys must not invert them */ } else v = lamp_stock[r]; diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index bf7ff3ad4a..ad37cef3cf 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -19,7 +19,7 @@ "overview": "Bounce In Place records the active track, and any other tracks you pick, for exactly one pattern length (in per-track mode the track's own length; merged tracks until their lengths meet), with their effects. When the take ends, the active track becomes a Flex machine playing it, with its FX off, stock AMP and one trig on step 1, and the take is saved as a WAV (B-YYMMDD-HHMM) with the track's buffer assigned to it, so it reloads once you save the project. The other merged tracks are muted with stock's mute. RESET TRACK makes a track a fresh STATIC track. UNDO brings back the last bounce or reset until the next power cycle or project change. It uses no effect slot.", "highlights": [ "DOWN then REC, or FUNC+PART > BOUNCE, opens BOUNCE for the active track.", - "Press trig keys 1-8 to merge more tracks into the active track's take; the keys light the track red and merged tracks green.", + "Press trig keys 1-8 to merge more tracks into the active track's take; tappable keys light yellow, tracks in the take green.", "Records on the instrument's own tempo and length, starting on the next step 1.", "The take is saved to the project, the track becomes a Flex machine playing it, and UNDO BOUNCE restores it." ], @@ -91,7 +91,7 @@ "location": "Hold DOWN and press REC, or FUNC+PART (Part Edit) > BOUNCE.", "steps": [ "Select the destination track with its TRACK key.", - "Hold DOWN, then press REC: BOUNCE opens with the active track inverted and its trig key red.", + "Hold DOWN, then press REC: BOUNCE opens with the active track inverted; trig keys light yellow, the active track green.", "Press trig keys 1-8 to add or remove tracks, then YES to arm; NO closes without changes." ], "screenshots": [] diff --git a/sdk/drafts/bounce/unit.s b/sdk/drafts/bounce/unit.s index e8ac879c36..d354be5204 100644 --- a/sdk/drafts/bounce/unit.s +++ b/sdk/drafts/bounce/unit.s @@ -1333,7 +1333,7 @@ module_tick: clr.l %d0 move.b (%a0),51(%sp) addq.l #4,%sp -.L223: +.L225: move.l %d0,%a4 add.l #1175169420,%a4 move.b (%a4),%d1 @@ -1356,62 +1356,66 @@ module_tick: move.l %d2,48(%sp) clr.b %d2 move.l %d6,%a1 -.L220: +.L222: cmp.l 48(%sp),%a1 - jne .L218 - moveq #1,%d7 - move.l %a0,%d6 - lsl.l %d6,%d7 - or.l %d7,%d2 -.L219: + jeq .L218 + move.l %a1,%d7 + btst %d7,%d5 + jeq .L219 +.L218: + moveq #2,%d6 + move.l %a0,%d7 + lsl.l %d7,%d6 + or.l %d6,%d2 +.L220: addq.l #1,%a1 addq.l #2,%a0 - moveq #8,%d6 - cmp.l %a0,%d6 - jne .L220 + moveq #8,%d7 + cmp.l %a0,%d7 + jne .L222 move.l %d0,%a0 add.l #1175169454,%a0 move.b (%a0),%d5 eor.l %d5,%d2 -.L221: +.L223: mvz.b %d1,%d1 mvz.b %d2,%d5 cmp.l %d1,%d5 - jeq .L222 + jeq .L224 move.b %d2,(%a4) moveq #1,%d3 -.L222: +.L224: move.b %d2,(%a2,%d0.l) subq.l #1,%d0 tst.l %d0 - jne .L225 + jne .L227 tst.l %d3 - jeq .L224 + jeq .L226 jsr 1073821352 -.L224: +.L226: + move.w %a6,%d2 move.l #1175169472,-(%sp) jsr 1073744564 - move.w %a6,%d0 addq.l #4,%sp - move.b %d0,lamps_on + move.b %d2,lamps_on .L214: mvz.b arm+6,%d0 - moveq #24,%d2 - moveq #9,%d6 + moveq #24,%d6 + moveq #9,%d7 move.l -2147457608,%d1 + mvz.b arm+7,%d2 mulu.w #168,%d0 tst.l %d1 sne %d1 + swap %d2 + clr.w %d2 move.l %d0,%a0 add.l #-2147464743,%a0 move.l phase,%d0 - lsl.l %d2,%d0 - mvz.b arm+7,%d2 + lsl.l %d6,%d0 mvs.b %d1,%d1 - swap %d2 - clr.w %d2 neg.l %d1 - lsl.l %d6,%d1 + lsl.l %d7,%d1 or.l undo_ready,%d0 or.l %d2,%d0 movem.l (%sp),#23804 @@ -1448,9 +1452,9 @@ module_tick: tst.l -2147457608 jne .L195 pea .LC12 -.L252: +.L251: jsr cancel -.L249: +.L248: addq.l #4,%sp jra .L196 .L195: @@ -1477,7 +1481,7 @@ module_tick: jne .L198 .L197: pea .LC13 - jra .L252 + jra .L251 .L198: move.l %d2,%d0 add.l #296877961,%d0 @@ -1486,7 +1490,7 @@ module_tick: tst.l (%a0) jne .L200 pea .LC14 - jra .L252 + jra .L251 .L200: mvz.b arm+5,%d0 move.l (%a2),%d3 @@ -1498,7 +1502,7 @@ module_tick: jsr modwerk_machine addq.l #8,%sp tst.l %d0 - jeq .L250 + jeq .L249 mulu.w #12,%d2 move.l %d3,-(%sp) jsr (copy.constprop.0) @@ -1568,7 +1572,7 @@ module_tick: .L205: pea .LC8 jsr show - jra .L249 + jra .L248 .L206: mvz.b %d3,%d3 mvz.b arm+6,%d0 @@ -1586,7 +1590,7 @@ module_tick: addq.l #8,%sp tst.l %d0 jne .L196 -.L250: +.L249: jsr apply_clip jsr save_take jra .L196 @@ -1599,7 +1603,7 @@ module_tick: jsr save_done_restore tst.l saved_result jge .L210 -.L251: +.L250: jsr not_saved jra .L196 .L210: @@ -1607,7 +1611,7 @@ module_tick: move.l #wav_name,%d7 jsr show move.l %d7,message2 - jra .L249 + jra .L248 .L209: move.l saved_ticks,%d0 addq.l #1,%d0 @@ -1615,7 +1619,7 @@ module_tick: cmp.l #1800,%d0 jls .L211 jsr save_done_restore - jra .L251 + jra .L250 .L208: subq.l #4,%d0 tst.l %d0 @@ -1635,21 +1639,24 @@ module_tick: tst.l %d0 jne .L211 jra .L192 -.L225: +.L227: moveq #1,%d0 - jra .L223 -.L218: - move.l %a1,%d7 - btst %d7,%d5 - jeq .L219 - moveq #2,%d6 - move.l %a0,%d7 - lsl.l %d7,%d6 - or.l %d6,%d2 - jra .L219 + jra .L225 +.L219: + moveq #7,%d6 + cmp.l %a1,%d6 + jne .L221 + tst.b -2147483596.l + jne .L220 +.L221: + moveq #3,%d7 + move.l %a0,%d6 + lsl.l %d6,%d7 + or.l %d7,%d2 + jra .L220 .L217: move.b (%a3,%d0.l),%d2 - jra .L221 + jra .L223 .size module_tick, .-module_tick .section .rodata.str1.1 .LC16: @@ -1681,13 +1688,13 @@ module_key: move.l 8(%fp),%d4 move.l 12(%fp),%d0 cmp.l %d4,%d1 - jcs .L254 + jcs .L253 moveq #31,%d2 cmp.l %d4,%d2 - jlt .L255 + jlt .L254 move.l consumed_lo,%d1 lea consumed_lo,%a2 -.L256: +.L255: moveq #31,%d2 moveq #1,%d3 and.l %d4,%d2 @@ -1695,74 +1702,74 @@ module_key: move.l %d1,%d2 and.l %d3,%d2 tst.l %d0 - jne .L257 + jne .L256 tst.l %d2 - jeq .L258 + jeq .L257 not.l %d3 and.l %d1,%d3 move.l %d3,(%a2) -.L259: - moveq #1,%d0 .L258: + moveq #1,%d0 +.L257: movem.l -52(%fp),#3324 unlk %fp rts -.L255: +.L254: move.l consumed_hi,%d1 lea consumed_hi,%a2 - jra .L256 -.L257: + jra .L255 +.L256: tst.l %d2 - jne .L259 + jne .L258 move.l phase,%d0 moveq #8,%d1 cmp.l %d0,%d1 - jeq .L254 + jeq .L253 tst.l %d0 - jeq .L260 + jeq .L259 moveq #6,%d1 cmp.l %d0,%d1 - jne .L261 -.L260: + jne .L260 +.L259: moveq #41,%d2 cmp.l %d4,%d2 - jne .L254 + jne .L253 move.b 1175456540,%d0 btst #0,%d0 - jeq .L254 + jeq .L253 jsr open_select -.L262: - or.l %d3,(%a2) - jra .L259 .L261: + or.l %d3,(%a2) + jra .L258 +.L260: moveq #7,%d1 cmp.l %d0,%d1 - jne .L263 + jne .L262 moveq #49,%d2 cmp.l %d4,%d2 - jne .L264 + jne .L263 move.l %fp,%d6 add.l #-12,%d6 move.l %d6,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L276 + jeq .L275 move.b -6(%fp),%d5 mvz.b arm+6,%d0 mvz.b %d5,%d2 cmp.l %d2,%d0 - jne .L276 + jne .L275 pea arm move.l %d6,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L266 -.L276: + jne .L265 +.L275: pea .LC16 - jra .L326 -.L266: + jra .L325 +.L265: mvz.b -7(%fp),%d0 move.l #585088,%a0 move.l -12(%fp),%a3 @@ -1776,24 +1783,24 @@ module_key: addq.l #8,%sp move.l %d0,%d4 tst.l %d0 - jeq .L268 + jeq .L267 pea .LC17 -.L326: +.L325: jsr show -.L327: +.L326: addq.l #4,%sp - jra .L262 -.L268: + jra .L261 +.L267: move.w %d2,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L269 -.L328: + jeq .L268 +.L327: pea .LC18 - jra .L326 -.L269: + jra .L325 +.L268: moveq #1,%d0 lsl.l %d2,%d0 move.l #-2147483640,%a1 @@ -1838,12 +1845,12 @@ module_key: lea record_new,%a0 clr.l %d0 move.l %a0,%d1 -.L270: +.L269: clr.b %d2 move.b %d2,(%a0,%d0.l) addq.l #1,%d0 cmp.l #2330,%d0 - jne .L270 + jne .L269 st %d0 lea record_copy+80,%a1 move.w (%a1),record_new+80 @@ -1852,12 +1859,12 @@ module_key: move.l %a0,record_new+68 lea record_new+89,%a0 move.b %d0,record_new+83 -.L271: +.L270: st %d2 addq.l #1,%d4 move.b %d2,-1(%a0,%d4.l) cmp.l #2048,%d4 - jne .L271 + jne .L270 lea record_copy+2329,%a0 move.b (%a0),record_new+2329 move.l %d1,-(%sp) @@ -1872,81 +1879,81 @@ module_key: move.l %d0,undo_ready jsr show lea (24,%sp),%sp - jra .L262 -.L264: + jra .L261 +.L263: moveq #50,%d1 cmp.l %d4,%d1 - jne .L254 -.L290: + jne .L253 +.L289: jsr close_view - jra .L262 -.L263: + jra .L261 +.L262: moveq #1,%d1 cmp.l %d0,%d1 - jne .L272 + jne .L271 moveq #7,%d1 cmp.l %d4,%d1 - jlt .L273 + jlt .L272 mvz.b arm+6,%d1 cmp.l %d4,%d1 - jeq .L274 + jeq .L273 move.b arm+7,%d1 lsl.l %d4,%d0 eor.l %d1,%d0 move.b %d0,arm+7 -.L274: +.L273: moveq #1,%d2 move.l %d2,1187497772 - jra .L262 -.L273: + jra .L261 +.L272: moveq #49,%d0 cmp.l %d4,%d0 - jne .L275 + jne .L274 move.l %fp,%d4 add.l #-12,%d4 move.l %d4,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L276 + jeq .L275 pea arm move.l %d4,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L276 + jeq .L275 move.b arm+6,%d6 mvz.b -6(%fp),%d0 mvz.b %d6,%d4 cmp.l %d0,%d4 - jne .L276 + jne .L275 pea -16(%fp) jsr (pass_steps.constprop.0) addq.l #4,%sp move.l %d0,%d7 tst.l %d0 - jne .L279 + jne .L278 pea .LC20 - jra .L326 -.L279: + jra .L325 +.L278: move.b arm+7,%d5 tst.b -2147483596.l - jne .L280 -.L283: + jne .L279 +.L282: moveq #1,%d0 lsl.l %d4,%d0 mvz.b %d5,%d5 mvz.b %d0,%d0 move.l %d0,-20(%fp) cmp.l %d5,%d0 - jne .L285 -.L282: + jne .L284 +.L281: move.w %d4,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jne .L328 + jne .L327 mvz.b arm+5,%d0 move.l #-2147483640,%a1 subq.l #1,%d7 @@ -1983,9 +1990,9 @@ module_key: clr.w (%a0) move.b %d7,2(%a0) cmp.l -20(%fp),%d5 - jne .L293 + jne .L292 addq.l #1,%d6 -.L287: +.L286: clr.b %d0 move.b %d6,4(%a0) move.b %d0,9(%a0) @@ -1995,7 +2002,7 @@ module_key: jsr 1073912396 addq.l #8,%sp cmp.l -20(%fp),%d5 - jeq .L288 + jeq .L287 mvz.b arm+7,%d0 move.l arm+8,%d1 swap %d0 @@ -2005,46 +2012,46 @@ module_key: move.l %d1,-(%sp) jsr set_mutes addq.l #4,%sp -.L288: +.L287: move.l %d4,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 clr.l (%a0) tst.l -2147457608 - jeq .L294 + jeq .L293 pea 1.w move.l #49168,-(%sp) move.l %d4,-(%sp) jsr 1073762680 lea (12,%sp),%sp moveq #2,%d0 -.L289: +.L288: move.l %d0,phase moveq #1,%d0 move.l %d0,1187497772 - jra .L262 -.L280: + jra .L261 +.L279: tst.b %d5 - jge .L283 + jge .L282 pea .LC21 - jra .L326 -.L284: + jra .L325 +.L283: move.l %d1,%d2 moveq #8,%d0 cmp.l %d1,%d0 - jeq .L282 -.L285: + jeq .L281 +.L284: move.l %d2,%d1 addq.l #1,%d1 btst %d2,%d5 - jeq .L284 + jeq .L283 mvz.w %d2,%d0 add.l %d0,%d0 move.l %d0,%a0 add.l #-2147480495,%a0 tst.b (%a0) - jne .L284 + jne .L283 clr.b %d1 pea .LC22 move.l #note,%d4 @@ -2062,43 +2069,43 @@ module_key: move.l %d4,-(%sp) jsr show lea (20,%sp),%sp - jra .L262 -.L293: + jra .L261 +.L292: moveq #10,%d6 - jra .L287 -.L294: + jra .L286 +.L293: moveq #5,%d0 - jra .L289 -.L275: + jra .L288 +.L274: moveq #50,%d1 cmp.l %d4,%d1 - jeq .L290 + jeq .L289 jsr close_view -.L254: +.L253: clr.l %d0 - jra .L258 -.L272: + jra .L257 +.L271: move.l %d0,%d1 subq.l #2,%d1 lsr.l #1,%d1 - jeq .L291 + jeq .L290 subq.l #5,%d0 tst.l %d0 - jne .L292 -.L291: + jne .L291 +.L290: moveq #50,%d2 cmp.l %d4,%d2 - jne .L254 + jne .L253 pea .LC24 jsr cancel - jra .L327 -.L292: + jra .L326 +.L291: add.l #-49,%d4 jsr close_view move.l %d4,-20(%fp) lsr.l #1,%d4 - jne .L254 - jra .L262 + jne .L253 + jra .L261 .size module_key, .-module_key .align 2 .globl module_enc @@ -2170,16 +2177,16 @@ module_draw: move.l %a5,%d0 and.l %d1,%d0 tst.l %d0 - jeq .L330 + jeq .L329 tst.l 8(%fp) - jeq .L330 + jeq .L329 lea append,%a3 moveq #6,%d4 lea fill,%a4 lea text,%a2 move.l #invert,%d3 cmp.l %a5,%d4 - jne .L332 + jne .L331 clr.b %d0 pea .LC32 move.l %fp,%d2 @@ -2216,11 +2223,11 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a0) lea (36,%sp),%sp -.L330: +.L329: movem.l -68(%fp),#15388 unlk %fp rts -.L332: +.L331: clr.l -(%sp) moveq #7,%d4 pea 44.w @@ -2273,7 +2280,7 @@ module_draw: move.b %d0,-28(%fp) move.b %d1,-27(%fp) cmp.l %a5,%d4 - jne .L333 + jne .L332 pea .LC35 move.l %d2,-(%sp) move.b %d1,-36(%fp) @@ -2284,7 +2291,7 @@ module_draw: move.b %d0,-29(%fp) clr.b %d0 move.b %d0,-28(%fp) -.L334: +.L333: move.l %d2,-(%sp) pea 13.w pea 10.w @@ -2301,12 +2308,12 @@ module_draw: move.l phase,%d0 moveq #4,%d1 cmp.l %d0,%d1 - jne .L335 + jne .L334 move.l message,%d0 tst.l %d0 - jne .L336 + jne .L335 move.l #.LC26,%d0 -.L336: +.L335: move.l %d0,-(%sp) pea 27.w pea 10.w @@ -2315,25 +2322,25 @@ module_draw: lea (16,%sp),%sp move.l message2,%d0 tst.l %d0 - jeq .L330 + jeq .L329 move.l %d0,-(%sp) pea 35.w -.L366: +.L365: pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (16,%sp),%sp - jra .L330 -.L333: + jra .L329 +.L332: moveq #4,%d1 cmp.l %a5,%d1 - jne .L334 + jne .L333 move.l #.LC25,%d2 - jra .L334 -.L335: + jra .L333 +.L334: subq.l #7,%d0 tst.l %d0 - jne .L346 + jne .L345 pea .LC36 pea 24.w pea 10.w @@ -2346,15 +2353,15 @@ module_draw: jsr (%a2) lea (28,%sp),%sp move.l #.LC38,(%sp) -.L365: +.L364: pea 45.w - jra .L366 -.L346: + jra .L365 +.L345: move.w #10,%a5 move.l %fp,%d2 sub.l %a4,%a4 add.l #-24,%d2 -.L337: +.L336: moveq #84,%d0 clr.b %d1 move.l %d2,-(%sp) @@ -2371,7 +2378,7 @@ module_draw: mvz.b arm+7,%d0 lea (16,%sp),%sp btst %d4,%d0 - jeq .L338 + jeq .L337 pea 7.w pea 12.w pea 21.w @@ -2380,16 +2387,16 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a0) lea (20,%sp),%sp -.L338: +.L337: addq.l #1,%a4 lea (14,%a5),%a5 moveq #8,%d0 cmp.l %a4,%d0 - jne .L337 + jne .L336 move.l phase,%d0 moveq #1,%d1 cmp.l %d0,%d1 - jne .L339 + jne .L338 clr.b %d3 pea .LC39 move.l %d2,-(%sp) @@ -2399,17 +2406,17 @@ module_draw: jsr (pass_steps.constprop.0) lea (12,%sp),%sp tst.l %d0 - jeq .L340 + jeq .L339 moveq #9,%d4 cmp.l %d0,%d4 - jcc .L347 + jcc .L346 move.l %d0,%d1 moveq #10,%d4 divu.l %d4,%d1 lea (-18,%fp),%a0 add.l #48,%d1 move.b %d1,-19(%fp) -.L341: +.L340: moveq #10,%d3 remu.l %d3,%d1:%d0 clr.b %d4 @@ -2417,11 +2424,11 @@ module_draw: move.b %d1,(%a0) move.b %d4,1(%a0) tst.l -40(%fp) - jeq .L348 + jeq .L347 move.l #.LC27,%d0 -.L342: +.L341: move.l %d0,-(%sp) -.L364: +.L363: move.l %d2,-(%sp) jsr (%a3) addq.l #4,%sp @@ -2437,25 +2444,25 @@ module_draw: jsr (%a2) lea (28,%sp),%sp move.l #.LC42,(%sp) - jra .L365 -.L347: + jra .L364 +.L346: lea (-19,%fp),%a0 - jra .L341 -.L348: + jra .L340 +.L347: move.l #.LC28,%d0 - jra .L342 -.L340: - pea .LC40 - jra .L364 + jra .L341 .L339: + pea .LC40 + jra .L363 +.L338: moveq #5,%d1 cmp.l %d0,%d1 - jeq .L349 + jeq .L348 subq.l #2,%d0 tst.l %d0 - jne .L350 + jne .L349 move.l #.LC31,%d0 -.L344: +.L343: move.l %d0,-(%sp) pea 31.w pea 10.w @@ -2467,13 +2474,13 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a2) lea (32,%sp),%sp - jra .L330 -.L349: + jra .L329 +.L348: move.l #.LC30,%d0 - jra .L344 -.L350: + jra .L343 +.L349: move.l #.LC29,%d0 - jra .L344 + jra .L343 .size module_draw, .-module_draw .section .rodata .type ticks.0, @object From c2214fe06a7a471be7a58be22e17d73c19e12bf2 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 19:33:51 +0100 Subject: [PATCH 16/43] Bounce In Place 0.4.0: the test procedure's unit steps on the MKII, CPU at rest and while recording Package 22e9087c on development twin 4813a3e5 (RAM): device:test passed; at rest -0.1 points of the frame interrupt, while a take records +6 (35.3 % against 29.3 %); bounce, merge and RESET TRACK each undone with the Part back to its saved copy; no restart. The soak was not run: the twin offers no USB MIDI port. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/README.md | 4 +-- sdk/drafts/bounce/TESTING.md | 51 +++++++++++++++++++++++++++ sdk/drafts/bounce/octamod.module.json | 4 +-- 3 files changed, 55 insertions(+), 4 deletions(-) diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index b8e34cfe52..57154294ef 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -1,6 +1,6 @@ # Bounce In Place -Version 0.4.0 · by @seniorspiz · a draft: 0.3.0 ran on its developer's MKII in a RAM trial; 0.4.0's trig key lamps have run in the emulator only ([TESTING.md](TESTING.md)). +Version 0.4.0 · by @seniorspiz · a draft: 0.4.0 passed the test procedure's unit steps on one MKII in RAM; its trig key lamps are not yet checked by eye ([TESTING.md](TESTING.md)). ## Overview @@ -59,7 +59,7 @@ It has no code in the frame interrupt (no detour, no `rests` hook), so there is - Seen in the emulator (TESTING.md): CUE and SRC3 = the track both carry a track after its FX. The pattern's trig and lock layout is mapped. Still open: the same on a unit, Studio mode cue, MAIN TO CUE, and whether a take follows the track's LEVEL. - The WAV is never deleted by Bounce: UNDO gives the track its old settings back and leaves the file on the card and the buffer's link to it. A later recording into the same buffer replaces the take in the buffer, as stock does. - The trig key lamps are written in stock's steady LED bytes for keys 1-8 only while BOUNCE is open or armed, and patch no stock site. Another module that lights trig keys 1-8 at the same moment would be overdrawn until BOUNCE closes; none does today. -- 0.3.0 ran on its developer's MKII; 0.4.0 has run in the emulator only (TESTING.md). +- 0.4.0 ran on one MKII (development twin, RAM only): bounce, merge and RESET TRACK, each undone. CPU: nothing measurable at rest; about 6 points of the frame interrupt while a take records (TESTING.md). ### What the 0.4.0 prototype does and does not do yet diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 464b6cbe24..81a1b43f91 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -175,6 +175,57 @@ Changed after this run, built but not run: the colours. At the developer's reque Not tested in 0.4.0: the lamps on a unit (MKII or MKI), by eye; another module lighting trig keys 1-8 at the same time; everything still open from 0.3.0. +## The 0.4.0 test procedure on the unit + +**3 December 2026, the developer's MKII.** OS 1.40C. The development twin `4813a3e5` was RAM-booted with the developer's OK, never flashed; a power cycle returns the unit to release base `ddb56b72`. Source revision `9f17972c1`, clean tree. Package `bounce.mwrm`, SHA-256 `22e9087cf901cbd5368e17e1dcfc71e5c8d686faaed96e833741ba199478c00d` (`22e9087c`). The developer's own project was loaded. Bank A's Part 1 had unsaved changes and was left alone. The run used bank B, pattern B01, Part 1, whose working copy equalled its saved one (preflight: ready). Nothing was kept and the project was never saved. + +`npm run test:procedure -- bounce` stopped at its preflight on bank A: a changed Part, a pattern with trigs on 8 tracks, and no MIDI bridge. Its steps were then run one by one on bank B, with the commands from `--plan`: + +| Step | Result | +| --- | --- | +| 1 Software checks | `module:doctor -- --draft bounce`: passed (experimental lines green) | +| 2 Beside every other module | judged by step 1's compatibility line (a draft) | +| 3 Name the build | `module:dev -- bounce --build-only`: SHA-256 `22e9087c…` | +| 4 DSP cost model | `cycle-scan.mjs check`: passed | +| 5 Emulator rehearsal | not run by the procedure; the 0.4.0 emulator run is above | +| 6 Read the unit | status, Part state and inventory read; nothing installed | +| 7 Scripted unit pass | `device:test`: passed. Trial in RAM, rolled back; self-test passed; Part switches 12 of 12; inventory the same afterwards | +| 8 Soak | **not run**: the twin offers the Mac no USB MIDI port (only mass storage), so the soak's program changes cannot reach it | +| 9 Cost on the unit | `device:price`, 3 readings of 8 s a state, B01 playing: below | +| 10 Put back | inventory as before; Part 1 on B01: nothing to put back, working = saved | + +**CPU.** The share of the frame interrupt, and the CPU meter: + +| State | Frame interrupt | Longest frame | CPU meter | +| --- | --- | --- | --- | +| Before (no module), `device:price` | 28.9 % | 39.2 % | 41.6 % | +| Installed, BOUNCE closed (at rest), `device:price` | 28.8 % (adds −0.1, within the readings' spread) | 39.1 % | 41.5 % | +| Installed, B01 playing, 2 s windows just before each take (3 takes) | 29.3 % | 39.1–39.4 % | 41.8–41.9 % | +| While a take records: T4 alone, a window from the recorder's start to its end, 1.7 s (16 steps at 141 BPM), 3 takes | 35.2–35.4 % | 53.6–54.0 % | 51.0–51.5 % | + +The take adds about 6 points of the frame interrupt and 9.5 of the CPU meter while it records, and none were skipped. While recording, Bounce's own tick only reads the recorder's flag and the transport, so the rise is most likely stock's recorder writing the take. That is an inference: a stock recording of the same track, without Bounce, was not measured. + +**Edge cases on the unit.** All on T4 of B01, the pattern playing; the trial readout's tick count rose throughout, and `health` showed no crash and no stall: + +| Case | Seen | +| --- | --- | +| A bounce, then UNDO (4 times) | each take saved as a WAV named `B4-261203-…` (the first `B4-261203-1915`), a free name each time; after each UNDO bank B's Part 1 equalled its saved copy byte for byte. Before UNDO the working Part differed exactly in T4's FX1, FX2, machine (FLEX) and Flex slot (recorder buffer 4) | +| A merge (T4 with T3), then UNDO | BOUNCED, SAVED AS `B4-261203-1922-2`; T3 was already muted in this project, so the mutes stayed `0x7c00`; after UNDO the Part equalled its saved copy and the mutes were unchanged | +| RESET TRACK on T4, then UNDO | RESET T4 asked first, YES: TRACK RESET, T4 STATIC; after UNDO the Part equalled its saved copy | +| A restart after UNDO (0.1.0's open question) | none in 6 UNDOs, over about 9 minutes of trial | + +The takes' WAV files stay on the developer's card (UNDO never deletes them). + +**Not run on the unit:** +- the soak; +- a project save and reload, and a power cycle, after a bounce; +- a WAV save onto a full card; +- the lamps by eye; +- the agent's step 11 screenshots of every screen; +- the submitter's stage 12. + +Once during the run, stock's Part Edit window was open on PART's actions, SAVE ALL highlighted. No script had sent FUNC+PART at that point, and it was closed without YES. The saved Part was checked afterwards and was unchanged. + ## Stock flows Not tested. To compare with and without the module: REC alone (grid recording), TRACK + REC1/2/3 sampling, recorder trigs and RLEN, CUE routing and Studio mode, Part Edit's stock rows, Part Reload and Save, project save and reload, stock track mute. diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index ad37cef3cf..2147c1248e 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -39,7 +39,7 @@ "key:TRIG@BOUNCE" ], "limitations": [ - "Experimental: 0.3.0 ran on its developer's MKII in a RAM trial (bounce, merge, WAV save, RESET TRACK, UNDO worked, as reported); 0.4.0's trig key lamps have run in the emulator only.", + "Experimental: 0.4.0 (package 22e9087c) passed the test procedure's unit steps on one MKII, a development twin in RAM (bounce, merge and RESET TRACK each undone, no restart); its trig key lamps are not yet checked by eye. 0.3.0 ran on its developer's MKII, as reported.", "The WAV is saved at once, but the track only keeps pointing to it after you save the project (as stock's own SAVE THIS RECORDING).", "A full card: BOUNCE says NOT SAVED and the take stays in the recorder buffer; save it from the Audio Editor.", "A pass longer than 64 master steps (4 bars at 1X) is refused.", @@ -72,7 +72,7 @@ }, "tests": { "report": "TESTING.md", - "summary": "0.3.0 ran on one MKII in RAM trials (the developer's own tests); 0.2.1-0.4.0 in the emulator (TESTING.md). No release record yet: test procedure, CPU price and package lifecycle are still to run on the unit.", + "summary": "0.4.0 package 22e9087c: the test procedure's unit steps on one MKII (development twin 4813a3e5), the soak not run; CPU at rest -0.1 points of the frame interrupt, +6 while a take records (TESTING.md). Not yet: a project save, reload and power cycle after a bounce, a full card.", "hardwareStatus": "untested", "evidenceRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", "gates": [ From 0ab8ad50db06fabf5dfb8f5ca6a02aab8f3a9fe3 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 19:50:43 +0100 Subject: [PATCH 17/43] Bounce In Place 0.4.0: the active track's trig key red, merged green, tappable yellow The developer's choice after seeing the lamps on the unit; the keys have no white. Records their report: a take survives a project save and power cycle. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/CHANGELOG.json | 2 +- sdk/drafts/bounce/README.md | 2 +- sdk/drafts/bounce/TESTING.md | 4 + sdk/drafts/bounce/bounce.c | 5 +- sdk/drafts/bounce/octamod.module.json | 4 +- sdk/drafts/bounce/unit.s | 471 +++++++++++++------------- 6 files changed, 248 insertions(+), 240 deletions(-) diff --git a/sdk/drafts/bounce/CHANGELOG.json b/sdk/drafts/bounce/CHANGELOG.json index 82870f14da..ea41aff83d 100644 --- a/sdk/drafts/bounce/CHANGELOG.json +++ b/sdk/drafts/bounce/CHANGELOG.json @@ -4,7 +4,7 @@ "date": "2026-12-03", "changes": [ "Renamed Bounce In Place.", - "While BOUNCE is open or armed, trig keys 1-8 light up: yellow for tracks you can add, green for the tracks in the take.", + "While BOUNCE is open or armed, trig keys 1-8 light up: red for the track you bounce into, green for merged tracks, yellow for the ones you can add.", "If the WAV can't be saved (a full card), BOUNCE says so until you press a key: the take stays in the buffer, save it in the Audio Editor.", "0.3.0 ran on its developer's MKII: bounce, merge, WAV save, RESET TRACK and UNDO worked." ] diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index 57154294ef..457ef24afa 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -21,7 +21,7 @@ Category: **system**. It rewrites a track's Part and pattern when the musician a | After bouncing a Grain or synth track | The take is in, and the bottom line reads BOUNCED: T*n* PICK FLEX. Pick FLEX for that track in the machine chooser: Bounce then makes it play the take. Until then the machine plays on unchanged. | | FUNC+PART > BOUNCE > UNDO | Restores the last bounce's or reset's track: machine, FX, every page, slots, trigs, locks, and the merged tracks' mutes. | -BOUNCE shows the merge as inverted track names and on trig keys 1-8 (every track you can tap yellow, the tracks in the take green; T8 dark while MASTER TRACK is on) until the take ends, then PRESS PLAY, WAITS FOR PATTERN START or RECORDING ONE PASS, and at the end BOUNCED, SAVED AS with the file's name, or the reason it refused. While stock writes the WAV, its own screens show. +BOUNCE shows the merge as inverted track names and on trig keys 1-8 (the active track red, merged tracks green, every other track you can tap yellow; T8 dark while MASTER TRACK is on) until the take ends, then PRESS PLAY, WAITS FOR PATTERN START or RECORDING ONE PASS, and at the end BOUNCED, SAVED AS with the file's name, or the reason it refused. While stock writes the WAV, its own screens show. ## Usage diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 81a1b43f91..379e1401e9 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -226,6 +226,10 @@ The takes' WAV files stay on the developer's card (UNDO never deletes them). Once during the run, stock's Part Edit window was open on PART's actions, SAVE ALL highlighted. No script had sent FUNC+PART at that point, and it was closed without YES. The saved Part was checked afterwards and was unchanged. +**3 December 2026, the developer at the unit**, after this run. The developer's report, not a test record: +- **Lamps.** The 0.4.0 build showed tappable keys yellow and the tracks in the take green. On their request the active track is now red, merged tracks green and the other tappable tracks yellow (the keys have only red and green, so no white). The red build is built but not yet seen. +- **Power cycle.** After a bounce, a project save and a power cycle, the take was still there ("power cycle works"). + ## Stock flows Not tested. To compare with and without the module: REC alone (grid recording), TRACK + REC1/2/3 sampling, recorder trigs and RLEN, CUE routing and Studio mode, Part Edit's stock rows, Part Reload and Save, project save and reload, stock track mute. diff --git a/sdk/drafts/bounce/bounce.c b/sdk/drafts/bounce/bounce.c index 1ba616e104..f62e2a5ed1 100644 --- a/sdk/drafts/bounce/bounce.c +++ b/sdk/drafts/bounce/bounce.c @@ -566,7 +566,7 @@ static void undo(void) } /* ---- the trig key lamps: while BOUNCE is open or armed, keys 1-8 show the merge (tappable - * yellow, the tracks in the take green, T8 dark while MASTER TRACK is on). Stock's steady bytes are kept as stock last drew + * yellow, the active track red, merged tracks green, T8 dark while MASTER TRACK is on). Stock's steady bytes are kept as stock last drew * them and put back when the window closes; stock's own drawing comes back on its next pass. * Nothing runs while the lamps are stock's. ---- */ static uint8_t lamps_on, lamp_stock[2], lamp_mine[2]; @@ -583,7 +583,8 @@ static void lamps(void) if (want) { for (unsigned k = 0; k < 4u; ++k) { unsigned t = r * 4u + k; - if (t == arm.track || (arm.merged & (1u << t))) v |= (uint8_t)(2u << (2u * k)); /* in: green */ + if (t == arm.track) v |= (uint8_t)(1u << (2u * k)); /* the destination: red */ + else if (arm.merged & (1u << t)) v |= (uint8_t)(2u << (2u * k)); /* merged: green */ else if (t != 7u || !U8(MASTER_TRACK)) v |= (uint8_t)(3u << (2u * k)); /* tappable: yellow */ } v ^= U8(LED_TIMED + r); /* a stock flash on these keys must not invert them */ diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index 2147c1248e..957ad4f09c 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -19,7 +19,7 @@ "overview": "Bounce In Place records the active track, and any other tracks you pick, for exactly one pattern length (in per-track mode the track's own length; merged tracks until their lengths meet), with their effects. When the take ends, the active track becomes a Flex machine playing it, with its FX off, stock AMP and one trig on step 1, and the take is saved as a WAV (B-YYMMDD-HHMM) with the track's buffer assigned to it, so it reloads once you save the project. The other merged tracks are muted with stock's mute. RESET TRACK makes a track a fresh STATIC track. UNDO brings back the last bounce or reset until the next power cycle or project change. It uses no effect slot.", "highlights": [ "DOWN then REC, or FUNC+PART > BOUNCE, opens BOUNCE for the active track.", - "Press trig keys 1-8 to merge more tracks into the active track's take; tappable keys light yellow, tracks in the take green.", + "Press trig keys 1-8 to merge more tracks into the active track's take; the active track lights red, merged tracks green, the others you can tap yellow.", "Records on the instrument's own tempo and length, starting on the next step 1.", "The take is saved to the project, the track becomes a Flex machine playing it, and UNDO BOUNCE restores it." ], @@ -91,7 +91,7 @@ "location": "Hold DOWN and press REC, or FUNC+PART (Part Edit) > BOUNCE.", "steps": [ "Select the destination track with its TRACK key.", - "Hold DOWN, then press REC: BOUNCE opens with the active track inverted; trig keys light yellow, the active track green.", + "Hold DOWN, then press REC: BOUNCE opens with the active track inverted; the active track's trig key lights red, the others you can tap yellow.", "Press trig keys 1-8 to add or remove tracks, then YES to arm; NO closes without changes." ], "screenshots": [] diff --git a/sdk/drafts/bounce/unit.s b/sdk/drafts/bounce/unit.s index d354be5204..72a0f80282 100644 --- a/sdk/drafts/bounce/unit.s +++ b/sdk/drafts/bounce/unit.s @@ -1336,100 +1336,35 @@ module_tick: .L225: move.l %d0,%a4 add.l #1175169420,%a4 - move.b (%a4),%d1 + move.b (%a4),%d2 tst.b 47(%sp) jeq .L215 mvz.b (%a2,%d0.l),%d5 - mvz.b %d1,%d2 - cmp.l %d2,%d5 + mvz.b %d2,%d1 + cmp.l %d1,%d5 jeq .L216 .L215: - move.b %d1,(%a3,%d0.l) + move.b %d2,(%a3,%d0.l) .L216: tst.l %d4 jeq .L217 - mvz.b arm+6,%d2 + mvz.b arm+6,%d1 move.l %d0,%d6 sub.l %a0,%a0 lsl.l #2,%d6 mvz.b arm+7,%d5 - move.l %d2,48(%sp) - clr.b %d2 + move.l %d1,48(%sp) + clr.b %d1 move.l %d6,%a1 .L222: cmp.l 48(%sp),%a1 - jeq .L218 - move.l %a1,%d7 - btst %d7,%d5 - jeq .L219 -.L218: - moveq #2,%d6 - move.l %a0,%d7 - lsl.l %d7,%d6 - or.l %d6,%d2 -.L220: - addq.l #1,%a1 - addq.l #2,%a0 - moveq #8,%d7 - cmp.l %a0,%d7 - jne .L222 - move.l %d0,%a0 - add.l #1175169454,%a0 - move.b (%a0),%d5 - eor.l %d5,%d2 -.L223: - mvz.b %d1,%d1 - mvz.b %d2,%d5 - cmp.l %d1,%d5 - jeq .L224 - move.b %d2,(%a4) - moveq #1,%d3 -.L224: - move.b %d2,(%a2,%d0.l) - subq.l #1,%d0 - tst.l %d0 - jne .L227 - tst.l %d3 - jeq .L226 - jsr 1073821352 -.L226: - move.w %a6,%d2 - move.l #1175169472,-(%sp) - jsr 1073744564 - addq.l #4,%sp - move.b %d2,lamps_on -.L214: - mvz.b arm+6,%d0 - moveq #24,%d6 - moveq #9,%d7 - move.l -2147457608,%d1 - mvz.b arm+7,%d2 - mulu.w #168,%d0 - tst.l %d1 - sne %d1 - swap %d2 - clr.w %d2 - move.l %d0,%a0 - add.l #-2147464743,%a0 - move.l phase,%d0 - lsl.l %d6,%d0 - mvs.b %d1,%d1 - neg.l %d1 - lsl.l %d7,%d1 - or.l undo_ready,%d0 - or.l %d2,%d0 - movem.l (%sp),#23804 - or.l %d1,%d0 - tst.b (%a0) - sne %d1 - move.l 68(%sp),%a0 - mvs.b %d1,%d1 - neg.l %d1 - lsl.l #8,%d1 - or.l %d1,%d0 - move.l %d0,(%a0) - lea (64,%sp),%sp - rts + jne .L218 + moveq #1,%d7 +.L251: + move.l %a0,%d6 + lsl.l %d6,%d7 + or.l %d7,%d1 + jra .L219 .L191: moveq #2,%d7 cmp.l %d0,%d7 @@ -1452,7 +1387,7 @@ module_tick: tst.l -2147457608 jne .L195 pea .LC12 -.L251: +.L252: jsr cancel .L248: addq.l #4,%sp @@ -1481,7 +1416,7 @@ module_tick: jne .L198 .L197: pea .LC13 - jra .L251 + jra .L252 .L198: move.l %d2,%d0 add.l #296877961,%d0 @@ -1490,7 +1425,7 @@ module_tick: tst.l (%a0) jne .L200 pea .LC14 - jra .L251 + jra .L252 .L200: mvz.b arm+5,%d0 move.l (%a2),%d3 @@ -1642,20 +1577,88 @@ module_tick: .L227: moveq #1,%d0 jra .L225 +.L218: + move.l %a1,%d7 + btst %d7,%d5 + jeq .L220 + moveq #2,%d6 + move.l %a0,%d7 + lsl.l %d7,%d6 + or.l %d6,%d1 .L219: + addq.l #1,%a1 + addq.l #2,%a0 + moveq #8,%d7 + cmp.l %a0,%d7 + jne .L222 + move.l %d0,%a0 + add.l #1175169454,%a0 + move.b (%a0),%d5 + eor.l %d5,%d1 +.L223: + mvz.b %d2,%d2 + mvz.b %d1,%d5 + cmp.l %d2,%d5 + jeq .L224 + move.b %d1,(%a4) + moveq #1,%d3 +.L224: + move.b %d1,(%a2,%d0.l) + subq.l #1,%d0 + tst.l %d0 + jne .L227 + tst.l %d3 + jeq .L226 + jsr 1073821352 +.L226: + move.w %a6,%d2 + move.l #1175169472,-(%sp) + jsr 1073744564 + addq.l #4,%sp + move.b %d2,lamps_on +.L214: + mvz.b arm+6,%d0 + moveq #24,%d6 + moveq #9,%d7 + move.l -2147457608,%d1 + mvz.b arm+7,%d2 + mulu.w #168,%d0 + tst.l %d1 + sne %d1 + swap %d2 + clr.w %d2 + move.l %d0,%a0 + add.l #-2147464743,%a0 + move.l phase,%d0 + lsl.l %d6,%d0 + mvs.b %d1,%d1 + neg.l %d1 + lsl.l %d7,%d1 + or.l undo_ready,%d0 + or.l %d2,%d0 + movem.l (%sp),#23804 + or.l %d1,%d0 + tst.b (%a0) + sne %d1 + move.l 68(%sp),%a0 + mvs.b %d1,%d1 + neg.l %d1 + lsl.l #8,%d1 + or.l %d1,%d0 + move.l %d0,(%a0) + lea (64,%sp),%sp + rts +.L220: moveq #7,%d6 cmp.l %a1,%d6 jne .L221 tst.b -2147483596.l - jne .L220 + jne .L219 .L221: moveq #3,%d7 - move.l %a0,%d6 - lsl.l %d6,%d7 - or.l %d7,%d2 - jra .L220 + jra .L251 .L217: - move.b (%a3,%d0.l),%d2 + move.b (%a3,%d0.l),%d1 jra .L223 .size module_tick, .-module_tick .section .rodata.str1.1 @@ -1688,13 +1691,13 @@ module_key: move.l 8(%fp),%d4 move.l 12(%fp),%d0 cmp.l %d4,%d1 - jcs .L253 + jcs .L254 moveq #31,%d2 cmp.l %d4,%d2 - jlt .L254 + jlt .L255 move.l consumed_lo,%d1 lea consumed_lo,%a2 -.L255: +.L256: moveq #31,%d2 moveq #1,%d3 and.l %d4,%d2 @@ -1702,74 +1705,74 @@ module_key: move.l %d1,%d2 and.l %d3,%d2 tst.l %d0 - jne .L256 + jne .L257 tst.l %d2 - jeq .L257 + jeq .L258 not.l %d3 and.l %d1,%d3 move.l %d3,(%a2) -.L258: +.L259: moveq #1,%d0 -.L257: +.L258: movem.l -52(%fp),#3324 unlk %fp rts -.L254: +.L255: move.l consumed_hi,%d1 lea consumed_hi,%a2 - jra .L255 -.L256: + jra .L256 +.L257: tst.l %d2 - jne .L258 + jne .L259 move.l phase,%d0 moveq #8,%d1 cmp.l %d0,%d1 - jeq .L253 + jeq .L254 tst.l %d0 - jeq .L259 + jeq .L260 moveq #6,%d1 cmp.l %d0,%d1 - jne .L260 -.L259: + jne .L261 +.L260: moveq #41,%d2 cmp.l %d4,%d2 - jne .L253 + jne .L254 move.b 1175456540,%d0 btst #0,%d0 - jeq .L253 + jeq .L254 jsr open_select -.L261: +.L262: or.l %d3,(%a2) - jra .L258 -.L260: + jra .L259 +.L261: moveq #7,%d1 cmp.l %d0,%d1 - jne .L262 + jne .L263 moveq #49,%d2 cmp.l %d4,%d2 - jne .L263 + jne .L264 move.l %fp,%d6 add.l #-12,%d6 move.l %d6,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L275 + jeq .L276 move.b -6(%fp),%d5 mvz.b arm+6,%d0 mvz.b %d5,%d2 cmp.l %d2,%d0 - jne .L275 + jne .L276 pea arm move.l %d6,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L265 -.L275: + jne .L266 +.L276: pea .LC16 - jra .L325 -.L265: + jra .L326 +.L266: mvz.b -7(%fp),%d0 move.l #585088,%a0 move.l -12(%fp),%a3 @@ -1783,24 +1786,24 @@ module_key: addq.l #8,%sp move.l %d0,%d4 tst.l %d0 - jeq .L267 + jeq .L268 pea .LC17 -.L325: - jsr show .L326: + jsr show +.L327: addq.l #4,%sp - jra .L261 -.L267: + jra .L262 +.L268: move.w %d2,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L268 -.L327: + jeq .L269 +.L328: pea .LC18 - jra .L325 -.L268: + jra .L326 +.L269: moveq #1,%d0 lsl.l %d2,%d0 move.l #-2147483640,%a1 @@ -1845,12 +1848,12 @@ module_key: lea record_new,%a0 clr.l %d0 move.l %a0,%d1 -.L269: +.L270: clr.b %d2 move.b %d2,(%a0,%d0.l) addq.l #1,%d0 cmp.l #2330,%d0 - jne .L269 + jne .L270 st %d0 lea record_copy+80,%a1 move.w (%a1),record_new+80 @@ -1859,12 +1862,12 @@ module_key: move.l %a0,record_new+68 lea record_new+89,%a0 move.b %d0,record_new+83 -.L270: +.L271: st %d2 addq.l #1,%d4 move.b %d2,-1(%a0,%d4.l) cmp.l #2048,%d4 - jne .L270 + jne .L271 lea record_copy+2329,%a0 move.b (%a0),record_new+2329 move.l %d1,-(%sp) @@ -1879,81 +1882,81 @@ module_key: move.l %d0,undo_ready jsr show lea (24,%sp),%sp - jra .L261 -.L263: + jra .L262 +.L264: moveq #50,%d1 cmp.l %d4,%d1 - jne .L253 -.L289: + jne .L254 +.L290: jsr close_view - jra .L261 -.L262: + jra .L262 +.L263: moveq #1,%d1 cmp.l %d0,%d1 - jne .L271 + jne .L272 moveq #7,%d1 cmp.l %d4,%d1 - jlt .L272 + jlt .L273 mvz.b arm+6,%d1 cmp.l %d4,%d1 - jeq .L273 + jeq .L274 move.b arm+7,%d1 lsl.l %d4,%d0 eor.l %d1,%d0 move.b %d0,arm+7 -.L273: +.L274: moveq #1,%d2 move.l %d2,1187497772 - jra .L261 -.L272: + jra .L262 +.L273: moveq #49,%d0 cmp.l %d4,%d0 - jne .L274 + jne .L275 move.l %fp,%d4 add.l #-12,%d4 move.l %d4,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L275 + jeq .L276 pea arm move.l %d4,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L275 + jeq .L276 move.b arm+6,%d6 mvz.b -6(%fp),%d0 mvz.b %d6,%d4 cmp.l %d0,%d4 - jne .L275 + jne .L276 pea -16(%fp) jsr (pass_steps.constprop.0) addq.l #4,%sp move.l %d0,%d7 tst.l %d0 - jne .L278 + jne .L279 pea .LC20 - jra .L325 -.L278: + jra .L326 +.L279: move.b arm+7,%d5 tst.b -2147483596.l - jne .L279 -.L282: + jne .L280 +.L283: moveq #1,%d0 lsl.l %d4,%d0 mvz.b %d5,%d5 mvz.b %d0,%d0 move.l %d0,-20(%fp) cmp.l %d5,%d0 - jne .L284 -.L281: + jne .L285 +.L282: move.w %d4,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jne .L327 + jne .L328 mvz.b arm+5,%d0 move.l #-2147483640,%a1 subq.l #1,%d7 @@ -1990,9 +1993,9 @@ module_key: clr.w (%a0) move.b %d7,2(%a0) cmp.l -20(%fp),%d5 - jne .L292 + jne .L293 addq.l #1,%d6 -.L286: +.L287: clr.b %d0 move.b %d6,4(%a0) move.b %d0,9(%a0) @@ -2002,7 +2005,7 @@ module_key: jsr 1073912396 addq.l #8,%sp cmp.l -20(%fp),%d5 - jeq .L287 + jeq .L288 mvz.b arm+7,%d0 move.l arm+8,%d1 swap %d0 @@ -2012,46 +2015,46 @@ module_key: move.l %d1,-(%sp) jsr set_mutes addq.l #4,%sp -.L287: +.L288: move.l %d4,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 clr.l (%a0) tst.l -2147457608 - jeq .L293 + jeq .L294 pea 1.w move.l #49168,-(%sp) move.l %d4,-(%sp) jsr 1073762680 lea (12,%sp),%sp moveq #2,%d0 -.L288: +.L289: move.l %d0,phase moveq #1,%d0 move.l %d0,1187497772 - jra .L261 -.L279: + jra .L262 +.L280: tst.b %d5 - jge .L282 + jge .L283 pea .LC21 - jra .L325 -.L283: + jra .L326 +.L284: move.l %d1,%d2 moveq #8,%d0 cmp.l %d1,%d0 - jeq .L281 -.L284: + jeq .L282 +.L285: move.l %d2,%d1 addq.l #1,%d1 btst %d2,%d5 - jeq .L283 + jeq .L284 mvz.w %d2,%d0 add.l %d0,%d0 move.l %d0,%a0 add.l #-2147480495,%a0 tst.b (%a0) - jne .L283 + jne .L284 clr.b %d1 pea .LC22 move.l #note,%d4 @@ -2069,43 +2072,43 @@ module_key: move.l %d4,-(%sp) jsr show lea (20,%sp),%sp - jra .L261 -.L292: - moveq #10,%d6 - jra .L286 + jra .L262 .L293: + moveq #10,%d6 + jra .L287 +.L294: moveq #5,%d0 - jra .L288 -.L274: + jra .L289 +.L275: moveq #50,%d1 cmp.l %d4,%d1 - jeq .L289 + jeq .L290 jsr close_view -.L253: +.L254: clr.l %d0 - jra .L257 -.L271: + jra .L258 +.L272: move.l %d0,%d1 subq.l #2,%d1 lsr.l #1,%d1 - jeq .L290 + jeq .L291 subq.l #5,%d0 tst.l %d0 - jne .L291 -.L290: + jne .L292 +.L291: moveq #50,%d2 cmp.l %d4,%d2 - jne .L253 + jne .L254 pea .LC24 jsr cancel - jra .L326 -.L291: + jra .L327 +.L292: add.l #-49,%d4 jsr close_view move.l %d4,-20(%fp) lsr.l #1,%d4 - jne .L253 - jra .L261 + jne .L254 + jra .L262 .size module_key, .-module_key .align 2 .globl module_enc @@ -2177,16 +2180,16 @@ module_draw: move.l %a5,%d0 and.l %d1,%d0 tst.l %d0 - jeq .L329 + jeq .L330 tst.l 8(%fp) - jeq .L329 + jeq .L330 lea append,%a3 moveq #6,%d4 lea fill,%a4 lea text,%a2 move.l #invert,%d3 cmp.l %a5,%d4 - jne .L331 + jne .L332 clr.b %d0 pea .LC32 move.l %fp,%d2 @@ -2223,11 +2226,11 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a0) lea (36,%sp),%sp -.L329: +.L330: movem.l -68(%fp),#15388 unlk %fp rts -.L331: +.L332: clr.l -(%sp) moveq #7,%d4 pea 44.w @@ -2280,7 +2283,7 @@ module_draw: move.b %d0,-28(%fp) move.b %d1,-27(%fp) cmp.l %a5,%d4 - jne .L332 + jne .L333 pea .LC35 move.l %d2,-(%sp) move.b %d1,-36(%fp) @@ -2291,7 +2294,7 @@ module_draw: move.b %d0,-29(%fp) clr.b %d0 move.b %d0,-28(%fp) -.L333: +.L334: move.l %d2,-(%sp) pea 13.w pea 10.w @@ -2308,12 +2311,12 @@ module_draw: move.l phase,%d0 moveq #4,%d1 cmp.l %d0,%d1 - jne .L334 + jne .L335 move.l message,%d0 tst.l %d0 - jne .L335 + jne .L336 move.l #.LC26,%d0 -.L335: +.L336: move.l %d0,-(%sp) pea 27.w pea 10.w @@ -2322,25 +2325,25 @@ module_draw: lea (16,%sp),%sp move.l message2,%d0 tst.l %d0 - jeq .L329 + jeq .L330 move.l %d0,-(%sp) pea 35.w -.L365: +.L366: pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (16,%sp),%sp - jra .L329 -.L332: + jra .L330 +.L333: moveq #4,%d1 cmp.l %a5,%d1 - jne .L333 + jne .L334 move.l #.LC25,%d2 - jra .L333 -.L334: + jra .L334 +.L335: subq.l #7,%d0 tst.l %d0 - jne .L345 + jne .L346 pea .LC36 pea 24.w pea 10.w @@ -2353,15 +2356,15 @@ module_draw: jsr (%a2) lea (28,%sp),%sp move.l #.LC38,(%sp) -.L364: +.L365: pea 45.w - jra .L365 -.L345: + jra .L366 +.L346: move.w #10,%a5 move.l %fp,%d2 sub.l %a4,%a4 add.l #-24,%d2 -.L336: +.L337: moveq #84,%d0 clr.b %d1 move.l %d2,-(%sp) @@ -2378,7 +2381,7 @@ module_draw: mvz.b arm+7,%d0 lea (16,%sp),%sp btst %d4,%d0 - jeq .L337 + jeq .L338 pea 7.w pea 12.w pea 21.w @@ -2387,16 +2390,16 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a0) lea (20,%sp),%sp -.L337: +.L338: addq.l #1,%a4 lea (14,%a5),%a5 moveq #8,%d0 cmp.l %a4,%d0 - jne .L336 + jne .L337 move.l phase,%d0 moveq #1,%d1 cmp.l %d0,%d1 - jne .L338 + jne .L339 clr.b %d3 pea .LC39 move.l %d2,-(%sp) @@ -2406,17 +2409,17 @@ module_draw: jsr (pass_steps.constprop.0) lea (12,%sp),%sp tst.l %d0 - jeq .L339 + jeq .L340 moveq #9,%d4 cmp.l %d0,%d4 - jcc .L346 + jcc .L347 move.l %d0,%d1 moveq #10,%d4 divu.l %d4,%d1 lea (-18,%fp),%a0 add.l #48,%d1 move.b %d1,-19(%fp) -.L340: +.L341: moveq #10,%d3 remu.l %d3,%d1:%d0 clr.b %d4 @@ -2424,11 +2427,11 @@ module_draw: move.b %d1,(%a0) move.b %d4,1(%a0) tst.l -40(%fp) - jeq .L347 + jeq .L348 move.l #.LC27,%d0 -.L341: +.L342: move.l %d0,-(%sp) -.L363: +.L364: move.l %d2,-(%sp) jsr (%a3) addq.l #4,%sp @@ -2444,25 +2447,25 @@ module_draw: jsr (%a2) lea (28,%sp),%sp move.l #.LC42,(%sp) - jra .L364 -.L346: - lea (-19,%fp),%a0 - jra .L340 + jra .L365 .L347: - move.l #.LC28,%d0 + lea (-19,%fp),%a0 jra .L341 -.L339: +.L348: + move.l #.LC28,%d0 + jra .L342 +.L340: pea .LC40 - jra .L363 -.L338: + jra .L364 +.L339: moveq #5,%d1 cmp.l %d0,%d1 - jeq .L348 + jeq .L349 subq.l #2,%d0 tst.l %d0 - jne .L349 + jne .L350 move.l #.LC31,%d0 -.L343: +.L344: move.l %d0,-(%sp) pea 31.w pea 10.w @@ -2474,13 +2477,13 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a2) lea (32,%sp),%sp - jra .L329 -.L348: - move.l #.LC30,%d0 - jra .L343 + jra .L330 .L349: + move.l #.LC30,%d0 + jra .L344 +.L350: move.l #.LC29,%d0 - jra .L343 + jra .L344 .size module_draw, .-module_draw .section .rodata .type ticks.0, @object From 3d0b1a34a37e66cb51c0d3cfaa9fc3253f4f7401 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 20:22:16 +0100 Subject: [PATCH 18/43] Bounce In Place 0.4.0: bounces always in the project's BOUNCES folder The WAV goes to /BOUNCES/ (made with stock's folder call the first time), whatever SAVE SAMPLES TO says; a never-saved project uses /AUDIO/BOUNCES/. Bounce calls stock's save past its naming keyboard (which refuses a '/') and runs the assign step itself, with SAVE SAMPLES TO set for those two calls only. Emulator: both bounces saved, the project stores PATH=BOUNCES/.wav and reloads it. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/CHANGELOG.json | 1 + sdk/drafts/bounce/README.md | 5 +- sdk/drafts/bounce/TESTING.md | 15 + sdk/drafts/bounce/bounce.c | 63 +- sdk/drafts/bounce/octamod.module.json | 4 +- sdk/drafts/bounce/unit.s | 1126 +++++++++++++------------ 6 files changed, 664 insertions(+), 550 deletions(-) diff --git a/sdk/drafts/bounce/CHANGELOG.json b/sdk/drafts/bounce/CHANGELOG.json index ea41aff83d..f1b2e21f81 100644 --- a/sdk/drafts/bounce/CHANGELOG.json +++ b/sdk/drafts/bounce/CHANGELOG.json @@ -5,6 +5,7 @@ "changes": [ "Renamed Bounce In Place.", "While BOUNCE is open or armed, trig keys 1-8 light up: red for the track you bounce into, green for merged tracks, yellow for the ones you can add.", + "Bounces are always saved in the project's own BOUNCES folder, whatever SAVE SAMPLES TO says.", "If the WAV can't be saved (a full card), BOUNCE says so until you press a key: the take stays in the buffer, save it in the Audio Editor.", "0.3.0 ran on its developer's MKII: bounce, merge, WAV save, RESET TRACK and UNDO worked." ] diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index 457ef24afa..9c13b7110e 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -4,7 +4,7 @@ Version 0.4.0 · by @seniorspiz · a draft: 0.4.0 passed the test procedure's un ## Overview -Bounce In Place records a track in place, the way bounce or freeze works in a DAW, without setting up the recorder's buffer, length and trigs by hand. It records the active track, and any other tracks you merge in, for exactly one pattern length (in per-track mode, the track's own length; merged tracks of different lengths, until their lengths meet), with their effects. When the take ends, the active track becomes a Flex machine playing the take: its FX are off, its AMP is stock's (HOLD and REL full, VOL and BAL centred), its LFOs no longer move it, its old trigs and locks are replaced by one trig on step 1, and the take is saved as a WAV (`B-YYMMDD-HHMM`) where SAVE SAMPLES TO says, with the track's recorder buffer assigned to it, so once you save the project the take reloads with it. The other merged tracks are muted with stock's own mute. A Grain or synth track is bounced as it sounds, so its CPU is free once it plays the take as Flex. RESET TRACK turns any track back into a plain STATIC track. UNDO brings back what the last bounce or reset changed, until the next power cycle or project change. +Bounce In Place records a track in place, the way bounce or freeze works in a DAW, without setting up the recorder's buffer, length and trigs by hand. It records the active track, and any other tracks you merge in, for exactly one pattern length (in per-track mode, the track's own length; merged tracks of different lengths, until their lengths meet), with their effects. When the take ends, the active track becomes a Flex machine playing the take: its FX are off, its AMP is stock's (HOLD and REL full, VOL and BAL centred), its LFOs no longer move it, its old trigs and locks are replaced by one trig on step 1, and the take is saved as a WAV (`B-YYMMDD-HHMM`) in the project's own `BOUNCES` folder, with the track's recorder buffer assigned to it, so once you save the project the take reloads with it. The other merged tracks are muted with stock's own mute. A Grain or synth track is bounced as it sounds, so its CPU is free once it plays the take as Flex. RESET TRACK turns any track back into a plain STATIC track. UNDO brings back what the last bounce or reset changed, until the next power cycle or project change. Category: **system**. It rewrites a track's Part and pattern when the musician asks, and uses no effect slot, DSP code or knob. @@ -46,7 +46,7 @@ Every piece of work runs on a key press, once a step while a take is armed, or a | See that the take ended | the UI tick, a few compares, only while armed | | Light trig keys 1-8 with the merge: stock's steady LED bytes for those keys, put back as stock last drew them when the window closes | the UI tick, only while BOUNCE is open or armed | | Make the active track a Flex machine playing the take, FX1 and FX2 off, one trig on step 1 at full length; mute the merged tracks; restore the CUE routing | one bounded edit | -| Save the take as a WAV and assign the track's recorder buffer to it: stock's SAVE THIS RECORDING with ASSIGN TO SELF (the chain stock's SAVE ALL RECORDINGS runs), a name that is free, and stock's done callback | stock's card job after the take | +| Save the take as a WAV in `/BOUNCES/` (made with stock's folder call the first time) and assign the track's recorder buffer to it: stock's SAVE THIS RECORDING past its naming keyboard, then its ASSIGN TO SELF (the chain stock's SAVE ALL RECORDINGS runs), a name that is free, and stock's done callbacks. SAVE SAMPLES TO is set to PROJ DIR for the two calls that build a path, and put back straight after each | stock's card jobs after the take | It has no code in the frame interrupt (no detour, no `rests` hook), so there is nothing for `ev_in_use` to rest. Its UI tick compares its phase and returns while BOUNCE is closed. It contributes its BOUNCE row to the base's `ot_part_menu` table. @@ -66,6 +66,7 @@ It has no code in the frame interrupt (no detour, no `rests` hook), so there is 0.3.0 ran on its developer's MKII in a RAM trial; 0.4.0 adds the trig key lamps ([TESTING.md](TESTING.md)). Its limits: - **A full card.** When the WAV can't be written (stock shows its own error, or no answer comes within 30 s), BOUNCE reads NOT SAVED: TAKE IN BUFFER / SAVE IT IN AUDIO EDITOR until you press a key. The track still plays the take from its recorder buffer: free some space, then save it from the Audio Editor (AED) before a power cycle empties the buffer. +- **Where the WAV goes.** Always `/BOUNCES/`, whatever SAVE SAMPLES TO says, so bounces stay with their project and out of the set's shared AUDIO pool. The project records it as `BOUNCES/.wav`. A project that was never saved has no folder yet; its bounces go to `/AUDIO/BOUNCES/`. - **The WAV needs a project save.** The file is written at once, but the project names it only after you save the project, as with stock's SAVE THIS RECORDING. A power cycle before that leaves the WAV on the card and the buffer empty. - **Passes over 64 master steps.** RLEN counts at most 64 master 16ths (4 bars at 1X), so a longer pass is refused with PASS OVER 64 STEPS. - **Trig key lamps.** While the sequencer plays, stock redraws the trig keys each step; Bounce redraws its lamps on the next UI tick, so a key may flicker for up to 1/60 s. diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 379e1401e9..c09a7935c0 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -175,6 +175,21 @@ Changed after this run, built but not run: the colours. At the developer's reque Not tested in 0.4.0: the lamps on a unit (MKII or MKI), by eye; another module lighting trig keys 1-8 at the same time; everything still open from 0.3.0. +### Bounces in the project's BOUNCES folder + +**3 December 2026, emulator only**, after the unit run below, so that run's package (`22e9087c`) saved to SAVE SAMPLES TO's folder. At the developer's request, the WAV now always goes to `/BOUNCES/`. Same `ot_emu` setup, package built from this change. SAVE SAMPLES TO was AUD POOL (`0x800000a4` = 0), the case the change must override. Not hardware evidence. + +| What | Steps | Seen | +| --- | --- | --- | +| First attempt | the WAV path forced for the write only | the WAV and `.ot` landed in `BOUNCE/BOUNCES/`, but BOUNCE said NOT SAVED: stock's assign step builds the slot's path from SAVE SAMPLES TO again, after the write, and looked in the pool. Fixed: Bounce now runs that step itself, with the setting forced for that call too | +| Folder made | T1 bounced, no `BOUNCES` folder yet | BOUNCED, SAVED AS `B1-261203-2012`; on the card `BOUNCE/BOUNCES/B1-261203-2012.wav` (352,844 bytes) and its `.ot` | +| Folder there | T2 bounced | BOUNCED, SAVED AS `B2-261203-2012`, beside the first | +| Setting kept | `0x800000a4` read before and after | 0 both times | +| Project save | PROJECT > SAVE, YES | `project.work` and `project.strd`: `PATH=BOUNCES/B1-261203-2012.wav` and `PATH=BOUNCES/B2-261203-2012.wav` | +| Reload | PROJECT > RELOAD, YES | the track showed `B2-…-2012` again once loaded | + +Not tested: a project that was never saved (`/AUDIO/BOUNCES/`), USB disk mode during a save (stock's folder call is a stub then, so it should read NOT SAVED), and all of it on a unit. + ## The 0.4.0 test procedure on the unit **3 December 2026, the developer's MKII.** OS 1.40C. The development twin `4813a3e5` was RAM-booted with the developer's OK, never flashed; a power cycle returns the unit to release base `ddb56b72`. Source revision `9f17972c1`, clean tree. Package `bounce.mwrm`, SHA-256 `22e9087cf901cbd5368e17e1dcfc71e5c8d686faaed96e833741ba199478c00d` (`22e9087c`). The developer's own project was loaded. Bank A's Part 1 had unsaved changes and was left alone. The run used bank B, pattern B01, Part 1, whose working copy equalled its saved one (preflight: ready). Nothing was kept and the project was never saved. diff --git a/sdk/drafts/bounce/bounce.c b/sdk/drafts/bounce/bounce.c index f62e2a5ed1..2aa3072200 100644 --- a/sdk/drafts/bounce/bounce.c +++ b/sdk/drafts/bounce/bounce.c @@ -14,7 +14,8 @@ * itself. Done: the Part gets FLEX on the track's own buffer with stock's FLEX, * AMP and no-LFO settings, FX1/FX2 none and its recorder setup back; the * pattern record gets one trig on step 1 and no locks; merged tracks are muted. - * Then stock's SAVE THIS RECORDING writes the take as B-YYMMDD-HHMM.wav + * Then stock's SAVE THIS RECORDING writes the take as BOUNCES/B-YYMMDD-HHMM.wav + * in the project folder * and assigns the buffer to it, as SAVE ALL RECORDINGS does. * A Modwerk machine track (Grain, a synth) is bounced as it sounds; then the * player picks FLEX in the chooser, so the machine leaves through the base, @@ -106,10 +107,14 @@ #define SAVE_KIND 0x460be9e8u /* long: the object's kind, 1 FLEX */ #define SAVE_OBJ 0x460be9ecu /* long: the object, recorder buffer n = 128 + n */ #define SAVE_NAME 0x460be9f0u /* the file name, no extension */ -#define SAVE_MODE 0x460bcfc8u /* long: 2 save, then assign the buffer to the file, no menu */ +#define SAVE_MODE 0x460bcfc8u /* long: 0 save only; 2 save, then assign the buffer to the file */ +#define SAVE_ASSIGN 0x40024148u /* (): assign SAVE_OBJ to SAVE_NAME's file, then SAVE_DONE_B (mode 2 runs it after the .ot) */ #define SAVE_DONE_A 0x46c8d194u /* done callbacks: A after the WAV (mode 0) */ #define SAVE_DONE_B 0x46c8d198u /* B after the assignment (modes 1, 2), (result): < 0 failed */ -#define SAVE_GO 0x40024288u /* (1): the naming keyboard's confirm, without the keyboard */ +#define SAVE_WRITE 0x40024168u /* (name): the naming keyboard's confirm past its name and overwrite + * checks (SAVE_GO 0x40024288 calls it with SAVE_NAME): builds + * "%s/%s.wav" from the folder SAVE_TO picks and the name, then + * queues the write. The name may hold a '/', which SAVE_GO refuses. */ #define POOL_READY 0x46105408u /* nonzero once the sample pool is up (the WAV writer's guard) */ #define SLOT_STATE 0x46c922c4u /* + 44 id: the slot's state, +16 its length in frames */ #define CLOCK_NAME 0x400819fcu /* (): "YYMMDD-HHMM", stock's recording name */ @@ -118,7 +123,8 @@ #define PROJ_DIR_OK 0x40024eecu /* (): nonzero when the project has a folder of its own */ #define PROJ_DIR 0x40025230u /* (0, 0): the project's folder */ #define SET_DIR 0x100f8480u /* the set's folder */ -#define FILE_EXISTS 0x46c823fau /* long: the file-exists test, (path) */ +#define FILE_EXISTS 0x46c823fau /* long: the file-exists test, (path); answers for a folder too */ +#define FS_MKDIR 0x46c8240au /* long: create one folder, (path): 0 made, < 0 failed (STEM_REC.md 6) */ #define MASTER_TRACK 0x80000034u /* nonzero: T8 is the master track (STORAGE.md) */ #define CUE_LEVEL 0x80000c51u /* + 2t: the track's cue level (MIDI.md, CC 47) */ @@ -183,9 +189,10 @@ static uint8_t record_new[TRK_BYTES]; static uint8_t part_copy[PART_BYTES]; /* the Part as it was (UNDO; the recorder setup on cancel) */ static uint8_t part_buf[PART_BYTES]; static char note[32]; /* a message built at run time */ -static volatile int saved_result, saved_in; +static volatile int saved_result, saved_in, wav_result, wav_in; +static uint32_t wav_in_project, assigning; static uint32_t saved_ticks, prev_done_a, prev_done_b, prev_mode; -static char wav_name[24], wav_base[24], wav_path[160]; +static char wav_name[24], wav_base[24], wav_dir[136], wav_path[160]; static void call6(uint32_t fn, uint32_t a, uint32_t b, uint32_t c, uint32_t d, uint32_t e, uint32_t f) { ((void (*)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t))(uintptr_t)fn)(a, b, c, d, e, f); } @@ -431,15 +438,27 @@ static void apply_clip(void) } /* The WAV. Stock names it B-YYMMDD-HHMM (-2 .. -99 while that file - * exists: nothing is overwritten), writes it and its .ot where SAVE SAMPLES TO - * says, assigns the buffer to it and calls saved(). A project SAVE then keeps + * exists in /BOUNCES: nothing is overwritten) and writes it and its .ot + * there, whatever SAVE SAMPLES TO says. wav_saved() comes after the WAV; the tick + * then assigns the buffer to it, and stock calls saved(). A project SAVE then keeps * the path, and a reload fills the buffer again. */ typedef int (*printf_fn)(char *, const char *, ...); static void saved(int result) { saved_result = result; saved_in = 1; } +static void wav_saved(int result) { wav_result = result; wav_in = 1; } static void save_done_restore(void) { if (U32(SAVE_DONE_B) == (uint32_t)(uintptr_t)saved) { U32(SAVE_DONE_B) = prev_done_b; U32(SAVE_DONE_A) = prev_done_a; } - if (U32(SAVE_MODE) == 2u) U32(SAVE_MODE) = prev_mode; + if (U32(SAVE_MODE) == 0u) U32(SAVE_MODE) = prev_mode; +} +/* SAVE SAMPLES TO picks the folder both when stock builds the WAV's path and + * when it writes the slot's path ("%s.wav" in the project, "../AUDIO/%s.wav" in + * the pool), so it is set for those two calls only, and put back at once. */ +static void with_folder(uint32_t fn, uint32_t arg) +{ + uint32_t save_to = U32(SAVE_TO); + U32(SAVE_TO) = wav_in_project; + call1(fn, arg); + U32(SAVE_TO) = save_to; } static void save_take(void) { @@ -448,20 +467,26 @@ static void save_take(void) printf_fn pf = (printf_fn)(uintptr_t)SPRINTF; pf(wav_base, "B%d-%s", (int)(t + 1u), ((const char *(*)(void))(uintptr_t)CLOCK_NAME)()); int (*exists)(const char *) = (int (*)(const char *))(uintptr_t)U32(FILE_EXISTS); + int (*mkdir)(const char *) = (int (*)(const char *))(uintptr_t)U32(FS_MKDIR); + /* Always /BOUNCES, whatever SAVE SAMPLES TO says; a project without a + * folder of its own (never saved) gets /AUDIO/BOUNCES. */ + unsigned in_project = ((int (*)(void))(uintptr_t)PROJ_DIR_OK)() != 0; + wav_in_project = in_project; + if (in_project) pf(wav_dir, "%s/BOUNCES", ((const char *(*)(int, int))(uintptr_t)PROJ_DIR)(0, 0)); + else pf(wav_dir, "%s/AUDIO/BOUNCES", (const char *)(uintptr_t)SET_DIR); + if (!exists || !mkdir || (!exists(wav_dir) && mkdir(wav_dir) < 0)) { not_saved(); return; } for (int k = 1; k <= 99; ++k) { if (k == 1) pf(wav_name, "%s", wav_base); else pf(wav_name, "%s-%d", wav_base, k); - if (U32(SAVE_TO) && ((int (*)(void))(uintptr_t)PROJ_DIR_OK)()) - pf(wav_path, "%s/%s.wav", ((const char *(*)(int, int))(uintptr_t)PROJ_DIR)(0, 0), wav_name); - else pf(wav_path, "%s/AUDIO/%s.wav", (const char *)(uintptr_t)SET_DIR, wav_name); - if (!exists || !exists(wav_path)) break; + pf(wav_path, "%s/%s.wav", wav_dir, wav_name); + if (!exists(wav_path)) break; if (k == 99) { not_saved(); return; } } - pf((char *)(uintptr_t)SAVE_NAME, "%s", wav_name); + pf((char *)(uintptr_t)SAVE_NAME, "BOUNCES/%s", wav_name); U32(SAVE_KIND) = 1; U32(SAVE_OBJ) = 128u + t; prev_mode = U32(SAVE_MODE); prev_done_a = U32(SAVE_DONE_A); prev_done_b = U32(SAVE_DONE_B); - U32(SAVE_MODE) = 2; U32(SAVE_DONE_A) = 0; U32(SAVE_DONE_B) = (uint32_t)(uintptr_t)saved; - saved_in = 0; saved_ticks = 0; phase = SAVING; redraw(); - call1(SAVE_GO, 1); + U32(SAVE_MODE) = 0; U32(SAVE_DONE_A) = (uint32_t)(uintptr_t)wav_saved; U32(SAVE_DONE_B) = (uint32_t)(uintptr_t)saved; + saved_in = 0; wav_in = 0; assigning = 0; saved_ticks = 0; phase = SAVING; redraw(); + with_folder(SAVE_WRITE, SAVE_NAME); } /* Once a tick while SAVING: stock's answer, or none (a failed write shows * stock's own error and never calls back). */ @@ -471,6 +496,10 @@ static void saving_tick(void) save_done_restore(); if (saved_result < 0) not_saved(); else { show("BOUNCED, SAVED AS"); message2 = wav_name; } + } else if (wav_in && !assigning) { /* the WAV is written: assign the buffer to it */ + assigning = 1; + if (wav_result < 0) { save_done_restore(); not_saved(); } + else with_folder(SAVE_ASSIGN, 0); } else if (++saved_ticks > 1800u) { save_done_restore(); not_saved(); } /* 30 s: a full card, stock's own error shown */ } diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index 957ad4f09c..a085eac188 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -16,7 +16,7 @@ "label": "Bounce tracks in place", "family": "Recording", "summary": "Bounce one or more audio tracks into the active track as a Flex recording, one pattern long, saved as a WAV, without setting up the recorder by hand.", - "overview": "Bounce In Place records the active track, and any other tracks you pick, for exactly one pattern length (in per-track mode the track's own length; merged tracks until their lengths meet), with their effects. When the take ends, the active track becomes a Flex machine playing it, with its FX off, stock AMP and one trig on step 1, and the take is saved as a WAV (B-YYMMDD-HHMM) with the track's buffer assigned to it, so it reloads once you save the project. The other merged tracks are muted with stock's mute. RESET TRACK makes a track a fresh STATIC track. UNDO brings back the last bounce or reset until the next power cycle or project change. It uses no effect slot.", + "overview": "Bounce In Place records the active track, and any other tracks you pick, for exactly one pattern length (in per-track mode the track's own length; merged tracks until their lengths meet), with their effects. When the take ends, the active track becomes a Flex machine playing it, with its FX off, stock AMP and one trig on step 1, and the take is saved as a WAV (B-YYMMDD-HHMM) in the project's BOUNCES folder, with the track's buffer assigned to it, so it reloads once you save the project. The other merged tracks are muted with stock's mute. RESET TRACK makes a track a fresh STATIC track. UNDO brings back the last bounce or reset until the next power cycle or project change. It uses no effect slot.", "highlights": [ "DOWN then REC, or FUNC+PART > BOUNCE, opens BOUNCE for the active track.", "Press trig keys 1-8 to merge more tracks into the active track's take; the active track lights red, merged tracks green, the others you can tap yellow.", @@ -39,7 +39,7 @@ "key:TRIG@BOUNCE" ], "limitations": [ - "Experimental: 0.4.0 (package 22e9087c) passed the test procedure's unit steps on one MKII, a development twin in RAM (bounce, merge and RESET TRACK each undone, no restart); its trig key lamps are not yet checked by eye. 0.3.0 ran on its developer's MKII, as reported.", + "Experimental: 0.4.0 (package 22e9087c) passed the test procedure's unit steps on one MKII, a development twin in RAM (bounce, merge and RESET TRACK each undone, no restart); its trig key lamps are not yet checked by eye. Saving into the project's BOUNCES folder came after that run and has run in the emulator only. 0.3.0 ran on its developer's MKII, as reported.", "The WAV is saved at once, but the track only keeps pointing to it after you save the project (as stock's own SAVE THIS RECORDING).", "A full card: BOUNCE says NOT SAVED and the take stays in the recorder buffer; save it from the Audio Editor.", "A pass longer than 64 master steps (4 bars at 1X) is refused.", diff --git a/sdk/drafts/bounce/unit.s b/sdk/drafts/bounce/unit.s index 72a0f80282..8aa4fe3f27 100644 --- a/sdk/drafts/bounce/unit.s +++ b/sdk/drafts/bounce/unit.s @@ -98,7 +98,7 @@ write_span: move.l %a2,-(%sp) move.l 20(%sp),%a1 #APP -| 304 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 311 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %sr,%d0 move.w #0x2700,%sr | 0 "" 2 @@ -114,7 +114,7 @@ write_span: cmp.l 24(%sp),%a0 jne .L13 #APP -| 306 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 313 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %d0,%sr | 0 "" 2 #NO_APP @@ -275,6 +275,15 @@ saved: rts .size saved, .-saved .align 2 + .type wav_saved, @function +wav_saved: + lea (4,%sp),%a0 + moveq #1,%d0 + move.l (%a0),wav_result + move.l %d0,wav_in + rts + .size wav_saved, .-wav_saved + .align 2 .type fill, @function fill: lea (-24,%sp),%sp @@ -285,16 +294,16 @@ fill: move.l %d1,%d3 add.l 40(%sp),%d3 add.l 44(%sp),%d4 -.L32: +.L33: cmp.l %d3,%d1 - jcc .L31 + jcc .L32 move.l %d1,%d0 lsl.l #3,%d0 addq.l #7,%d0 move.l %d0,20(%sp) move.l 36(%sp),%d0 - jra .L37 -.L35: + jra .L38 +.L36: move.l %d0,%d2 lsr.l #3,%d2 move.l 20(%sp),%a1 @@ -309,23 +318,23 @@ fill: move.b (%a1),%d6 move.w %d6,%a0 tst.l 48(%sp) - jeq .L33 + jeq .L34 move.l %a0,%d6 or.l %d6,%d2 -.L34: +.L35: move.b %d2,(%a1) addq.l #1,%d0 -.L37: +.L38: cmp.l %d4,%d0 - jcs .L35 + jcs .L36 addq.l #1,%d1 - jra .L32 -.L33: + jra .L33 +.L34: not.l %d2 move.l %a0,%d6 and.l %d6,%d2 - jra .L34 -.L31: + jra .L35 +.L32: movem.l (%sp),#124 lea (24,%sp),%sp rts @@ -341,12 +350,12 @@ invert: move.l %a0,%d3 add.l 36(%sp),%d3 add.l 40(%sp),%d4 -.L39: +.L40: mvz.w %a0,%d1 move.l 32(%sp),%d0 lsl.l #3,%d1 addq.l #7,%d1 -.L40: +.L41: moveq #7,%d6 and.l %d0,%d6 move.l %d0,%d2 @@ -361,10 +370,10 @@ invert: eor.l %d6,%d2 move.b %d2,(%a1) cmp.l %d0,%d4 - jhi .L40 + jhi .L41 addq.l #1,%a0 cmp.l %a0,%d3 - jhi .L39 + jhi .L40 movem.l (%sp),#124 lea (20,%sp),%sp rts @@ -376,10 +385,10 @@ text: move.l %sp,%a1 move.l #1074524426,%a0 move.l %sp,%d0 -.L44: +.L45: move.l (%a0)+,(%a1)+ cmp.l #1074524454,%a0 - jne .L44 + jne .L45 move.l 32(%sp),12(%sp) move.l 44(%sp),-(%sp) pea -1.w @@ -397,20 +406,20 @@ text: .type append, @function append: move.l 4(%sp),%a0 -.L47: +.L48: move.b (%a0),%d0 move.l %a0,%a1 addq.l #1,%a0 tst.b %d0 - jne .L47 + jne .L48 clr.l %d0 -.L48: +.L49: move.l 8(%sp),%a0 move.b (%a0,%d0.l),%d1 move.b %d1,(%a1,%d0.l) addq.l #1,%d0 tst.b %d1 - jne .L48 + jne .L49 rts .size append, .-append .align 2 @@ -419,17 +428,16 @@ save_done_restore: move.l #1187565976,%a0 move.l #saved,%d0 cmp.l (%a0),%d0 - jne .L52 + jne .L53 move.l prev_done_b,(%a0) lea prev_done_a,%a0 move.l (%a0),1187565972 -.L52: +.L53: move.l #1175179208,%a0 - moveq #2,%d0 - cmp.l (%a0),%d0 - jne .L51 + tst.l (%a0) + jne .L52 move.l prev_mode,(%a0) -.L51: +.L52: rts .size save_done_restore, .-save_done_restore .align 2 @@ -440,7 +448,7 @@ put_track.constprop.0: movem.l #3100,(%sp) lea TRACK_BYTES,%a1 clr.l %d2 -.L59: +.L60: mvz.b 2(%a1),%d0 mvz.w (%a1),%d3 move.l 24(%sp),%a3 @@ -452,29 +460,29 @@ put_track.constprop.0: mvz.b 3(%a1),%d3 add.l %d0,%a3 add.l #part_buf,%d0 -.L55: +.L56: cmp.l %a0,%d3 - jhi .L58 + jhi .L59 add.l %d3,%d2 addq.l #1,%d1 addq.l #4,%a1 moveq #9,%d0 cmp.l %d1,%d0 - jne .L59 + jne .L60 movem.l (%sp),#3100 lea (20,%sp),%sp rts -.L58: +.L59: tst.l 32(%sp) - jeq .L56 + jeq .L57 move.b (%a3,%a0.l),%d4 -.L57: +.L58: move.b %d4,(%a0,%d0.l) addq.l #1,%a0 - jra .L55 -.L56: + jra .L56 +.L57: move.b (%a2,%a0.l),%d4 - jra .L57 + jra .L58 .size put_track.constprop.0, .-put_track.constprop.0 .align 2 .type copy.constprop.0, @function @@ -483,12 +491,12 @@ copy.constprop.0: move.l 8(%sp),%a1 clr.l %d0 lea part_buf,%a0 -.L62: +.L63: lea (%a1,%d0.l),%a2 move.b (%a2),(%a0,%d0.l) addq.l #1,%d0 cmp.l #6322,%d0 - jne .L62 + jne .L63 move.l (%sp)+,%a2 rts .size copy.constprop.0, .-copy.constprop.0 @@ -497,7 +505,7 @@ copy.constprop.0: set_mutes: move.l 4(%sp),%d0 #APP -| 280 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 287 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %sr,%d1 move.w #0x2700,%sr | 0 "" 2 @@ -505,7 +513,7 @@ set_mutes: move.l %d0,-2147483640 move.l %d0,269161684 #APP -| 282 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 289 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %d1,%sr | 0 "" 2 #NO_APP @@ -542,87 +550,87 @@ pass_steps.constprop.0: add.l %a0,%a3 add.l %a0,%a4 lea (81,%a0),%a0 -.L75: +.L76: btst %d5,%d4 - jeq .L66 - tst.b (%a2) jeq .L67 + tst.b (%a2) + jeq .L68 move.b -1(%a0),%d6 -.L68: +.L69: tst.b (%a2) - jeq .L69 + jeq .L70 move.b (%a0),%d3 -.L70: +.L71: mvz.b %d3,%d3 moveq #6,%d0 cmp.l %d3,%d0 - jcs .L71 + jcs .L72 mvz.b %d6,%d0 tst.b %d6 - jeq .L65 + jeq .L66 move.l #ticks.0,%d6 move.l %d6,%a5 mvz.b (%a5,%d3.l),%d3 mulu.w %d3,%d0 tst.l %d0 - jeq .L65 + jeq .L66 cmp.l %a1,%d0 - jls .L73 + jls .L74 move.l %d0,%a1 -.L73: +.L74: tst.l %d2 - jne .L66 + jne .L67 move.l %d0,%d3 move.l %d1,%d2 -.L74: +.L75: remu.l %d3,%d7:%d2 move.l %d3,%d6 move.l %d6,%d2 move.l %d7,%d3 tst.l %d7 - jne .L74 + jne .L75 divu.l %d6,%d1 muls.l %d0,%d1 cmp.l #384,%d1 shi %d2 mvs.b %d2,%d2 neg.l %d2 -.L66: +.L67: addq.l #1,%d5 lea (2330,%a0),%a0 moveq #8,%d0 cmp.l %d5,%d0 - jne .L75 - tst.l %d2 jne .L76 + tst.l %d2 + jne .L77 move.l %d1,%d0 moveq #6,%d2 divu.l %d2,%d0 -.L65: +.L66: movem.l (%sp),#15612 lea (40,%sp),%sp rts -.L67: +.L68: move.b (%a3),%d6 - jra .L68 -.L69: + jra .L69 +.L70: move.b (%a4),%d3 - jra .L70 -.L76: + jra .L71 +.L77: move.l 44(%sp),%a0 moveq #1,%d0 move.l %d0,(%a0) move.l %a1,%d0 addq.l #5,%d0 cmp.l #389,%d0 - jls .L77 -.L71: + jls .L78 +.L72: clr.l %d0 - jra .L65 -.L77: + jra .L66 +.L78: moveq #6,%d2 divu.l %d2,%d0 - jra .L65 + jra .L66 .size pass_steps.constprop.0, .-pass_steps.constprop.0 .align 2 .type write_record, @function @@ -654,7 +662,7 @@ write_record: move.l %d2,%a1 add.l #268525991,%a1 move.l %a0,36(%sp) -.L90: +.L91: pea 32.w move.l 40(%sp),%a0 pea (%a0,%a3.l) @@ -666,7 +674,7 @@ write_record: lea (32,%a3),%a3 move.l 32(%sp),%a1 cmp.l #2048,%a3 - jne .L90 + jne .L91 pea 193.w move.l #1187501196,%a3 pea 2137(%a6) @@ -684,32 +692,32 @@ write_record: add.l %d1,%a0 add.l (%a2),%a0 lea (89,%a0),%a0 -.L91: +.L92: sub.l %a1,%a1 -.L94: +.L95: move.b (%a0,%a1.l),%d0 addq.l #1,%a1 moveq #31,%d1 cmp.l %a1,%d1 - jne .L92 + jne .L93 not.l %d0 tst.b %d0 sne %d0 mvs.b %d0,%d0 neg.l %d0 -.L93: +.L94: mvz.b 6(%a2),%d1 move.l %a4,%d2 lsl.l %d1,%d2 move.b (%a3),%d1 tst.l %d0 - jeq .L95 + jeq .L96 or.l %d2,%d1 -.L96: +.L97: move.b %d1,(%a3)+ lea (32,%a0),%a0 cmp.l #1187501260,%a3 - jne .L91 + jne .L92 move.l (%a2),%a0 moveq #1,%d0 add.l #635698,%a0 @@ -722,137 +730,168 @@ write_record: move.l %d0,44(%sp) lea (40,%sp),%sp jmp 1074387488 -.L92: +.L93: mvz.b %d0,%d0 cmp.l #255,%d0 - jeq .L94 + jeq .L95 moveq #1,%d0 - jra .L93 -.L95: + jra .L94 +.L96: not.l %d2 and.l %d2,%d1 - jra .L96 + jra .L97 .size write_record, .-write_record .section .rodata.str1.1 .LC3: .string "B%d-%s" .LC4: - .string "%s" + .string "%s/BOUNCES" .LC5: - .string "%s/%s.wav" + .string "%s/AUDIO/BOUNCES" .LC6: - .string "%s/AUDIO/%s.wav" + .string "%s/%s.wav" .LC7: .string "%s-%d" +.LC8: + .string "%s" +.LC9: + .string "BOUNCES/%s" .text .align 2 .type save_take, @function save_take: - lea (-12,%sp),%sp - movem.l #1036,(%sp) + lea (-16,%sp),%sp + movem.l #3084,(%sp) tst.l 1175475208 - jeq .L102 + jeq .L103 mvz.b arm+6,%d3 move.w %d3,%d0 mulu.w #44,%d0 move.l %d0,%a0 add.l #1187592404,%a0 tst.l (%a0) - jgt .L103 -.L102: - movem.l (%sp),#1036 - lea (12,%sp),%sp - jra not_saved + jgt .L104 .L103: + movem.l (%sp),#3084 + lea (16,%sp),%sp + jra not_saved +.L104: jsr 1074272764 - move.l #1073822216,%d2 + move.l #1073822216,%a2 move.l %d3,%a0 move.l %d0,-(%sp) pea 1(%a0) pea .LC3 pea wav_base - move.l %d2,%a0 - jsr (%a0) - move.l 1187521530,%a2 - pea wav_base - pea .LC4 - pea wav_name - move.l %d2,%a0 - moveq #1,%d2 - jsr (%a0) - lea (28,%sp),%sp -.L107: - tst.l -2147483484 - jeq .L104 + jsr (%a2) + move.l 1187521530,%a3 + move.l 1187521546,%d2 jsr 1073893100 + lea (16,%sp),%sp + tst.l %d0 + sne %d1 + mvs.b %d1,%d1 + neg.l %d1 + move.l %d1,wav_in_project tst.l %d0 - jeq .L104 + jeq .L105 clr.l -(%sp) clr.l -(%sp) jsr 1073893936 - pea wav_name move.l %d0,-(%sp) - pea .LC5 - pea wav_path + pea .LC4 + pea wav_dir + jsr (%a2) + lea (20,%sp),%sp +.L106: + tst.l %a3 + jeq .L103 + tst.l %d2 + jeq .L103 + pea wav_dir + jsr (%a3) + addq.l #4,%sp + tst.l %d0 + jne .L107 + pea wav_dir + move.l %d2,%a0 + jsr (%a0) + addq.l #4,%sp + tst.l %d0 + jlt .L103 +.L107: + pea wav_base + moveq #1,%d2 + pea .LC8 + pea wav_name jsr 1073822216 - lea (24,%sp),%sp -.L105: - tst.l %a2 - jeq .L106 + lea (12,%sp),%sp +.L109: + pea wav_name + move.l #1073822216,%a2 + pea wav_dir + pea .LC6 pea wav_path jsr (%a2) - addq.l #4,%sp + pea wav_path + jsr (%a3) + lea (20,%sp),%sp tst.l %d0 - jeq .L106 + jeq .L108 moveq #99,%d0 cmp.l %d2,%d0 - jeq .L102 + jeq .L103 addq.l #1,%d2 move.l %d2,-(%sp) pea wav_base pea .LC7 pea wav_name - jsr 1073822216 + jsr (%a2) lea (16,%sp),%sp - jra .L107 -.L104: - pea wav_name + jra .L109 +.L105: move.l #269452416,-(%sp) - pea .LC6 - pea wav_path - jsr 1073822216 - lea (16,%sp),%sp - jra .L105 -.L106: + pea .LC5 + pea wav_dir + jsr (%a2) + lea (12,%sp),%sp + jra .L106 +.L108: pea wav_name - pea .LC4 + pea .LC9 move.l #1175185904,-(%sp) - jsr 1073822216 + jsr (%a2) add.l #128,%d3 + move.l #-2147483484,%a2 moveq #1,%d0 move.l %d0,1175185896 move.l #1175179208,%a0 move.l %d3,1175185900 - moveq #2,%d0 + move.l #wav_saved,%d0 move.l (%a0),prev_mode move.l #1187565972,%a0 move.l (%a0),prev_done_a move.l #1187565976,%a0 move.l (%a0),prev_done_b - move.l %d0,1175179208 + clr.l 1175179208 + move.l %d0,1187565972 moveq #8,%d0 - clr.l 1187565972 lea saved,%a0 move.l %a0,1187565976 - move.l %d0,phase - moveq #1,%d0 clr.l saved_in + clr.l wav_in + clr.l assigning clr.l saved_ticks + move.l %d0,phase + moveq #1,%d0 move.l %d0,1187497772 - pea 1.w - jsr 1073889928 - movem.l 16(%sp),#1036 - lea (28,%sp),%sp + move.l (%a2),%d3 + move.l wav_in_project,(%a2) + move.l #1175185904,-(%sp) + jsr 1073889640 + move.l %d3,(%a2) + movem.l 16(%sp),#3084 + lea (32,%sp),%sp rts .size save_take, .-save_take .align 2 @@ -871,7 +910,7 @@ paste: lea part_buf,%a0 mvz.b 34(%a0,%d2.l),%d0 cmp.l %d0,%d3 - jeq .L127 + jeq .L123 move.l %d3,28(%sp) move.l %d2,24(%sp) mvz.b 5(%a2),%d0 @@ -879,16 +918,16 @@ paste: move.l %d0,20(%sp) lea (16,%sp),%sp jmp 1074361084 -.L127: +.L123: move.b 269161679,%d0 move.b 5(%a2),%d1 moveq #3,%d4 and.l %d4,%d0 mvz.b %d1,%d3 cmp.l %d3,%d0 - jne .L126 + jne .L122 tst.b -2147483627.l - jne .L126 + jne .L122 move.b 269161678,%d0 move.l %d2,28(%sp) movem.l (%sp),#1052 @@ -898,7 +937,7 @@ paste: move.l %d0,20(%sp) lea (16,%sp),%sp jmp 1073749784 -.L126: +.L122: movem.l (%sp),#1052 lea (16,%sp),%sp rts @@ -932,13 +971,13 @@ apply_clip: add.l #part_copy+1538,%a1 add.l #part_buf+1538,%a0 clr.l %d0 -.L130: +.L126: lea (%a1,%d0.l),%a3 moveq #12,%d1 move.b (%a3),(%a0,%d0.l) addq.l #1,%d0 cmp.l %d0,%d1 - jne .L130 + jne .L126 move.w %d2,%d0 moveq #1,%d5 lea part_buf,%a1 @@ -955,14 +994,14 @@ apply_clip: move.b %d4,715(%a0) mulu.w #30,%d0 addq.l #6,%d0 -.L132: +.L128: move.l %d1,%a3 moveq #5,%d4 add.l #1074606604,%a3 cmp.l %d1,%d4 - jcs .L138 + jcs .L134 move.w #42,%a0 -.L131: +.L127: move.l %d1,%d5 moveq #6,%d6 remu.l %d6,%d4:%d5 @@ -972,7 +1011,7 @@ apply_clip: move.b (%a3),(%a0,%d4.l) moveq #12,%d4 cmp.l %d1,%d4 - jne .L132 + jne .L128 move.w %d2,%d1 moveq #127,%d6 move.l #2139045952,%d5 @@ -990,43 +1029,43 @@ apply_clip: clr.l %d1 lea record_new,%a0 lea record_copy,%a1 -.L133: +.L129: lea (%a1,%d1.l),%a3 move.b (%a3),(%a0,%d1.l) addq.l #1,%d1 cmp.l #2330,%d1 - jne .L133 + jne .L129 clr.l %d0 -.L134: +.L130: clr.b %d1 moveq #64,%d4 move.b %d1,(%a0,%d0.l) addq.l #1,%d0 cmp.l %d0,%d4 - jne .L134 + jne .L130 moveq #1,%d5 clr.l %d0 lea record_new+89,%a0 move.b %d5,record_new+7 -.L135: +.L131: st %d6 addq.l #1,%d0 move.b %d6,-1(%a0,%d0.l) cmp.l #2048,%d0 - jne .L135 + jne .L131 mvz.b arm+4,%d0 move.l (%a2),%a0 add.l #36437,%a0 mulu.w #36568,%d0 tst.b (%a0,%d0.l) - jeq .L136 + jeq .L132 tst.l -12(%fp) - jeq .L136 + jeq .L132 moveq #2,%d0 lea (-9,%fp),%a0 move.b (%a0),record_new+80 move.b %d0,record_new+81 -.L136: +.L132: pea record_new pea arm jsr write_record @@ -1040,11 +1079,11 @@ apply_clip: lsl.l #8,%d0 or.l arm+8,%d0 cmp.l -2147483640.l,%d0 - jeq .L137 + jeq .L133 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L137: +.L133: pea 12.w pea arm pea last @@ -1055,18 +1094,18 @@ apply_clip: move.l %d1,undo_ready unlk %fp rts -.L138: +.L134: move.l %a4,%a0 - jra .L131 + jra .L127 .size apply_clip, .-apply_clip .section .rodata.str1.1 -.LC8: +.LC10: .string "TAKE LEFT IN BUFFER" -.LC9: +.LC11: .string "NOTHING TO UNDO" -.LC10: +.LC12: .string "UNDO: OPEN ITS PATTERN" -.LC11: +.LC13: .string "UNDONE" .text .align 2 @@ -1077,30 +1116,30 @@ bounce_choose: move.l 32(%sp),%d0 movem.l #17412,(%sp) cmp.l %d0,%d1 - jne .L151 + jne .L147 move.l phase,%d0 moveq #8,%d1 cmp.l %d0,%d1 - jcs .L152 + jcs .L148 move.l #-301,%d1 btst %d0,%d1 - jeq .L150 + jeq .L146 subq.l #6,%d0 tst.l %d0 - jne .L152 - move.l #.LC8,%d0 + jne .L148 + move.l #.LC10,%d0 move.l %d0,32(%sp) -.L173: +.L169: movem.l (%sp),#17412 lea (28,%sp),%sp jra show -.L152: +.L148: tst.l undo_ready - jne .L154 - move.l #.LC9,%d1 + jne .L150 + move.l #.LC11,%d1 move.l %d1,32(%sp) - jra .L173 -.L154: + jra .L169 +.L150: move.l %sp,%d2 add.l #16,%d2 move.l %d2,-(%sp) @@ -1108,24 +1147,24 @@ bounce_choose: addq.l #4,%sp lea show,%a2 tst.l %d0 - jeq .L155 + jeq .L151 pea last move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L156 -.L155: - pea .LC10 -.L174: + jne .L152 +.L151: + pea .LC12 +.L170: jsr (%a2) -.L172: +.L168: addq.l #4,%sp -.L150: +.L146: movem.l (%sp),#17412 lea (28,%sp),%sp rts -.L156: +.L152: mvz.b last+5,%d0 mvz.b last+6,%d2 lea last,%a6 @@ -1159,40 +1198,40 @@ bounce_choose: and.l %d2,%d0 eor.l %d1,%d0 cmp.l (%a0),%d0 - jeq .L157 + jeq .L153 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L157: +.L153: clr.l undo_ready - pea .LC11 - jra .L174 -.L151: + pea .LC13 + jra .L170 +.L147: tst.l %d0 - jeq .L159 + jeq .L155 move.l phase,%d0 moveq #8,%d1 cmp.l %d0,%d1 - jcs .L160 + jcs .L156 move.l #-301,%d1 btst %d0,%d1 - jeq .L150 + jeq .L146 subq.l #6,%d0 tst.l %d0 - jne .L160 + jne .L156 clr.l phase -.L160: +.L156: move.l %sp,%d2 add.l #16,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jne .L162 + jne .L158 pea .LC2 jsr show - jra .L172 -.L162: + jra .L168 +.L158: pea 12.w move.l %d2,-(%sp) pea arm @@ -1207,8 +1246,8 @@ bounce_choose: moveq #7,%d0 move.l %d0,phase move.l %d1,1187497772 - jra .L150 -.L159: + jra .L146 +.L155: movem.l (%sp),#17412 lea (28,%sp),%sp jra open_select @@ -1227,26 +1266,26 @@ cancel: move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L176 + jeq .L172 clr.l -(%sp) pea 128.w move.l %a6,-(%sp) jsr 1073762680 lea (12,%sp),%sp -.L176: +.L172: move.l %sp,%d2 add.l #12,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L177 + jeq .L173 pea arm move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L177 + jeq .L173 mvz.b arm+5,%d0 move.l arm,%a0 add.l #585088,%a0 @@ -1261,26 +1300,26 @@ cancel: move.l %d1,%a0 add.l #part_buf+1538,%a6 add.l #part_copy+1538,%a0 -.L178: +.L174: lea (%a0,%d0.l),%a1 moveq #12,%d1 move.b (%a1),(%a6,%d0.l) addq.l #1,%d0 cmp.l %d0,%d1 - jne .L178 + jne .L174 mvz.b arm+5,%d0 move.l %d0,-(%sp) pea part_buf jsr 1073912396 addq.l #8,%sp -.L177: +.L173: move.l arm+8,%d0 cmp.l -2147483640.l,%d0 - jeq .L179 + jeq .L175 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L179: +.L175: move.l 8(%sp),%a1 move.l %a1,28(%sp) move.l (%sp)+,%d2 @@ -1289,13 +1328,13 @@ cancel: jra show .size cancel, .-cancel .section .rodata.str1.1 -.LC12: +.LC14: .string "STOPPED - NO BOUNCE" -.LC13: +.LC15: .string "PATTERN CHANGED" -.LC14: +.LC16: .string "TAKE INCOMPLETE" -.LC15: +.LC17: .string "BOUNCED, SAVED AS" .text .align 2 @@ -1307,9 +1346,9 @@ module_tick: lea (-64,%sp),%sp movem.l #23804,(%sp) cmp.l %d0,%d1 - jne .L191 + jne .L187 tst.l -2147457608 - jeq .L192 + jeq .L188 mvz.b arm+6,%d0 pea 1.w moveq #2,%d2 @@ -1320,10 +1359,10 @@ module_tick: move.l %d2,phase move.l %d6,1187497772 lea (12,%sp),%sp -.L192: +.L188: move.w #1,%a6 moveq #1,%d4 -.L213: +.L212: move.l #1175169472,-(%sp) jsr 1073744372 clr.l %d3 @@ -1333,21 +1372,21 @@ module_tick: clr.l %d0 move.b (%a0),51(%sp) addq.l #4,%sp -.L225: +.L224: move.l %d0,%a4 add.l #1175169420,%a4 move.b (%a4),%d2 tst.b 47(%sp) - jeq .L215 + jeq .L214 mvz.b (%a2,%d0.l),%d5 mvz.b %d2,%d1 cmp.l %d1,%d5 - jeq .L216 -.L215: + jeq .L215 +.L214: move.b %d2,(%a3,%d0.l) -.L216: +.L215: tst.l %d4 - jeq .L217 + jeq .L216 mvz.b arm+6,%d1 move.l %d0,%d6 sub.l %a0,%a0 @@ -1356,43 +1395,43 @@ module_tick: move.l %d1,48(%sp) clr.b %d1 move.l %d6,%a1 -.L222: +.L221: cmp.l 48(%sp),%a1 - jne .L218 + jne .L217 moveq #1,%d7 -.L251: +.L253: move.l %a0,%d6 lsl.l %d6,%d7 or.l %d7,%d1 - jra .L219 -.L191: + jra .L218 +.L187: moveq #2,%d7 cmp.l %d0,%d7 - jne .L193 + jne .L189 mvz.b arm+6,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L192 + jeq .L188 moveq #3,%d0 moveq #1,%d1 move.l %d0,phase move.l %d1,1187497772 - jra .L192 -.L193: + jra .L188 +.L189: moveq #3,%d2 cmp.l %d0,%d2 - jne .L194 + jne .L190 tst.l -2147457608 - jne .L195 - pea .LC12 -.L252: + jne .L191 + pea .LC14 +.L254: jsr cancel -.L248: +.L250: addq.l #4,%sp - jra .L196 -.L195: + jra .L192 +.L191: mvz.b arm+6,%d2 lea arm,%a2 move.w %d2,%d0 @@ -1400,33 +1439,33 @@ module_tick: move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jne .L192 + jne .L188 move.l %sp,%d3 add.l #52,%d3 move.l %d3,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L197 + jeq .L193 move.l %a2,-(%sp) move.l %d3,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L198 -.L197: - pea .LC13 - jra .L252 -.L198: + jne .L194 +.L193: + pea .LC15 + jra .L254 +.L194: move.l %d2,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 tst.l (%a0) - jne .L200 - pea .LC14 - jra .L252 -.L200: + jne .L196 + pea .LC16 + jra .L254 +.L196: mvz.b arm+5,%d0 move.l (%a2),%d3 add.l #585088,%d3 @@ -1437,7 +1476,7 @@ module_tick: jsr modwerk_machine addq.l #8,%sp tst.l %d0 - jeq .L249 + jeq .L251 mulu.w #12,%d2 move.l %d3,-(%sp) jsr (copy.constprop.0) @@ -1447,13 +1486,13 @@ module_tick: move.l %d2,%a0 add.l #part_copy+1538,%a1 add.l #part_buf+1538,%a0 -.L202: +.L198: lea (%a1,%d0.l),%a2 moveq #12,%d1 move.b (%a2),(%a0,%d0.l) addq.l #1,%d0 cmp.l %d0,%d1 - jne .L202 + jne .L198 mvz.b arm+5,%d0 move.l %d0,-(%sp) pea part_buf @@ -1461,33 +1500,28 @@ module_tick: addq.l #8,%sp move.l arm+8,%d0 cmp.l -2147483640.l,%d0 - jeq .L203 + jeq .L199 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L203: +.L199: moveq #6,%d2 moveq #1,%d6 move.l %d2,phase clr.l message move.l %d6,1187497772 -.L196: +.L192: move.l phase,%d0 moveq #3,%d6 cmp.l %d0,%d6 - jcs .L212 + jcs .L211 tst.l %d0 - jne .L192 -.L211: - tst.b lamps_on.l - jeq .L214 - clr.l %d4 - sub.l %a6,%a6 - jra .L213 -.L194: + jeq .L210 + jra .L188 +.L190: moveq #6,%d7 cmp.l %d0,%d7 - jne .L204 + jne .L200 lea arm,%a2 move.l %sp,%d4 add.l #52,%d4 @@ -1497,18 +1531,18 @@ module_tick: jsr current addq.l #4,%sp tst.l %d0 - jeq .L205 + jeq .L201 move.l %a2,-(%sp) move.l %d4,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L206 -.L205: - pea .LC8 + jne .L202 +.L201: + pea .LC10 jsr show - jra .L248 -.L206: + jra .L250 +.L202: mvz.b %d3,%d3 mvz.b arm+6,%d0 move.l %d2,%a0 @@ -1518,105 +1552,129 @@ module_tick: mvz.b 34(%a0,%d0.l),%d1 subq.l #1,%d1 tst.l %d1 - jne .L205 + jne .L201 move.l %d0,-(%sp) move.l %a0,-(%sp) jsr modwerk_machine addq.l #8,%sp tst.l %d0 - jne .L196 -.L249: + jne .L192 +.L251: jsr apply_clip jsr save_take - jra .L196 -.L204: + jra .L192 +.L200: moveq #8,%d6 cmp.l %d0,%d6 - jne .L208 + jne .L204 tst.l saved_in - jeq .L209 + jeq .L205 jsr save_done_restore tst.l saved_result - jge .L210 -.L250: + jge .L206 +.L252: jsr not_saved - jra .L196 -.L210: - pea .LC15 + jra .L192 +.L206: + pea .LC17 move.l #wav_name,%d7 jsr show move.l %d7,message2 - jra .L248 + jra .L250 +.L205: + tst.l wav_in + jeq .L207 + tst.l assigning + jne .L207 + moveq #1,%d0 + move.l %d0,assigning + tst.l wav_result + jge .L208 .L209: + jsr save_done_restore + jra .L252 +.L208: + move.l #-2147483484,%a2 + move.l (%a2),%d2 + move.l wav_in_project,(%a2) + clr.l -(%sp) + jsr 1073889608 + move.l %d2,(%a2) + jra .L250 +.L207: move.l saved_ticks,%d0 addq.l #1,%d0 move.l %d0,saved_ticks cmp.l #1800,%d0 - jls .L211 - jsr save_done_restore - jra .L250 -.L208: + jhi .L209 +.L210: + tst.b lamps_on.l + jeq .L213 + clr.l %d4 + sub.l %a6,%a6 + jra .L212 +.L204: subq.l #4,%d0 tst.l %d0 - jne .L196 + jne .L192 tst.l sticky - jne .L211 + jne .L210 move.l shown_ticks,%d0 addq.l #1,%d0 move.l %d0,shown_ticks moveq #90,%d2 cmp.l %d0,%d2 - jcc .L211 + jcc .L210 jsr close_view - jra .L196 -.L212: + jra .L192 +.L211: subq.l #5,%d0 tst.l %d0 - jne .L211 - jra .L192 -.L227: + jne .L210 + jra .L188 +.L226: moveq #1,%d0 - jra .L225 -.L218: + jra .L224 +.L217: move.l %a1,%d7 btst %d7,%d5 - jeq .L220 + jeq .L219 moveq #2,%d6 move.l %a0,%d7 lsl.l %d7,%d6 or.l %d6,%d1 -.L219: +.L218: addq.l #1,%a1 addq.l #2,%a0 moveq #8,%d7 cmp.l %a0,%d7 - jne .L222 + jne .L221 move.l %d0,%a0 add.l #1175169454,%a0 move.b (%a0),%d5 eor.l %d5,%d1 -.L223: +.L222: mvz.b %d2,%d2 mvz.b %d1,%d5 cmp.l %d2,%d5 - jeq .L224 + jeq .L223 move.b %d1,(%a4) moveq #1,%d3 -.L224: +.L223: move.b %d1,(%a2,%d0.l) subq.l #1,%d0 tst.l %d0 - jne .L227 + jne .L226 tst.l %d3 - jeq .L226 + jeq .L225 jsr 1073821352 -.L226: +.L225: move.w %a6,%d2 move.l #1175169472,-(%sp) jsr 1073744564 addq.l #4,%sp move.b %d2,lamps_on -.L214: +.L213: mvz.b arm+6,%d0 moveq #24,%d6 moveq #9,%d7 @@ -1648,37 +1706,37 @@ module_tick: move.l %d0,(%a0) lea (64,%sp),%sp rts -.L220: +.L219: moveq #7,%d6 cmp.l %a1,%d6 - jne .L221 + jne .L220 tst.b -2147483596.l - jne .L219 -.L221: + jne .L218 +.L220: moveq #3,%d7 - jra .L251 -.L217: + jra .L253 +.L216: move.b (%a3,%d0.l),%d1 - jra .L223 + jra .L222 .size module_tick, .-module_tick .section .rodata.str1.1 -.LC16: +.LC18: .string "TRACK CHANGED" -.LC17: +.LC19: .string "PICK STATIC FIRST" -.LC18: +.LC20: .string "RECORDER BUSY" -.LC19: +.LC21: .string "TRACK RESET" -.LC20: +.LC22: .string "PASS OVER 64 STEPS" -.LC21: +.LC23: .string "T8 IS THE MASTER TRACK" -.LC22: +.LC24: .string "T" -.LC23: +.LC25: .string " CUE LEVEL IS 0" -.LC24: +.LC26: .string "BOUNCE CANCELLED" .text .align 2 @@ -1691,13 +1749,13 @@ module_key: move.l 8(%fp),%d4 move.l 12(%fp),%d0 cmp.l %d4,%d1 - jcs .L254 + jcs .L256 moveq #31,%d2 cmp.l %d4,%d2 - jlt .L255 + jlt .L257 move.l consumed_lo,%d1 lea consumed_lo,%a2 -.L256: +.L258: moveq #31,%d2 moveq #1,%d3 and.l %d4,%d2 @@ -1705,74 +1763,74 @@ module_key: move.l %d1,%d2 and.l %d3,%d2 tst.l %d0 - jne .L257 + jne .L259 tst.l %d2 - jeq .L258 + jeq .L260 not.l %d3 and.l %d1,%d3 move.l %d3,(%a2) -.L259: +.L261: moveq #1,%d0 -.L258: +.L260: movem.l -52(%fp),#3324 unlk %fp rts -.L255: +.L257: move.l consumed_hi,%d1 lea consumed_hi,%a2 - jra .L256 -.L257: + jra .L258 +.L259: tst.l %d2 - jne .L259 + jne .L261 move.l phase,%d0 moveq #8,%d1 cmp.l %d0,%d1 - jeq .L254 + jeq .L256 tst.l %d0 - jeq .L260 + jeq .L262 moveq #6,%d1 cmp.l %d0,%d1 - jne .L261 -.L260: + jne .L263 +.L262: moveq #41,%d2 cmp.l %d4,%d2 - jne .L254 + jne .L256 move.b 1175456540,%d0 btst #0,%d0 - jeq .L254 + jeq .L256 jsr open_select -.L262: +.L264: or.l %d3,(%a2) - jra .L259 -.L261: + jra .L261 +.L263: moveq #7,%d1 cmp.l %d0,%d1 - jne .L263 + jne .L265 moveq #49,%d2 cmp.l %d4,%d2 - jne .L264 + jne .L266 move.l %fp,%d6 add.l #-12,%d6 move.l %d6,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L276 + jeq .L278 move.b -6(%fp),%d5 mvz.b arm+6,%d0 mvz.b %d5,%d2 cmp.l %d2,%d0 - jne .L276 + jne .L278 pea arm move.l %d6,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L266 -.L276: - pea .LC16 - jra .L326 -.L266: + jne .L268 +.L278: + pea .LC18 + jra .L328 +.L268: mvz.b -7(%fp),%d0 move.l #585088,%a0 move.l -12(%fp),%a3 @@ -1786,24 +1844,24 @@ module_key: addq.l #8,%sp move.l %d0,%d4 tst.l %d0 - jeq .L268 - pea .LC17 -.L326: + jeq .L270 + pea .LC19 +.L328: jsr show -.L327: +.L329: addq.l #4,%sp - jra .L262 -.L268: + jra .L264 +.L270: move.w %d2,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L269 -.L328: - pea .LC18 - jra .L326 -.L269: + jeq .L271 +.L330: + pea .LC20 + jra .L328 +.L271: moveq #1,%d0 lsl.l %d2,%d0 move.l #-2147483640,%a1 @@ -1848,12 +1906,12 @@ module_key: lea record_new,%a0 clr.l %d0 move.l %a0,%d1 -.L270: +.L272: clr.b %d2 move.b %d2,(%a0,%d0.l) addq.l #1,%d0 cmp.l #2330,%d0 - jne .L270 + jne .L272 st %d0 lea record_copy+80,%a1 move.w (%a1),record_new+80 @@ -1862,12 +1920,12 @@ module_key: move.l %a0,record_new+68 lea record_new+89,%a0 move.b %d0,record_new+83 -.L271: +.L273: st %d2 addq.l #1,%d4 move.b %d2,-1(%a0,%d4.l) cmp.l #2048,%d4 - jne .L271 + jne .L273 lea record_copy+2329,%a0 move.b (%a0),record_new+2329 move.l %d1,-(%sp) @@ -1877,86 +1935,86 @@ module_key: move.l %d6,-(%sp) pea last jsr copy - pea .LC19 + pea .LC21 moveq #1,%d0 move.l %d0,undo_ready jsr show lea (24,%sp),%sp - jra .L262 -.L264: + jra .L264 +.L266: moveq #50,%d1 cmp.l %d4,%d1 - jne .L254 -.L290: + jne .L256 +.L292: jsr close_view - jra .L262 -.L263: + jra .L264 +.L265: moveq #1,%d1 cmp.l %d0,%d1 - jne .L272 + jne .L274 moveq #7,%d1 cmp.l %d4,%d1 - jlt .L273 + jlt .L275 mvz.b arm+6,%d1 cmp.l %d4,%d1 - jeq .L274 + jeq .L276 move.b arm+7,%d1 lsl.l %d4,%d0 eor.l %d1,%d0 move.b %d0,arm+7 -.L274: +.L276: moveq #1,%d2 move.l %d2,1187497772 - jra .L262 -.L273: + jra .L264 +.L275: moveq #49,%d0 cmp.l %d4,%d0 - jne .L275 + jne .L277 move.l %fp,%d4 add.l #-12,%d4 move.l %d4,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L276 + jeq .L278 pea arm move.l %d4,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L276 + jeq .L278 move.b arm+6,%d6 mvz.b -6(%fp),%d0 mvz.b %d6,%d4 cmp.l %d0,%d4 - jne .L276 + jne .L278 pea -16(%fp) jsr (pass_steps.constprop.0) addq.l #4,%sp move.l %d0,%d7 tst.l %d0 - jne .L279 - pea .LC20 - jra .L326 -.L279: + jne .L281 + pea .LC22 + jra .L328 +.L281: move.b arm+7,%d5 tst.b -2147483596.l - jne .L280 -.L283: + jne .L282 +.L285: moveq #1,%d0 lsl.l %d4,%d0 mvz.b %d5,%d5 mvz.b %d0,%d0 move.l %d0,-20(%fp) cmp.l %d5,%d0 - jne .L285 -.L282: + jne .L287 +.L284: move.w %d4,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jne .L328 + jne .L330 mvz.b arm+5,%d0 move.l #-2147483640,%a1 subq.l #1,%d7 @@ -1993,9 +2051,9 @@ module_key: clr.w (%a0) move.b %d7,2(%a0) cmp.l -20(%fp),%d5 - jne .L293 + jne .L295 addq.l #1,%d6 -.L287: +.L289: clr.b %d0 move.b %d6,4(%a0) move.b %d0,9(%a0) @@ -2005,7 +2063,7 @@ module_key: jsr 1073912396 addq.l #8,%sp cmp.l -20(%fp),%d5 - jeq .L288 + jeq .L290 mvz.b arm+7,%d0 move.l arm+8,%d1 swap %d0 @@ -2015,48 +2073,48 @@ module_key: move.l %d1,-(%sp) jsr set_mutes addq.l #4,%sp -.L288: +.L290: move.l %d4,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 clr.l (%a0) tst.l -2147457608 - jeq .L294 + jeq .L296 pea 1.w move.l #49168,-(%sp) move.l %d4,-(%sp) jsr 1073762680 lea (12,%sp),%sp moveq #2,%d0 -.L289: +.L291: move.l %d0,phase moveq #1,%d0 move.l %d0,1187497772 - jra .L262 -.L280: + jra .L264 +.L282: tst.b %d5 - jge .L283 - pea .LC21 - jra .L326 -.L284: + jge .L285 + pea .LC23 + jra .L328 +.L286: move.l %d1,%d2 moveq #8,%d0 cmp.l %d1,%d0 - jeq .L282 -.L285: + jeq .L284 +.L287: move.l %d2,%d1 addq.l #1,%d1 btst %d2,%d5 - jeq .L284 + jeq .L286 mvz.w %d2,%d0 add.l %d0,%d0 move.l %d0,%a0 add.l #-2147480495,%a0 tst.b (%a0) - jne .L284 + jne .L286 clr.b %d1 - pea .LC22 + pea .LC24 move.l #note,%d4 move.l %d4,-(%sp) lea append,%a3 @@ -2065,50 +2123,50 @@ module_key: jsr (%a3) move.b %d2,note+1 clr.b %d2 - pea .LC23 + pea .LC25 move.l %d4,-(%sp) move.b %d2,note+2 jsr (%a3) move.l %d4,-(%sp) jsr show lea (20,%sp),%sp - jra .L262 -.L293: + jra .L264 +.L295: moveq #10,%d6 - jra .L287 -.L294: - moveq #5,%d0 jra .L289 -.L275: +.L296: + moveq #5,%d0 + jra .L291 +.L277: moveq #50,%d1 cmp.l %d4,%d1 - jeq .L290 + jeq .L292 jsr close_view -.L254: +.L256: clr.l %d0 - jra .L258 -.L272: + jra .L260 +.L274: move.l %d0,%d1 subq.l #2,%d1 lsr.l #1,%d1 - jeq .L291 + jeq .L293 subq.l #5,%d0 tst.l %d0 - jne .L292 -.L291: + jne .L294 +.L293: moveq #50,%d2 cmp.l %d4,%d2 - jne .L254 - pea .LC24 + jne .L256 + pea .LC26 jsr cancel - jra .L327 -.L292: + jra .L329 +.L294: add.l #-49,%d4 jsr close_view move.l %d4,-20(%fp) lsr.l #1,%d4 - jne .L254 - jra .L262 + jne .L256 + jra .L264 .size module_key, .-module_key .align 2 .globl module_enc @@ -2130,43 +2188,43 @@ module_enc: rts .size module_enc, .-module_enc .section .rodata.str1.1 -.LC25: +.LC27: .string "BOUNCE" -.LC26: +.LC28: .string "" -.LC27: +.LC29: .string " (LONGEST)" -.LC28: +.LC30: .string " STEPS" -.LC29: +.LC31: .string "RECORDING ONE PASS" -.LC30: +.LC32: .string "PRESS PLAY" -.LC31: +.LC33: .string "WAITS FOR PATTERN START" -.LC32: +.LC34: .string "BOUNCED: T" -.LC33: +.LC35: .string " PICK FLEX" -.LC34: +.LC36: .string "BOUNCE T" -.LC35: +.LC37: .string "RESET T" -.LC36: +.LC38: .string "STOCK STATIC TRACK" -.LC37: +.LC39: .string "NO TRIGS, NO LOCKS" -.LC38: +.LC40: .string "YES: RESET NO: BACK" -.LC39: +.LC41: .string "PASS " -.LC40: +.LC42: .string "OVER 64 STEPS" -.LC41: +.LC43: .string "TRIG 1-8: MERGE" -.LC42: +.LC44: .string "YES: REC NO: CLOSE" -.LC43: +.LC45: .string "NO: CANCEL" .text .align 2 @@ -2180,18 +2238,18 @@ module_draw: move.l %a5,%d0 and.l %d1,%d0 tst.l %d0 - jeq .L330 + jeq .L332 tst.l 8(%fp) - jeq .L330 + jeq .L332 lea append,%a3 moveq #6,%d4 lea fill,%a4 lea text,%a2 move.l #invert,%d3 cmp.l %a5,%d4 - jne .L332 + jne .L334 clr.b %d0 - pea .LC32 + pea .LC34 move.l %fp,%d2 add.l #-24,%d2 move.l %d2,-(%sp) @@ -2199,7 +2257,7 @@ module_draw: jsr (%a3) move.b arm+6,%d0 clr.b %d1 - pea .LC33 + pea .LC35 move.l %d2,-(%sp) add.l #49,%d0 move.b %d0,-14(%fp) @@ -2226,11 +2284,11 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a0) lea (36,%sp),%sp -.L330: +.L332: movem.l -68(%fp),#15388 unlk %fp rts -.L332: +.L334: clr.l -(%sp) moveq #7,%d4 pea 44.w @@ -2272,7 +2330,7 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a4) clr.b %d0 - pea .LC34 + pea .LC36 move.l %d2,-(%sp) move.b %d0,-36(%fp) jsr (%a3) @@ -2283,8 +2341,8 @@ module_draw: move.b %d0,-28(%fp) move.b %d1,-27(%fp) cmp.l %a5,%d4 - jne .L333 - pea .LC35 + jne .L335 + pea .LC37 move.l %d2,-(%sp) move.b %d1,-36(%fp) jsr (%a3) @@ -2294,7 +2352,7 @@ module_draw: move.b %d0,-29(%fp) clr.b %d0 move.b %d0,-28(%fp) -.L334: +.L336: move.l %d2,-(%sp) pea 13.w pea 10.w @@ -2311,12 +2369,12 @@ module_draw: move.l phase,%d0 moveq #4,%d1 cmp.l %d0,%d1 - jne .L335 + jne .L337 move.l message,%d0 tst.l %d0 - jne .L336 - move.l #.LC26,%d0 -.L336: + jne .L338 + move.l #.LC28,%d0 +.L338: move.l %d0,-(%sp) pea 27.w pea 10.w @@ -2325,46 +2383,46 @@ module_draw: lea (16,%sp),%sp move.l message2,%d0 tst.l %d0 - jeq .L330 + jeq .L332 move.l %d0,-(%sp) pea 35.w -.L366: +.L368: pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (16,%sp),%sp - jra .L330 -.L333: + jra .L332 +.L335: moveq #4,%d1 cmp.l %a5,%d1 - jne .L334 - move.l #.LC25,%d2 - jra .L334 -.L335: + jne .L336 + move.l #.LC27,%d2 + jra .L336 +.L337: subq.l #7,%d0 tst.l %d0 - jne .L346 - pea .LC36 + jne .L348 + pea .LC38 pea 24.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) - pea .LC37 + pea .LC39 pea 31.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (28,%sp),%sp - move.l #.LC38,(%sp) -.L365: + move.l #.LC40,(%sp) +.L367: pea 45.w - jra .L366 -.L346: + jra .L368 +.L348: move.w #10,%a5 move.l %fp,%d2 sub.l %a4,%a4 add.l #-24,%d2 -.L337: +.L339: moveq #84,%d0 clr.b %d1 move.l %d2,-(%sp) @@ -2381,7 +2439,7 @@ module_draw: mvz.b arm+7,%d0 lea (16,%sp),%sp btst %d4,%d0 - jeq .L338 + jeq .L340 pea 7.w pea 12.w pea 21.w @@ -2390,18 +2448,18 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a0) lea (20,%sp),%sp -.L338: +.L340: addq.l #1,%a4 lea (14,%a5),%a5 moveq #8,%d0 cmp.l %a4,%d0 - jne .L337 + jne .L339 move.l phase,%d0 moveq #1,%d1 cmp.l %d0,%d1 - jne .L339 + jne .L341 clr.b %d3 - pea .LC39 + pea .LC41 move.l %d2,-(%sp) move.b %d3,-24(%fp) jsr (%a3) @@ -2409,17 +2467,17 @@ module_draw: jsr (pass_steps.constprop.0) lea (12,%sp),%sp tst.l %d0 - jeq .L340 + jeq .L342 moveq #9,%d4 cmp.l %d0,%d4 - jcc .L347 + jcc .L349 move.l %d0,%d1 moveq #10,%d4 divu.l %d4,%d1 lea (-18,%fp),%a0 add.l #48,%d1 move.b %d1,-19(%fp) -.L341: +.L343: moveq #10,%d3 remu.l %d3,%d1:%d0 clr.b %d4 @@ -2427,11 +2485,11 @@ module_draw: move.b %d1,(%a0) move.b %d4,1(%a0) tst.l -40(%fp) - jeq .L348 - move.l #.LC27,%d0 -.L342: + jeq .L350 + move.l #.LC29,%d0 +.L344: move.l %d0,-(%sp) -.L364: +.L366: move.l %d2,-(%sp) jsr (%a3) addq.l #4,%sp @@ -2440,50 +2498,50 @@ module_draw: pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) - pea .LC41 + pea .LC43 pea 38.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (28,%sp),%sp - move.l #.LC42,(%sp) - jra .L365 -.L347: + move.l #.LC44,(%sp) + jra .L367 +.L349: lea (-19,%fp),%a0 - jra .L341 -.L348: - move.l #.LC28,%d0 - jra .L342 -.L340: - pea .LC40 - jra .L364 -.L339: + jra .L343 +.L350: + move.l #.LC30,%d0 + jra .L344 +.L342: + pea .LC42 + jra .L366 +.L341: moveq #5,%d1 cmp.l %d0,%d1 - jeq .L349 + jeq .L351 subq.l #2,%d0 tst.l %d0 - jne .L350 - move.l #.LC31,%d0 -.L344: + jne .L352 + move.l #.LC33,%d0 +.L346: move.l %d0,-(%sp) pea 31.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) - pea .LC43 + pea .LC45 pea 45.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (32,%sp),%sp - jra .L330 -.L349: - move.l #.LC30,%d0 - jra .L344 -.L350: - move.l #.LC29,%d0 - jra .L344 + jra .L332 +.L351: + move.l #.LC32,%d0 + jra .L346 +.L352: + move.l #.LC31,%d0 + jra .L346 .size module_draw, .-module_draw .section .rodata .type ticks.0, @object @@ -2497,26 +2555,26 @@ ticks.0: .size bounce_part_menu, 24 bounce_part_menu: .long 1 - .long .LC25 + .long .LC27 .long 3 .long bounce_actions .long bounce_choose .long 0 .section .rodata.str1.1 -.LC44: +.LC46: .string "BOUNCE TRACK" -.LC45: +.LC47: .string "RESET TRACK" -.LC46: +.LC48: .string "UNDO" .section .rodata .align 2 .type bounce_actions, @object .size bounce_actions, 12 bounce_actions: - .long .LC44 - .long .LC45 .long .LC46 + .long .LC47 + .long .LC48 .local lamp_mine .comm lamp_mine,2,1 .local lamp_stock @@ -2527,6 +2585,8 @@ bounce_actions: .comm sticky,4,2 .local wav_path .comm wav_path,160,1 + .local wav_dir + .comm wav_dir,136,1 .local wav_base .comm wav_base,24,1 .local wav_name @@ -2539,6 +2599,14 @@ bounce_actions: .comm prev_done_a,4,2 .local saved_ticks .comm saved_ticks,4,2 + .local assigning + .comm assigning,4,2 + .local wav_in_project + .comm wav_in_project,4,2 + .local wav_in + .comm wav_in,4,2 + .local wav_result + .comm wav_result,4,2 .local saved_in .comm saved_in,4,2 .local saved_result From ae69ad6d1d3df3c60cb6072e40d9221ea63df87a Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 21:44:35 +0100 Subject: [PATCH 19/43] Bounce In Place 0.4.0: BOUNCES folder and trig key lamps worked in the developer's unit trial, as reported Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/TESTING.md | 4 +++- sdk/drafts/bounce/octamod.module.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index c09a7935c0..cd1dc34785 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -188,7 +188,9 @@ Not tested in 0.4.0: the lamps on a unit (MKII or MKI), by eye; another module l | Project save | PROJECT > SAVE, YES | `project.work` and `project.strd`: `PATH=BOUNCES/B1-261203-2012.wav` and `PATH=BOUNCES/B2-261203-2012.wav` | | Reload | PROJECT > RELOAD, YES | the track showed `B2-…-2012` again once loaded | -Not tested: a project that was never saved (`/AUDIO/BOUNCES/`), USB disk mode during a save (stock's folder call is a stub then, so it should read NOT SAVED), and all of it on a unit. +**3 December 2026, on the unit, as reported by the developer.** The developer's MKII, OS 1.40C, base `ddb56b72`, a RAM trial of package `cc70165ee9ed5364a3034a276af2ddbc6a1b1b9920fffc3ff733c8a56b4f6a98` through `npm run module:dev -- bounce`, USB disk mode off, never kept. The developer reported that everything worked, that the WAVs were saved into the project's `BOUNCES` folder, and that the trig key lamps were as designed. The trial's readout showed no refusals over about 270 s. The agent did not see the card or the unit itself. + +Not tested: a project that was never saved (`/AUDIO/BOUNCES/`), USB disk mode during a save (stock's folder call is a stub then, so it should read NOT SAVED), a project save and power cycle after a bounce on this package, and the test procedure's unit steps and CPU reading on this package. ## The 0.4.0 test procedure on the unit diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index a085eac188..f8b92434cc 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -39,7 +39,7 @@ "key:TRIG@BOUNCE" ], "limitations": [ - "Experimental: 0.4.0 (package 22e9087c) passed the test procedure's unit steps on one MKII, a development twin in RAM (bounce, merge and RESET TRACK each undone, no restart); its trig key lamps are not yet checked by eye. Saving into the project's BOUNCES folder came after that run and has run in the emulator only. 0.3.0 ran on its developer's MKII, as reported.", + "Experimental: 0.4.0 (package 22e9087c) passed the test procedure's unit steps on one MKII, a development twin in RAM (bounce, merge and RESET TRACK each undone, no restart); saving into the project's BOUNCES folder came after that run. Package cc70165e, with the BOUNCES folder and the trig key lamps, worked in its developer's RAM trial on the same MKII, as reported. 0.3.0 ran on its developer's MKII, as reported.", "The WAV is saved at once, but the track only keeps pointing to it after you save the project (as stock's own SAVE THIS RECORDING).", "A full card: BOUNCE says NOT SAVED and the take stays in the recorder buffer; save it from the Audio Editor.", "A pass longer than 64 master steps (4 bars at 1X) is refused.", From 72517c2d3f50ce583da6cbfb352fa8c929d7670e Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 22:00:26 +0100 Subject: [PATCH 20/43] Bounce In Place 0.4.0: a popup says to pick FLEX after a Grain or synth bounce; SAVE TO NEW keeps BOUNCES Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/CHANGELOG.json | 2 +- sdk/drafts/bounce/README.md | 4 +- sdk/drafts/bounce/TESTING.md | 12 + sdk/drafts/bounce/bounce.c | 27 +- sdk/drafts/bounce/unit.s | 656 +++++++++++++++++-------------- 5 files changed, 398 insertions(+), 303 deletions(-) diff --git a/sdk/drafts/bounce/CHANGELOG.json b/sdk/drafts/bounce/CHANGELOG.json index f1b2e21f81..7f2f77d6c7 100644 --- a/sdk/drafts/bounce/CHANGELOG.json +++ b/sdk/drafts/bounce/CHANGELOG.json @@ -7,7 +7,7 @@ "While BOUNCE is open or armed, trig keys 1-8 light up: red for the track you bounce into, green for merged tracks, yellow for the ones you can add.", "Bounces are always saved in the project's own BOUNCES folder, whatever SAVE SAMPLES TO says.", "If the WAV can't be saved (a full card), BOUNCE says so until you press a key: the take stays in the buffer, save it in the Audio Editor.", - "0.3.0 ran on its developer's MKII: bounce, merge, WAV save, RESET TRACK and UNDO worked." + "After bouncing a Grain or synth track, a popup tells you to pick FLEX for it (FUNC+SRC) until you press a key." ] }, { diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index 9c13b7110e..9f5865d3b8 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -18,7 +18,7 @@ Category: **system**. It rewrites a track's Part and pattern when the musician a | YES, while BOUNCE is open | Arms the take: it starts with the next pattern start. Refused, with the reason, when the pass is over 64 steps, T8 is merged or chosen while MASTER TRACK is on, a merged track's cue level is 0, or the recorder is busy. | | NO, while BOUNCE is open | Closes BOUNCE and changes nothing; cancels an armed or running take. | | FUNC+PART > BOUNCE > RESET TRACK | Asks first, then makes the active track a STATIC track with a fresh project's settings (FX1 FILTER, FX2 DELAY, stock AMP, LFO, playback and recorder setup, its own slots), no trigs and no locks. Its length and scale stay. A Grain or synth track: pick STATIC in the machine chooser first. | -| After bouncing a Grain or synth track | The take is in, and the bottom line reads BOUNCED: T*n* PICK FLEX. Pick FLEX for that track in the machine chooser: Bounce then makes it play the take. Until then the machine plays on unchanged. | +| After bouncing a Grain or synth track | The take is in, and a popup reads TAKE RECORDED, NOW PICK FLEX FOR T*n*, FUNC+SRC, FLEX, YES. Any key closes it; FUNC and SRC go straight on to the chooser. The bottom line then reads BOUNCED: T*n* PICK FLEX until you do. Pick FLEX for that track in the machine chooser: Bounce then makes it play the take. Until then the machine plays on unchanged. | | FUNC+PART > BOUNCE > UNDO | Restores the last bounce's or reset's track: machine, FX, every page, slots, trigs, locks, and the merged tracks' mutes. | BOUNCE shows the merge as inverted track names and on trig keys 1-8 (the active track red, merged tracks green, every other track you can tap yellow; T8 dark while MASTER TRACK is on) until the take ends, then PRESS PLAY, WAITS FOR PATTERN START or RECORDING ONE PASS, and at the end BOUNCED, SAVED AS with the file's name, or the reason it refused. While stock writes the WAV, its own screens show. @@ -66,7 +66,7 @@ It has no code in the frame interrupt (no detour, no `rests` hook), so there is 0.3.0 ran on its developer's MKII in a RAM trial; 0.4.0 adds the trig key lamps ([TESTING.md](TESTING.md)). Its limits: - **A full card.** When the WAV can't be written (stock shows its own error, or no answer comes within 30 s), BOUNCE reads NOT SAVED: TAKE IN BUFFER / SAVE IT IN AUDIO EDITOR until you press a key. The track still plays the take from its recorder buffer: free some space, then save it from the Audio Editor (AED) before a power cycle empties the buffer. -- **Where the WAV goes.** Always `/BOUNCES/`, whatever SAVE SAMPLES TO says, so bounces stay with their project and out of the set's shared AUDIO pool. The project records it as `BOUNCES/.wav`. A project that was never saved has no folder yet; its bounces go to `/AUDIO/BOUNCES/`. +- **Where the WAV goes.** Always `/BOUNCES/`, whatever SAVE SAMPLES TO says, so bounces stay with their project and out of the set's shared AUDIO pool. The project records it as `BOUNCES/.wav`. A project that was never saved has no folder yet; its bounces go to `/AUDIO/BOUNCES/`. PROJECT > SAVE TO NEW copies the `BOUNCES` folder into the new project, so the takes come along. - **The WAV needs a project save.** The file is written at once, but the project names it only after you save the project, as with stock's SAVE THIS RECORDING. A power cycle before that leaves the WAV on the card and the buffer empty. - **Passes over 64 master steps.** RLEN counts at most 64 master 16ths (4 bars at 1X), so a longer pass is refused with PASS OVER 64 STEPS. - **Trig key lamps.** While the sequencer plays, stock redraws the trig keys each step; Bounce redraws its lamps on the next UI tick, so a key may flicker for up to 1/60 s. diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index cd1dc34785..afdd646179 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -192,6 +192,18 @@ Not tested in 0.4.0: the lamps on a unit (MKII or MKI), by eye; another module l Not tested: a project that was never saved (`/AUDIO/BOUNCES/`), USB disk mode during a save (stock's folder call is a stub then, so it should read NOT SAVED), a project save and power cycle after a bounce on this package, and the test procedure's unit steps and CPU reading on this package. +### The PICK FLEX popup, and PROJECT > SAVE TO NEW + +**3 December 2026, emulator only** (`ot_emu`, the twin, MKII), package `1dcee07b1f0faaaba282132bf362ca4fca137b91928c8f30609842c3b339a565` (`1dcee07b`). Not hardware evidence. + +| What | Steps | Seen | +| --- | --- | --- | +| A bounce with this build | T1, DOWN+REC, YES, PLAY | BOUNCED, SAVED AS `B1-261203-2156`, in `BOUNCE/BOUNCES/` | +| SAVE TO NEW | stopped, PROJECT > SAVE TO NEW, a new name, YES | SYNCING PROJECT, SAVING AS NEW, THE NEW PROJECT IS NOW ACTIVE. The new project folder has its own `BOUNCES/` holding `B1-261203-2156.wav` (byte for byte the same as the original) and its `.ot`, and its `project.work` names `PATH=BOUNCES/B1-261203-2156.wav` | +| FUNC+SRC | T2, FUNC+SRC | SRC SETUP opens on the MACHINE list (STATIC, FLEX, THRU, NEIGHBOR, PICKUP): the gesture the popup names | + +Not tested: the popup itself. Only a Grain or synth track reaches it, and the emulator has none, so it waits for the unit. Not tested either: reloading the new project. + ## The 0.4.0 test procedure on the unit **3 December 2026, the developer's MKII.** OS 1.40C. The development twin `4813a3e5` was RAM-booted with the developer's OK, never flashed; a power cycle returns the unit to release base `ddb56b72`. Source revision `9f17972c1`, clean tree. Package `bounce.mwrm`, SHA-256 `22e9087cf901cbd5368e17e1dcfc71e5c8d686faaed96e833741ba199478c00d` (`22e9087c`). The developer's own project was loaded. Bank A's Part 1 had unsaved changes and was left alone. The run used bank B, pattern B01, Part 1, whose working copy equalled its saved one (preflight: ready). Nothing was kept and the project was never saved. diff --git a/sdk/drafts/bounce/bounce.c b/sdk/drafts/bounce/bounce.c index 2aa3072200..1b5e59920e 100644 --- a/sdk/drafts/bounce/bounce.c +++ b/sdk/drafts/bounce/bounce.c @@ -145,7 +145,8 @@ #define TAKE_WORD 0xc010u /* start, SRC3 (free-loop's take word) */ #define STOP_WORD 0x80u -enum { CLOSED, SELECT, ARMED, RECORDING, MESSAGE, WAIT_PLAY, PICK_FLEX, CONFIRM_RESET, SAVING }; +enum { CLOSED, SELECT, ARMED, RECORDING, MESSAGE, WAIT_PLAY, PICK_FLEX, CONFIRM_RESET, SAVING, PICK_INFO }; +#define PICKING (phase == PICK_FLEX || phase == PICK_INFO) /* waits for FLEX: the popup, then the strip */ /* A track's own bytes in its Part, in this order: what Bounce and RESET TRACK * change and UNDO puts back (PARTS.md; ot_project.py, ot_spec.py). */ @@ -353,7 +354,7 @@ static void open_select(void) { struct ctx c; if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY || phase == SAVING) return; - if (phase == PICK_FLEX) phase = CLOSED; /* the take stays in the recorder buffer, nothing else changed */ + if (PICKING) phase = CLOSED; /* the take stays in the recorder buffer, nothing else changed */ if (!current(&c)) { show("AUDIO TRACKS ONLY"); return; } copy_ctx(&arm, &c); arm.merged = (uint8_t)(1u << c.track); phase = SELECT; message = 0; redraw(); @@ -515,7 +516,7 @@ static void finish(void) for (unsigned i = 0; i < 12u; ++i) part_buf[P_REC + 12u * t + i] = part_copy[P_REC + 12u * t + i]; call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, arm.part); if (U32(MUTES) != arm.mutes) set_mutes(arm.mutes); - phase = PICK_FLEX; message = 0; redraw(); + phase = PICK_INFO; message = 0; redraw(); /* a popup says what to do, until a key */ return; } apply_clip(); @@ -567,7 +568,7 @@ static void open_reset(void) { struct ctx c; if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY || phase == SAVING) return; - if (phase == PICK_FLEX) phase = CLOSED; + if (PICKING) phase = CLOSED; if (!current(&c)) { show("AUDIO TRACKS ONLY"); return; } copy_ctx(&arm, &c); arm.merged = (uint8_t)(1u << c.track); phase = CONFIRM_RESET; message = 0; redraw(); @@ -577,7 +578,7 @@ static void undo(void) { struct ctx now; if (phase == ARMED || phase == RECORDING || phase == WAIT_PLAY || phase == SAVING) return; - if (phase == PICK_FLEX) { show("TAKE LEFT IN BUFFER"); return; } + if (PICKING) { show("TAKE LEFT IN BUFFER"); return; } if (!undo_ready) { show("NOTHING TO UNDO"); return; } if (!current(&now) || !same_place(&now, &last)) { show("UNDO: OPEN ITS PATTERN"); return; } unsigned t = last.track; @@ -636,7 +637,7 @@ void module_tick(struct modwerk_runtime_api *api) } else if (phase == RECORDING) { if (!U32(TRANSPORT)) cancel("STOPPED - NO BOUNCE"); else if (!recording(arm.track)) finish(); - } else if (phase == PICK_FLEX) pick_tick(); + } else if (PICKING) pick_tick(); else if (phase == SAVING) saving_tick(); else if (phase == MESSAGE && !sticky && ++shown_ticks > 90u) close_view(); lamps(); @@ -656,7 +657,10 @@ int module_key(int code, int pressed) } if (*consumed & bit) return 1; if (phase == SAVING) return 0; /* stock's save owns the screen */ - if (phase == CLOSED || phase == PICK_FLEX) { /* PICK FLEX leaves every key to the chooser */ + if (phase == PICK_INFO) { /* any key closes the popup; the strip stays until FLEX */ + phase = PICK_FLEX; redraw(); + if (code != K_YES && code != K_NO) return 0; /* FUNC, SRC ... go on to stock */ + } else if (phase == CLOSED || phase == PICK_FLEX) { /* PICK FLEX leaves every key to the chooser */ if (code != K_REC || !held(K_DOWN)) return 0; open_select(); } else if (phase == CONFIRM_RESET) { @@ -749,6 +753,15 @@ void module_draw(unsigned char *frame) if (message2) text(frame, 10, 35, message2); return; } + if (phase == PICK_INFO) { + char line[24]; + line[0] = 0; append(line, "NOW PICK FLEX FOR T"); line[19] = (char)('1' + arm.track); line[20] = 0; + text(frame, 10, 24, "TAKE RECORDED"); + text(frame, 10, 31, line); + text(frame, 10, 38, "FUNC+SRC, FLEX, YES"); + text(frame, 10, 45, "ANY KEY: OK"); + return; + } if (phase == CONFIRM_RESET) { text(frame, 10, 24, "STOCK STATIC TRACK"); text(frame, 10, 31, "NO TRIGS, NO LOCKS"); diff --git a/sdk/drafts/bounce/unit.s b/sdk/drafts/bounce/unit.s index 8aa4fe3f27..7d90c5e06e 100644 --- a/sdk/drafts/bounce/unit.s +++ b/sdk/drafts/bounce/unit.s @@ -98,7 +98,7 @@ write_span: move.l %a2,-(%sp) move.l 20(%sp),%a1 #APP -| 311 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 312 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %sr,%d0 move.w #0x2700,%sr | 0 "" 2 @@ -114,7 +114,7 @@ write_span: cmp.l 24(%sp),%a0 jne .L13 #APP -| 313 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 314 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %d0,%sr | 0 "" 2 #NO_APP @@ -222,18 +222,21 @@ close_view: .align 2 .type open_select, @function open_select: - move.l phase,%d0 - moveq #8,%d1 + move.l phase,%d1 + moveq #9,%d0 lea (-12,%sp),%sp move.l %a6,-(%sp) - cmp.l %d0,%d1 + cmp.l %d1,%d0 jcs .L24 - move.l #-301,%d1 - btst %d0,%d1 - jeq .L23 - subq.l #6,%d0 + moveq #1,%d0 + lsl.l %d1,%d0 + move.l %d0,%d1 + and.l #300,%d1 + tst.l %d1 + jne .L23 + and.l #576,%d0 tst.l %d0 - jne .L24 + jeq .L24 clr.l phase .L24: lea (4,%sp),%a6 @@ -505,7 +508,7 @@ copy.constprop.0: set_mutes: move.l 4(%sp),%d0 #APP -| 287 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 288 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %sr,%d1 move.w #0x2700,%sr | 0 "" 2 @@ -513,7 +516,7 @@ set_mutes: move.l %d0,-2147483640 move.l %d0,269161684 #APP -| 289 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 290 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 move.w %d1,%sr | 0 "" 2 #NO_APP @@ -1117,18 +1120,21 @@ bounce_choose: movem.l #17412,(%sp) cmp.l %d0,%d1 jne .L147 - move.l phase,%d0 - moveq #8,%d1 - cmp.l %d0,%d1 + move.l phase,%d1 + moveq #9,%d0 + cmp.l %d1,%d0 jcs .L148 - move.l #-301,%d1 - btst %d0,%d1 - jeq .L146 - subq.l #6,%d0 + moveq #1,%d0 + lsl.l %d1,%d0 + move.l %d0,%d1 + and.l #300,%d1 + tst.l %d1 + jne .L146 + and.l #576,%d0 tst.l %d0 - jne .L148 - move.l #.LC10,%d0 - move.l %d0,32(%sp) + jeq .L148 + move.l #.LC10,%d1 + move.l %d1,32(%sp) .L169: movem.l (%sp),#17412 lea (28,%sp),%sp @@ -1136,8 +1142,8 @@ bounce_choose: .L148: tst.l undo_ready jne .L150 - move.l #.LC11,%d1 - move.l %d1,32(%sp) + move.l #.LC11,%d0 + move.l %d0,32(%sp) jra .L169 .L150: move.l %sp,%d2 @@ -1172,8 +1178,8 @@ bounce_choose: add.l #585088,%a0 mulu.w #6322,%d0 add.l %d0,%a0 - move.b 34(%a0,%d2.l),%d0 - move.b %d0,15(%sp) + move.b 34(%a0,%d2.l),%d1 + move.b %d1,15(%sp) move.l %a0,-(%sp) jsr (copy.constprop.0) pea 1.w @@ -1209,16 +1215,19 @@ bounce_choose: .L147: tst.l %d0 jeq .L155 - move.l phase,%d0 - moveq #8,%d1 - cmp.l %d0,%d1 + move.l phase,%d1 + moveq #9,%d0 + cmp.l %d1,%d0 jcs .L156 - move.l #-301,%d1 - btst %d0,%d1 - jeq .L146 - subq.l #6,%d0 + moveq #1,%d0 + lsl.l %d1,%d0 + move.l %d0,%d1 + and.l #300,%d1 + tst.l %d1 + jne .L146 + and.l #576,%d0 tst.l %d0 - jne .L156 + jeq .L156 clr.l phase .L156: move.l %sp,%d2 @@ -1241,11 +1250,11 @@ bounce_choose: moveq #1,%d0 lea (12,%sp),%sp lsl.l %d1,%d0 - moveq #1,%d1 + moveq #7,%d1 + move.l %d1,phase move.b %d0,arm+7 - moveq #7,%d0 - move.l %d0,phase - move.l %d1,1187497772 + moveq #1,%d0 + move.l %d0,1187497772 jra .L146 .L155: movem.l (%sp),#17412 @@ -1362,7 +1371,7 @@ module_tick: .L188: move.w #1,%a6 moveq #1,%d4 -.L212: +.L213: move.l #1175169472,-(%sp) jsr 1073744372 clr.l %d3 @@ -1372,21 +1381,21 @@ module_tick: clr.l %d0 move.b (%a0),51(%sp) addq.l #4,%sp -.L224: +.L225: move.l %d0,%a4 add.l #1175169420,%a4 move.b (%a4),%d2 tst.b 47(%sp) - jeq .L214 + jeq .L215 mvz.b (%a2,%d0.l),%d5 mvz.b %d2,%d1 cmp.l %d1,%d5 - jeq .L215 -.L214: - move.b %d2,(%a3,%d0.l) + jeq .L216 .L215: + move.b %d2,(%a3,%d0.l) +.L216: tst.l %d4 - jeq .L216 + jeq .L217 mvz.b arm+6,%d1 move.l %d0,%d6 sub.l %a0,%a0 @@ -1395,15 +1404,15 @@ module_tick: move.l %d1,48(%sp) clr.b %d1 move.l %d6,%a1 -.L221: +.L222: cmp.l 48(%sp),%a1 - jne .L217 + jne .L218 moveq #1,%d7 -.L253: +.L257: move.l %a0,%d6 lsl.l %d6,%d7 or.l %d7,%d1 - jra .L218 + jra .L219 .L187: moveq #2,%d7 cmp.l %d0,%d7 @@ -1426,9 +1435,9 @@ module_tick: tst.l -2147457608 jne .L191 pea .LC14 -.L254: +.L258: jsr cancel -.L250: +.L254: addq.l #4,%sp jra .L192 .L191: @@ -1455,7 +1464,7 @@ module_tick: jne .L194 .L193: pea .LC15 - jra .L254 + jra .L258 .L194: move.l %d2,%d0 add.l #296877961,%d0 @@ -1464,7 +1473,7 @@ module_tick: tst.l (%a0) jne .L196 pea .LC16 - jra .L254 + jra .L258 .L196: mvz.b arm+5,%d0 move.l (%a2),%d3 @@ -1476,7 +1485,7 @@ module_tick: jsr modwerk_machine addq.l #8,%sp tst.l %d0 - jeq .L251 + jeq .L255 mulu.w #12,%d2 move.l %d3,-(%sp) jsr (copy.constprop.0) @@ -1505,7 +1514,7 @@ module_tick: jsr set_mutes addq.l #4,%sp .L199: - moveq #6,%d2 + moveq #9,%d2 moveq #1,%d6 move.l %d2,phase clr.l message @@ -1514,14 +1523,18 @@ module_tick: move.l phase,%d0 moveq #3,%d6 cmp.l %d0,%d6 - jcs .L211 + jcs .L212 tst.l %d0 - jeq .L210 + jeq .L211 jra .L188 .L190: moveq #6,%d7 cmp.l %d0,%d7 - jne .L200 + jeq .L200 + moveq #9,%d1 + cmp.l %d0,%d1 + jne .L201 +.L200: lea arm,%a2 move.l %sp,%d4 add.l #52,%d4 @@ -1531,18 +1544,18 @@ module_tick: jsr current addq.l #4,%sp tst.l %d0 - jeq .L201 + jeq .L202 move.l %a2,-(%sp) move.l %d4,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L202 -.L201: + jne .L203 +.L202: pea .LC10 jsr show - jra .L250 -.L202: + jra .L254 +.L203: mvz.b %d3,%d3 mvz.b arm+6,%d0 move.l %d2,%a0 @@ -1552,129 +1565,129 @@ module_tick: mvz.b 34(%a0,%d0.l),%d1 subq.l #1,%d1 tst.l %d1 - jne .L201 + jne .L202 move.l %d0,-(%sp) move.l %a0,-(%sp) jsr modwerk_machine addq.l #8,%sp tst.l %d0 jne .L192 -.L251: +.L255: jsr apply_clip jsr save_take jra .L192 -.L200: +.L201: moveq #8,%d6 cmp.l %d0,%d6 - jne .L204 + jne .L205 tst.l saved_in - jeq .L205 + jeq .L206 jsr save_done_restore tst.l saved_result - jge .L206 -.L252: + jge .L207 +.L256: jsr not_saved jra .L192 -.L206: +.L207: pea .LC17 move.l #wav_name,%d7 jsr show move.l %d7,message2 - jra .L250 -.L205: + jra .L254 +.L206: tst.l wav_in - jeq .L207 + jeq .L208 tst.l assigning - jne .L207 + jne .L208 moveq #1,%d0 move.l %d0,assigning tst.l wav_result - jge .L208 -.L209: + jge .L209 +.L210: jsr save_done_restore - jra .L252 -.L208: + jra .L256 +.L209: move.l #-2147483484,%a2 move.l (%a2),%d2 move.l wav_in_project,(%a2) clr.l -(%sp) jsr 1073889608 move.l %d2,(%a2) - jra .L250 -.L207: + jra .L254 +.L208: move.l saved_ticks,%d0 addq.l #1,%d0 move.l %d0,saved_ticks cmp.l #1800,%d0 - jhi .L209 -.L210: + jhi .L210 +.L211: tst.b lamps_on.l - jeq .L213 + jeq .L214 clr.l %d4 sub.l %a6,%a6 - jra .L212 -.L204: + jra .L213 +.L205: subq.l #4,%d0 tst.l %d0 jne .L192 tst.l sticky - jne .L210 + jne .L211 move.l shown_ticks,%d0 addq.l #1,%d0 move.l %d0,shown_ticks moveq #90,%d2 cmp.l %d0,%d2 - jcc .L210 + jcc .L211 jsr close_view jra .L192 -.L211: +.L212: subq.l #5,%d0 tst.l %d0 - jne .L210 + jne .L211 jra .L188 -.L226: +.L227: moveq #1,%d0 - jra .L224 -.L217: + jra .L225 +.L218: move.l %a1,%d7 btst %d7,%d5 - jeq .L219 + jeq .L220 moveq #2,%d6 move.l %a0,%d7 lsl.l %d7,%d6 or.l %d6,%d1 -.L218: +.L219: addq.l #1,%a1 addq.l #2,%a0 moveq #8,%d7 cmp.l %a0,%d7 - jne .L221 + jne .L222 move.l %d0,%a0 add.l #1175169454,%a0 move.b (%a0),%d5 eor.l %d5,%d1 -.L222: +.L223: mvz.b %d2,%d2 mvz.b %d1,%d5 cmp.l %d2,%d5 - jeq .L223 + jeq .L224 move.b %d1,(%a4) moveq #1,%d3 -.L223: +.L224: move.b %d1,(%a2,%d0.l) subq.l #1,%d0 tst.l %d0 - jne .L226 + jne .L227 tst.l %d3 - jeq .L225 + jeq .L226 jsr 1073821352 -.L225: +.L226: move.w %a6,%d2 move.l #1175169472,-(%sp) jsr 1073744564 addq.l #4,%sp move.b %d2,lamps_on -.L213: +.L214: mvz.b arm+6,%d0 moveq #24,%d6 moveq #9,%d7 @@ -1706,18 +1719,18 @@ module_tick: move.l %d0,(%a0) lea (64,%sp),%sp rts -.L219: +.L220: moveq #7,%d6 cmp.l %a1,%d6 - jne .L220 + jne .L221 tst.b -2147483596.l - jne .L218 -.L220: + jne .L219 +.L221: moveq #3,%d7 - jra .L253 -.L216: + jra .L257 +.L217: move.b (%a3,%d0.l),%d1 - jra .L222 + jra .L223 .size module_tick, .-module_tick .section .rodata.str1.1 .LC18: @@ -1749,13 +1762,13 @@ module_key: move.l 8(%fp),%d4 move.l 12(%fp),%d0 cmp.l %d4,%d1 - jcs .L256 + jcs .L260 moveq #31,%d2 cmp.l %d4,%d2 - jlt .L257 + jlt .L261 move.l consumed_lo,%d1 lea consumed_lo,%a2 -.L258: +.L262: moveq #31,%d2 moveq #1,%d3 and.l %d4,%d2 @@ -1763,74 +1776,85 @@ module_key: move.l %d1,%d2 and.l %d3,%d2 tst.l %d0 - jne .L259 + jne .L263 tst.l %d2 - jeq .L260 + jeq .L264 not.l %d3 and.l %d1,%d3 move.l %d3,(%a2) -.L261: +.L265: moveq #1,%d0 -.L260: - movem.l -52(%fp),#3324 - unlk %fp - rts -.L257: + jra .L264 +.L261: move.l consumed_hi,%d1 lea consumed_hi,%a2 - jra .L258 -.L259: + jra .L262 +.L263: tst.l %d2 - jne .L261 + jne .L265 move.l phase,%d0 moveq #8,%d1 cmp.l %d0,%d1 - jeq .L256 + jeq .L260 + moveq #9,%d1 + cmp.l %d0,%d1 + jne .L266 + moveq #6,%d2 + moveq #1,%d0 + move.l %d2,phase + move.l %d0,1187497772 + add.l #-49,%d4 + move.l %d4,-20(%fp) +.L334: + cmp.l %d4,%d0 + jcc .L267 + jra .L260 +.L266: tst.l %d0 - jeq .L262 + jeq .L268 moveq #6,%d1 cmp.l %d0,%d1 - jne .L263 -.L262: + jne .L269 +.L268: moveq #41,%d2 cmp.l %d4,%d2 - jne .L256 + jne .L260 move.b 1175456540,%d0 btst #0,%d0 - jeq .L256 + jeq .L260 jsr open_select -.L264: +.L267: or.l %d3,(%a2) - jra .L261 -.L263: + jra .L265 +.L269: moveq #7,%d1 cmp.l %d0,%d1 - jne .L265 + jne .L270 moveq #49,%d2 cmp.l %d4,%d2 - jne .L266 + jne .L271 move.l %fp,%d6 add.l #-12,%d6 move.l %d6,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L278 + jeq .L283 move.b -6(%fp),%d5 mvz.b arm+6,%d0 mvz.b %d5,%d2 cmp.l %d2,%d0 - jne .L278 + jne .L283 pea arm move.l %d6,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L268 -.L278: + jne .L273 +.L283: pea .LC18 - jra .L328 -.L268: + jra .L335 +.L273: mvz.b -7(%fp),%d0 move.l #585088,%a0 move.l -12(%fp),%a3 @@ -1844,24 +1868,24 @@ module_key: addq.l #8,%sp move.l %d0,%d4 tst.l %d0 - jeq .L270 + jeq .L275 pea .LC19 -.L328: +.L335: jsr show -.L329: +.L337: addq.l #4,%sp - jra .L264 -.L270: + jra .L267 +.L275: move.w %d2,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L271 -.L330: + jeq .L276 +.L336: pea .LC20 - jra .L328 -.L271: + jra .L335 +.L276: moveq #1,%d0 lsl.l %d2,%d0 move.l #-2147483640,%a1 @@ -1906,12 +1930,12 @@ module_key: lea record_new,%a0 clr.l %d0 move.l %a0,%d1 -.L272: +.L277: clr.b %d2 move.b %d2,(%a0,%d0.l) addq.l #1,%d0 cmp.l #2330,%d0 - jne .L272 + jne .L277 st %d0 lea record_copy+80,%a1 move.w (%a1),record_new+80 @@ -1920,12 +1944,12 @@ module_key: move.l %a0,record_new+68 lea record_new+89,%a0 move.b %d0,record_new+83 -.L273: +.L278: st %d2 addq.l #1,%d4 move.b %d2,-1(%a0,%d4.l) cmp.l #2048,%d4 - jne .L273 + jne .L278 lea record_copy+2329,%a0 move.b (%a0),record_new+2329 move.l %d1,-(%sp) @@ -1940,81 +1964,82 @@ module_key: move.l %d0,undo_ready jsr show lea (24,%sp),%sp - jra .L264 -.L266: + jra .L267 +.L271: moveq #50,%d1 cmp.l %d4,%d1 - jne .L256 -.L292: + jne .L260 +.L297: jsr close_view - jra .L264 -.L265: + jra .L267 +.L270: moveq #1,%d1 cmp.l %d0,%d1 - jne .L274 - moveq #7,%d1 - cmp.l %d4,%d1 - jlt .L275 - mvz.b arm+6,%d1 - cmp.l %d4,%d1 - jeq .L276 + jne .L279 + moveq #7,%d0 + cmp.l %d4,%d0 + jlt .L280 + mvz.b arm+6,%d0 + cmp.l %d4,%d0 + jeq .L281 + moveq #1,%d0 move.b arm+7,%d1 lsl.l %d4,%d0 eor.l %d1,%d0 move.b %d0,arm+7 -.L276: - moveq #1,%d2 - move.l %d2,1187497772 - jra .L264 -.L275: +.L281: + moveq #1,%d1 + move.l %d1,1187497772 + jra .L267 +.L280: moveq #49,%d0 cmp.l %d4,%d0 - jne .L277 + jne .L282 move.l %fp,%d4 add.l #-12,%d4 move.l %d4,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L278 + jeq .L283 pea arm move.l %d4,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L278 + jeq .L283 move.b arm+6,%d6 mvz.b -6(%fp),%d0 mvz.b %d6,%d4 cmp.l %d0,%d4 - jne .L278 + jne .L283 pea -16(%fp) jsr (pass_steps.constprop.0) addq.l #4,%sp move.l %d0,%d7 tst.l %d0 - jne .L281 + jne .L286 pea .LC22 - jra .L328 -.L281: + jra .L335 +.L286: move.b arm+7,%d5 tst.b -2147483596.l - jne .L282 -.L285: + jne .L287 +.L290: moveq #1,%d0 lsl.l %d4,%d0 mvz.b %d5,%d5 mvz.b %d0,%d0 move.l %d0,-20(%fp) cmp.l %d5,%d0 - jne .L287 -.L284: + jne .L292 +.L289: move.w %d4,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jne .L330 + jne .L336 mvz.b arm+5,%d0 move.l #-2147483640,%a1 subq.l #1,%d7 @@ -2051,9 +2076,9 @@ module_key: clr.w (%a0) move.b %d7,2(%a0) cmp.l -20(%fp),%d5 - jne .L295 + jne .L300 addq.l #1,%d6 -.L289: +.L294: clr.b %d0 move.b %d6,4(%a0) move.b %d0,9(%a0) @@ -2063,7 +2088,7 @@ module_key: jsr 1073912396 addq.l #8,%sp cmp.l -20(%fp),%d5 - jeq .L290 + jeq .L295 mvz.b arm+7,%d0 move.l arm+8,%d1 swap %d0 @@ -2073,46 +2098,46 @@ module_key: move.l %d1,-(%sp) jsr set_mutes addq.l #4,%sp -.L290: +.L295: move.l %d4,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 clr.l (%a0) tst.l -2147457608 - jeq .L296 + jeq .L301 pea 1.w move.l #49168,-(%sp) move.l %d4,-(%sp) jsr 1073762680 lea (12,%sp),%sp moveq #2,%d0 -.L291: +.L296: move.l %d0,phase moveq #1,%d0 move.l %d0,1187497772 - jra .L264 -.L282: + jra .L267 +.L287: tst.b %d5 - jge .L285 + jge .L290 pea .LC23 - jra .L328 -.L286: + jra .L335 +.L291: move.l %d1,%d2 moveq #8,%d0 cmp.l %d1,%d0 - jeq .L284 -.L287: + jeq .L289 +.L292: move.l %d2,%d1 addq.l #1,%d1 btst %d2,%d5 - jeq .L286 + jeq .L291 mvz.w %d2,%d0 add.l %d0,%d0 move.l %d0,%a0 add.l #-2147480495,%a0 tst.b (%a0) - jne .L286 + jne .L291 clr.b %d1 pea .LC24 move.l #note,%d4 @@ -2130,43 +2155,45 @@ module_key: move.l %d4,-(%sp) jsr show lea (20,%sp),%sp - jra .L264 -.L295: + jra .L267 +.L300: moveq #10,%d6 - jra .L289 -.L296: + jra .L294 +.L301: moveq #5,%d0 - jra .L291 -.L277: + jra .L296 +.L282: moveq #50,%d1 cmp.l %d4,%d1 - jeq .L292 + jeq .L297 jsr close_view -.L256: +.L260: clr.l %d0 - jra .L260 -.L274: +.L264: + movem.l -52(%fp),#3324 + unlk %fp + rts +.L279: move.l %d0,%d1 subq.l #2,%d1 lsr.l #1,%d1 - jeq .L293 + jeq .L298 subq.l #5,%d0 tst.l %d0 - jne .L294 -.L293: + jne .L299 +.L298: moveq #50,%d2 cmp.l %d4,%d2 - jne .L256 + jne .L260 pea .LC26 jsr cancel - jra .L329 -.L294: - add.l #-49,%d4 + jra .L337 +.L299: jsr close_view + add.l #-49,%d4 move.l %d4,-20(%fp) - lsr.l #1,%d4 - jne .L256 - jra .L264 + moveq #1,%d0 + jra .L334 .size module_key, .-module_key .align 2 .globl module_enc @@ -2211,20 +2238,28 @@ module_enc: .LC37: .string "RESET T" .LC38: - .string "STOCK STATIC TRACK" + .string "NOW PICK FLEX FOR T" .LC39: - .string "NO TRIGS, NO LOCKS" + .string "TAKE RECORDED" .LC40: - .string "YES: RESET NO: BACK" + .string "FUNC+SRC, FLEX, YES" .LC41: - .string "PASS " + .string "ANY KEY: OK" .LC42: - .string "OVER 64 STEPS" + .string "STOCK STATIC TRACK" .LC43: - .string "TRIG 1-8: MERGE" + .string "NO TRIGS, NO LOCKS" .LC44: - .string "YES: REC NO: CLOSE" + .string "YES: RESET NO: BACK" .LC45: + .string "PASS " +.LC46: + .string "OVER 64 STEPS" +.LC47: + .string "TRIG 1-8: MERGE" +.LC48: + .string "YES: REC NO: CLOSE" +.LC49: .string "NO: CANCEL" .text .align 2 @@ -2238,16 +2273,16 @@ module_draw: move.l %a5,%d0 and.l %d1,%d0 tst.l %d0 - jeq .L332 + jeq .L339 tst.l 8(%fp) - jeq .L332 + jeq .L339 lea append,%a3 moveq #6,%d4 lea fill,%a4 lea text,%a2 move.l #invert,%d3 cmp.l %a5,%d4 - jne .L334 + jne .L341 clr.b %d0 pea .LC34 move.l %fp,%d2 @@ -2284,11 +2319,11 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a0) lea (36,%sp),%sp -.L332: +.L339: movem.l -68(%fp),#15388 unlk %fp rts -.L334: +.L341: clr.l -(%sp) moveq #7,%d4 pea 44.w @@ -2341,7 +2376,7 @@ module_draw: move.b %d0,-28(%fp) move.b %d1,-27(%fp) cmp.l %a5,%d4 - jne .L335 + jne .L342 pea .LC37 move.l %d2,-(%sp) move.b %d1,-36(%fp) @@ -2352,7 +2387,7 @@ module_draw: move.b %d0,-29(%fp) clr.b %d0 move.b %d0,-28(%fp) -.L336: +.L343: move.l %d2,-(%sp) pea 13.w pea 10.w @@ -2369,12 +2404,12 @@ module_draw: move.l phase,%d0 moveq #4,%d1 cmp.l %d0,%d1 - jne .L337 + jne .L344 move.l message,%d0 tst.l %d0 - jne .L338 + jne .L345 move.l #.LC28,%d0 -.L338: +.L345: move.l %d0,-(%sp) pea 27.w pea 10.w @@ -2383,46 +2418,86 @@ module_draw: lea (16,%sp),%sp move.l message2,%d0 tst.l %d0 - jeq .L332 + jeq .L339 move.l %d0,-(%sp) pea 35.w -.L368: +.L376: pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (16,%sp),%sp - jra .L332 -.L335: + jra .L339 +.L342: moveq #4,%d1 cmp.l %a5,%d1 - jne .L336 + jne .L343 move.l #.LC27,%d2 - jra .L336 -.L337: + jra .L343 +.L344: + moveq #9,%d4 + cmp.l %d0,%d4 + jne .L346 + clr.b %d0 + pea .LC38 + move.l %fp,%d2 + add.l #-24,%d2 + move.l %d2,-(%sp) + move.b %d0,-24(%fp) + jsr (%a3) + move.b arm+6,%d0 + clr.b %d1 + pea .LC39 + pea 24.w + pea 10.w + move.l 8(%fp),-(%sp) + add.l #49,%d0 + move.b %d0,-5(%fp) + move.b %d1,-4(%fp) + jsr (%a2) + move.l %d2,-(%sp) + pea 31.w + pea 10.w + move.l 8(%fp),-(%sp) + jsr (%a2) + lea (36,%sp),%sp + move.l #.LC40,(%sp) + pea 38.w + pea 10.w + move.l 8(%fp),-(%sp) + jsr (%a2) + pea .LC41 +.L377: + pea 45.w + pea 10.w + move.l 8(%fp),-(%sp) + jsr (%a2) + lea (32,%sp),%sp + jra .L339 +.L346: subq.l #7,%d0 tst.l %d0 - jne .L348 - pea .LC38 + jne .L356 + pea .LC42 pea 24.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) - pea .LC39 + pea .LC43 pea 31.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (28,%sp),%sp - move.l #.LC40,(%sp) -.L367: + move.l #.LC44,(%sp) +.L375: pea 45.w - jra .L368 -.L348: + jra .L376 +.L356: move.w #10,%a5 move.l %fp,%d2 sub.l %a4,%a4 add.l #-24,%d2 -.L339: +.L347: moveq #84,%d0 clr.b %d1 move.l %d2,-(%sp) @@ -2439,7 +2514,7 @@ module_draw: mvz.b arm+7,%d0 lea (16,%sp),%sp btst %d4,%d0 - jeq .L340 + jeq .L348 pea 7.w pea 12.w pea 21.w @@ -2448,18 +2523,18 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a0) lea (20,%sp),%sp -.L340: +.L348: addq.l #1,%a4 lea (14,%a5),%a5 moveq #8,%d0 cmp.l %a4,%d0 - jne .L339 + jne .L347 move.l phase,%d0 moveq #1,%d1 cmp.l %d0,%d1 - jne .L341 + jne .L349 clr.b %d3 - pea .LC41 + pea .LC45 move.l %d2,-(%sp) move.b %d3,-24(%fp) jsr (%a3) @@ -2467,17 +2542,17 @@ module_draw: jsr (pass_steps.constprop.0) lea (12,%sp),%sp tst.l %d0 - jeq .L342 + jeq .L350 moveq #9,%d4 cmp.l %d0,%d4 - jcc .L349 + jcc .L357 move.l %d0,%d1 moveq #10,%d4 divu.l %d4,%d1 lea (-18,%fp),%a0 add.l #48,%d1 move.b %d1,-19(%fp) -.L343: +.L351: moveq #10,%d3 remu.l %d3,%d1:%d0 clr.b %d4 @@ -2485,11 +2560,11 @@ module_draw: move.b %d1,(%a0) move.b %d4,1(%a0) tst.l -40(%fp) - jeq .L350 + jeq .L358 move.l #.LC29,%d0 -.L344: +.L352: move.l %d0,-(%sp) -.L366: +.L374: move.l %d2,-(%sp) jsr (%a3) addq.l #4,%sp @@ -2498,50 +2573,45 @@ module_draw: pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) - pea .LC43 + pea .LC47 pea 38.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (28,%sp),%sp - move.l #.LC44,(%sp) - jra .L367 -.L349: + move.l #.LC48,(%sp) + jra .L375 +.L357: lea (-19,%fp),%a0 - jra .L343 -.L350: + jra .L351 +.L358: move.l #.LC30,%d0 - jra .L344 -.L342: - pea .LC42 - jra .L366 -.L341: + jra .L352 +.L350: + pea .LC46 + jra .L374 +.L349: moveq #5,%d1 cmp.l %d0,%d1 - jeq .L351 + jeq .L359 subq.l #2,%d0 tst.l %d0 - jne .L352 + jne .L360 move.l #.LC33,%d0 -.L346: +.L354: move.l %d0,-(%sp) pea 31.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) - pea .LC45 - pea 45.w - pea 10.w - move.l 8(%fp),-(%sp) - jsr (%a2) - lea (32,%sp),%sp - jra .L332 -.L351: + pea .LC49 + jra .L377 +.L359: move.l #.LC32,%d0 - jra .L346 -.L352: + jra .L354 +.L360: move.l #.LC31,%d0 - jra .L346 + jra .L354 .size module_draw, .-module_draw .section .rodata .type ticks.0, @object @@ -2561,20 +2631,20 @@ bounce_part_menu: .long bounce_choose .long 0 .section .rodata.str1.1 -.LC46: +.LC50: .string "BOUNCE TRACK" -.LC47: +.LC51: .string "RESET TRACK" -.LC48: +.LC52: .string "UNDO" .section .rodata .align 2 .type bounce_actions, @object .size bounce_actions, 12 bounce_actions: - .long .LC46 - .long .LC47 - .long .LC48 + .long .LC50 + .long .LC51 + .long .LC52 .local lamp_mine .comm lamp_mine,2,1 .local lamp_stock From 64d32dc44630877f4884c0e35129fab9f7dda973 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 22:27:09 +0100 Subject: [PATCH 21/43] Bounce In Place 0.4.0: the PICK FLEX popup in two lines Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/CHANGELOG.json | 2 +- sdk/drafts/bounce/README.md | 2 +- sdk/drafts/bounce/TESTING.md | 4 +- sdk/drafts/bounce/bounce.c | 20 +- sdk/drafts/bounce/unit.s | 1088 +++++++++++++++--------------- 5 files changed, 576 insertions(+), 540 deletions(-) diff --git a/sdk/drafts/bounce/CHANGELOG.json b/sdk/drafts/bounce/CHANGELOG.json index 7f2f77d6c7..f4f213bbc2 100644 --- a/sdk/drafts/bounce/CHANGELOG.json +++ b/sdk/drafts/bounce/CHANGELOG.json @@ -7,7 +7,7 @@ "While BOUNCE is open or armed, trig keys 1-8 light up: red for the track you bounce into, green for merged tracks, yellow for the ones you can add.", "Bounces are always saved in the project's own BOUNCES folder, whatever SAVE SAMPLES TO says.", "If the WAV can't be saved (a full card), BOUNCE says so until you press a key: the take stays in the buffer, save it in the Audio Editor.", - "After bouncing a Grain or synth track, a popup tells you to pick FLEX for it (FUNC+SRC) until you press a key." + "After bouncing a Grain or synth track, a popup tells you to change it to FLEX." ] }, { diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index 9f5865d3b8..dd130e27c1 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -18,7 +18,7 @@ Category: **system**. It rewrites a track's Part and pattern when the musician a | YES, while BOUNCE is open | Arms the take: it starts with the next pattern start. Refused, with the reason, when the pass is over 64 steps, T8 is merged or chosen while MASTER TRACK is on, a merged track's cue level is 0, or the recorder is busy. | | NO, while BOUNCE is open | Closes BOUNCE and changes nothing; cancels an armed or running take. | | FUNC+PART > BOUNCE > RESET TRACK | Asks first, then makes the active track a STATIC track with a fresh project's settings (FX1 FILTER, FX2 DELAY, stock AMP, LFO, playback and recorder setup, its own slots), no trigs and no locks. Its length and scale stay. A Grain or synth track: pick STATIC in the machine chooser first. | -| After bouncing a Grain or synth track | The take is in, and a popup reads TAKE RECORDED, NOW PICK FLEX FOR T*n*, FUNC+SRC, FLEX, YES. Any key closes it; FUNC and SRC go straight on to the chooser. The bottom line then reads BOUNCED: T*n* PICK FLEX until you do. Pick FLEX for that track in the machine chooser: Bounce then makes it play the take. Until then the machine plays on unchanged. | +| After bouncing a Grain or synth track | The take is in, and a small popup reads TAKE RECORDED, CHANGE T*n* TO FLEX. Any key closes it; FUNC and SRC go straight on to the chooser. The bottom line then reads BOUNCED: T*n* PICK FLEX until you do. Pick FLEX for that track in the machine chooser: Bounce then makes it play the take. Until then the machine plays on unchanged. | | FUNC+PART > BOUNCE > UNDO | Restores the last bounce's or reset's track: machine, FX, every page, slots, trigs, locks, and the merged tracks' mutes. | BOUNCE shows the merge as inverted track names and on trig keys 1-8 (the active track red, merged tracks green, every other track you can tap yellow; T8 dark while MASTER TRACK is on) until the take ends, then PRESS PLAY, WAITS FOR PATTERN START or RECORDING ONE PASS, and at the end BOUNCED, SAVED AS with the file's name, or the reason it refused. While stock writes the WAV, its own screens show. diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index afdd646179..cb80bb7ae9 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -200,9 +200,9 @@ Not tested: a project that was never saved (`/AUDIO/BOUNCES/`), USB disk mo | --- | --- | --- | | A bounce with this build | T1, DOWN+REC, YES, PLAY | BOUNCED, SAVED AS `B1-261203-2156`, in `BOUNCE/BOUNCES/` | | SAVE TO NEW | stopped, PROJECT > SAVE TO NEW, a new name, YES | SYNCING PROJECT, SAVING AS NEW, THE NEW PROJECT IS NOW ACTIVE. The new project folder has its own `BOUNCES/` holding `B1-261203-2156.wav` (byte for byte the same as the original) and its `.ot`, and its `project.work` names `PATH=BOUNCES/B1-261203-2156.wav` | -| FUNC+SRC | T2, FUNC+SRC | SRC SETUP opens on the MACHINE list (STATIC, FLEX, THRU, NEIGHBOR, PICKUP): the gesture the popup names | +| FUNC+SRC | T2, FUNC+SRC | SRC SETUP opens on the MACHINE list (STATIC, FLEX, THRU, NEIGHBOR, PICKUP), where the player picks FLEX | -Not tested: the popup itself. Only a Grain or synth track reaches it, and the emulator has none, so it waits for the unit. Not tested either: reloading the new project. +Not tested: the popup itself. After the developer saw its first version (four lines, too big), it became two: TAKE RECORDED, CHANGE T*n* TO FLEX. Only a Grain or synth track reaches it, and the emulator has none, so it waits for the unit. Not tested either: reloading the new project. ## The 0.4.0 test procedure on the unit diff --git a/sdk/drafts/bounce/bounce.c b/sdk/drafts/bounce/bounce.c index 1b5e59920e..e9164acafb 100644 --- a/sdk/drafts/bounce/bounce.c +++ b/sdk/drafts/bounce/bounce.c @@ -740,6 +740,17 @@ void module_draw(unsigned char *frame) invert(frame, 0, 56, 128, 8); return; } + if (phase == PICK_INFO) { /* a small popup: what to do next, until a key */ + char line[20]; + line[0] = 0; append(line, "CHANGE T"); line[8] = (char)('1' + arm.track); line[9] = 0; + append(line, " TO FLEX"); + fill(frame, 16, 18, 96, 26, 0); + frame_box(frame, 16, 18, 96, 26); + text(frame, 20, 21, "TAKE RECORDED"); + invert(frame, 17, 20, 94, 7); + text(frame, 20, 32, line); + return; + } fill(frame, 6, 10, 116, 44, 0); frame_box(frame, 6, 10, 116, 44); char title[12]; @@ -753,15 +764,6 @@ void module_draw(unsigned char *frame) if (message2) text(frame, 10, 35, message2); return; } - if (phase == PICK_INFO) { - char line[24]; - line[0] = 0; append(line, "NOW PICK FLEX FOR T"); line[19] = (char)('1' + arm.track); line[20] = 0; - text(frame, 10, 24, "TAKE RECORDED"); - text(frame, 10, 31, line); - text(frame, 10, 38, "FUNC+SRC, FLEX, YES"); - text(frame, 10, 45, "ANY KEY: OK"); - return; - } if (phase == CONFIRM_RESET) { text(frame, 10, 24, "STOCK STATIC TRACK"); text(frame, 10, 31, "NO TRIGS, NO LOCKS"); diff --git a/sdk/drafts/bounce/unit.s b/sdk/drafts/bounce/unit.s index 7d90c5e06e..4ebeba843a 100644 --- a/sdk/drafts/bounce/unit.s +++ b/sdk/drafts/bounce/unit.s @@ -382,16 +382,60 @@ invert: rts .size invert, .-invert .align 2 + .type frame_box, @function +frame_box: + lea (-16,%sp),%sp + movem.l #7172,(%sp) + move.l 20(%sp),%d2 + move.l 24(%sp),%a3 + move.l 28(%sp),%a4 + pea 1.w + pea 1.w + move.l 40(%sp),-(%sp) + move.l %a4,-(%sp) + move.l %a3,-(%sp) + move.l %d2,-(%sp) + lea fill,%a2 + jsr (%a2) + pea 1.w + pea 1.w + move.l 64(%sp),-(%sp) + move.l 72(%sp),%d0 + pea -1(%a4,%d0.l) + move.l %a3,-(%sp) + move.l %d2,-(%sp) + jsr (%a2) + lea (48,%sp),%sp + pea 1.w + move.l 40(%sp),-(%sp) + pea 1.w + move.l %a4,-(%sp) + move.l %a3,-(%sp) + move.l %d2,-(%sp) + jsr (%a2) + pea 1.w + move.l 64(%sp),-(%sp) + pea 1.w + move.l %a4,-(%sp) + move.l 72(%sp),%d0 + pea -1(%a3,%d0.l) + move.l %d2,-(%sp) + jsr (%a2) + movem.l 48(%sp),#7172 + lea (64,%sp),%sp + rts + .size frame_box, .-frame_box + .align 2 .type text, @function text: lea (-28,%sp),%sp move.l %sp,%a1 move.l #1074524426,%a0 move.l %sp,%d0 -.L45: +.L46: move.l (%a0)+,(%a1)+ cmp.l #1074524454,%a0 - jne .L45 + jne .L46 move.l 32(%sp),12(%sp) move.l 44(%sp),-(%sp) pea -1.w @@ -409,20 +453,20 @@ text: .type append, @function append: move.l 4(%sp),%a0 -.L48: +.L49: move.b (%a0),%d0 move.l %a0,%a1 addq.l #1,%a0 tst.b %d0 - jne .L48 + jne .L49 clr.l %d0 -.L49: +.L50: move.l 8(%sp),%a0 move.b (%a0,%d0.l),%d1 move.b %d1,(%a1,%d0.l) addq.l #1,%d0 tst.b %d1 - jne .L49 + jne .L50 rts .size append, .-append .align 2 @@ -431,16 +475,16 @@ save_done_restore: move.l #1187565976,%a0 move.l #saved,%d0 cmp.l (%a0),%d0 - jne .L53 + jne .L54 move.l prev_done_b,(%a0) lea prev_done_a,%a0 move.l (%a0),1187565972 -.L53: +.L54: move.l #1175179208,%a0 tst.l (%a0) - jne .L52 + jne .L53 move.l prev_mode,(%a0) -.L52: +.L53: rts .size save_done_restore, .-save_done_restore .align 2 @@ -451,7 +495,7 @@ put_track.constprop.0: movem.l #3100,(%sp) lea TRACK_BYTES,%a1 clr.l %d2 -.L60: +.L61: mvz.b 2(%a1),%d0 mvz.w (%a1),%d3 move.l 24(%sp),%a3 @@ -463,29 +507,29 @@ put_track.constprop.0: mvz.b 3(%a1),%d3 add.l %d0,%a3 add.l #part_buf,%d0 -.L56: +.L57: cmp.l %a0,%d3 - jhi .L59 + jhi .L60 add.l %d3,%d2 addq.l #1,%d1 addq.l #4,%a1 moveq #9,%d0 cmp.l %d1,%d0 - jne .L60 + jne .L61 movem.l (%sp),#3100 lea (20,%sp),%sp rts -.L59: +.L60: tst.l 32(%sp) - jeq .L57 + jeq .L58 move.b (%a3,%a0.l),%d4 -.L58: +.L59: move.b %d4,(%a0,%d0.l) addq.l #1,%a0 - jra .L56 -.L57: + jra .L57 +.L58: move.b (%a2,%a0.l),%d4 - jra .L58 + jra .L59 .size put_track.constprop.0, .-put_track.constprop.0 .align 2 .type copy.constprop.0, @function @@ -494,12 +538,12 @@ copy.constprop.0: move.l 8(%sp),%a1 clr.l %d0 lea part_buf,%a0 -.L63: +.L64: lea (%a1,%d0.l),%a2 move.b (%a2),(%a0,%d0.l) addq.l #1,%d0 cmp.l #6322,%d0 - jne .L63 + jne .L64 move.l (%sp)+,%a2 rts .size copy.constprop.0, .-copy.constprop.0 @@ -553,87 +597,87 @@ pass_steps.constprop.0: add.l %a0,%a3 add.l %a0,%a4 lea (81,%a0),%a0 -.L76: +.L77: btst %d5,%d4 - jeq .L67 - tst.b (%a2) jeq .L68 + tst.b (%a2) + jeq .L69 move.b -1(%a0),%d6 -.L69: +.L70: tst.b (%a2) - jeq .L70 + jeq .L71 move.b (%a0),%d3 -.L71: +.L72: mvz.b %d3,%d3 moveq #6,%d0 cmp.l %d3,%d0 - jcs .L72 + jcs .L73 mvz.b %d6,%d0 tst.b %d6 - jeq .L66 + jeq .L67 move.l #ticks.0,%d6 move.l %d6,%a5 mvz.b (%a5,%d3.l),%d3 mulu.w %d3,%d0 tst.l %d0 - jeq .L66 + jeq .L67 cmp.l %a1,%d0 - jls .L74 + jls .L75 move.l %d0,%a1 -.L74: +.L75: tst.l %d2 - jne .L67 + jne .L68 move.l %d0,%d3 move.l %d1,%d2 -.L75: +.L76: remu.l %d3,%d7:%d2 move.l %d3,%d6 move.l %d6,%d2 move.l %d7,%d3 tst.l %d7 - jne .L75 + jne .L76 divu.l %d6,%d1 muls.l %d0,%d1 cmp.l #384,%d1 shi %d2 mvs.b %d2,%d2 neg.l %d2 -.L67: +.L68: addq.l #1,%d5 lea (2330,%a0),%a0 moveq #8,%d0 cmp.l %d5,%d0 - jne .L76 - tst.l %d2 jne .L77 + tst.l %d2 + jne .L78 move.l %d1,%d0 moveq #6,%d2 divu.l %d2,%d0 -.L66: +.L67: movem.l (%sp),#15612 lea (40,%sp),%sp rts -.L68: +.L69: move.b (%a3),%d6 - jra .L69 -.L70: + jra .L70 +.L71: move.b (%a4),%d3 - jra .L71 -.L77: + jra .L72 +.L78: move.l 44(%sp),%a0 moveq #1,%d0 move.l %d0,(%a0) move.l %a1,%d0 addq.l #5,%d0 cmp.l #389,%d0 - jls .L78 -.L72: + jls .L79 +.L73: clr.l %d0 - jra .L66 -.L78: + jra .L67 +.L79: moveq #6,%d2 divu.l %d2,%d0 - jra .L66 + jra .L67 .size pass_steps.constprop.0, .-pass_steps.constprop.0 .align 2 .type write_record, @function @@ -665,7 +709,7 @@ write_record: move.l %d2,%a1 add.l #268525991,%a1 move.l %a0,36(%sp) -.L91: +.L92: pea 32.w move.l 40(%sp),%a0 pea (%a0,%a3.l) @@ -677,7 +721,7 @@ write_record: lea (32,%a3),%a3 move.l 32(%sp),%a1 cmp.l #2048,%a3 - jne .L91 + jne .L92 pea 193.w move.l #1187501196,%a3 pea 2137(%a6) @@ -695,32 +739,32 @@ write_record: add.l %d1,%a0 add.l (%a2),%a0 lea (89,%a0),%a0 -.L92: +.L93: sub.l %a1,%a1 -.L95: +.L96: move.b (%a0,%a1.l),%d0 addq.l #1,%a1 moveq #31,%d1 cmp.l %a1,%d1 - jne .L93 + jne .L94 not.l %d0 tst.b %d0 sne %d0 mvs.b %d0,%d0 neg.l %d0 -.L94: +.L95: mvz.b 6(%a2),%d1 move.l %a4,%d2 lsl.l %d1,%d2 move.b (%a3),%d1 tst.l %d0 - jeq .L96 + jeq .L97 or.l %d2,%d1 -.L97: +.L98: move.b %d1,(%a3)+ lea (32,%a0),%a0 cmp.l #1187501260,%a3 - jne .L92 + jne .L93 move.l (%a2),%a0 moveq #1,%d0 add.l #635698,%a0 @@ -733,16 +777,16 @@ write_record: move.l %d0,44(%sp) lea (40,%sp),%sp jmp 1074387488 -.L93: +.L94: mvz.b %d0,%d0 cmp.l #255,%d0 - jeq .L95 + jeq .L96 moveq #1,%d0 - jra .L94 -.L96: + jra .L95 +.L97: not.l %d2 and.l %d2,%d1 - jra .L97 + jra .L98 .size write_record, .-write_record .section .rodata.str1.1 .LC3: @@ -766,19 +810,19 @@ save_take: lea (-16,%sp),%sp movem.l #3084,(%sp) tst.l 1175475208 - jeq .L103 + jeq .L104 mvz.b arm+6,%d3 move.w %d3,%d0 mulu.w #44,%d0 move.l %d0,%a0 add.l #1187592404,%a0 tst.l (%a0) - jgt .L104 -.L103: + jgt .L105 +.L104: movem.l (%sp),#3084 lea (16,%sp),%sp jra not_saved -.L104: +.L105: jsr 1074272764 move.l #1073822216,%a2 move.l %d3,%a0 @@ -797,7 +841,7 @@ save_take: neg.l %d1 move.l %d1,wav_in_project tst.l %d0 - jeq .L105 + jeq .L106 clr.l -(%sp) clr.l -(%sp) jsr 1073893936 @@ -806,30 +850,30 @@ save_take: pea wav_dir jsr (%a2) lea (20,%sp),%sp -.L106: +.L107: tst.l %a3 - jeq .L103 + jeq .L104 tst.l %d2 - jeq .L103 + jeq .L104 pea wav_dir jsr (%a3) addq.l #4,%sp tst.l %d0 - jne .L107 + jne .L108 pea wav_dir move.l %d2,%a0 jsr (%a0) addq.l #4,%sp tst.l %d0 - jlt .L103 -.L107: + jlt .L104 +.L108: pea wav_base moveq #1,%d2 pea .LC8 pea wav_name jsr 1073822216 lea (12,%sp),%sp -.L109: +.L110: pea wav_name move.l #1073822216,%a2 pea wav_dir @@ -840,10 +884,10 @@ save_take: jsr (%a3) lea (20,%sp),%sp tst.l %d0 - jeq .L108 + jeq .L109 moveq #99,%d0 cmp.l %d2,%d0 - jeq .L103 + jeq .L104 addq.l #1,%d2 move.l %d2,-(%sp) pea wav_base @@ -851,15 +895,15 @@ save_take: pea wav_name jsr (%a2) lea (16,%sp),%sp - jra .L109 -.L105: + jra .L110 +.L106: move.l #269452416,-(%sp) pea .LC5 pea wav_dir jsr (%a2) lea (12,%sp),%sp - jra .L106 -.L108: + jra .L107 +.L109: pea wav_name pea .LC9 move.l #1175185904,-(%sp) @@ -913,7 +957,7 @@ paste: lea part_buf,%a0 mvz.b 34(%a0,%d2.l),%d0 cmp.l %d0,%d3 - jeq .L123 + jeq .L124 move.l %d3,28(%sp) move.l %d2,24(%sp) mvz.b 5(%a2),%d0 @@ -921,16 +965,16 @@ paste: move.l %d0,20(%sp) lea (16,%sp),%sp jmp 1074361084 -.L123: +.L124: move.b 269161679,%d0 move.b 5(%a2),%d1 moveq #3,%d4 and.l %d4,%d0 mvz.b %d1,%d3 cmp.l %d3,%d0 - jne .L122 + jne .L123 tst.b -2147483627.l - jne .L122 + jne .L123 move.b 269161678,%d0 move.l %d2,28(%sp) movem.l (%sp),#1052 @@ -940,7 +984,7 @@ paste: move.l %d0,20(%sp) lea (16,%sp),%sp jmp 1073749784 -.L122: +.L123: movem.l (%sp),#1052 lea (16,%sp),%sp rts @@ -974,13 +1018,13 @@ apply_clip: add.l #part_copy+1538,%a1 add.l #part_buf+1538,%a0 clr.l %d0 -.L126: +.L127: lea (%a1,%d0.l),%a3 moveq #12,%d1 move.b (%a3),(%a0,%d0.l) addq.l #1,%d0 cmp.l %d0,%d1 - jne .L126 + jne .L127 move.w %d2,%d0 moveq #1,%d5 lea part_buf,%a1 @@ -997,14 +1041,14 @@ apply_clip: move.b %d4,715(%a0) mulu.w #30,%d0 addq.l #6,%d0 -.L128: +.L129: move.l %d1,%a3 moveq #5,%d4 add.l #1074606604,%a3 cmp.l %d1,%d4 - jcs .L134 + jcs .L135 move.w #42,%a0 -.L127: +.L128: move.l %d1,%d5 moveq #6,%d6 remu.l %d6,%d4:%d5 @@ -1014,7 +1058,7 @@ apply_clip: move.b (%a3),(%a0,%d4.l) moveq #12,%d4 cmp.l %d1,%d4 - jne .L128 + jne .L129 move.w %d2,%d1 moveq #127,%d6 move.l #2139045952,%d5 @@ -1032,43 +1076,43 @@ apply_clip: clr.l %d1 lea record_new,%a0 lea record_copy,%a1 -.L129: +.L130: lea (%a1,%d1.l),%a3 move.b (%a3),(%a0,%d1.l) addq.l #1,%d1 cmp.l #2330,%d1 - jne .L129 + jne .L130 clr.l %d0 -.L130: +.L131: clr.b %d1 moveq #64,%d4 move.b %d1,(%a0,%d0.l) addq.l #1,%d0 cmp.l %d0,%d4 - jne .L130 + jne .L131 moveq #1,%d5 clr.l %d0 lea record_new+89,%a0 move.b %d5,record_new+7 -.L131: +.L132: st %d6 addq.l #1,%d0 move.b %d6,-1(%a0,%d0.l) cmp.l #2048,%d0 - jne .L131 + jne .L132 mvz.b arm+4,%d0 move.l (%a2),%a0 add.l #36437,%a0 mulu.w #36568,%d0 tst.b (%a0,%d0.l) - jeq .L132 + jeq .L133 tst.l -12(%fp) - jeq .L132 + jeq .L133 moveq #2,%d0 lea (-9,%fp),%a0 move.b (%a0),record_new+80 move.b %d0,record_new+81 -.L132: +.L133: pea record_new pea arm jsr write_record @@ -1082,11 +1126,11 @@ apply_clip: lsl.l #8,%d0 or.l arm+8,%d0 cmp.l -2147483640.l,%d0 - jeq .L133 + jeq .L134 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L133: +.L134: pea 12.w pea arm pea last @@ -1097,9 +1141,9 @@ apply_clip: move.l %d1,undo_ready unlk %fp rts -.L134: +.L135: move.l %a4,%a0 - jra .L127 + jra .L128 .size apply_clip, .-apply_clip .section .rodata.str1.1 .LC10: @@ -1119,33 +1163,33 @@ bounce_choose: move.l 32(%sp),%d0 movem.l #17412,(%sp) cmp.l %d0,%d1 - jne .L147 + jne .L148 move.l phase,%d1 moveq #9,%d0 cmp.l %d1,%d0 - jcs .L148 + jcs .L149 moveq #1,%d0 lsl.l %d1,%d0 move.l %d0,%d1 and.l #300,%d1 tst.l %d1 - jne .L146 + jne .L147 and.l #576,%d0 tst.l %d0 - jeq .L148 + jeq .L149 move.l #.LC10,%d1 move.l %d1,32(%sp) -.L169: +.L170: movem.l (%sp),#17412 lea (28,%sp),%sp jra show -.L148: +.L149: tst.l undo_ready - jne .L150 + jne .L151 move.l #.LC11,%d0 move.l %d0,32(%sp) - jra .L169 -.L150: + jra .L170 +.L151: move.l %sp,%d2 add.l #16,%d2 move.l %d2,-(%sp) @@ -1153,24 +1197,24 @@ bounce_choose: addq.l #4,%sp lea show,%a2 tst.l %d0 - jeq .L151 + jeq .L152 pea last move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L152 -.L151: + jne .L153 +.L152: pea .LC12 -.L170: +.L171: jsr (%a2) -.L168: +.L169: addq.l #4,%sp -.L146: +.L147: movem.l (%sp),#17412 lea (28,%sp),%sp rts -.L152: +.L153: mvz.b last+5,%d0 mvz.b last+6,%d2 lea last,%a6 @@ -1204,43 +1248,43 @@ bounce_choose: and.l %d2,%d0 eor.l %d1,%d0 cmp.l (%a0),%d0 - jeq .L153 + jeq .L154 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L153: +.L154: clr.l undo_ready pea .LC13 - jra .L170 -.L147: + jra .L171 +.L148: tst.l %d0 - jeq .L155 + jeq .L156 move.l phase,%d1 moveq #9,%d0 cmp.l %d1,%d0 - jcs .L156 + jcs .L157 moveq #1,%d0 lsl.l %d1,%d0 move.l %d0,%d1 and.l #300,%d1 tst.l %d1 - jne .L146 + jne .L147 and.l #576,%d0 tst.l %d0 - jeq .L156 + jeq .L157 clr.l phase -.L156: +.L157: move.l %sp,%d2 add.l #16,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jne .L158 + jne .L159 pea .LC2 jsr show - jra .L168 -.L158: + jra .L169 +.L159: pea 12.w move.l %d2,-(%sp) pea arm @@ -1255,8 +1299,8 @@ bounce_choose: move.b %d0,arm+7 moveq #1,%d0 move.l %d0,1187497772 - jra .L146 -.L155: + jra .L147 +.L156: movem.l (%sp),#17412 lea (28,%sp),%sp jra open_select @@ -1275,26 +1319,26 @@ cancel: move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L172 + jeq .L173 clr.l -(%sp) pea 128.w move.l %a6,-(%sp) jsr 1073762680 lea (12,%sp),%sp -.L172: +.L173: move.l %sp,%d2 add.l #12,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L173 + jeq .L174 pea arm move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L173 + jeq .L174 mvz.b arm+5,%d0 move.l arm,%a0 add.l #585088,%a0 @@ -1309,26 +1353,26 @@ cancel: move.l %d1,%a0 add.l #part_buf+1538,%a6 add.l #part_copy+1538,%a0 -.L174: +.L175: lea (%a0,%d0.l),%a1 moveq #12,%d1 move.b (%a1),(%a6,%d0.l) addq.l #1,%d0 cmp.l %d0,%d1 - jne .L174 + jne .L175 mvz.b arm+5,%d0 move.l %d0,-(%sp) pea part_buf jsr 1073912396 addq.l #8,%sp -.L173: +.L174: move.l arm+8,%d0 cmp.l -2147483640.l,%d0 - jeq .L175 + jeq .L176 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L175: +.L176: move.l 8(%sp),%a1 move.l %a1,28(%sp) move.l (%sp)+,%d2 @@ -1355,9 +1399,9 @@ module_tick: lea (-64,%sp),%sp movem.l #23804,(%sp) cmp.l %d0,%d1 - jne .L187 + jne .L188 tst.l -2147457608 - jeq .L188 + jeq .L189 mvz.b arm+6,%d0 pea 1.w moveq #2,%d2 @@ -1368,10 +1412,10 @@ module_tick: move.l %d2,phase move.l %d6,1187497772 lea (12,%sp),%sp -.L188: +.L189: move.w #1,%a6 moveq #1,%d4 -.L213: +.L214: move.l #1175169472,-(%sp) jsr 1073744372 clr.l %d3 @@ -1381,21 +1425,21 @@ module_tick: clr.l %d0 move.b (%a0),51(%sp) addq.l #4,%sp -.L225: +.L226: move.l %d0,%a4 add.l #1175169420,%a4 move.b (%a4),%d2 tst.b 47(%sp) - jeq .L215 + jeq .L216 mvz.b (%a2,%d0.l),%d5 mvz.b %d2,%d1 cmp.l %d1,%d5 - jeq .L216 -.L215: - move.b %d2,(%a3,%d0.l) + jeq .L217 .L216: + move.b %d2,(%a3,%d0.l) +.L217: tst.l %d4 - jeq .L217 + jeq .L218 mvz.b arm+6,%d1 move.l %d0,%d6 sub.l %a0,%a0 @@ -1404,43 +1448,43 @@ module_tick: move.l %d1,48(%sp) clr.b %d1 move.l %d6,%a1 -.L222: +.L223: cmp.l 48(%sp),%a1 - jne .L218 + jne .L219 moveq #1,%d7 -.L257: +.L258: move.l %a0,%d6 lsl.l %d6,%d7 or.l %d7,%d1 - jra .L219 -.L187: + jra .L220 +.L188: moveq #2,%d7 cmp.l %d0,%d7 - jne .L189 + jne .L190 mvz.b arm+6,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L188 + jeq .L189 moveq #3,%d0 moveq #1,%d1 move.l %d0,phase move.l %d1,1187497772 - jra .L188 -.L189: + jra .L189 +.L190: moveq #3,%d2 cmp.l %d0,%d2 - jne .L190 - tst.l -2147457608 jne .L191 + tst.l -2147457608 + jne .L192 pea .LC14 -.L258: +.L259: jsr cancel -.L254: +.L255: addq.l #4,%sp - jra .L192 -.L191: + jra .L193 +.L192: mvz.b arm+6,%d2 lea arm,%a2 move.w %d2,%d0 @@ -1448,33 +1492,33 @@ module_tick: move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jne .L188 + jne .L189 move.l %sp,%d3 add.l #52,%d3 move.l %d3,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L193 + jeq .L194 move.l %a2,-(%sp) move.l %d3,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L194 -.L193: - pea .LC15 - jra .L258 + jne .L195 .L194: + pea .LC15 + jra .L259 +.L195: move.l %d2,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 tst.l (%a0) - jne .L196 + jne .L197 pea .LC16 - jra .L258 -.L196: + jra .L259 +.L197: mvz.b arm+5,%d0 move.l (%a2),%d3 add.l #585088,%d3 @@ -1485,7 +1529,7 @@ module_tick: jsr modwerk_machine addq.l #8,%sp tst.l %d0 - jeq .L255 + jeq .L256 mulu.w #12,%d2 move.l %d3,-(%sp) jsr (copy.constprop.0) @@ -1495,13 +1539,13 @@ module_tick: move.l %d2,%a0 add.l #part_copy+1538,%a1 add.l #part_buf+1538,%a0 -.L198: +.L199: lea (%a1,%d0.l),%a2 moveq #12,%d1 move.b (%a2),(%a0,%d0.l) addq.l #1,%d0 cmp.l %d0,%d1 - jne .L198 + jne .L199 mvz.b arm+5,%d0 move.l %d0,-(%sp) pea part_buf @@ -1509,32 +1553,32 @@ module_tick: addq.l #8,%sp move.l arm+8,%d0 cmp.l -2147483640.l,%d0 - jeq .L199 + jeq .L200 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L199: +.L200: moveq #9,%d2 moveq #1,%d6 move.l %d2,phase clr.l message move.l %d6,1187497772 -.L192: +.L193: move.l phase,%d0 moveq #3,%d6 cmp.l %d0,%d6 - jcs .L212 + jcs .L213 tst.l %d0 - jeq .L211 - jra .L188 -.L190: + jeq .L212 + jra .L189 +.L191: moveq #6,%d7 cmp.l %d0,%d7 - jeq .L200 + jeq .L201 moveq #9,%d1 cmp.l %d0,%d1 - jne .L201 -.L200: + jne .L202 +.L201: lea arm,%a2 move.l %sp,%d4 add.l #52,%d4 @@ -1544,18 +1588,18 @@ module_tick: jsr current addq.l #4,%sp tst.l %d0 - jeq .L202 + jeq .L203 move.l %a2,-(%sp) move.l %d4,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L203 -.L202: + jne .L204 +.L203: pea .LC10 jsr show - jra .L254 -.L203: + jra .L255 +.L204: mvz.b %d3,%d3 mvz.b arm+6,%d0 move.l %d2,%a0 @@ -1565,129 +1609,129 @@ module_tick: mvz.b 34(%a0,%d0.l),%d1 subq.l #1,%d1 tst.l %d1 - jne .L202 + jne .L203 move.l %d0,-(%sp) move.l %a0,-(%sp) jsr modwerk_machine addq.l #8,%sp tst.l %d0 - jne .L192 -.L255: + jne .L193 +.L256: jsr apply_clip jsr save_take - jra .L192 -.L201: + jra .L193 +.L202: moveq #8,%d6 cmp.l %d0,%d6 - jne .L205 + jne .L206 tst.l saved_in - jeq .L206 + jeq .L207 jsr save_done_restore tst.l saved_result - jge .L207 -.L256: + jge .L208 +.L257: jsr not_saved - jra .L192 -.L207: + jra .L193 +.L208: pea .LC17 move.l #wav_name,%d7 jsr show move.l %d7,message2 - jra .L254 -.L206: + jra .L255 +.L207: tst.l wav_in - jeq .L208 + jeq .L209 tst.l assigning - jne .L208 + jne .L209 moveq #1,%d0 move.l %d0,assigning tst.l wav_result - jge .L209 -.L210: + jge .L210 +.L211: jsr save_done_restore - jra .L256 -.L209: + jra .L257 +.L210: move.l #-2147483484,%a2 move.l (%a2),%d2 move.l wav_in_project,(%a2) clr.l -(%sp) jsr 1073889608 move.l %d2,(%a2) - jra .L254 -.L208: + jra .L255 +.L209: move.l saved_ticks,%d0 addq.l #1,%d0 move.l %d0,saved_ticks cmp.l #1800,%d0 - jhi .L210 -.L211: + jhi .L211 +.L212: tst.b lamps_on.l - jeq .L214 + jeq .L215 clr.l %d4 sub.l %a6,%a6 - jra .L213 -.L205: + jra .L214 +.L206: subq.l #4,%d0 tst.l %d0 - jne .L192 + jne .L193 tst.l sticky - jne .L211 + jne .L212 move.l shown_ticks,%d0 addq.l #1,%d0 move.l %d0,shown_ticks moveq #90,%d2 cmp.l %d0,%d2 - jcc .L211 + jcc .L212 jsr close_view - jra .L192 -.L212: + jra .L193 +.L213: subq.l #5,%d0 tst.l %d0 - jne .L211 - jra .L188 -.L227: + jne .L212 + jra .L189 +.L228: moveq #1,%d0 - jra .L225 -.L218: + jra .L226 +.L219: move.l %a1,%d7 btst %d7,%d5 - jeq .L220 + jeq .L221 moveq #2,%d6 move.l %a0,%d7 lsl.l %d7,%d6 or.l %d6,%d1 -.L219: +.L220: addq.l #1,%a1 addq.l #2,%a0 moveq #8,%d7 cmp.l %a0,%d7 - jne .L222 + jne .L223 move.l %d0,%a0 add.l #1175169454,%a0 move.b (%a0),%d5 eor.l %d5,%d1 -.L223: +.L224: mvz.b %d2,%d2 mvz.b %d1,%d5 cmp.l %d2,%d5 - jeq .L224 + jeq .L225 move.b %d1,(%a4) moveq #1,%d3 -.L224: +.L225: move.b %d1,(%a2,%d0.l) subq.l #1,%d0 tst.l %d0 - jne .L227 + jne .L228 tst.l %d3 - jeq .L226 + jeq .L227 jsr 1073821352 -.L226: +.L227: move.w %a6,%d2 move.l #1175169472,-(%sp) jsr 1073744564 addq.l #4,%sp move.b %d2,lamps_on -.L214: +.L215: mvz.b arm+6,%d0 moveq #24,%d6 moveq #9,%d7 @@ -1719,18 +1763,18 @@ module_tick: move.l %d0,(%a0) lea (64,%sp),%sp rts -.L220: +.L221: moveq #7,%d6 cmp.l %a1,%d6 - jne .L221 + jne .L222 tst.b -2147483596.l - jne .L219 -.L221: + jne .L220 +.L222: moveq #3,%d7 - jra .L257 -.L217: + jra .L258 +.L218: move.b (%a3,%d0.l),%d1 - jra .L223 + jra .L224 .size module_tick, .-module_tick .section .rodata.str1.1 .LC18: @@ -1762,13 +1806,13 @@ module_key: move.l 8(%fp),%d4 move.l 12(%fp),%d0 cmp.l %d4,%d1 - jcs .L260 + jcs .L261 moveq #31,%d2 cmp.l %d4,%d2 - jlt .L261 + jlt .L262 move.l consumed_lo,%d1 lea consumed_lo,%a2 -.L262: +.L263: moveq #31,%d2 moveq #1,%d3 and.l %d4,%d2 @@ -1776,85 +1820,85 @@ module_key: move.l %d1,%d2 and.l %d3,%d2 tst.l %d0 - jne .L263 + jne .L264 tst.l %d2 - jeq .L264 + jeq .L265 not.l %d3 and.l %d1,%d3 move.l %d3,(%a2) -.L265: +.L266: moveq #1,%d0 - jra .L264 -.L261: + jra .L265 +.L262: move.l consumed_hi,%d1 lea consumed_hi,%a2 - jra .L262 -.L263: + jra .L263 +.L264: tst.l %d2 - jne .L265 + jne .L266 move.l phase,%d0 moveq #8,%d1 cmp.l %d0,%d1 - jeq .L260 + jeq .L261 moveq #9,%d1 cmp.l %d0,%d1 - jne .L266 + jne .L267 moveq #6,%d2 moveq #1,%d0 move.l %d2,phase move.l %d0,1187497772 add.l #-49,%d4 move.l %d4,-20(%fp) -.L334: +.L335: cmp.l %d4,%d0 - jcc .L267 - jra .L260 -.L266: + jcc .L268 + jra .L261 +.L267: tst.l %d0 - jeq .L268 + jeq .L269 moveq #6,%d1 cmp.l %d0,%d1 - jne .L269 -.L268: + jne .L270 +.L269: moveq #41,%d2 cmp.l %d4,%d2 - jne .L260 + jne .L261 move.b 1175456540,%d0 btst #0,%d0 - jeq .L260 + jeq .L261 jsr open_select -.L267: +.L268: or.l %d3,(%a2) - jra .L265 -.L269: + jra .L266 +.L270: moveq #7,%d1 cmp.l %d0,%d1 - jne .L270 + jne .L271 moveq #49,%d2 cmp.l %d4,%d2 - jne .L271 + jne .L272 move.l %fp,%d6 add.l #-12,%d6 move.l %d6,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L283 + jeq .L284 move.b -6(%fp),%d5 mvz.b arm+6,%d0 mvz.b %d5,%d2 cmp.l %d2,%d0 - jne .L283 + jne .L284 pea arm move.l %d6,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L273 -.L283: + jne .L274 +.L284: pea .LC18 - jra .L335 -.L273: + jra .L336 +.L274: mvz.b -7(%fp),%d0 move.l #585088,%a0 move.l -12(%fp),%a3 @@ -1868,24 +1912,24 @@ module_key: addq.l #8,%sp move.l %d0,%d4 tst.l %d0 - jeq .L275 + jeq .L276 pea .LC19 -.L335: +.L336: jsr show -.L337: +.L338: addq.l #4,%sp - jra .L267 -.L275: + jra .L268 +.L276: move.w %d2,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L276 -.L336: + jeq .L277 +.L337: pea .LC20 - jra .L335 -.L276: + jra .L336 +.L277: moveq #1,%d0 lsl.l %d2,%d0 move.l #-2147483640,%a1 @@ -1930,12 +1974,12 @@ module_key: lea record_new,%a0 clr.l %d0 move.l %a0,%d1 -.L277: +.L278: clr.b %d2 move.b %d2,(%a0,%d0.l) addq.l #1,%d0 cmp.l #2330,%d0 - jne .L277 + jne .L278 st %d0 lea record_copy+80,%a1 move.w (%a1),record_new+80 @@ -1944,12 +1988,12 @@ module_key: move.l %a0,record_new+68 lea record_new+89,%a0 move.b %d0,record_new+83 -.L278: +.L279: st %d2 addq.l #1,%d4 move.b %d2,-1(%a0,%d4.l) cmp.l #2048,%d4 - jne .L278 + jne .L279 lea record_copy+2329,%a0 move.b (%a0),record_new+2329 move.l %d1,-(%sp) @@ -1964,82 +2008,82 @@ module_key: move.l %d0,undo_ready jsr show lea (24,%sp),%sp - jra .L267 -.L271: + jra .L268 +.L272: moveq #50,%d1 cmp.l %d4,%d1 - jne .L260 -.L297: + jne .L261 +.L298: jsr close_view - jra .L267 -.L270: + jra .L268 +.L271: moveq #1,%d1 cmp.l %d0,%d1 - jne .L279 + jne .L280 moveq #7,%d0 cmp.l %d4,%d0 - jlt .L280 + jlt .L281 mvz.b arm+6,%d0 cmp.l %d4,%d0 - jeq .L281 + jeq .L282 moveq #1,%d0 move.b arm+7,%d1 lsl.l %d4,%d0 eor.l %d1,%d0 move.b %d0,arm+7 -.L281: +.L282: moveq #1,%d1 move.l %d1,1187497772 - jra .L267 -.L280: + jra .L268 +.L281: moveq #49,%d0 cmp.l %d4,%d0 - jne .L282 + jne .L283 move.l %fp,%d4 add.l #-12,%d4 move.l %d4,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L283 + jeq .L284 pea arm move.l %d4,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L283 + jeq .L284 move.b arm+6,%d6 mvz.b -6(%fp),%d0 mvz.b %d6,%d4 cmp.l %d0,%d4 - jne .L283 + jne .L284 pea -16(%fp) jsr (pass_steps.constprop.0) addq.l #4,%sp move.l %d0,%d7 tst.l %d0 - jne .L286 + jne .L287 pea .LC22 - jra .L335 -.L286: + jra .L336 +.L287: move.b arm+7,%d5 tst.b -2147483596.l - jne .L287 -.L290: + jne .L288 +.L291: moveq #1,%d0 lsl.l %d4,%d0 mvz.b %d5,%d5 mvz.b %d0,%d0 move.l %d0,-20(%fp) cmp.l %d5,%d0 - jne .L292 -.L289: + jne .L293 +.L290: move.w %d4,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jne .L336 + jne .L337 mvz.b arm+5,%d0 move.l #-2147483640,%a1 subq.l #1,%d7 @@ -2076,9 +2120,9 @@ module_key: clr.w (%a0) move.b %d7,2(%a0) cmp.l -20(%fp),%d5 - jne .L300 + jne .L301 addq.l #1,%d6 -.L294: +.L295: clr.b %d0 move.b %d6,4(%a0) move.b %d0,9(%a0) @@ -2088,7 +2132,7 @@ module_key: jsr 1073912396 addq.l #8,%sp cmp.l -20(%fp),%d5 - jeq .L295 + jeq .L296 mvz.b arm+7,%d0 move.l arm+8,%d1 swap %d0 @@ -2098,46 +2142,46 @@ module_key: move.l %d1,-(%sp) jsr set_mutes addq.l #4,%sp -.L295: +.L296: move.l %d4,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 clr.l (%a0) tst.l -2147457608 - jeq .L301 + jeq .L302 pea 1.w move.l #49168,-(%sp) move.l %d4,-(%sp) jsr 1073762680 lea (12,%sp),%sp moveq #2,%d0 -.L296: +.L297: move.l %d0,phase moveq #1,%d0 move.l %d0,1187497772 - jra .L267 -.L287: + jra .L268 +.L288: tst.b %d5 - jge .L290 + jge .L291 pea .LC23 - jra .L335 -.L291: + jra .L336 +.L292: move.l %d1,%d2 moveq #8,%d0 cmp.l %d1,%d0 - jeq .L289 -.L292: + jeq .L290 +.L293: move.l %d2,%d1 addq.l #1,%d1 btst %d2,%d5 - jeq .L291 + jeq .L292 mvz.w %d2,%d0 add.l %d0,%d0 move.l %d0,%a0 add.l #-2147480495,%a0 tst.b (%a0) - jne .L291 + jne .L292 clr.b %d1 pea .LC24 move.l #note,%d4 @@ -2155,45 +2199,45 @@ module_key: move.l %d4,-(%sp) jsr show lea (20,%sp),%sp - jra .L267 -.L300: - moveq #10,%d6 - jra .L294 + jra .L268 .L301: + moveq #10,%d6 + jra .L295 +.L302: moveq #5,%d0 - jra .L296 -.L282: + jra .L297 +.L283: moveq #50,%d1 cmp.l %d4,%d1 - jeq .L297 + jeq .L298 jsr close_view -.L260: +.L261: clr.l %d0 -.L264: +.L265: movem.l -52(%fp),#3324 unlk %fp rts -.L279: +.L280: move.l %d0,%d1 subq.l #2,%d1 lsr.l #1,%d1 - jeq .L298 + jeq .L299 subq.l #5,%d0 tst.l %d0 - jne .L299 -.L298: + jne .L300 +.L299: moveq #50,%d2 cmp.l %d4,%d2 - jne .L260 + jne .L261 pea .LC26 jsr cancel - jra .L337 -.L299: + jra .L338 +.L300: jsr close_view add.l #-49,%d4 move.l %d4,-20(%fp) moveq #1,%d0 - jra .L334 + jra .L335 .size module_key, .-module_key .align 2 .globl module_enc @@ -2234,32 +2278,30 @@ module_enc: .LC35: .string " PICK FLEX" .LC36: - .string "BOUNCE T" + .string "CHANGE T" .LC37: - .string "RESET T" + .string " TO FLEX" .LC38: - .string "NOW PICK FLEX FOR T" -.LC39: .string "TAKE RECORDED" +.LC39: + .string "BOUNCE T" .LC40: - .string "FUNC+SRC, FLEX, YES" + .string "RESET T" .LC41: - .string "ANY KEY: OK" -.LC42: .string "STOCK STATIC TRACK" -.LC43: +.LC42: .string "NO TRIGS, NO LOCKS" -.LC44: +.LC43: .string "YES: RESET NO: BACK" -.LC45: +.LC44: .string "PASS " -.LC46: +.LC45: .string "OVER 64 STEPS" -.LC47: +.LC46: .string "TRIG 1-8: MERGE" -.LC48: +.LC47: .string "YES: REC NO: CLOSE" -.LC49: +.LC48: .string "NO: CANCEL" .text .align 2 @@ -2267,36 +2309,35 @@ module_enc: .type module_draw, @function module_draw: link.w %fp,#-68 - moveq #-9,%d1 + moveq #-9,%d0 movem.l #15388,(%sp) - move.l phase,%a5 - move.l %a5,%d0 - and.l %d1,%d0 + move.l phase,%d3 + and.l %d3,%d0 tst.l %d0 - jeq .L339 + jeq .L340 tst.l 8(%fp) - jeq .L339 + jeq .L340 lea append,%a3 - moveq #6,%d4 + moveq #6,%d0 lea fill,%a4 lea text,%a2 - move.l #invert,%d3 - cmp.l %a5,%d4 - jne .L341 - clr.b %d0 + lea invert,%a5 + cmp.l %d3,%d0 + jne .L342 + clr.b %d1 pea .LC34 move.l %fp,%d2 add.l #-24,%d2 move.l %d2,-(%sp) - move.b %d0,-24(%fp) + clr.b %d3 + move.b %d1,-24(%fp) jsr (%a3) move.b arm+6,%d0 - clr.b %d1 + move.b %d3,-13(%fp) pea .LC35 move.l %d2,-(%sp) add.l #49,%d0 move.b %d0,-14(%fp) - move.b %d1,-13(%fp) jsr (%a3) clr.l -(%sp) pea 8.w @@ -2315,69 +2356,100 @@ module_draw: pea 128.w pea 56.w clr.l -(%sp) - move.l %d3,%a0 move.l 8(%fp),-(%sp) - jsr (%a0) + jsr (%a5) +.L377: lea (36,%sp),%sp -.L339: +.L340: movem.l -68(%fp),#15388 unlk %fp rts -.L341: - clr.l -(%sp) - moveq #7,%d4 - pea 44.w - pea 116.w - pea 10.w - pea 6.w +.L342: + move.l #frame_box,%d4 + moveq #9,%d0 + cmp.l %d3,%d0 + jne .L343 + clr.b %d1 + pea .LC36 move.l %fp,%d2 - add.l #-36,%d2 + add.l #-24,%d2 + move.l %d2,-(%sp) + clr.b %d3 + move.b %d1,-24(%fp) + jsr (%a3) + move.b arm+6,%d0 + move.b %d3,-15(%fp) + pea .LC37 + move.l %d2,-(%sp) + add.l #49,%d0 + move.b %d0,-16(%fp) + jsr (%a3) + clr.l -(%sp) + pea 26.w + pea 96.w + pea 18.w + pea 16.w move.l 8(%fp),-(%sp) jsr (%a4) - pea 1.w - pea 1.w - pea 116.w - pea 10.w - pea 6.w + lea (40,%sp),%sp + pea 26.w + pea 96.w + pea 18.w + pea 16.w + move.l %d4,%a0 move.l 8(%fp),-(%sp) - jsr (%a4) - lea (48,%sp),%sp - pea 1.w - pea 1.w - pea 116.w - pea 53.w - pea 6.w + jsr (%a0) + pea .LC38 + pea 21.w + pea 20.w move.l 8(%fp),-(%sp) - jsr (%a4) - pea 1.w + jsr (%a2) + lea (36,%sp),%sp + pea 7.w + pea 94.w + pea 20.w + pea 17.w + move.l 8(%fp),-(%sp) + jsr (%a5) + move.l %d2,-(%sp) + pea 32.w + pea 20.w + move.l 8(%fp),-(%sp) + jsr (%a2) + jra .L377 +.L343: + clr.l -(%sp) pea 44.w - pea 1.w + pea 116.w pea 10.w pea 6.w + move.l %fp,%d2 + add.l #-36,%d2 move.l 8(%fp),-(%sp) jsr (%a4) - lea (48,%sp),%sp - pea 1.w pea 44.w - pea 1.w + pea 116.w pea 10.w - pea 121.w + pea 6.w + move.l %d4,%a0 + moveq #7,%d4 move.l 8(%fp),-(%sp) - jsr (%a4) + jsr (%a0) clr.b %d0 - pea .LC36 + lea (40,%sp),%sp + move.l #.LC39,(%sp) move.l %d2,-(%sp) move.b %d0,-36(%fp) jsr (%a3) move.b arm+6,%d0 clr.b %d1 - lea (32,%sp),%sp + addq.l #8,%sp add.l #49,%d0 move.b %d0,-28(%fp) move.b %d1,-27(%fp) - cmp.l %a5,%d4 - jne .L342 - pea .LC37 + cmp.l %d3,%d4 + jne .L344 + pea .LC40 move.l %d2,-(%sp) move.b %d1,-36(%fp) jsr (%a3) @@ -2387,8 +2459,9 @@ module_draw: move.b %d0,-29(%fp) clr.b %d0 move.b %d0,-28(%fp) -.L343: +.L345: move.l %d2,-(%sp) + moveq #4,%d3 pea 13.w pea 10.w move.l 8(%fp),-(%sp) @@ -2397,19 +2470,17 @@ module_draw: pea 114.w pea 12.w pea 7.w - move.l %d3,%a0 move.l 8(%fp),-(%sp) - jsr (%a0) + jsr (%a5) lea (36,%sp),%sp move.l phase,%d0 - moveq #4,%d1 - cmp.l %d0,%d1 - jne .L344 + cmp.l %d0,%d3 + jne .L346 move.l message,%d0 tst.l %d0 - jne .L345 + jne .L347 move.l #.LC28,%d0 -.L345: +.L347: move.l %d0,-(%sp) pea 27.w pea 10.w @@ -2418,123 +2489,81 @@ module_draw: lea (16,%sp),%sp move.l message2,%d0 tst.l %d0 - jeq .L339 + jeq .L340 move.l %d0,-(%sp) pea 35.w -.L376: +.L378: pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (16,%sp),%sp - jra .L339 -.L342: - moveq #4,%d1 - cmp.l %a5,%d1 - jne .L343 - move.l #.LC27,%d2 - jra .L343 + jra .L340 .L344: - moveq #9,%d4 - cmp.l %d0,%d4 - jne .L346 - clr.b %d0 - pea .LC38 - move.l %fp,%d2 - add.l #-24,%d2 - move.l %d2,-(%sp) - move.b %d0,-24(%fp) - jsr (%a3) - move.b arm+6,%d0 - clr.b %d1 - pea .LC39 - pea 24.w - pea 10.w - move.l 8(%fp),-(%sp) - add.l #49,%d0 - move.b %d0,-5(%fp) - move.b %d1,-4(%fp) - jsr (%a2) - move.l %d2,-(%sp) - pea 31.w - pea 10.w - move.l 8(%fp),-(%sp) - jsr (%a2) - lea (36,%sp),%sp - move.l #.LC40,(%sp) - pea 38.w - pea 10.w - move.l 8(%fp),-(%sp) - jsr (%a2) - pea .LC41 -.L377: - pea 45.w - pea 10.w - move.l 8(%fp),-(%sp) - jsr (%a2) - lea (32,%sp),%sp - jra .L339 + subq.l #4,%d3 + tst.l %d3 + jne .L345 + move.l #.LC27,%d2 + jra .L345 .L346: subq.l #7,%d0 tst.l %d0 - jne .L356 - pea .LC42 + jne .L357 + pea .LC41 pea 24.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) - pea .LC43 + pea .LC42 pea 31.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (28,%sp),%sp - move.l #.LC44,(%sp) -.L375: + move.l #.LC43,(%sp) +.L376: pea 45.w - jra .L376 -.L356: - move.w #10,%a5 + jra .L378 +.L357: + move.w #10,%a4 move.l %fp,%d2 - sub.l %a4,%a4 + clr.l %d3 add.l #-24,%d2 -.L347: +.L348: moveq #84,%d0 clr.b %d1 move.l %d2,-(%sp) pea 22.w - move.l %a5,-(%sp) + move.l %a4,-(%sp) move.l 8(%fp),-(%sp) - move.l %a4,%d4 move.b %d0,-24(%fp) - move.l %a4,%d0 + move.l %d3,%d0 add.l #49,%d0 move.b %d0,-23(%fp) move.b %d1,-22(%fp) jsr (%a2) mvz.b arm+7,%d0 lea (16,%sp),%sp - btst %d4,%d0 - jeq .L348 + btst %d3,%d0 + jeq .L349 pea 7.w pea 12.w pea 21.w - pea -1(%a5) - move.l %d3,%a0 + pea -1(%a4) move.l 8(%fp),-(%sp) - jsr (%a0) + jsr (%a5) lea (20,%sp),%sp -.L348: - addq.l #1,%a4 - lea (14,%a5),%a5 - moveq #8,%d0 - cmp.l %a4,%d0 - jne .L347 +.L349: + addq.l #1,%d3 + lea (14,%a4),%a4 + moveq #8,%d4 + cmp.l %d3,%d4 + jne .L348 move.l phase,%d0 moveq #1,%d1 cmp.l %d0,%d1 - jne .L349 + jne .L350 clr.b %d3 - pea .LC45 + pea .LC44 move.l %d2,-(%sp) move.b %d3,-24(%fp) jsr (%a3) @@ -2542,17 +2571,17 @@ module_draw: jsr (pass_steps.constprop.0) lea (12,%sp),%sp tst.l %d0 - jeq .L350 + jeq .L351 moveq #9,%d4 cmp.l %d0,%d4 - jcc .L357 + jcc .L358 move.l %d0,%d1 moveq #10,%d4 divu.l %d4,%d1 lea (-18,%fp),%a0 add.l #48,%d1 move.b %d1,-19(%fp) -.L351: +.L352: moveq #10,%d3 remu.l %d3,%d1:%d0 clr.b %d4 @@ -2560,11 +2589,11 @@ module_draw: move.b %d1,(%a0) move.b %d4,1(%a0) tst.l -40(%fp) - jeq .L358 + jeq .L359 move.l #.LC29,%d0 -.L352: +.L353: move.l %d0,-(%sp) -.L374: +.L375: move.l %d2,-(%sp) jsr (%a3) addq.l #4,%sp @@ -2573,45 +2602,50 @@ module_draw: pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) - pea .LC47 + pea .LC46 pea 38.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (28,%sp),%sp - move.l #.LC48,(%sp) - jra .L375 -.L357: - lea (-19,%fp),%a0 - jra .L351 + move.l #.LC47,(%sp) + jra .L376 .L358: - move.l #.LC30,%d0 + lea (-19,%fp),%a0 jra .L352 +.L359: + move.l #.LC30,%d0 + jra .L353 +.L351: + pea .LC45 + jra .L375 .L350: - pea .LC46 - jra .L374 -.L349: moveq #5,%d1 cmp.l %d0,%d1 - jeq .L359 + jeq .L360 subq.l #2,%d0 tst.l %d0 - jne .L360 + jne .L361 move.l #.LC33,%d0 -.L354: +.L355: move.l %d0,-(%sp) pea 31.w pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) - pea .LC49 - jra .L377 -.L359: - move.l #.LC32,%d0 - jra .L354 + pea .LC48 + pea 45.w + pea 10.w + move.l 8(%fp),-(%sp) + jsr (%a2) + lea (32,%sp),%sp + jra .L340 .L360: + move.l #.LC32,%d0 + jra .L355 +.L361: move.l #.LC31,%d0 - jra .L354 + jra .L355 .size module_draw, .-module_draw .section .rodata .type ticks.0, @object @@ -2631,20 +2665,20 @@ bounce_part_menu: .long bounce_choose .long 0 .section .rodata.str1.1 -.LC50: +.LC49: .string "BOUNCE TRACK" -.LC51: +.LC50: .string "RESET TRACK" -.LC52: +.LC51: .string "UNDO" .section .rodata .align 2 .type bounce_actions, @object .size bounce_actions, 12 bounce_actions: + .long .LC49 .long .LC50 .long .LC51 - .long .LC52 .local lamp_mine .comm lamp_mine,2,1 .local lamp_stock From afe1b44fbf79522d318d6273db8f224ca23678b3 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 22:27:40 +0100 Subject: [PATCH 22/43] Bounce In Place 0.4.0: the first popup's unit run, as reported Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/TESTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index cb80bb7ae9..1b5e366e7a 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -202,7 +202,7 @@ Not tested: a project that was never saved (`/AUDIO/BOUNCES/`), USB disk mo | SAVE TO NEW | stopped, PROJECT > SAVE TO NEW, a new name, YES | SYNCING PROJECT, SAVING AS NEW, THE NEW PROJECT IS NOW ACTIVE. The new project folder has its own `BOUNCES/` holding `B1-261203-2156.wav` (byte for byte the same as the original) and its `.ot`, and its `project.work` names `PATH=BOUNCES/B1-261203-2156.wav` | | FUNC+SRC | T2, FUNC+SRC | SRC SETUP opens on the MACHINE list (STATIC, FLEX, THRU, NEIGHBOR, PICKUP), where the player picks FLEX | -Not tested: the popup itself. After the developer saw its first version (four lines, too big), it became two: TAKE RECORDED, CHANGE T*n* TO FLEX. Only a Grain or synth track reaches it, and the emulator has none, so it waits for the unit. Not tested either: reloading the new project. +**The popup on the unit, as reported by the developer:** package `1dcee07b` in a RAM trial on their MKII, release base `ddb56b72`, a Grain or synth track bounced. The trial's readout went RECORDING, then the popup (phase 9) for about 48 s, then the strip (phase 6), then the saved message (phase 4), and then closed, with no refusals: the popup appeared, a key closed it, FLEX was picked, and the take was saved. The developer found the popup too big and detailed, so it now has two lines: TAKE RECORDED, then CHANGE T*n* TO FLEX. The two-line version has not been seen yet. Only a Grain or synth track reaches it, and the emulator has none, so it waits for the unit. Not tested either: reloading the new project. ## The 0.4.0 test procedure on the unit From 72af1cd79df72ea8a72a82604ed88e94b0349f97 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 22:50:37 +0100 Subject: [PATCH 23/43] Bounce In Place 0.4.0: CPU price on package 196de6d7, measured on the developer's MKII Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/TESTING.md | 13 ++++- sdk/drafts/bounce/evidence/cpu-price.json | 68 +++++++++++++++++++++++ sdk/drafts/bounce/octamod.module.json | 9 +++ 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 sdk/drafts/bounce/evidence/cpu-price.json diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 1b5e366e7a..97f147bc23 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -190,7 +190,7 @@ Not tested in 0.4.0: the lamps on a unit (MKII or MKI), by eye; another module l **3 December 2026, on the unit, as reported by the developer.** The developer's MKII, OS 1.40C, base `ddb56b72`, a RAM trial of package `cc70165ee9ed5364a3034a276af2ddbc6a1b1b9920fffc3ff733c8a56b4f6a98` through `npm run module:dev -- bounce`, USB disk mode off, never kept. The developer reported that everything worked, that the WAVs were saved into the project's `BOUNCES` folder, and that the trig key lamps were as designed. The trial's readout showed no refusals over about 270 s. The agent did not see the card or the unit itself. -Not tested: a project that was never saved (`/AUDIO/BOUNCES/`), USB disk mode during a save (stock's folder call is a stub then, so it should read NOT SAVED), a project save and power cycle after a bounce on this package, and the test procedure's unit steps and CPU reading on this package. +Not tested: a project that was never saved (`/AUDIO/BOUNCES/`), USB disk mode during a save (stock's folder call is a stub then, so it should read NOT SAVED), a project save and power cycle after a bounce on this package, and the test procedure's unit steps on this package (its CPU reading is below). ### The PICK FLEX popup, and PROJECT > SAVE TO NEW @@ -234,6 +234,17 @@ Not tested: a project that was never saved (`/AUDIO/BOUNCES/`), USB disk mo The take adds about 6 points of the frame interrupt and 9.5 of the CPU meter while it records, and none were skipped. While recording, Bounce's own tick only reads the recorder's flag and the transport, so the rise is most likely stock's recorder writing the take. That is an inference: a stock recording of the same track, without Bounce, was not measured. +**CPU on the release candidate, package `196de6d7`.** 3 December 2026, the developer's MKII. The development twin `4813a3e5` was RAM-booted, never flashed; a power cycle returns to release base 0.8.5 (`ddb56b72`). Package SHA-256 `196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458`: the build with the BOUNCES folder and the two-line popup (source `64d32dc44`). Project SALVA 4, bank B, pattern B01, Part 1, at 141 BPM. On the twin's boot, the project showed stock's SOME ERRORS OCCURED, 'PARSE ERROR' prompt; NO let it load. That prompt comes from bank 16's file, which was damaged on 28 November, before this module existed. + +| State | Frame interrupt | Longest frame | CPU meter | +| --- | --- | --- | --- | +| Before (no module), `device:price --write`, 3 × 8 s | 23.7 % | 32.0 % | 36.1 % | +| Installed, BOUNCE closed (at rest), same | 23.7 % (+0) | 32.1 % | 36.2 % (+0.1) | +| Installed, B01 playing, 2 s just before each take (3 takes) | 25.2–25.3 % | 34.4–34.7 % | 37.8–38.0 % | +| While a take records: T4 alone, from the recorder's start to its end (about 4,510 frames), 3 takes | 31.1–31.2 % | 49.4–49.6 % | 47.6–47.9 % | + +`device:price --write` wrote the price (0 % of a frame) into the manifest and its readings into `evidence/cpu-price.json`. While recording, the take adds about 6 points of the frame interrupt and 10 of the CPU meter, as on `22e9087c`, and no frame was skipped. Each take was saved (`B4-261203-…`); after each, UNDO put bank B's Part 1 back byte for byte equal to its saved copy. The trial was rolled back. The base's CPU refusal count, already 297 from the price runs, rose to 477 while B01 played in the trial. Bounce has no render; what the base refused was not read. + **Edge cases on the unit.** All on T4 of B01, the pattern playing; the trial readout's tick count rose throughout, and `health` showed no crash and no stall: | Case | Seen | diff --git a/sdk/drafts/bounce/evidence/cpu-price.json b/sdk/drafts/bounce/evidence/cpu-price.json new file mode 100644 index 0000000000..8a9a53ed5d --- /dev/null +++ b/sdk/drafts/bounce/evidence/cpu-price.json @@ -0,0 +1,68 @@ +{ + "module": "bounce", + "version": "0.4.0-experimental", + "base": "development twin 4813a3e5 of release base 0.8.5 (ddb56b72 flashed), RAM-booted", + "scene": "Octatrack MKII, the developer's project SALVA 4, bank B pattern B01 Part 1 playing at 141 BPM; installed and not used by any key press, menu or setting", + "inputs": { + "transport": "playing" + }, + "seconds": 8, + "readings": 3, + "measuredAt": "2026-12-03T21:39:36.441Z", + "result": { + "id": "bounce", + "version": "file", + "packageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", + "before": { + "frame": 23.7, + "frameMax": 32, + "frames": 67364, + "skipped": 0, + "cpu": 36.1, + "dsp1to4": 32.8, + "dsp5to8": 39.8, + "dsp1to4Peak": 33.9, + "dsp5to8Peak": 43.5, + "readings": 3, + "spread": { + "frame": 0, + "cpu": 0, + "dsp1to4": 0, + "dsp5to8": 0, + "frameMax": 0.4, + "dsp1to4Peak": 0.1, + "dsp5to8Peak": 3.6 + } + }, + "atRest": { + "frame": 23.7, + "frameMax": 32.1, + "frames": 67354, + "skipped": 0, + "cpu": 36.2, + "dsp1to4": 32.8, + "dsp5to8": 39.8, + "dsp1to4Peak": 33.9, + "dsp5to8Peak": 43.5, + "readings": 3, + "spread": { + "frame": 0, + "cpu": 0.1, + "dsp1to4": 0, + "dsp5to8": 0, + "frameMax": 0.3, + "dsp1to4Peak": 0.1, + "dsp5to8Peak": 3.6 + } + }, + "atRestAdds": { + "frame": 0, + "cpu": 0.1, + "dsp1to4": 0, + "dsp5to8": 0, + "dsp1to4Peak": 0, + "dsp5to8Peak": 0 + }, + "rolledBack": true + } +} diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index f8b92434cc..3bf13e5003 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -68,6 +68,15 @@ "method": "unmeasured", "conditions": "No measurements exist yet. Add exact conditions and source evidence when available.", "source": "TESTING.md" + }, + "cpuPrice": { + "value": 0, + "unit": "percent-of-frame", + "measure": "frame-interrupt", + "tool": "npm run device:price -- --write", + "date": "2026-12-03", + "conditions": "Octatrack MKII, the developer's project SALVA 4, bank B pattern B01 Part 1 playing at 141 BPM; installed and not used by any key press, menu or setting; base development twin 4813a3e5 of release base 0.8.5 (ddb56b72 flashed), RAM-booted; 3 readings of 8 s a state. Frame interrupt 23.7 % before, 23.7 % installed and used nowhere; CPU meter 36.1 % before, 36.2 % at rest.", + "source": "evidence/cpu-price.json" } }, "tests": { From d9f2af7036d1a38e67bb830ff904c25a43fa7c48 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 23:06:15 +0100 Subject: [PATCH 24/43] Bounce In Place 0.4.0: the test procedure's unit steps on package 196de6d7 Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/TESTING.md | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 97f147bc23..44fa884c60 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -270,6 +270,45 @@ Once during the run, stock's Part Edit window was open on PART's actions, SAVE A - **Lamps.** The 0.4.0 build showed tappable keys yellow and the tracks in the take green. On their request the active track is now red, merged tracks green and the other tappable tracks yellow (the keys have only red and green, so no white). The red build is built but not yet seen. - **Power cycle.** After a bounce, a project save and a power cycle, the take was still there ("power cycle works"). +## The 0.4.0 test procedure on the release candidate + +**3 December 2026, the developer's MKII.** OS 1.40C. The development twin `4813a3e5` was RAM-booted again after a power cycle, never flashed. Release base 0.8.5 (`ddb56b72`) is flashed. Source `72af1cd79`. Package SHA-256 `196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458`, the same package the CPU reading above priced. Project SALVA 4 (its bank 16's parse error prompt answered NO, as above), bank B, pattern B01, Part 1, working = saved. Nothing was kept and the project was never saved. + +`npm run test:procedure -- bounce` stopped at its preflight again: no MIDI bridge, since the twin offers the Mac no USB MIDI port. Its steps were run one by one with the commands from `--plan`: + +| Step | Result | +| --- | --- | +| 1 Software checks | `module:doctor -- --draft bounce`: experimental lines green; cross-compatibility installs beside every active module and the base | +| 2 Beside every other module | judged by step 1's compatibility line (a draft) | +| 3 Name the build | `module:dev -- bounce --build-only`: SHA-256 `196de6d7…` | +| 4 DSP cost model | `cycle-scan.mjs check`: passed | +| 5 Emulator rehearsal | not run by the procedure; this build's emulator runs are above | +| 6 Read the unit | status, Part state (Part 1 on B01, working = saved) and inventory (empty) read | +| 7 Scripted unit pass | `device:test`: passed. Trial in RAM, rolled back; self-test passed; Part switches 12 of 12; inventory unchanged | +| 8 Soak | **not run**: no USB MIDI port on the twin | +| 9 Cost on the unit | `device:price --write`: the CPU section above (0 % of a frame at rest; `--curve` is for machines and effects) | +| 10 Put back | inventory empty; Part 1 on B01: nothing to put back, working = saved | + +**Edge cases by hand**, on T4 of B01, in one trial, rolled back: + +| Case | Seen | +| --- | --- | +| Three bounces of T4, each then UNDO (the CPU readings) | each saved as `B4-261203-…`; after each UNDO bank B's Part 1 equalled its saved copy byte for byte | +| The windows | BOUNCE T4 with PASS 16 STEPS, TRIG 1-8: MERGE, YES: REC NO: CLOSE; T3 tapped and shown inverted beside T4; PRESS PLAY; WAITS FOR PATTERN START | +| A merge (T4 with T3), twice | RECORDING, then BOUNCED and saved; T3 muted afterwards (`0x80000008` = `0x400`); T4 FLEX on the take | +| UNDO after the merge | UNDONE; mutes back to 0; the Part equalled its saved copy | +| RESET TRACK on T4, then UNDO | RESET T4: STOCK STATIC TRACK, NO TRIGS, NO LOCKS, YES: RESET NO: BACK; YES: TRACK RESET; UNDO: UNDONE, the Part equalled its saved copy | + +**An unexplained popup.** After the first merge, stock's PART menu (RENAME, RELOAD, SAVE, SAVE ALL, with SAVE ALL highlighted) was open over the main screen. It was found at the next screenshot, about two minutes after the take. No script had sent PART or FUNC+PART in that trial, and in the earlier 0.4.0 run the same window turned up once. It was closed with NO, and the saved Part was unchanged. It did not come back in the second merge (screenshots every 1.5 s for 21 s), after the UNDO that restored the mutes, or in the three plain bounces. Cause not found: Bounce's mute redraw call ran in the UNDO without it, and a key pressed at the unit was not ruled out. + +**Not run:** +- the soak; +- a project save and reload, and a power cycle, on this package (the developer's report covers `cc70165e`); +- a WAV save onto a full card; +- a project never saved; +- the two-line popup seen by eye; +- the submitter's stage 12. + ## Stock flows Not tested. To compare with and without the module: REC alone (grid recording), TRACK + REC1/2/3 sampling, recorder trigs and RLEN, CUE routing and Studio mode, Part Edit's stock rows, Part Reload and Save, project save and reload, stock track mute. From a09ccf7c6eaa80688ebeaba76a70a422f24a7662 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 23:06:22 +0100 Subject: [PATCH 25/43] Bounce In Place 0.4.0: TESTING names which build the power cycle report covers Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/TESTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 44fa884c60..fdcea1f003 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -303,7 +303,7 @@ Once during the run, stock's Part Edit window was open on PART's actions, SAVE A **Not run:** - the soak; -- a project save and reload, and a power cycle, on this package (the developer's report covers `cc70165e`); +- a project save and reload, and a power cycle, on this package (the developer reported one on an earlier 0.4.0 build); - a WAV save onto a full card; - a project never saved; - the two-line popup seen by eye; From 7790d7c8cc15859caa29780bfb92b55f87f80c76 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 23:17:57 +0100 Subject: [PATCH 26/43] Bounce In Place 0.4.0: the developer's test of package 196de6d7, and the texts for release Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/README.md | 10 +++++----- sdk/drafts/bounce/TESTING.md | 12 +++++++----- sdk/drafts/bounce/octamod.module.json | 12 +++++++----- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index dd130e27c1..26faa005f1 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -1,6 +1,6 @@ # Bounce In Place -Version 0.4.0 · by @seniorspiz · a draft: 0.4.0 passed the test procedure's unit steps on one MKII in RAM; its trig key lamps are not yet checked by eye ([TESTING.md](TESTING.md)). +Version 0.4.0 · by @seniorspiz · experimental: 0.4.0 passed the test procedure's unit steps on one MKII in RAM, and its developer's own test (a project save, reload and power cycle, the lamps and the popup) on the same unit, as reported ([TESTING.md](TESTING.md)). ## Overview @@ -59,11 +59,11 @@ It has no code in the frame interrupt (no detour, no `rests` hook), so there is - Seen in the emulator (TESTING.md): CUE and SRC3 = the track both carry a track after its FX. The pattern's trig and lock layout is mapped. Still open: the same on a unit, Studio mode cue, MAIN TO CUE, and whether a take follows the track's LEVEL. - The WAV is never deleted by Bounce: UNDO gives the track its old settings back and leaves the file on the card and the buffer's link to it. A later recording into the same buffer replaces the take in the buffer, as stock does. - The trig key lamps are written in stock's steady LED bytes for keys 1-8 only while BOUNCE is open or armed, and patch no stock site. Another module that lights trig keys 1-8 at the same moment would be overdrawn until BOUNCE closes; none does today. -- 0.4.0 ran on one MKII (development twin, RAM only): bounce, merge and RESET TRACK, each undone. CPU: nothing measurable at rest; about 6 points of the frame interrupt while a take records (TESTING.md). +- 0.4.0 ran on one MKII (development twin, RAM only): bounce, merge and RESET TRACK, each undone; its developer saved, reloaded and power cycled a project with bounces. CPU: nothing measurable at rest; about 6 points of the frame interrupt while a take records (TESTING.md). Not yet run on an MKI. -### What the 0.4.0 prototype does and does not do yet +### What 0.4.0 does and does not do yet -0.3.0 ran on its developer's MKII in a RAM trial; 0.4.0 adds the trig key lamps ([TESTING.md](TESTING.md)). Its limits: +Its limits ([TESTING.md](TESTING.md)): - **A full card.** When the WAV can't be written (stock shows its own error, or no answer comes within 30 s), BOUNCE reads NOT SAVED: TAKE IN BUFFER / SAVE IT IN AUDIO EDITOR until you press a key. The track still plays the take from its recorder buffer: free some space, then save it from the Audio Editor (AED) before a power cycle empties the buffer. - **Where the WAV goes.** Always `/BOUNCES/`, whatever SAVE SAMPLES TO says, so bounces stay with their project and out of the set's shared AUDIO pool. The project records it as `BOUNCES/.wav`. A project that was never saved has no folder yet; its bounces go to `/AUDIO/BOUNCES/`. PROJECT > SAVE TO NEW copies the `BOUNCES` folder into the new project, so the takes come along. @@ -85,7 +85,7 @@ Design and code by @seniorspiz, MIT (LICENSE). Track Solo's LED level handling a ## Screens and audio -None yet. +None yet: no screenshots or audio are published for 0.4.0. ## Develop diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index fdcea1f003..19cd2f350d 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -171,7 +171,7 @@ The stem levels vary by run: three readings in a row, with nothing changed, gave Changed after this run, built but not run: every save that fails (stock's error, no answer within 30 s, which a full card gives, no free name, the pool not ready) now shows NOT SAVED: TAKE IN BUFFER / SAVE IT IN AUDIO EDITOR until a key, instead of a short message or closing silently after 100 s. The developer's suggestion, 3 December 2026. -Changed after this run, built but not run: the colours. At the developer's request (3 December 2026) every key that can be tapped lights yellow (the trig keys have no white) and the tracks in the take green, the active one included; key 8 stays dark while MASTER TRACK is on. +Changed after this run, built but not run: the colours. At the developer's request (3 December 2026) every key that can be tapped lights yellow (the trig keys have no white) and the tracks in the take green, the active one included; key 8 stays dark while MASTER TRACK is on. (Later the destination went back to red, as the README describes; the developer saw that version, package `cc70165e`.) Not tested in 0.4.0: the lamps on a unit (MKII or MKI), by eye; another module lighting trig keys 1-8 at the same time; everything still open from 0.3.0. @@ -202,7 +202,7 @@ Not tested: a project that was never saved (`/AUDIO/BOUNCES/`), USB disk mo | SAVE TO NEW | stopped, PROJECT > SAVE TO NEW, a new name, YES | SYNCING PROJECT, SAVING AS NEW, THE NEW PROJECT IS NOW ACTIVE. The new project folder has its own `BOUNCES/` holding `B1-261203-2156.wav` (byte for byte the same as the original) and its `.ot`, and its `project.work` names `PATH=BOUNCES/B1-261203-2156.wav` | | FUNC+SRC | T2, FUNC+SRC | SRC SETUP opens on the MACHINE list (STATIC, FLEX, THRU, NEIGHBOR, PICKUP), where the player picks FLEX | -**The popup on the unit, as reported by the developer:** package `1dcee07b` in a RAM trial on their MKII, release base `ddb56b72`, a Grain or synth track bounced. The trial's readout went RECORDING, then the popup (phase 9) for about 48 s, then the strip (phase 6), then the saved message (phase 4), and then closed, with no refusals: the popup appeared, a key closed it, FLEX was picked, and the take was saved. The developer found the popup too big and detailed, so it now has two lines: TAKE RECORDED, then CHANGE T*n* TO FLEX. The two-line version has not been seen yet. Only a Grain or synth track reaches it, and the emulator has none, so it waits for the unit. Not tested either: reloading the new project. +**The popup on the unit, as reported by the developer:** package `1dcee07b` in a RAM trial on their MKII, release base `ddb56b72`, a Grain or synth track bounced. The trial's readout went RECORDING, then the popup (phase 9) for about 48 s, then the strip (phase 6), then the saved message (phase 4), and then closed, with no refusals: the popup appeared, a key closed it, FLEX was picked, and the take was saved. The developer found the popup too big and detailed, so it now has two lines: TAKE RECORDED, then CHANGE T*n* TO FLEX. The two-line version was then seen on the unit with package `196de6d7` ([below](#the-040-test-procedure-on-the-release-candidate)). Reloading a project made with SAVE TO NEW: not tested. ## The 0.4.0 test procedure on the unit @@ -299,14 +299,16 @@ Once during the run, stock's Part Edit window was open on PART's actions, SAVE A | UNDO after the merge | UNDONE; mutes back to 0; the Part equalled its saved copy | | RESET TRACK on T4, then UNDO | RESET T4: STOCK STATIC TRACK, NO TRIGS, NO LOCKS, YES: RESET NO: BACK; YES: TRACK RESET; UNDO: UNDONE, the Part equalled its saved copy | -**An unexplained popup.** After the first merge, stock's PART menu (RENAME, RELOAD, SAVE, SAVE ALL, with SAVE ALL highlighted) was open over the main screen. It was found at the next screenshot, about two minutes after the take. No script had sent PART or FUNC+PART in that trial, and in the earlier 0.4.0 run the same window turned up once. It was closed with NO, and the saved Part was unchanged. It did not come back in the second merge (screenshots every 1.5 s for 21 s), after the UNDO that restored the mutes, or in the three plain bounces. Cause not found: Bounce's mute redraw call ran in the UNDO without it, and a key pressed at the unit was not ruled out. +**An unexplained popup.** After the first merge, stock's PART menu (RENAME, RELOAD, SAVE, SAVE ALL, with SAVE ALL highlighted) was open over the main screen. It was found at the next screenshot, about two minutes after the take. No script had sent PART or FUNC+PART in that trial, and in the earlier 0.4.0 run the same window turned up once. It was closed with NO, and the saved Part was unchanged. It did not come back in the second merge (screenshots every 1.5 s for 21 s), after the UNDO that restored the mutes, or in the three plain bounces. Cause not found: Bounce's mute redraw call ran in the UNDO without it, and a key pressed at the unit was not ruled out. The developer never saw it in their own runs and takes it for an artefact of the agent's scripted session on the development twin; it stays recorded here as seen only there. + +**The developer's own test of package `196de6d7`, as reported** (3 December 2026, the same MKII, in a RAM trial, never kept): +- the two-line popup, TAKE RECORDED / CHANGE T*n* TO FLEX, read right; +- a project save, reload and power cycle, and playing the bounced tracks, worked as they did on the earlier 0.4.0 builds (reported as "tested ... too", without details per step). **Not run:** - the soak; -- a project save and reload, and a power cycle, on this package (the developer reported one on an earlier 0.4.0 build); - a WAV save onto a full card; - a project never saved; -- the two-line popup seen by eye; - the submitter's stage 12. ## Stock flows diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index 3bf13e5003..ec6bb12320 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -18,13 +18,13 @@ "summary": "Bounce one or more audio tracks into the active track as a Flex recording, one pattern long, saved as a WAV, without setting up the recorder by hand.", "overview": "Bounce In Place records the active track, and any other tracks you pick, for exactly one pattern length (in per-track mode the track's own length; merged tracks until their lengths meet), with their effects. When the take ends, the active track becomes a Flex machine playing it, with its FX off, stock AMP and one trig on step 1, and the take is saved as a WAV (B-YYMMDD-HHMM) in the project's BOUNCES folder, with the track's buffer assigned to it, so it reloads once you save the project. The other merged tracks are muted with stock's mute. RESET TRACK makes a track a fresh STATIC track. UNDO brings back the last bounce or reset until the next power cycle or project change. It uses no effect slot.", "highlights": [ - "DOWN then REC, or FUNC+PART > BOUNCE, opens BOUNCE for the active track.", + "Hold DOWN and press REC, or FUNC+PART > BOUNCE, to open BOUNCE for the active track.", "Press trig keys 1-8 to merge more tracks into the active track's take; the active track lights red, merged tracks green, the others you can tap yellow.", "Records on the instrument's own tempo and length, starting on the next step 1.", - "The take is saved to the project, the track becomes a Flex machine playing it, and UNDO BOUNCE restores it." + "The take is saved in the project's BOUNCES folder, the track becomes a Flex machine playing it, and FUNC+PART > BOUNCE > UNDO brings the track back." ], "usage": [ - "Select the track to bounce into, then hold DOWN and press REC (or FUNC+PART > BOUNCE).", + "Select the track to bounce into, then hold DOWN and press REC (or FUNC+PART > BOUNCE > BOUNCE).", "Press trig keys 1-8 to merge those tracks in; press YES to arm. The take starts on the next step 1.", "When BOUNCE reads BOUNCED, SAVED AS, the track plays the recording. FUNC+PART > BOUNCE > UNDO goes back." ] @@ -39,12 +39,14 @@ "key:TRIG@BOUNCE" ], "limitations": [ - "Experimental: 0.4.0 (package 22e9087c) passed the test procedure's unit steps on one MKII, a development twin in RAM (bounce, merge and RESET TRACK each undone, no restart); saving into the project's BOUNCES folder came after that run. Package cc70165e, with the BOUNCES folder and the trig key lamps, worked in its developer's RAM trial on the same MKII, as reported. 0.3.0 ran on its developer's MKII, as reported.", + "Experimental: 0.4.0 (package 196de6d7) passed the test procedure's unit steps on one MKII (a development twin in RAM; bounce, merge, RESET TRACK and UNDO), the soak not run. Its developer's own test on the same MKII (the popup, a project save, reload and power cycle, playing the bounces) worked, as reported.", "The WAV is saved at once, but the track only keeps pointing to it after you save the project (as stock's own SAVE THIS RECORDING).", "A full card: BOUNCE says NOT SAVED and the take stays in the recorder buffer; save it from the Audio Editor.", "A pass longer than 64 master steps (4 bars at 1X) is refused.", "Refuses T8 while MASTER TRACK is on, and a merged track whose cue level is 0.", + "A Grain or synth track: after the take, pick FLEX for it in the machine chooser yourself; a popup says so.", "Bounces only while the sequencer plays; UNDO lasts until the next power cycle or project change.", + "While a take records, the frame interrupt carries about 6 points more; at rest nothing.", "Not yet tested: a full card, Studio cue mode, MAIN TO CUE, an MKI." ], "effectId": null @@ -81,7 +83,7 @@ }, "tests": { "report": "TESTING.md", - "summary": "0.4.0 package 22e9087c: the test procedure's unit steps on one MKII (development twin 4813a3e5), the soak not run; CPU at rest -0.1 points of the frame interrupt, +6 while a take records (TESTING.md). Not yet: a project save, reload and power cycle after a bounce, a full card.", + "summary": "0.4.0 package 196de6d7 on one MKII (development twin 4813a3e5 of base 0.8.5, in RAM): the test procedure's unit steps passed, the soak not run (no USB MIDI on the twin); bounce, merge, RESET TRACK and UNDO each restored the Part byte for byte. CPU at rest +0 points of the frame interrupt, about +6 while a take records. The developer's own test on this package (the popup, a project save, reload and power cycle, playing the bounces) worked, as reported. Not yet: a full card, an MKI.", "hardwareStatus": "untested", "evidenceRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", "gates": [ From 55dbfe0e0022fed264952520e92762113c339982 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 23:29:53 +0100 Subject: [PATCH 27/43] Bounce In Place 0.4.0: key-press cost record, stress run and four emulator screenshots Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/bounce/README.md | 9 +- sdk/drafts/bounce/TESTING.md | 26 +++++ sdk/drafts/bounce/evidence/performance.json | 21 ++++ sdk/drafts/bounce/media/capture.json | 121 ++++++++++++++++++++ sdk/drafts/bounce/media/ot-bounced.png | Bin 0 -> 1900 bytes sdk/drafts/bounce/media/ot-recording.png | Bin 0 -> 2057 bytes sdk/drafts/bounce/media/ot-select.png | Bin 0 -> 2195 bytes sdk/drafts/bounce/media/ot-undo.png | Bin 0 -> 1880 bytes sdk/drafts/bounce/octamod.module.json | 78 ++++++++++++- 9 files changed, 252 insertions(+), 3 deletions(-) create mode 100644 sdk/drafts/bounce/evidence/performance.json create mode 100644 sdk/drafts/bounce/media/capture.json create mode 100644 sdk/drafts/bounce/media/ot-bounced.png create mode 100644 sdk/drafts/bounce/media/ot-recording.png create mode 100644 sdk/drafts/bounce/media/ot-select.png create mode 100644 sdk/drafts/bounce/media/ot-undo.png diff --git a/sdk/drafts/bounce/README.md b/sdk/drafts/bounce/README.md index 26faa005f1..161dcb4caf 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/drafts/bounce/README.md @@ -85,7 +85,14 @@ Design and code by @seniorspiz, MIT (LICENSE). Track Solo's LED level handling a ## Screens and audio -None yet: no screenshots or audio are published for 0.4.0. +Captured in the emulator from package `196de6d7` (MKII panel, [media/capture.json](media/capture.json)); no audio is published. + +| Screen | What it shows | +| --- | --- | +| [media/ot-select.png](media/ot-select.png) | BOUNCE for T1, with T2 merged | +| [media/ot-recording.png](media/ot-recording.png) | RECORDING ONE PASS | +| [media/ot-bounced.png](media/ot-bounced.png) | BOUNCED, SAVED AS with the WAV's name | +| [media/ot-undo.png](media/ot-undo.png) | FUNC+PART > BOUNCE: BOUNCE TRACK, RESET TRACK, UNDO | ## Develop diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/drafts/bounce/TESTING.md index 19cd2f350d..a59356321e 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/drafts/bounce/TESTING.md @@ -311,6 +311,32 @@ Once during the run, stock's Part Edit window was open on PART's actions, SAVE A - a project never saved; - the submitter's stage 12. +## Key-press cost, package 196de6d7 (emulator) + +**3 December 2026, `ot_emu`** (octabam `f7d72906`, `--dsp --frame`, MKII panel) on the development twin `4813a3e5` of base 0.8.5, the developer's MAIN OS 1.40C, an emulated card with the BOUNCE project. Package `196de6d7` in a trial (`device.mjs try`), the same package the unit ran. Instructions counted with `watch`/`hits` between the base's key call (`0x40061dc8`) and its return, and its UI tick call (`0x40061e94`) and its return; each count includes the stock code and interrupts that ran inside the call. Not hardware evidence. + +| Press | Executed instructions | +| --- | --- | +| DOWN+REC (opens BOUNCE) | 10,486 | +| Trig key 2 (merge T2) | 253 | +| YES (arms the merge, stopped) | 161,103 | +| The take's end, in the UI tick while playing (Flex conversion, mutes, the save started) | 2,394,862 | +| UNDO of that bounce | 145,880 | +| RESET TRACK's YES | 247,170 | +| UNDO of the reset | 159,433 | +| A UI tick otherwise | about 6,000 | + +**Stress run:** with B01 playing, ten RESET TRACK and UNDO pairs on T1 in Part 1; STOP, PLAY, Part 2 (PART held, RIGHT); ten more pairs. The trial readout counted 20 resets and 20 undos, the UI tick count rose throughout (2,914 to 5,184), the slot stayed running. `npm run perf:audit -- check sdk/drafts/bounce/evidence/performance.json`: + +| Check | Result | +| --- | --- | +| record | key-press coldfire record for bounce@0.4.0-experimental | +| cycles | worst event 2,394,862 of 26,600,000 cycles (9 %) | +| stock benchmark | none: a key-press module adds nothing to the frame interrupt | +| stress | 40 presses while playing, no hang | + +After the take, the emulator showed stock's SET DATE/TIME window over the main screen (closed with NO); the bounce had finished and saved. It was not seen on the unit, whose clock is set. + ## Stock flows Not tested. To compare with and without the module: REC alone (grid recording), TRACK + REC1/2/3 sampling, recorder trigs and RLEN, CUE routing and Studio mode, Part Edit's stock rows, Part Reload and Save, project save and reload, stock track mute. diff --git a/sdk/drafts/bounce/evidence/performance.json b/sdk/drafts/bounce/evidence/performance.json new file mode 100644 index 0000000000..836ccb5aa3 --- /dev/null +++ b/sdk/drafts/bounce/evidence/performance.json @@ -0,0 +1,21 @@ +{ + "schema": 1, + "module": "bounce", + "version": "0.4.0-experimental", + "sourceSha256": "0e6113ba94346d692368f012988db10fed5398e2567600d34c8d61c4f47ff77a", + "kind": "coldfire", + "trigger": "key", + "cycles": { + "unit": "cycles/event", + "static": null, + "measured": 2394862, + "budget": 26600000, + "method": "Executed instructions between the base's call sites and their returns, read with ot_emu's watch/hits (octabam f7d72906, --dsp --frame, MKII panel) on the development twin 4813a3e5 of base 0.8.5, package 196de6d7 (the release candidate), 3 December 2026. Key presses (core_key 0x40061dc8 to 0x40061dce): RESET TRACK's YES 247,170 (the dearest press: it snapshots the Part bytes and the 2,330-byte pattern record and writes a fresh track), UNDO 145,880 and 159,433, YES arming a merge 161,103, DOWN+REC 10,486, a merge tap 253. The take's end is not a key press but one bounded edit in the UI tick (core_tick 0x40061e94 to 0x40061e9a): the dearest tick of a two-track bounce while playing, the Flex conversion and the start of stock's save, 2,394,862; a tick otherwise about 6,000. Every count includes the stock code and interrupts that ran inside the call. Instructions, not cycles: at a few cycles each, still several times under the budget." + }, + "stress": { + "events": 40, + "playing": true, + "hangs": 0, + "method": "ot_emu, the same build and package: with B01 playing, ten times RESET TRACK (FUNC+PART > BOUNCE > RESET TRACK, YES, YES) and UNDO (FUNC+PART > BOUNCE > UNDO, YES) on T1 in Part 1; then STOP, PLAY and a Part change to Part 2 (PART held, RIGHT); then ten more pairs on Part 2. The trial's readout showed 20 resets and 20 undos (its undo bit rising and falling), the transport on throughout but for the STOP, the UI tick count rising steadily (2,914 to 5,184), the slot running. After the run the screen read UNDONE and T1 was FLEX again, as before it." + } +} diff --git a/sdk/drafts/bounce/media/capture.json b/sdk/drafts/bounce/media/capture.json new file mode 100644 index 0000000000..2d120a9cdc --- /dev/null +++ b/sdk/drafts/bounce/media/capture.json @@ -0,0 +1,121 @@ +{ + "schemaVersion": 1, + "captured": "2026-12-03", + "moduleId": "bounce", + "moduleVersion": "0.4.0-experimental", + "packageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", + "sourceRevision": "64d32dc44", + "firmware": "1.40C", + "imageSha256": "1d7a00b139d4eef4d8e99aff0f788435c4486187ac851fab775e375329d7c54b", + "emulatorSha256": "c91e905aafb9133041110890ed2d42d4fe4e2af2de462dd14b1937d9a42c7c61", + "setup": "Headless ot_emu (octabam f7d72906, the adapted emulator), MKII panel, --dsp --frame; the development twin 4813a3e5 of Modwerk base 0.8.5 built from the developer's own 1.40C, with package 196de6d7 in a trial over the emulated USB; an emulated card with a test project (BOUNCE), Part 2, pattern A01; the LCD as the panel link carries it (module_draw included), 128x64 at integer scale 6.", + "palette": { + "on": [ + 240, + 240, + 240 + ], + "off": [ + 24, + 24, + 24 + ] + }, + "keyMs": 150, + "model": "MKII", + "capturedBy": "seniorspiz", + "stockOs": { + "release": "1.40C", + "updateSha256": "34695b606eb00e1b4dded5fd0c4b66f3a460522a632e47d7416dbd220599e1ad" + }, + "captureMethod": "A private ot_emu session (--interactive --usb-host): node scripts/device.mjs try on the emulated bench, keys through scripts/device-send.py, each screen read with its png: step (the LCD the panel link carries, 2x, white 255) and rescaled to 6x in the 24/240 palette without changing a pixel.", + "plan": [ + { + "press": [ + "STOP" + ] + }, + { + "press": [ + "T1" + ] + }, + { + "hold": [ + "DOWN" + ] + }, + { + "press": [ + "REC" + ] + }, + { + "release": [ + "DOWN" + ] + }, + { + "press": [ + "TRIG2" + ] + }, + { + "capture": "ot-select.png" + }, + { + "press": [ + "YES" + ] + }, + { + "press": [ + "PLAY" + ] + }, + { + "wait": 13000 + }, + { + "capture": "ot-recording.png" + }, + { + "wait": 15000 + }, + { + "capture": "ot-bounced.png" + }, + { + "wait": 10000 + }, + { + "hold": [ + "FUNC" + ] + }, + { + "press": [ + "PART" + ] + }, + { + "release": [ + "FUNC" + ] + }, + { + "capture": "ot-undo.png" + }, + { + "press": [ + "YES" + ] + } + ], + "screenshots": { + "ot-select.png": "3502dac2afedcc9e8d6691376d867744f365e55c460a70adc8a8d8eb15751f15", + "ot-recording.png": "97a9afc1ca526b3edd719cd2711539c9c781bb684e1a9f103b055cbc64e7d84f", + "ot-bounced.png": "9f82ad21bcfe988c219cd3cb0e71f8a38ffcba9a00a6d7bc65d96a84770b0b49", + "ot-undo.png": "a2031c1516bb9074301c5879342466ec0293370f7eb6cb6fff9a11d7a69ac60c" + } +} diff --git a/sdk/drafts/bounce/media/ot-bounced.png b/sdk/drafts/bounce/media/ot-bounced.png new file mode 100644 index 0000000000000000000000000000000000000000..9fa9bb2b007ea59bef48fb8ad37ba85509c73c5e GIT binary patch literal 1900 zcmb7FdrXs86hB|TQsgC%4ed}$2XmWSb%IQkGTKgD?G}*{RIEeTs)L}s6vrG6ZX`Nz zB~Z7hnFTr-fiMclQ^&N7Oek?kr&(Pq51}&xwjdF(@+kXSEVS^4@towo&bhzu-gAEE zemP;GTqk=EdjN3aZ4U_tz=@?=9j{a*3}zSJuC^T{L=Vg3+3}u9BKXL};-*qKMw-t4cQcmCZzTZA`!1t1~PI zbc%@R3U7eO?C1W~AE50%;C-(GllPz`{EAe4jItOC;Fmi%8-Nbr0;Zg>y%4AHy1$#Q zD%m1Iz=r8=acV#HRa3r*>D(3#@T+o!C45|||H{RE4grw~^(RRhvKnchh@urzGxS`# z^Sl3ur_Q``wARMtNJc=QjbTCtT@YsE!aOz%FhJydad<=`)5xDl+j`vA&Y#i*bx;*jT_@1c#I*VGD#OPzm~F=I_pA zit^SEC6&&e(49T_)Lqs!D!56@u?PYfB?!OY-6qns@2}bWFp}AzJx5dlX|8lkcAz^* z8a7Wxmp3N<+{XQ3O32ZGkQ0jy*v^?P+X|X%FpH8K{bL%pP9?QlC_|G|bCW<3+q0jV zdFX+hT9IcBV<4AIdd&E;yJ+4YpzXB%>(@GN-2U zd~!KE$qHw)X`wGm2wk9@+KWA*`MYEWV@zj&-3xSZ7l=A|#*`q7>{`8o`S8-Z8-Kj! z_#_Q_t!qPKBav+x3<2pL65XO^etWIC*9+LCc%1ZeE6N7oaS5S;zsjqUtd`SA^5qx2 z5BK|&EA7O=XTE(T*9Ex23WCOwMA^h}VE)x9vmtcvY z%}6U-z3rSpmvZ8!>Y-Eeo;>>O`WkuXE&dkOxFfO*Gh!fv;++h&>hj$ok=QqGy8NTc zXY#7M>UiQZi{(q~0<+nVGSf=+KT^*fUb)y#{D1CI{SA{^oATTpNtEhDM-SP`dQFgi nWT_`XYV}%PdW+TNQ=QOk=kllnaSLx-Xh`LUF(>~AP2LgC literal 0 HcmV?d00001 diff --git a/sdk/drafts/bounce/media/ot-recording.png b/sdk/drafts/bounce/media/ot-recording.png new file mode 100644 index 0000000000000000000000000000000000000000..67db3165aa67ad195527351cc7ea97d848aa2bab GIT binary patch literal 2057 zcmah~2~bmK5Z;$af;4#65rrUaJs6{HNQ4XoN>V5UM-h~xo{6SvTdWo%1`+U0u@;#S zaOlV=hfIS?2@o&Jp#{r;q=g2eqauPjM3V>v5Y!lnp)VlhpflY!^Jf2l_y2bP-TmG> z84(`p?6lYk0Gz`(!5aban2Ml|*c$?ywnzYo?P0;}sKicPH+#Q|N@6M9CHlafS=5J! z)7)au^QT{#R?4qk;rAu{8P+Kq+!c5`O*)|Y3}yh}FeE?$Sa2NbxXQgdTJkD7MhBLg zv2CP_z|&uviB{Fs-pTsFY~cj~pw0+@&&L2A>3Vq6x>X#GP?HiQ6lzkw@8924_Kp}H z*1xV6jP4w8(s0Q(coPfO5|%M}0n6k@%d4wZh)437YsZ|-*RvA=41ZD@9aL4>93Ujs z_Lh|jmkJ7{K3!r;SIt^GUu?-bM(W&bpa*rV5V4smd5zcZW5%R=E^ADmPWLVHyV6RP zA6u`H#HWB@$*g{Q9#d+JxI#}YugfrHHIexd(+}|;dmI$UBuEnom5=jATO-}{@nf?A z&BS^#QI7XVh7#e7AJF0yNXa8qh_5cM=_5@?<6I=7<`#elz#ITal!UepMJAazYfd26 z2JIe@JS(2xTm)DgOY=&^Y}HS+<2}uH6KKIIS)(hA%lp1!pryn&(q_TJhHSk%#E;u> zQ*Do$eaSV%*x;w4x;j{c0*e9KeLo7YU>2DOTRWen&RyS3OrM>9B=u$W$SJupMBh?x zaWiY?=$CvgNoGU#e!|dd@;s}N!&2J?681dsTgdWvcVJBw0N@ZEO{`J=`mTzSGQ2vX z*7>HEf|yG)nPNAIcg=ews^_C9lc#~-1U)YX+zMOeiMq2)#YlOaIL0=c@s%IHomANC zvgT@&l;5tXSJz9&mNyu)PFyTEJCx<0bav{|>~!G(!(U^z@l@*dLJCAw$^J2glMPsg5aHC^`doU%?SJkr~1 zUfNl}toZ)bQDkb{qNL(Gyz2S`x#TSM{gbhMW!uPU1J{3t##n;I=e@R{z$?3;M?6Jr zoAz(VdyKrMJzoWq01|3N9gHC_4&FWqA>5fZ+u?BLS@Bh9L_8)KHaSKXjx2@ZDqM*v z>Ckfn_?S{)=Knm;Hy~f1&Qajz*ipCjphUURKQSYVwz%O|oBsagZ>`cZk1vbF8+g%q z*DrK(+$=fV!)e`?xpUQw+W#o4BiaojHa1fh?n03s`D*l(yjN9|71IFYf=-5OcZM6= z*A3#I$bzw7hlPkPNP2Eg_zddXwN{%L+wm^%9{A=)Yj7^Qo%WX1D+;33%?z8+OeBi9 zZjp~+?p>`z{^uF*q;z4|I_SViYWHUVf8Dc!JPHAIRb?PgZaD%Y1ggDoH#3!YpfQb8 zwP^(|UFdC%?E!BO?9M41Qij?j0%f=eGG}*qyqIg+ci@qylpsEH-B(ztIsDG!pEy;tW1)I9tEFThc^-FN+KgSqyx08?R-2YmXrj~uD zJ}XSUq0og`BTneN1!yIH6~A35V$)-<3+%pnW*_uoCVPa-{evao-^oMzUDMQqOIX{Z6il&x$5)R1o(3%0D| z(6NG$j#?KM6^vEEk{J!5Dg?B$Zx%%`s0G;!3G^qL5J>Nz$$RNHL+eTHTwbeVezf`|{`R zDNiVwY22a*X$7`p)x(Zc;*FhGZzOceWjGXo4nP4g!4S|bsMzMn(CxaBpYFbm)4`w@ znIIN|mKQ^sq{c;lOX+dY1?a$5hEsI_%}ra5vc5@7UWT^SM28)3YcD)^Bj{lUEo1iO zn$#FtPS~@V8b#Ji?GkR7OEaWo5DI0tF_)EAb*A4c+d}kayD2WhXs@ z8WfCw0HGX3pKg=xt*|H51Ss}a=>Z@ahd$Wgm};aD-bX`~5g4LJU(6jYI(MAfAI}MU zf2y&~b9#uOic*fs&wzQV>;3N-(*3`k<(N&J(KdL%IwN(U{ za@?tD)y$U0RpLB%n|X_Q#-#a*2JVj0n?r8x?^^q{6)HFm)fb7Y4>alcug>%=74}%N zU!IXbU;|GMT86qJGQ9MSu}fqVaj?r(#M6oZ0RswY?+)&&J|-e1mj&?bq9XLPqbLO4 z<5xRVSc?t}r}gMM>c`of9^o`%3vy-iYU)AFp(&WcJhy&4Xhi;2B;GhX6)b7)EQ`Vz z(J<`aU810)oq4gFyRTAu;pEj4P9FC1qY@P~wTwWY9loh5MpFqYh#n_=ZjOOXbVF8A zQQ>e0=|+a-f;1JW@HQe5v~}^LCk_?0KD$GdLUsFnQu10bq^&nqfv87X zT5g$j*gu(ntC(L@6LXjoUg|r)4$V*}pq|jlblDWEzo%|4fK7Cep9^eTp>7#vbxM%} z@_Z#JvntK5r-PInQ}L@jv>dUO9aBRrOv0mN2j;VDrGqximKpyJ(#i!FHp5Oj?16Em zdLD;>^+O*PGOUkkHYD1Zm_+-siaQaqR%lKOdTzCuHP_41XihcgHbX&&b5g!NK73S? z!g_OWO6^fkP%>1k>5lX|RTOJC-PB}5Gr&r&_Npc*2LgZ07cVyxlQWx-uvM=$$Ju=M zvekqBS(_9L|*rEOTG)?OoCeMz#lf+|h6vDcHU0=JYm>$P;< zThszr&xiUsmpA6eYutZ8Pt|E8oVJenhkB*W%#pKlwsL!FkN1af({2FN7(1AQweofz zotkKFBH{$O2}1ausf$`tp@)PFG(_zJx%>I<%Vx+#>Q2qelLD`{MxJ8NJn>qzBRtY6 zAbaoeOUPl!V&eNY)!_3AYn|A95qmMU%1W8&7jXUxh;Yf{kQq+199+*+YGZw|?Kqe9 zx@0s1PuIBgbm^<;+$bWqtMhvMtHKhyDA^Uys`M8kNk<&kRZHzKa@s{;kLQR;I}-Ue z(}qj^*pXw6EV##}baHcjgmT8d~2VxD&LI%zoh&3CKe_KD0~op|578P0t15p z0|U@Z76t~U2l@=%sthVnxa1bYC;wk>{ub{y{LIA)lm^<)(7?dpz`&ru5amB>|J_~7 z|4S>cSNRu=BE@jwEW@wctux=A+j)57|1%63@74+<=>*z0G5GSY@3+~m<}tKwcVtA^ z&%hANobZLAO4{MyBoBr>whLBfNUj4~pYSt;^FZ={eg#G-6lGEfW%}?z{jev42L!e< zxY+r5+%g7x2=3w@rWw^%f8)$wZ(wftC&duT0i2_j|LMH!4|L1Vss$^Miju zsli$nfuA@3{av2l{7he`rp(%!U*X>=MhwLbQyHG|y}sz4rq^jB+i(pS(db|f_k%lz z7BY;GsD%c3h-gEU_OzWFKHr>t@7kV8{<4v65SzmvftkM()}Lwn8Y$l( z%6_3f8$&73V_(EyM>qEKSO0F_`0M<%`zy}w(e2A~S;uIwfftm>QNeYFj{FIl`@ClM z9{TY(xB1(BBUE`1ui;|uh4cSBKfc|0!s&^=(HZ6&>Cz=%zWtl-vhUM>Oyva@4S&q; zoO*k7>h|yPs;*|XSc2*=;~LA#)nBWPZ!gdjj;%M;!ZhXr`-aaieV^wwADeGqv@4E9 zi{ayCb}UBSW%$D1eL`O5{<4~6=`U|@1M>(v@MACVLKg$^mos$qhfOqO04CNtOnC?H z2BYXji*GNRxX|hgIL=VjykT|#qZ+;DCBmdF@}bF3F;fr~E`C3kp$mabr5@U;R(n1SIj z%L6}#W1J4Q41Yl~kAW!{9|jgqYa&7!?Brw{su*hQ(F`NVl~8A30AWyB=nzVxy%G$Y zk{C{OF)C=YHLOAA7)BT(#{|4ULX9AV@Ph4(KPK5Qykh*II}yXl7ntyc@qT-t>>R!Y zrh*t6cSr)GA%NfE^+z)8Y@U Ssh2fo00K`}KbLh*2~7Ypn5jnq literal 0 HcmV?d00001 diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/drafts/bounce/octamod.module.json index ec6bb12320..b1380b433d 100644 --- a/sdk/drafts/bounce/octamod.module.json +++ b/sdk/drafts/bounce/octamod.module.json @@ -97,7 +97,76 @@ "file": "LICENSE", "declaration": "Original code by seniorspiz under MIT. No Elektron firmware, extracted routines or tables." }, - "media": [], + "media": [ + { + "path": "media/ot-select.png", + "captureType": "emulator", + "credit": "seniorspiz (headless capture)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "caption": "Select the track to bounce into (here T1), hold DOWN and press REC: BOUNCE opens. Press trig key 2 to merge T2 into the take, then YES to arm it. The pass is one pattern long, here 16 steps.", + "alt": "The BOUNCE T1 window with T1 and T2 inverted in a row of track names T1 to T8, and the lines PASS 16 STEPS, TRIG 1-8: MERGE, YES: REC NO: CLOSE.", + "otUi": { + "page": "BOUNCE", + "shows": "location-and-controls", + "firmware": "1.40C", + "moduleVersion": "0.4.0-experimental", + "imageSha256": "1d7a00b139d4eef4d8e99aff0f788435c4486187ac851fab775e375329d7c54b", + "setup": "Headless ot_emu (octabam f7d72906, the adapted emulator), MKII panel, --dsp --frame; the development twin 4813a3e5 of Modwerk base 0.8.5 built from the developer's own 1.40C, with package 196de6d7 in a trial over the emulated USB; an emulated card with a test project (BOUNCE), Part 2, pattern A01; the LCD as the panel link carries it (module_draw included), 128x64 at integer scale 6." + } + }, + { + "path": "media/ot-recording.png", + "captureType": "emulator", + "credit": "seniorspiz (headless capture)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "caption": "Once armed, the take starts on the next pattern start while the sequencer plays and runs for one pass. NO cancels it and changes nothing.", + "alt": "The BOUNCE T1 window with T1 and T2 inverted and the lines RECORDING ONE PASS and NO: CANCEL.", + "otUi": { + "page": "BOUNCE", + "shows": "controls", + "firmware": "1.40C", + "moduleVersion": "0.4.0-experimental", + "imageSha256": "1d7a00b139d4eef4d8e99aff0f788435c4486187ac851fab775e375329d7c54b", + "setup": "Headless ot_emu (octabam f7d72906, the adapted emulator), MKII panel, --dsp --frame; the development twin 4813a3e5 of Modwerk base 0.8.5 built from the developer's own 1.40C, with package 196de6d7 in a trial over the emulated USB; an emulated card with a test project (BOUNCE), Part 2, pattern A01; the LCD as the panel link carries it (module_draw included), 128x64 at integer scale 6." + } + }, + { + "path": "media/ot-bounced.png", + "captureType": "emulator", + "credit": "seniorspiz (headless capture)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "caption": "After one pass the take is saved as a WAV in the project's BOUNCES folder, and T1 becomes a Flex machine playing it; the merged T2 is muted. Save the project to keep the track's link to the file.", + "alt": "The BOUNCE window reading BOUNCED, SAVED AS B1-261203-2328 over the main screen, with SRC FLEX on the bottom line.", + "otUi": { + "page": "BOUNCE", + "shows": "controls", + "firmware": "1.40C", + "moduleVersion": "0.4.0-experimental", + "imageSha256": "1d7a00b139d4eef4d8e99aff0f788435c4486187ac851fab775e375329d7c54b", + "setup": "Headless ot_emu (octabam f7d72906, the adapted emulator), MKII panel, --dsp --frame; the development twin 4813a3e5 of Modwerk base 0.8.5 built from the developer's own 1.40C, with package 196de6d7 in a trial over the emulated USB; an emulated card with a test project (BOUNCE), Part 2, pattern A01; the LCD as the panel link carries it (module_draw included), 128x64 at integer scale 6." + } + }, + { + "path": "media/ot-undo.png", + "captureType": "emulator", + "credit": "seniorspiz (headless capture)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "caption": "FUNC+PART opens Part Edit, where the BOUNCE row holds BOUNCE TRACK, RESET TRACK and UNDO. UNDO gives the last bounced or reset track back its machine, settings, trigs and the merged tracks' mutes.", + "alt": "The PART EDIT window with PART and BOUNCE in the left column, BOUNCE selected, and BOUNCE TRACK, RESET TRACK and UNDO on the right, UNDO highlighted.", + "otUi": { + "page": "PART EDIT", + "shows": "location-and-controls", + "firmware": "1.40C", + "moduleVersion": "0.4.0-experimental", + "imageSha256": "1d7a00b139d4eef4d8e99aff0f788435c4486187ac851fab775e375329d7c54b", + "setup": "Headless ot_emu (octabam f7d72906, the adapted emulator), MKII panel, --dsp --frame; the development twin 4813a3e5 of Modwerk base 0.8.5 built from the developer's own 1.40C, with package 196de6d7 in a trial over the emulated USB; an emulated card with a test project (BOUNCE), Part 2, pattern A01; the LCD as the panel link carries it (module_draw included), 128x64 at integer scale 6." + } + } + ], "access": { "location": "Hold DOWN and press REC, or FUNC+PART (Part Edit) > BOUNCE.", "steps": [ @@ -105,6 +174,11 @@ "Hold DOWN, then press REC: BOUNCE opens with the active track inverted; the active track's trig key lights red, the others you can tap yellow.", "Press trig keys 1-8 to add or remove tracks, then YES to arm; NO closes without changes." ], - "screenshots": [] + "screenshots": [ + "media/ot-select.png", + "media/ot-recording.png", + "media/ot-bounced.png", + "media/ot-undo.png" + ] } } From 02cd155533cefe41bfe598247f50f69a3b314b49 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 23:55:46 +0100 Subject: [PATCH 28/43] Fix: device tool's Part RELOAD and SAVE reach PART's actions in the base's two-column Part Edit window With a module's Part Edit row installed, the window remembers its cursor (on BOUNCE, say), so the old keys landed on that row's actions. Co-Authored-By: Claude Opus 5.5 --- scripts/device.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/device.mjs b/scripts/device.mjs index 51b9dc712f..75775c7cf1 100644 --- a/scripts/device.mjs +++ b/scripts/device.mjs @@ -319,7 +319,9 @@ async function part(n) { /** The Part menu (RENAME, RELOAD, SAVE, SAVE ALL), then `steps` in it. FUNC + PART on an MKII; on an MKI, FUNC + BANK in * the Part window (FUNC + MIDI), which NO closes afterwards (#2099). The menu keeps its cursor and stops at RENAME. */ async function partMenu(steps) { - if (await mkii()) await run('FUNC+PART w600 ' + steps) + // With a module's Part Edit row (ot_part_menu) the base opens two columns and remembers the cursor, on BOUNCE say: LEFT, + // UP to PART and RIGHT put it on PART's actions first. Stock's one-column menu ignores LEFT and RIGHT (MKII, 3 Dec 2026). + if (await mkii()) await run('FUNC+PART w600 LEFT w200 UP w150 UP w150 UP w150 RIGHT w200 ' + steps) else await run('FUNC+MIDI w300 FUNC+BANK w600 ' + steps + ' w300 NO w200') } /** Pick an effect by name through the stock chooser, then wait until the track runs it (effectTables: id -> descriptor From 91ff6b12718a9ea929cfa8b558f878b600f47d52 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Thu, 3 Dec 2026 23:31:59 +0100 Subject: [PATCH 29/43] Bounce In Place 0.4.0: list it (catalog, package list, release notes), unit.s without local paths The package built from the listed folder is the tested one, 196de6d7. Co-Authored-By: Claude Opus 5.5 --- scripts/build-module-packages.py | 2 +- sdk/catalog.json | 5 ++ sdk/drafts/bounce/CHANGELOG.json | 45 ---------- sdk/drafts/bounce/qualification.example.json | 84 ------------------ .../bounce/resource-impact.example.json | 21 ----- .../modules}/bounce/LICENSE | 0 .../modules}/bounce/README.md | 4 +- .../modules}/bounce/TESTING.md | 2 +- .../modules}/bounce/bounce.c | 0 .../modules}/bounce/evidence/cpu-price.json | 0 .../modules}/bounce/evidence/performance.json | 2 +- .../modules}/bounce/generate.py | 2 +- .../modules}/bounce/manifest.py | 0 .../modules}/bounce/media/capture.json | 0 .../modules}/bounce/media/ot-bounced.png | Bin .../modules}/bounce/media/ot-recording.png | Bin .../modules}/bounce/media/ot-select.png | Bin .../modules}/bounce/media/ot-undo.png | Bin .../modules}/bounce/octamod.module.json | 0 .../bounce/presentation/thumbnail.svg | 0 .../modules}/bounce/runtime.json | 0 .../modules}/bounce/unit.s | 8 +- .../modules}/bounce/verify.py | 0 src/community/module-changelogs/bounce.json | 13 +++ .../assets/octatrack-module-packages.json | 6 ++ 25 files changed, 34 insertions(+), 160 deletions(-) delete mode 100644 sdk/drafts/bounce/CHANGELOG.json delete mode 100644 sdk/drafts/bounce/qualification.example.json delete mode 100644 sdk/drafts/bounce/resource-impact.example.json rename sdk/{drafts => octatrack/modules}/bounce/LICENSE (100%) rename sdk/{drafts => octatrack/modules}/bounce/README.md (98%) rename sdk/{drafts => octatrack/modules}/bounce/TESTING.md (99%) rename sdk/{drafts => octatrack/modules}/bounce/bounce.c (100%) rename sdk/{drafts => octatrack/modules}/bounce/evidence/cpu-price.json (100%) rename sdk/{drafts => octatrack/modules}/bounce/evidence/performance.json (95%) rename sdk/{drafts => octatrack/modules}/bounce/generate.py (93%) rename sdk/{drafts => octatrack/modules}/bounce/manifest.py (100%) rename sdk/{drafts => octatrack/modules}/bounce/media/capture.json (100%) rename sdk/{drafts => octatrack/modules}/bounce/media/ot-bounced.png (100%) rename sdk/{drafts => octatrack/modules}/bounce/media/ot-recording.png (100%) rename sdk/{drafts => octatrack/modules}/bounce/media/ot-select.png (100%) rename sdk/{drafts => octatrack/modules}/bounce/media/ot-undo.png (100%) rename sdk/{drafts => octatrack/modules}/bounce/octamod.module.json (100%) rename sdk/{drafts => octatrack/modules}/bounce/presentation/thumbnail.svg (100%) rename sdk/{drafts => octatrack/modules}/bounce/runtime.json (100%) rename sdk/{drafts => octatrack/modules}/bounce/unit.s (99%) rename sdk/{drafts => octatrack/modules}/bounce/verify.py (100%) create mode 100644 src/community/module-changelogs/bounce.json diff --git a/scripts/build-module-packages.py b/scripts/build-module-packages.py index 4e660a87c7..864f2095c1 100644 --- a/scripts/build-module-packages.py +++ b/scripts/build-module-packages.py @@ -11,7 +11,7 @@ ORDER = ['miniverb', 'tapeecho', 'euclid', 'repitch', 'tapehead', 'airwindows-chorus', 'everb', 'bbd', 'lofi2', 'ring-sc', 'vibrato', 'resonator', 'mackity', 'midiverb', 'ringbank', 'void'] # DSP code that stock code reaches through hooks. Output Matrix has no FX menu entry and is also a requested ColdFire module. HOOKED = ['sidechain-compressor', 'output-matrix'] -REQUESTED = ['analog-bassdrum', 'usb-audio-out-tracks-main-cue', 'quantizer', 'synth', 'vector', 'playmodes', 'mute-modes', 'recorder-loop-fix', 'poly8', 'output-matrix', 'quantize-live-rec-toggle', 'apply-scene', 'direct-jump-kyoti', 'dejavu', 'arp-key-locks', 'temp-save', 'tuner', 'scope', 'slow-lfo', 'bar-led', 'stem-rec', 'songbook', 'arr-rows', 'smart-reload'] +REQUESTED = ['analog-bassdrum', 'usb-audio-out-tracks-main-cue', 'quantizer', 'synth', 'vector', 'playmodes', 'mute-modes', 'recorder-loop-fix', 'poly8', 'output-matrix', 'quantize-live-rec-toggle', 'apply-scene', 'direct-jump-kyoti', 'dejavu', 'arp-key-locks', 'temp-save', 'tuner', 'scope', 'slow-lfo', 'bar-led', 'stem-rec', 'songbook', 'arr-rows', 'smart-reload', 'bounce'] UTILITIES = ['previewvol', 'cc-map'] ASSET_NAMES = ['dsp-packages.json', 'coldfire-packages.json', 'resident-dsp.json', 'rom-packages.json', 'bootstrap-package.json', 'menu-recipes.json', 'descriptor-recipes.json', 'platform-writes.json', 'requested-packages.json', 'utility-packages.json', 'usb-audio-packages.json'] diff --git a/sdk/catalog.json b/sdk/catalog.json index ed32963373..9370479562 100644 --- a/sdk/catalog.json +++ b/sdk/catalog.json @@ -281,6 +281,11 @@ "id": "smart-reload", "version": "0.1.0-experimental", "addedAt": "2026-11-29T12:00:00Z" + }, + { + "id": "bounce", + "version": "0.4.0-experimental", + "addedAt": "2026-12-03T22:31:23Z" } ] } diff --git a/sdk/drafts/bounce/CHANGELOG.json b/sdk/drafts/bounce/CHANGELOG.json deleted file mode 100644 index f4f213bbc2..0000000000 --- a/sdk/drafts/bounce/CHANGELOG.json +++ /dev/null @@ -1,45 +0,0 @@ -[ - { - "version": "0.4.0-experimental", - "date": "2026-12-03", - "changes": [ - "Renamed Bounce In Place.", - "While BOUNCE is open or armed, trig keys 1-8 light up: red for the track you bounce into, green for merged tracks, yellow for the ones you can add.", - "Bounces are always saved in the project's own BOUNCES folder, whatever SAVE SAMPLES TO says.", - "If the WAV can't be saved (a full card), BOUNCE says so until you press a key: the take stays in the buffer, save it in the Audio Editor.", - "After bouncing a Grain or synth track, a popup tells you to change it to FLEX." - ] - }, - { - "version": "0.3.0-experimental", - "date": "2026-12-03", - "changes": [ - "The take is saved as a WAV (B-YYMMDD-HHMM) and the track's buffer points to it, so it reloads once you save the project.", - "Refuses T8 while MASTER TRACK is on, and a merge with a track whose cue level is 0, with the reason on screen.", - "Emulator only so far; not yet run on a unit." - ] - }, - { - "version": "0.2.1-experimental", - "date": "2026-12-02", - "changes": [ - "RESET TRACK no longer leaves the track silent until a Part reload." - ] - }, - { - "version": "0.2.0-experimental", - "date": "2026-12-02", - "changes": [ - "Merged tracks record until their lengths meet; Grain and synth tracks are bounced as they sound, then you pick FLEX.", - "The bounced track gets stock AMP, no LFO depth and stock FLEX settings, so it plays the take as recorded.", - "New: FUNC+PART > BOUNCE > RESET TRACK makes a track a fresh STATIC track. UNDO covers it too." - ] - }, - { - "version": "0.1.1-experimental", - "date": "2026-12-02", - "changes": [ - "First run on a unit: DOWN+REC opens BOUNCE, trig keys merge tracks, YES records one pass and the track plays it as FLEX." - ] - } -] diff --git a/sdk/drafts/bounce/qualification.example.json b/sdk/drafts/bounce/qualification.example.json deleted file mode 100644 index f24ba06cd4..0000000000 --- a/sdk/drafts/bounce/qualification.example.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "moduleVersion": "0.1.0", - "sourceSha256": "REPLACE_WITH_NATIVE_SOURCE_SHA256", - "imageSha256": "REPLACE_WITH_LOCAL_TESTED_IMAGE_SHA256", - "cycles": [ - { - "processor": "dsp", - "worstCase": null, - "maxConfiguration": null, - "maxInstances": null, - "budget": null, - "unit": "cycles/sample", - "method": "emulator", - "conditions": { - "parameterExtremes": "Describe every minimum, maximum and branch boundary tested.", - "parameterModulation": "Describe simultaneous LFOs, p-locks, MIDI CC and scene sweeps; justify each inapplicable mechanism.", - "modeSwitching": "Describe repeated/interrupted mode, bypass and Part changes.", - "maxLoad": "Describe maximum voices/instances, both cores, FX slots, streaming and USB/MIDI load.", - "inputConditions": "Describe silence, impulses, full-scale inputs, feedback and other worst-case signal conditions." - }, - "report": "TESTING.md" - } - ], - "memory": { - "regions": [ - { - "name": "Replace with each code, state, table, buffer, stack/heap and padding allocation", - "space": "dsp-p", - "words": null, - "wordBits": 24, - "bytes": null, - "scope": "shared" - } - ], - "perInstanceBytes": null, - "sharedBytes": null, - "maxInstances": null, - "totalBytes": null, - "conditions": "State exact build options, alignment, accounting convention, allocator/stack bounds and reused stock/shared memory; justify every absent allocation class.", - "report": "TESTING.md" - }, - "hardware": { - "status": "pending", - "model": "MKII", - "testedOn": "YYYY-MM-DD", - "tester": "Your credited tester handle; no email", - "project": { - "name": "Your local stress project", - "sha256": "REPLACE_WITH_PROJECT_FINGERPRINT", - "recipe": "Record generator/tool revision and command, local source template fingerprint, sample recipe, all settings and modifications needed to reproduce this stress project. Keep the project/card/firmware local." - }, - "durationMinutes": null, - "audioTracks": 8, - "midiTracks": null, - "conditions": { - "parameterExtremes": "Describe every minimum, maximum and branch boundary tested.", - "parameterModulation": "Describe simultaneous LFOs, p-locks, MIDI CC and scene sweeps; justify each inapplicable mechanism.", - "modeSwitching": "Describe repeated/interrupted mode, bypass and Part changes.", - "maxLoad": "Describe maximum voices/instances, both cores, FX slots, streaming and USB/MIDI load.", - "inputConditions": "Describe silence, impulses, full-scale inputs, feedback and other worst-case signal conditions." - }, - "checks": { - "audioContinuity": "failed", - "transport": "failed", - "controls": "failed", - "memoryIntegrity": "failed", - "recovery": "failed" - }, - "report": "TESTING.md", - "maxInstances": null - }, - "documentation": { - "tutorial": { - "title": "Quick tutorial", - "steps": [ - "Explain setup and exactly where to select or enable the module.", - "Demonstrate the main controls with a useful example setting.", - "Explain what to hear/observe and how to stop, reset or bypass." - ] - }, - "screenshots": [], - "screenshotStyle": "black-and-white" - } -} diff --git a/sdk/drafts/bounce/resource-impact.example.json b/sdk/drafts/bounce/resource-impact.example.json deleted file mode 100644 index 8f7457a054..0000000000 --- a/sdk/drafts/bounce/resource-impact.example.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "conditions": "Describe the active workload, expensive modes, changing controls, instance count, and whether shared/stock allocations are included.", - "cpu": { - "level": null, - "basis": "source-estimate", - "rationale": "Choose minimal, low, moderate or high from source inspection or a documented workload comparison. Explain the ColdFire work and cite the record; do not invent a utilization percentage.", - "source": "TESTING.md" - }, - "dsp": { - "level": null, - "basis": "source-estimate", - "rationale": "Choose a relative demand tier covering the expensive DSP modes and modulation. Minimal needs an explanation of the small or absent added DSP path.", - "source": "TESTING.md" - }, - "memory": { - "level": null, - "basis": "source-estimate", - "rationale": "Choose a relative footprint tier covering code, state, tables and buffers. Distinguish shared reservations and reused stock buffers from extra per-instance memory.", - "source": "TESTING.md" - } -} diff --git a/sdk/drafts/bounce/LICENSE b/sdk/octatrack/modules/bounce/LICENSE similarity index 100% rename from sdk/drafts/bounce/LICENSE rename to sdk/octatrack/modules/bounce/LICENSE diff --git a/sdk/drafts/bounce/README.md b/sdk/octatrack/modules/bounce/README.md similarity index 98% rename from sdk/drafts/bounce/README.md rename to sdk/octatrack/modules/bounce/README.md index 161dcb4caf..5d6b46924b 100644 --- a/sdk/drafts/bounce/README.md +++ b/sdk/octatrack/modules/bounce/README.md @@ -34,7 +34,7 @@ BOUNCE shows the merge as inverted track names and on trig keys 1-8 (the active ## How it works -Every piece of work runs on a key press, once a step while a take is armed, or as a card job, never every frame or sample ([Keep the ColdFire cheap](../../../docs/module-guides/README.md#keep-the-coldfire-cheap)). +Every piece of work runs on a key press, once a step while a take is armed, or as a card job, never every frame or sample ([Keep the ColdFire cheap](../../../../docs/module-guides/README.md#keep-the-coldfire-cheap)). | Step | Where it runs | | --- | --- | @@ -96,7 +96,7 @@ Captured in the emulator from package `196de6d7` (MKII panel, [media/capture.jso ## Develop -- Edit `bounce.c`, then `python3 sdk/drafts/bounce/generate.py` writes `unit.s` (`--check` fails when it is stale). +- Edit `bounce.c`, then `python3 sdk/octatrack/modules/bounce/generate.py` writes `unit.s` (`--check` fails when it is stale). - Hear it: `npm run module:dev -- bounce` builds it and tries it on your unit over USB; `--watch` does that again on every save. - Check it: `npm run module:doctor -- --draft bounce`. - Measure the first build that runs: `npm run device:price -- `. diff --git a/sdk/drafts/bounce/TESTING.md b/sdk/octatrack/modules/bounce/TESTING.md similarity index 99% rename from sdk/drafts/bounce/TESTING.md rename to sdk/octatrack/modules/bounce/TESTING.md index a59356321e..dd589b589a 100644 --- a/sdk/drafts/bounce/TESTING.md +++ b/sdk/octatrack/modules/bounce/TESTING.md @@ -10,7 +10,7 @@ Settle these before building the rest. Each decides part of the design. Addresse | Question | Why it matters | Result | | --- | --- | --- | -| Does another module already patch the REC key site? | One owner per stock byte. | **Read**, settled: over USB a module reads keys through the base's `module_key` bus ([OCTATRACK_API.md](../../../docs/OCTATRACK_API.md#core-entry-points)) and patches no key site. Stem Rec's REC detour (`0x40048774`) is in card builds only. `modules:compat` finds no clash with `key:DOWN+REC`. | +| Does another module already patch the REC key site? | One owner per stock byte. | **Read**, settled: over USB a module reads keys through the base's `module_key` bus ([OCTATRACK_API.md](../../../../docs/OCTATRACK_API.md#core-entry-points)) and patches no key site. Stem Rec's REC detour (`0x40048774`) is in card builds only. `modules:compat` finds no clash with `key:DOWN+REC`. | | Does stock do anything with DOWN+REC? | A gesture must not move a stock shortcut. | **Measured** (emulator, below): DOWN held + REC (the transport record key ○, code `0x29`) does what REC alone does, toggling GRID RECORDING; DOWN adds nothing. With Bounce, REC alone stays stock and only the combination opens BOUNCE (Stem Rec's UP+REC is the same pattern). | | Does stock do anything with YES+TRACK? | The fallback gesture. | No longer needed. YES alone on the main screen opens stock's ARM ALL popup (octabam `tools/panel/KEYMAP.md`, **read**), so YES+TRACK would be a poor fallback anyway. Not tested. | | Does CUE carry a track after its FX? | Merging bakes the FX in by recording CUE. | **Measured in the emulator** (below), not on a unit: with FX1 LO-FI pushed hard, MAIN lost its highs and fell to 3 sample levels, and the CUE bus followed it sample for sample (r = 1.0000, one sample late on the left). CUE carries the track after FX1 and FX2, as core 0's mixdown suggests (octabam `docs/firmware/DSP.md`, "Core 0's frame", **read**). | diff --git a/sdk/drafts/bounce/bounce.c b/sdk/octatrack/modules/bounce/bounce.c similarity index 100% rename from sdk/drafts/bounce/bounce.c rename to sdk/octatrack/modules/bounce/bounce.c diff --git a/sdk/drafts/bounce/evidence/cpu-price.json b/sdk/octatrack/modules/bounce/evidence/cpu-price.json similarity index 100% rename from sdk/drafts/bounce/evidence/cpu-price.json rename to sdk/octatrack/modules/bounce/evidence/cpu-price.json diff --git a/sdk/drafts/bounce/evidence/performance.json b/sdk/octatrack/modules/bounce/evidence/performance.json similarity index 95% rename from sdk/drafts/bounce/evidence/performance.json rename to sdk/octatrack/modules/bounce/evidence/performance.json index 836ccb5aa3..b0dee1e6f8 100644 --- a/sdk/drafts/bounce/evidence/performance.json +++ b/sdk/octatrack/modules/bounce/evidence/performance.json @@ -2,7 +2,7 @@ "schema": 1, "module": "bounce", "version": "0.4.0-experimental", - "sourceSha256": "0e6113ba94346d692368f012988db10fed5398e2567600d34c8d61c4f47ff77a", + "sourceSha256": "079cf45f00e7d9e18170c992bda43852a67afc655f3ca84fcac4f82631154dcc", "kind": "coldfire", "trigger": "key", "cycles": { diff --git a/sdk/drafts/bounce/generate.py b/sdk/octatrack/modules/bounce/generate.py similarity index 93% rename from sdk/drafts/bounce/generate.py rename to sdk/octatrack/modules/bounce/generate.py index 20893b11e7..ec697cb050 100644 --- a/sdk/drafts/bounce/generate.py +++ b/sdk/octatrack/modules/bounce/generate.py @@ -24,7 +24,7 @@ with tempfile.TemporaryDirectory() as tmp: asm, obj = Path(tmp) / 'unit.s', Path(tmp) / 'unit.o' - subprocess.run(['m68k-elf-gcc', *FLAGS, '-S', str(HERE / 'bounce.c'), '-o', str(asm)], check=True) + subprocess.run(['m68k-elf-gcc', *FLAGS, '-S', 'bounce.c', '-o', str(asm)], check=True, cwd=HERE) # a relative name: no local path in unit.s # One initialized .text extent, as other ColdFire modules: no .bss to clear. result = '| Generated by generate.py from bounce.c; edit the C source.\n' result += asm.read_text().replace('\t.data', '\t.text') diff --git a/sdk/drafts/bounce/manifest.py b/sdk/octatrack/modules/bounce/manifest.py similarity index 100% rename from sdk/drafts/bounce/manifest.py rename to sdk/octatrack/modules/bounce/manifest.py diff --git a/sdk/drafts/bounce/media/capture.json b/sdk/octatrack/modules/bounce/media/capture.json similarity index 100% rename from sdk/drafts/bounce/media/capture.json rename to sdk/octatrack/modules/bounce/media/capture.json diff --git a/sdk/drafts/bounce/media/ot-bounced.png b/sdk/octatrack/modules/bounce/media/ot-bounced.png similarity index 100% rename from sdk/drafts/bounce/media/ot-bounced.png rename to sdk/octatrack/modules/bounce/media/ot-bounced.png diff --git a/sdk/drafts/bounce/media/ot-recording.png b/sdk/octatrack/modules/bounce/media/ot-recording.png similarity index 100% rename from sdk/drafts/bounce/media/ot-recording.png rename to sdk/octatrack/modules/bounce/media/ot-recording.png diff --git a/sdk/drafts/bounce/media/ot-select.png b/sdk/octatrack/modules/bounce/media/ot-select.png similarity index 100% rename from sdk/drafts/bounce/media/ot-select.png rename to sdk/octatrack/modules/bounce/media/ot-select.png diff --git a/sdk/drafts/bounce/media/ot-undo.png b/sdk/octatrack/modules/bounce/media/ot-undo.png similarity index 100% rename from sdk/drafts/bounce/media/ot-undo.png rename to sdk/octatrack/modules/bounce/media/ot-undo.png diff --git a/sdk/drafts/bounce/octamod.module.json b/sdk/octatrack/modules/bounce/octamod.module.json similarity index 100% rename from sdk/drafts/bounce/octamod.module.json rename to sdk/octatrack/modules/bounce/octamod.module.json diff --git a/sdk/drafts/bounce/presentation/thumbnail.svg b/sdk/octatrack/modules/bounce/presentation/thumbnail.svg similarity index 100% rename from sdk/drafts/bounce/presentation/thumbnail.svg rename to sdk/octatrack/modules/bounce/presentation/thumbnail.svg diff --git a/sdk/drafts/bounce/runtime.json b/sdk/octatrack/modules/bounce/runtime.json similarity index 100% rename from sdk/drafts/bounce/runtime.json rename to sdk/octatrack/modules/bounce/runtime.json diff --git a/sdk/drafts/bounce/unit.s b/sdk/octatrack/modules/bounce/unit.s similarity index 99% rename from sdk/drafts/bounce/unit.s rename to sdk/octatrack/modules/bounce/unit.s index 4ebeba843a..9c9701a425 100644 --- a/sdk/drafts/bounce/unit.s +++ b/sdk/octatrack/modules/bounce/unit.s @@ -98,7 +98,7 @@ write_span: move.l %a2,-(%sp) move.l 20(%sp),%a1 #APP -| 312 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 312 "bounce.c" 1 move.w %sr,%d0 move.w #0x2700,%sr | 0 "" 2 @@ -114,7 +114,7 @@ write_span: cmp.l 24(%sp),%a0 jne .L13 #APP -| 314 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 314 "bounce.c" 1 move.w %d0,%sr | 0 "" 2 #NO_APP @@ -552,7 +552,7 @@ copy.constprop.0: set_mutes: move.l 4(%sp),%d0 #APP -| 288 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 288 "bounce.c" 1 move.w %sr,%d1 move.w #0x2700,%sr | 0 "" 2 @@ -560,7 +560,7 @@ set_mutes: move.l %d0,-2147483640 move.l %d0,269161684 #APP -| 290 "/Volumes/SPIZ Portable/imd_mb/spiz/octamod/modwerk/sdk/drafts/bounce/bounce.c" 1 +| 290 "bounce.c" 1 move.w %d1,%sr | 0 "" 2 #NO_APP diff --git a/sdk/drafts/bounce/verify.py b/sdk/octatrack/modules/bounce/verify.py similarity index 100% rename from sdk/drafts/bounce/verify.py rename to sdk/octatrack/modules/bounce/verify.py diff --git a/src/community/module-changelogs/bounce.json b/src/community/module-changelogs/bounce.json new file mode 100644 index 0000000000..71ddd97a8c --- /dev/null +++ b/src/community/module-changelogs/bounce.json @@ -0,0 +1,13 @@ +[ + { + "version": "0.4.0-experimental", + "date": "2026-12-03", + "changes": [ + "Hold DOWN and press REC (or FUNC+PART > BOUNCE) to record the active track for one pattern length, with its FX, without setting up the recorder.", + "Trig keys 1-8 merge other tracks into the take; the keys light red for the track you bounce into, green for merged tracks, yellow for the rest.", + "The track becomes a Flex machine playing the take, saved as a WAV in the project's BOUNCES folder; save the project to keep the link.", + "FUNC+PART > BOUNCE > RESET TRACK makes a track a fresh STATIC track, and UNDO brings back the last bounced or reset track.", + "Known issue: a pass longer than 4 bars at 1X is refused, and a Grain or synth track needs FLEX picked by hand after the take." + ] + } +] diff --git a/src/engine/assets/octatrack-module-packages.json b/src/engine/assets/octatrack-module-packages.json index 3d6101ddb0..6a2e7ae9ec 100644 --- a/src/engine/assets/octatrack-module-packages.json +++ b/src/engine/assets/octatrack-module-packages.json @@ -962,6 +962,12 @@ "bytes": 6060, "sha256": "333dd706bd70bfbf4248e469c1de641cda8d53060e434379e611e2a73512336c", "path": "octatrack-modules/void/0.1.0-experimental.mwrm" + }, + { + "id": "bounce", + "octabam": true, + "version": "0.4.0-experimental", + "path": "octatrack-modules/bounce/0.4.0-experimental.mwrm" } ], "usbAudio": { From 3a006fe963acdeebe43b1f50ddb4f7ed65a412a4 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Fri, 4 Dec 2026 00:03:47 +0100 Subject: [PATCH 30/43] Bounce In Place 0.4.0: release record from test:procedure on package 196de6d7 Co-Authored-By: Claude Opus 5.5 --- sdk/octatrack/modules/bounce/README.md | 15 +- sdk/octatrack/modules/bounce/TESTING.md | 21 ++ .../modules/bounce/evidence/cpu-price.json | 52 ++-- .../modules/bounce/octamod.module.json | 142 ++++++++- src/catalog/module-documents.json | 292 ++++++++++++++++++ 5 files changed, 474 insertions(+), 48 deletions(-) diff --git a/sdk/octatrack/modules/bounce/README.md b/sdk/octatrack/modules/bounce/README.md index 5d6b46924b..2ede363b75 100644 --- a/sdk/octatrack/modules/bounce/README.md +++ b/sdk/octatrack/modules/bounce/README.md @@ -25,12 +25,17 @@ BOUNCE shows the merge as inverted track names and on trig keys 1-8 (the active ## Usage -### Quick tutorial: bounce two tracks into one +1. Select the track to bounce into, then hold DOWN and press REC (or FUNC+PART > BOUNCE > BOUNCE T*n*). +2. Press trig keys 1-8 to merge other tracks in, then YES to arm; the take starts on the next pattern start. +3. When BOUNCE reads BOUNCED, SAVED AS, the track plays the take. Save the project to keep it; FUNC+PART > BOUNCE > UNDO goes back. -1. Select T1 with its TRACK key. Hold DOWN and press REC: BOUNCE opens with T1 inverted. -2. Press trig key 2: T2 is inverted too, so it is merged into T1's take. Press YES: BOUNCE reads WAITS FOR PATTERN START (PRESS PLAY when stopped). -3. Play the pattern. At the pattern start BOUNCE reads RECORDING ONE PASS; after one pass the take is saved and BOUNCE reads BOUNCED, SAVED AS B1-…. T1 now plays the take on a Flex machine with one trig, and T2 is muted. -4. Save the project to keep the take's link. To go back, FUNC+PART > BOUNCE > UNDO. +### Quick tutorial + +1. Select the track to bounce into with its TRACK key, here T1. +2. Hold DOWN and press REC: BOUNCE opens with T1 inverted and its trig key red. +3. Press trig key 2 to merge T2 into the take, then YES to arm it; press PLAY if the sequencer is stopped. +4. After one pattern pass BOUNCE reads BOUNCED, SAVED AS with the WAV's name: T1 plays the take as a Flex machine and T2 is muted. Save the project to keep the link. +5. To go back, FUNC+PART > BOUNCE > UNDO. ## How it works diff --git a/sdk/octatrack/modules/bounce/TESTING.md b/sdk/octatrack/modules/bounce/TESTING.md index dd589b589a..f76d1d1d95 100644 --- a/sdk/octatrack/modules/bounce/TESTING.md +++ b/sdk/octatrack/modules/bounce/TESTING.md @@ -311,6 +311,27 @@ Once during the run, stock's Part Edit window was open on PART's actions, SAVE A - a project never saved; - the submitter's stage 12. +## The release run: test:procedure on package 196de6d7 + +**3 December 2026, the developer's MKII**, OS 1.40C. Development twin `7d1223b1` of base 0.8.5, built from the developer's own 1.40C with `--usb-midi` added (the earlier twin `4813a3e5` offered no USB MIDI port, which the soak needs), RAM-booted, never flashed. Release base 0.8.5 (`ddb56b72`) stays flashed. Source `02cd1555` (the draft, before the listing commit; the listed folder builds the same package). Package SHA-256 `196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458`. Bank B, pattern B01, Part 1. `npm run test:procedure -- bounce`, 394 s: + +| Step | Result | +| --- | --- | +| 1 Software checks | passed (`module:doctor -- --draft bounce`) | +| 2 Beside every other module | not run on the unit; `modules:compat` installs it beside every active module and the base | +| 3 Name the build | passed: `196de6d7` | +| 4 DSP cost model | passed | +| 5 Emulator rehearsal | passed (twin `7d1223b1` in `ot_emu`, not hardware evidence) | +| 6 Read the unit | passed: Part 1 on B01, working = saved; the procedure saved that Part once (unchanged) so that its RELOAD works at the end | +| 7 Scripted unit pass | passed (`device:test`, 12 Part switches) | +| 8 Soak | passed: 2,400 operations in 122 s (19.7 a second), health replies median 12 ms, most 48; Part 1 reloaded afterwards, working = saved | +| 9 Cost on the unit | passed: frame interrupt 28.4 % before and 28.4 % installed and unused (0 points), CPU meter 41.0 % and 40.7 %, B01 playing | +| 10 Put back | passed: inventory empty, Part 1 working = saved | + +Steps 11 and 12 (by hand, and the developer's stage) are the runs on the same package recorded above: the edge cases on twin `4813a3e5` and the developer's report. + +**A test-tool fix found on the way.** The first run of this procedure failed at the soak's put-back: the device tool's RELOAD sent FUNC+PART, UP x3, DOWN, YES, made for stock's one-column PART menu. With Bounce installed the base opens its two-column Part Edit window, which remembers its cursor (it was on BOUNCE > UNDO), so those keys landed on BOUNCE's actions: the readout showed RESET TRACK's confirm (phase 7), then NO cancelled it and nothing was reset. The tool now presses LEFT, UP x3 and RIGHT first, which reaches PART's actions in the two-column window and changes nothing in stock's menu (both seen on the unit, screenshots, 3 December 2026). Commit `02cd1555`. + ## Key-press cost, package 196de6d7 (emulator) **3 December 2026, `ot_emu`** (octabam `f7d72906`, `--dsp --frame`, MKII panel) on the development twin `4813a3e5` of base 0.8.5, the developer's MAIN OS 1.40C, an emulated card with the BOUNCE project. Package `196de6d7` in a trial (`device.mjs try`), the same package the unit ran. Instructions counted with `watch`/`hits` between the base's key call (`0x40061dc8`) and its return, and its UI tick call (`0x40061e94`) and its return; each count includes the stock code and interrupts that ran inside the call. Not hardware evidence. diff --git a/sdk/octatrack/modules/bounce/evidence/cpu-price.json b/sdk/octatrack/modules/bounce/evidence/cpu-price.json index 8a9a53ed5d..77dab0f9c7 100644 --- a/sdk/octatrack/modules/bounce/evidence/cpu-price.json +++ b/sdk/octatrack/modules/bounce/evidence/cpu-price.json @@ -1,49 +1,49 @@ { "module": "bounce", "version": "0.4.0-experimental", - "base": "development twin 4813a3e5 of release base 0.8.5 (ddb56b72 flashed), RAM-booted", - "scene": "Octatrack MKII, the developer's project SALVA 4, bank B pattern B01 Part 1 playing at 141 BPM; installed and not used by any key press, menu or setting", + "base": "development twin 7d1223b1 of base 0.8.5 (ddb56b72 flashed)", + "scene": "the bank, pattern and Part the unit was on, transport stopped (test:procedure)", "inputs": { "transport": "playing" }, "seconds": 8, "readings": 3, - "measuredAt": "2026-12-03T21:39:36.441Z", + "measuredAt": "2026-12-03T23:01:02.446Z", "result": { "id": "bounce", "version": "file", "packageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", "before": { - "frame": 23.7, - "frameMax": 32, - "frames": 67364, + "frame": 28.4, + "frameMax": 39.1, + "frames": 67326, "skipped": 0, - "cpu": 36.1, - "dsp1to4": 32.8, - "dsp5to8": 39.8, - "dsp1to4Peak": 33.9, - "dsp5to8Peak": 43.5, + "cpu": 41, + "dsp1to4": 38.6, + "dsp5to8": 47, + "dsp1to4Peak": 39.6, + "dsp5to8Peak": 48, "readings": 3, "spread": { - "frame": 0, - "cpu": 0, + "frame": 0.1, + "cpu": 0.5, "dsp1to4": 0, "dsp5to8": 0, "frameMax": 0.4, - "dsp1to4Peak": 0.1, - "dsp5to8Peak": 3.6 + "dsp1to4Peak": 0, + "dsp5to8Peak": 0.8 } }, "atRest": { - "frame": 23.7, - "frameMax": 32.1, - "frames": 67354, + "frame": 28.4, + "frameMax": 38.8, + "frames": 67337, "skipped": 0, - "cpu": 36.2, - "dsp1to4": 32.8, - "dsp5to8": 39.8, - "dsp1to4Peak": 33.9, - "dsp5to8Peak": 43.5, + "cpu": 40.7, + "dsp1to4": 38.6, + "dsp5to8": 47, + "dsp1to4Peak": 39.7, + "dsp5to8Peak": 48, "readings": 3, "spread": { "frame": 0, @@ -52,15 +52,15 @@ "dsp5to8": 0, "frameMax": 0.3, "dsp1to4Peak": 0.1, - "dsp5to8Peak": 3.6 + "dsp5to8Peak": 0.8 } }, "atRestAdds": { "frame": 0, - "cpu": 0.1, + "cpu": -0.3, "dsp1to4": 0, "dsp5to8": 0, - "dsp1to4Peak": 0, + "dsp1to4Peak": 0.1, "dsp5to8Peak": 0 }, "rolledBack": true diff --git a/sdk/octatrack/modules/bounce/octamod.module.json b/sdk/octatrack/modules/bounce/octamod.module.json index b1380b433d..0dbdba0076 100644 --- a/sdk/octatrack/modules/bounce/octamod.module.json +++ b/sdk/octatrack/modules/bounce/octamod.module.json @@ -52,24 +52,24 @@ "effectId": null }, "resources": { - "recorded": "Not measured", + "recorded": "2026-12-03", "storage": { - "label": "Storage", - "display": "Not measured", + "label": "ColdFire code", + "display": "26096 bytes", "value": null, - "unit": "unknown", - "method": "unmeasured", - "conditions": "No measurements exist yet. Add exact conditions and source evidence when available.", + "unit": "see display", + "method": "static", + "conditions": "The USB package 196de6d7: 8,312 bytes of ColdFire code and data and 17,784 bytes of bss (the Part and pattern snapshots for UNDO, 2,330 bytes of pattern record among them). No DSP memory.", "source": "TESTING.md" }, "processing": { - "label": "CPU / DSP load", - "display": "Not measured", + "label": "ColdFire worst event", + "display": "2394862 cycles/event", "value": null, - "unit": "unknown", - "method": "unmeasured", - "conditions": "No measurements exist yet. Add exact conditions and source evidence when available.", - "source": "TESTING.md" + "unit": "see display", + "method": "emulator", + "conditions": "The dearest event in ot_emu (evidence/performance.json): the take's end, one bounded edit in the UI tick, 2,394,862 executed instructions against a 26,600,000-cycle responsiveness deadline; the dearest key press, RESET TRACK's YES, 247,170. Nothing runs in the frame interrupt.", + "source": "evidence/performance.json" }, "cpuPrice": { "value": 0, @@ -77,20 +77,128 @@ "measure": "frame-interrupt", "tool": "npm run device:price -- --write", "date": "2026-12-03", - "conditions": "Octatrack MKII, the developer's project SALVA 4, bank B pattern B01 Part 1 playing at 141 BPM; installed and not used by any key press, menu or setting; base development twin 4813a3e5 of release base 0.8.5 (ddb56b72 flashed), RAM-booted; 3 readings of 8 s a state. Frame interrupt 23.7 % before, 23.7 % installed and used nowhere; CPU meter 36.1 % before, 36.2 % at rest.", + "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 7d1223b1 of base 0.8.5 (ddb56b72 flashed); 3 readings of 8 s a state. Frame interrupt 28.4 % before, 28.4 % installed and used nowhere; CPU meter 41 % before, 40.7 % at rest.", "source": "evidence/cpu-price.json" + }, + "impact": { + "conditions": "One instance, the only kind there is. On the developer's MKII (development twin 7d1223b1 of base 0.8.5), the frame interrupt with the module installed and unused, the pattern playing (test:procedure step 9); while a take records, the T4 readings on twin 4813a3e5 (TESTING.md).", + "cpu": { + "level": "minimal", + "basis": "measured-comparison", + "rationale": "Installed and unused, the frame interrupt stayed at 28.4 % (0 points). While a take records, about 6 more points, because stock's recorder runs; nothing at rest.", + "source": "evidence/cpu-price.json" + }, + "dsp": { + "level": "minimal", + "basis": "measured-comparison", + "rationale": "No DSP code: the package carries no DSP words and uses no effect slot.", + "source": "evidence/performance.json" + }, + "memory": { + "level": "moderate", + "basis": "source-estimate", + "rationale": "26,096 bytes of ColdFire RAM for the one instance, most of it the UNDO snapshot (tests.qualification.memory).", + "source": "TESTING.md" + } } }, "tests": { "report": "TESTING.md", - "summary": "0.4.0 package 196de6d7 on one MKII (development twin 4813a3e5 of base 0.8.5, in RAM): the test procedure's unit steps passed, the soak not run (no USB MIDI on the twin); bounce, merge, RESET TRACK and UNDO each restored the Part byte for byte. CPU at rest +0 points of the frame interrupt, about +6 while a take records. The developer's own test on this package (the popup, a project save, reload and power cycle, playing the bounces) worked, as reported. Not yet: a full card, an MKI.", - "hardwareStatus": "untested", - "evidenceRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", + "summary": "npm run test:procedure on the developer's MKII (3 December 2026, development twin 7d1223b1 of base 0.8.5): steps 1, 3-10 passed on package 196de6d7, including a 122 s soak of 2,400 operations and a CPU price of 0 points at rest. By hand on the same package: bounce, merge, RESET TRACK and UNDO, each restoring the Part byte for byte. The developer's own test (the popup, a project save, reload and power cycle, playing the bounces) worked, as reported. perf:audit: worst event 2,394,862 instructions in ot_emu.", + "hardwareStatus": "reported", + "evidenceRevision": "02cd155533cefe41bfe598247f50f69a3b314b49", "gates": [ "Worst-case cycles under parameter modulation and maximum load", "Exact memory region and maximum-instance totals", "Owner-reviewed real-hardware evidence with actual coverage and limitations" - ] + ], + "qualification": { + "moduleVersion": "0.4.0-experimental", + "sourceSha256": "dbd69915be55222063b329c449bcb89e93aefad2564fa2bfe180dec4cc503dd0", + "cycles": [ + { + "processor": "coldfire", + "worstCase": 2394862, + "maxConfiguration": 2394862, + "maxInstances": 1, + "budget": 26600000, + "unit": "cycles/event", + "method": "emulator", + "conditions": { + "parameterExtremes": "The dearest event: the end of a two-track take while playing (Flex conversion, mutes, stock's save started), 2,394,862 executed instructions in the UI tick; the dearest key press, RESET TRACK's YES, 247,170 (it snapshots the Part bytes and the 2,330-byte pattern record and writes a fresh track); UNDO 145,880-159,433; YES arming a merge 161,103. Read with ot_emu's watch/hits between the base's core_key (0x40061dc8-0x40061dce) and core_tick (0x40061e94-0x40061e9a) calls and their returns (octabam f7d72906, --dsp --frame, MKII panel, twin 4813a3e5 of base 0.8.5, package 196de6d7, 3 December 2026); each count includes stock code and interrupts inside the call. Instructions, not cycles.", + "parameterModulation": "Not applicable: the module has no parameters, LFO destinations or MIDI CCs; it acts on key presses and once per UI tick only while a take is armed.", + "modeSwitching": "In ot_emu, STOP, PLAY and a Part change (Part 1 to Part 2) between the stress run's two halves of ten RESET TRACK and UNDO pairs; on the unit, 12 Part switches in device:test with the package installed (test:procedure step 7).", + "maxLoad": "One instance (a ColdFire key and tick handler). The dearest edit touches one track's Part and pattern record and the merged tracks' mutes, at most eight tracks; the stress run kept the pattern playing throughout.", + "inputConditions": "Not applicable to the cost: no audio passes through the module's code. The take itself is stock's recorder, at most 64 master steps." + }, + "report": "evidence/performance.json" + } + ], + "memory": { + "regions": [ + { + "name": "ColdFire code and data of the USB package", + "space": "cpu-ram", + "words": 8312, + "wordBits": 8, + "bytes": 8312, + "scope": "shared" + }, + { + "name": "ColdFire bss of the USB package", + "space": "cpu-ram", + "words": 17784, + "wordBits": 8, + "bytes": 17784, + "scope": "shared" + } + ], + "perInstanceBytes": 0, + "sharedBytes": 26096, + "maxInstances": 1, + "totalBytes": 26096, + "conditions": "From the header of the USB package 196de6d7 (ABI 8): code and data 8,312 bytes, bss 17,784 (the UNDO snapshot of one track's Part bytes, its 2,330-byte pattern record and the mutes). No DSP memory and no stock blocks reused; the stack is the UI task's own; the WAV is written by stock's own save jobs.", + "report": "TESTING.md" + }, + "imageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", + "hardware": { + "kind": "functional", + "status": "reported", + "model": "MKII", + "testedOn": "2026-12-03", + "tester": "seniorspiz", + "sourceRevision": "02cd155533cefe41bfe598247f50f69a3b314b49", + "imageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", + "summary": "On the developer's Octatrack MKII (OS 1.40C), 3 December 2026, npm run test:procedure ran on package 196de6d7 built from 02cd1555 on development twin 7d1223b1 of base 0.8.5 (RAM-booted, never flashed): software checks, cost model, emulator rehearsal, unit read, scripted pass (12 Part switches), a 122 s soak of 2,400 operations, the CPU price (0 points at rest) and put back passed. By hand on the same package (twin 4813a3e5): bounce, merge, RESET TRACK and UNDO, each restoring the Part byte for byte; about 6 points of the frame interrupt while a take records. The developer then tested the popup, a project save, reload and power cycle and playing the bounces, as reported.", + "limitations": [ + "Not run: step 2, beside every other module on the unit; modules:compat installs it beside every active module and the base.", + "Not tested: a WAV save onto a full card, Studio cue mode, MAIN TO CUE, and an MKI.", + "Not tested: another module with Part Edit rows (Kits, Pattern Sample Locks) installed at the same time.", + "The developer's save, reload and power cycle test is as reported, without a record of each step.", + "No audio was recorded for evidence: how a take sounds is the developer's report." + ], + "report": "TESTING.md" + }, + "documentation": { + "tutorial": { + "title": "Quick tutorial", + "steps": [ + "Select the track to bounce into with its TRACK key, here T1.", + "Hold DOWN and press REC: BOUNCE opens with T1 inverted and its trig key red.", + "Press trig key 2 to merge T2 into the take, then YES to arm it; press PLAY if the sequencer is stopped.", + "After one pattern pass BOUNCE reads BOUNCED, SAVED AS with the WAV's name: T1 plays the take as a Flex machine and T2 is muted. Save the project to keep the link.", + "To go back, FUNC+PART > BOUNCE > UNDO." + ] + }, + "screenshots": [ + "media/ot-select.png", + "media/ot-recording.png", + "media/ot-bounced.png", + "media/ot-undo.png" + ], + "screenshotStyle": "black-and-white" + } + } }, "license": { "spdx": "MIT", diff --git a/src/catalog/module-documents.json b/src/catalog/module-documents.json index eccff8cb3b..f13063ecdc 100644 --- a/src/catalog/module-documents.json +++ b/src/catalog/module-documents.json @@ -17987,6 +17987,298 @@ "declaration": "Original code by Andrey Sidorkin (MIT). No Elektron firmware, extracted routines or tables: stock addresses and instruction hashes only." }, "media": [] + }, + { + "schemaVersion": 2, + "id": "bounce", + "key": "BOUNCE", + "name": "Bounce In Place", + "version": "0.4.0-experimental", + "category": "system", + "access": { + "location": "Hold DOWN and press REC, or FUNC+PART (Part Edit) > BOUNCE.", + "steps": [ + "Select the destination track with its TRACK key.", + "Hold DOWN, then press REC: BOUNCE opens with the active track inverted; the active track's trig key lights red, the others you can tap yellow.", + "Press trig keys 1-8 to add or remove tracks, then YES to arm; NO closes without changes." + ], + "screenshots": [ + "media/ot-select.png", + "media/ot-recording.png", + "media/ot-bounced.png", + "media/ot-undo.png" + ] + }, + "author": { + "github": "seniorspiz", + "credits": [ + "seniorspiz" + ] + }, + "nativeManifest": "manifest.py", + "presentation": { + "label": "Bounce tracks in place", + "family": "Recording", + "summary": "Bounce one or more audio tracks into the active track as a Flex recording, one pattern long, saved as a WAV, without setting up the recorder by hand.", + "overview": "Bounce In Place records the active track, and any other tracks you pick, for exactly one pattern length (in per-track mode the track's own length; merged tracks until their lengths meet), with their effects. When the take ends, the active track becomes a Flex machine playing it, with its FX off, stock AMP and one trig on step 1, and the take is saved as a WAV (B-YYMMDD-HHMM) in the project's BOUNCES folder, with the track's buffer assigned to it, so it reloads once you save the project. The other merged tracks are muted with stock's mute. RESET TRACK makes a track a fresh STATIC track. UNDO brings back the last bounce or reset until the next power cycle or project change. It uses no effect slot.", + "highlights": [ + "Hold DOWN and press REC, or FUNC+PART > BOUNCE, to open BOUNCE for the active track.", + "Press trig keys 1-8 to merge more tracks into the active track's take; the active track lights red, merged tracks green, the others you can tap yellow.", + "Records on the instrument's own tempo and length, starting on the next step 1.", + "The take is saved in the project's BOUNCES folder, the track becomes a Flex machine playing it, and FUNC+PART > BOUNCE > UNDO brings the track back." + ], + "usage": [ + "Select the track to bounce into, then hold DOWN and press REC (or FUNC+PART > BOUNCE > BOUNCE).", + "Press trig keys 1-8 to merge those tracks in; press YES to arm. The take starts on the next step 1.", + "When BOUNCE reads BOUNCED, SAVED AS, the track plays the recording. FUNC+PART > BOUNCE > UNDO goes back." + ] + }, + "controls": [], + "compatibility": { + "firmware": "1.40C", + "effectId": null, + "location": "Audio tracks", + "conflicts": [], + "uiClaims": [ + "key:DOWN+REC", + "key:TRIG@BOUNCE" + ], + "limitations": [ + "Experimental: 0.4.0 (package 196de6d7) passed the test procedure's unit steps on one MKII (a development twin in RAM; bounce, merge, RESET TRACK and UNDO), the soak not run. Its developer's own test on the same MKII (the popup, a project save, reload and power cycle, playing the bounces) worked, as reported.", + "The WAV is saved at once, but the track only keeps pointing to it after you save the project (as stock's own SAVE THIS RECORDING).", + "A full card: BOUNCE says NOT SAVED and the take stays in the recorder buffer; save it from the Audio Editor.", + "A pass longer than 64 master steps (4 bars at 1X) is refused.", + "Refuses T8 while MASTER TRACK is on, and a merged track whose cue level is 0.", + "A Grain or synth track: after the take, pick FLEX for it in the machine chooser yourself; a popup says so.", + "Bounces only while the sequencer plays; UNDO lasts until the next power cycle or project change.", + "While a take records, the frame interrupt carries about 6 points more; at rest nothing.", + "Not yet tested: a full card, Studio cue mode, MAIN TO CUE, an MKI." + ] + }, + "resources": { + "recorded": "2026-12-03", + "storage": { + "label": "ColdFire code", + "display": "26096 bytes", + "value": null, + "unit": "see display", + "method": "static", + "conditions": "The USB package 196de6d7: 8,312 bytes of ColdFire code and data and 17,784 bytes of bss (the Part and pattern snapshots for UNDO, 2,330 bytes of pattern record among them). No DSP memory.", + "source": "TESTING.md" + }, + "processing": { + "label": "ColdFire worst event", + "display": "2394862 cycles/event", + "value": null, + "unit": "see display", + "method": "emulator", + "conditions": "The dearest event in ot_emu (evidence/performance.json): the take's end, one bounded edit in the UI tick, 2,394,862 executed instructions against a 26,600,000-cycle responsiveness deadline; the dearest key press, RESET TRACK's YES, 247,170. Nothing runs in the frame interrupt.", + "source": "evidence/performance.json" + }, + "impact": { + "conditions": "One instance, the only kind there is. On the developer's MKII (development twin 7d1223b1 of base 0.8.5), the frame interrupt with the module installed and unused, the pattern playing (test:procedure step 9); while a take records, the T4 readings on twin 4813a3e5 (TESTING.md).", + "cpu": { + "level": "minimal", + "basis": "measured-comparison", + "rationale": "Installed and unused, the frame interrupt stayed at 28.4 % (0 points). While a take records, about 6 more points, because stock's recorder runs; nothing at rest.", + "source": "evidence/cpu-price.json" + }, + "dsp": { + "level": "minimal", + "basis": "measured-comparison", + "rationale": "No DSP code: the package carries no DSP words and uses no effect slot.", + "source": "evidence/performance.json" + }, + "memory": { + "level": "moderate", + "basis": "source-estimate", + "rationale": "26,096 bytes of ColdFire RAM for the one instance, most of it the UNDO snapshot (tests.qualification.memory).", + "source": "TESTING.md" + } + }, + "cpuPrice": { + "value": 0, + "unit": "percent-of-frame", + "measure": "frame-interrupt", + "tool": "npm run device:price -- --write", + "date": "2026-12-03", + "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 7d1223b1 of base 0.8.5 (ddb56b72 flashed); 3 readings of 8 s a state. Frame interrupt 28.4 % before, 28.4 % installed and used nowhere; CPU meter 41 % before, 40.7 % at rest.", + "source": "evidence/cpu-price.json" + } + }, + "tests": { + "report": "TESTING.md", + "summary": "npm run test:procedure on the developer's MKII (3 December 2026, development twin 7d1223b1 of base 0.8.5): steps 1, 3-10 passed on package 196de6d7, including a 122 s soak of 2,400 operations and a CPU price of 0 points at rest. By hand on the same package: bounce, merge, RESET TRACK and UNDO, each restoring the Part byte for byte. The developer's own test (the popup, a project save, reload and power cycle, playing the bounces) worked, as reported. perf:audit: worst event 2,394,862 instructions in ot_emu.", + "hardwareStatus": "reported", + "evidenceRevision": "02cd155533cefe41bfe598247f50f69a3b314b49", + "gates": [ + "Worst-case cycles under parameter modulation and maximum load", + "Exact memory region and maximum-instance totals", + "Owner-reviewed real-hardware evidence with actual coverage and limitations" + ], + "qualification": { + "documentation": { + "tutorial": { + "title": "Quick tutorial", + "steps": [ + "Select the track to bounce into with its TRACK key, here T1.", + "Hold DOWN and press REC: BOUNCE opens with T1 inverted and its trig key red.", + "Press trig key 2 to merge T2 into the take, then YES to arm it; press PLAY if the sequencer is stopped.", + "After one pattern pass BOUNCE reads BOUNCED, SAVED AS with the WAV's name: T1 plays the take as a Flex machine and T2 is muted. Save the project to keep the link.", + "To go back, FUNC+PART > BOUNCE > UNDO." + ] + }, + "screenshots": [ + "media/ot-select.png", + "media/ot-recording.png", + "media/ot-bounced.png", + "media/ot-undo.png" + ], + "screenshotStyle": "black-and-white" + }, + "moduleVersion": "0.4.0-experimental", + "sourceSha256": "dbd69915be55222063b329c449bcb89e93aefad2564fa2bfe180dec4cc503dd0", + "imageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", + "cycles": [ + { + "processor": "coldfire", + "worstCase": 2394862, + "maxConfiguration": 2394862, + "maxInstances": 1, + "budget": 26600000, + "unit": "cycles/event", + "method": "emulator", + "conditions": { + "parameterExtremes": "The dearest event: the end of a two-track take while playing (Flex conversion, mutes, stock's save started), 2,394,862 executed instructions in the UI tick; the dearest key press, RESET TRACK's YES, 247,170 (it snapshots the Part bytes and the 2,330-byte pattern record and writes a fresh track); UNDO 145,880-159,433; YES arming a merge 161,103. Read with ot_emu's watch/hits between the base's core_key (0x40061dc8-0x40061dce) and core_tick (0x40061e94-0x40061e9a) calls and their returns (octabam f7d72906, --dsp --frame, MKII panel, twin 4813a3e5 of base 0.8.5, package 196de6d7, 3 December 2026); each count includes stock code and interrupts inside the call. Instructions, not cycles.", + "parameterModulation": "Not applicable: the module has no parameters, LFO destinations or MIDI CCs; it acts on key presses and once per UI tick only while a take is armed.", + "modeSwitching": "In ot_emu, STOP, PLAY and a Part change (Part 1 to Part 2) between the stress run's two halves of ten RESET TRACK and UNDO pairs; on the unit, 12 Part switches in device:test with the package installed (test:procedure step 7).", + "maxLoad": "One instance (a ColdFire key and tick handler). The dearest edit touches one track's Part and pattern record and the merged tracks' mutes, at most eight tracks; the stress run kept the pattern playing throughout.", + "inputConditions": "Not applicable to the cost: no audio passes through the module's code. The take itself is stock's recorder, at most 64 master steps." + }, + "report": "evidence/performance.json" + } + ], + "memory": { + "regions": [ + { + "name": "ColdFire code and data of the USB package", + "space": "cpu-ram", + "words": 8312, + "wordBits": 8, + "bytes": 8312, + "scope": "shared" + }, + { + "name": "ColdFire bss of the USB package", + "space": "cpu-ram", + "words": 17784, + "wordBits": 8, + "bytes": 17784, + "scope": "shared" + } + ], + "perInstanceBytes": 0, + "sharedBytes": 26096, + "maxInstances": 1, + "totalBytes": 26096, + "conditions": "From the header of the USB package 196de6d7 (ABI 8): code and data 8,312 bytes, bss 17,784 (the UNDO snapshot of one track's Part bytes, its 2,330-byte pattern record and the mutes). No DSP memory and no stock blocks reused; the stack is the UI task's own; the WAV is written by stock's own save jobs.", + "report": "TESTING.md" + }, + "hardware": { + "kind": "functional", + "status": "reported", + "model": "MKII", + "testedOn": "2026-12-03", + "tester": "seniorspiz", + "sourceRevision": "02cd155533cefe41bfe598247f50f69a3b314b49", + "imageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", + "summary": "On the developer's Octatrack MKII (OS 1.40C), 3 December 2026, npm run test:procedure ran on package 196de6d7 built from 02cd1555 on development twin 7d1223b1 of base 0.8.5 (RAM-booted, never flashed): software checks, cost model, emulator rehearsal, unit read, scripted pass (12 Part switches), a 122 s soak of 2,400 operations, the CPU price (0 points at rest) and put back passed. By hand on the same package (twin 4813a3e5): bounce, merge, RESET TRACK and UNDO, each restoring the Part byte for byte; about 6 points of the frame interrupt while a take records. The developer then tested the popup, a project save, reload and power cycle and playing the bounces, as reported.", + "limitations": [ + "Not run: step 2, beside every other module on the unit; modules:compat installs it beside every active module and the base.", + "Not tested: a WAV save onto a full card, Studio cue mode, MAIN TO CUE, and an MKI.", + "Not tested: another module with Part Edit rows (Kits, Pattern Sample Locks) installed at the same time.", + "The developer's save, reload and power cycle test is as reported, without a record of each step.", + "No audio was recorded for evidence: how a take sounds is the developer's report." + ], + "report": "TESTING.md" + } + } + }, + "license": { + "spdx": "MIT", + "file": "LICENSE", + "declaration": "Original code by seniorspiz under MIT. No Elektron firmware, extracted routines or tables." + }, + "media": [ + { + "path": "media/ot-select.png", + "captureType": "emulator", + "caption": "Select the track to bounce into (here T1), hold DOWN and press REC: BOUNCE opens. Press trig key 2 to merge T2 into the take, then YES to arm it. The pass is one pattern long, here 16 steps.", + "alt": "The BOUNCE T1 window with T1 and T2 inverted in a row of track names T1 to T8, and the lines PASS 16 STEPS, TRIG 1-8: MERGE, YES: REC NO: CLOSE.", + "credit": "seniorspiz (headless capture)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "otUi": { + "page": "BOUNCE", + "shows": "location-and-controls", + "firmware": "1.40C", + "moduleVersion": "0.4.0-experimental", + "imageSha256": "1d7a00b139d4eef4d8e99aff0f788435c4486187ac851fab775e375329d7c54b", + "setup": "Headless ot_emu (octabam f7d72906, the adapted emulator), MKII panel, --dsp --frame; the development twin 4813a3e5 of Modwerk base 0.8.5 built from the developer's own 1.40C, with package 196de6d7 in a trial over the emulated USB; an emulated card with a test project (BOUNCE), Part 2, pattern A01; the LCD as the panel link carries it (module_draw included), 128x64 at integer scale 6." + } + }, + { + "path": "media/ot-recording.png", + "captureType": "emulator", + "caption": "Once armed, the take starts on the next pattern start while the sequencer plays and runs for one pass. NO cancels it and changes nothing.", + "alt": "The BOUNCE T1 window with T1 and T2 inverted and the lines RECORDING ONE PASS and NO: CANCEL.", + "credit": "seniorspiz (headless capture)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "otUi": { + "page": "BOUNCE", + "shows": "controls", + "firmware": "1.40C", + "moduleVersion": "0.4.0-experimental", + "imageSha256": "1d7a00b139d4eef4d8e99aff0f788435c4486187ac851fab775e375329d7c54b", + "setup": "Headless ot_emu (octabam f7d72906, the adapted emulator), MKII panel, --dsp --frame; the development twin 4813a3e5 of Modwerk base 0.8.5 built from the developer's own 1.40C, with package 196de6d7 in a trial over the emulated USB; an emulated card with a test project (BOUNCE), Part 2, pattern A01; the LCD as the panel link carries it (module_draw included), 128x64 at integer scale 6." + } + }, + { + "path": "media/ot-bounced.png", + "captureType": "emulator", + "caption": "After one pass the take is saved as a WAV in the project's BOUNCES folder, and T1 becomes a Flex machine playing it; the merged T2 is muted. Save the project to keep the track's link to the file.", + "alt": "The BOUNCE window reading BOUNCED, SAVED AS B1-261203-2328 over the main screen, with SRC FLEX on the bottom line.", + "credit": "seniorspiz (headless capture)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "otUi": { + "page": "BOUNCE", + "shows": "controls", + "firmware": "1.40C", + "moduleVersion": "0.4.0-experimental", + "imageSha256": "1d7a00b139d4eef4d8e99aff0f788435c4486187ac851fab775e375329d7c54b", + "setup": "Headless ot_emu (octabam f7d72906, the adapted emulator), MKII panel, --dsp --frame; the development twin 4813a3e5 of Modwerk base 0.8.5 built from the developer's own 1.40C, with package 196de6d7 in a trial over the emulated USB; an emulated card with a test project (BOUNCE), Part 2, pattern A01; the LCD as the panel link carries it (module_draw included), 128x64 at integer scale 6." + } + }, + { + "path": "media/ot-undo.png", + "captureType": "emulator", + "caption": "FUNC+PART opens Part Edit, where the BOUNCE row holds BOUNCE TRACK, RESET TRACK and UNDO. UNDO gives the last bounced or reset track back its machine, settings, trigs and the merged tracks' mutes.", + "alt": "The PART EDIT window with PART and BOUNCE in the left column, BOUNCE selected, and BOUNCE TRACK, RESET TRACK and UNDO on the right, UNDO highlighted.", + "credit": "seniorspiz (headless capture)", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "otUi": { + "page": "PART EDIT", + "shows": "location-and-controls", + "firmware": "1.40C", + "moduleVersion": "0.4.0-experimental", + "imageSha256": "1d7a00b139d4eef4d8e99aff0f788435c4486187ac851fab775e375329d7c54b", + "setup": "Headless ot_emu (octabam f7d72906, the adapted emulator), MKII panel, --dsp --frame; the development twin 4813a3e5 of Modwerk base 0.8.5 built from the developer's own 1.40C, with package 196de6d7 in a trial over the emulated USB; an emulated card with a test project (BOUNCE), Part 2, pattern A01; the LCD as the panel link carries it (module_draw included), 128x64 at integer scale 6." + } + } + ] } ] } From 7220f83cee4b4f394cc2a58a61264a128fb41b22 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Fri, 4 Dec 2026 00:04:24 +0100 Subject: [PATCH 31/43] Bounce In Place 0.4.0: its USB package, 196de6d7 (the tested one) Co-Authored-By: Claude Opus 5.5 --- .../bounce/0.4.0-experimental.mwrm | Bin 0 -> 9676 bytes src/engine/assets/octatrack-module-packages.json | 11 ++++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 public/octatrack-modules/bounce/0.4.0-experimental.mwrm diff --git a/public/octatrack-modules/bounce/0.4.0-experimental.mwrm b/public/octatrack-modules/bounce/0.4.0-experimental.mwrm new file mode 100644 index 0000000000000000000000000000000000000000..b407a7044181757086f88bf722b0270f1b4cb466 GIT binary patch literal 9676 zcmds7e^gUfp1&`I5Flbev?)b+hLoW$5=uQi>bl+JL1IYbgC=OP>uJ+glFl5f;g?dI zqb~s|cDu!j)9vxh&i2gdX{pnr3_7l|t`n)#QtD~JGHBhd z5z9A-mFu5;x&{Mg`qPFOGaX`Vj)eQG@&5-uC!5c#DdI+^mlX3xX6V|_i~+6X3Axd6 zRnO9Q>6usYk5pWVkGW2><@rmUeU{ar&dgkDOwAlH()Htvr3zG3ViOZ|%I~h86AcP` zMTtFakQ5KbR9s<3xpCogmVChGaWJjBC2*lOda*5Vepzzu_AlE4XKEuC+5)HCN5CZ` z(4Q_bZMuUcrrViLYz_(j9+D2SX+>k#D?zQK$c^=HGi_}r({@DyW5)YfVnzW=JfOJQ zqp@06ruffUQ>`f&k!g!LCx60T>05ENjajg|xgGp&q`SB6H&>V`@TD_mc_JU{wQ7p3 zEDfXdu}PNmNeq0K7u#_CyNvtTLyPr|QBi8R+kP?ryMt}(bdqApl^bi7hPy@ERGUGk zz#s-1k`F31=Y5g-Na&%iNX;-w-yoQ+%wQ}wnSVPYoToGt)$1+J){&pil$FYiw>Ms8cztgk07%x#wm|b-P;$Wb&Ean7OjL zz3>U_rvcJ5F@rUYdTRRRo*$0!k!S1ovw0zbD8A^NL+ct;rK=fHrSZr3ngv?lf}14w zf(g0twzliM?V8*OX)nU!!Ua}l*+SYA^M&F4tl-RkR@mLV&LawcZhKs@+E}It3V)%6 zU3igpyrZ`v>4fsh6_zbZmc&B+H+!?wi=FQMtT<>a)VH)|M7>H^OU-~c;y>(+7V1y5 z`Y*#u!;sm;XT3Z%tGGqL&SmH8F{=f$7S#7)Ch^ZZ9*=~RPAYspyI1Mx#at#!BF*z3 z(TwO}<*D=DwnJ@C4NP&(MQ?lsW=jY-$@HQ;#ti;klBnWyKh0<1&0{t`Nhv)T=4tZ1b7l zOyVg&aNW9*iP%XiD|9u*<8^<#3!1W$RB#6Ca$9QWCi#d>_?t7}vRH0}Mzltw+2w6> zv%qyp!Mi@ASkLA}C{DPAz$j?K&c4Cd$U-&iyLJXLL|F8KbM_m!ex5ggzTKcm{kYG) zGoa&rXH~sR5!Y!$b}8sYuN19)n`t%=lD1yygXfz5&>OqLat4|=zs(X($8@k*vl&{R zH`MHnRPP8SBNCkSU_9i6#;7@GBYF~qnb=W*$+>HnbVENF%KNGqzi#$H~P zPgkE5Euec<#|P4OX=g1oQS;GrbRCRMzI;Zs4ML8Z{y+4c?)$XQevv(rstx+x8NsdD z1@SoUTjm)zH-~gx%{7d*)wa5I!N&@r*WAMkotuBVgvH*4&$_yHJgqU?+|fXOKC=j( zQZcD8!J^Aga=#F`=5ZPY4>K_X`MTomZPb)Sz1!^`&o8e^|JY6_-y; zv^MTVY~IUsC$PfUWOCM!vQQE=|9J{pTVqYrDMsN*8MZY`-i_Ie`LlG*jIlNLQMSe` zeKLvOx2!H^0kw$v3tXYY%vJvyu!LF5S+P25#n((U!*c&^5*x$<#QS)D*!lj@ORf$2 zHM*!#_~~0#jq6$c8hJNl(Jl!yib}?M$VHm(gffj4RfEBO#A&S32ThyFHU^3lkbw#z-=y<{ zB}49=8w{{)1Ih1aHzqKL{_aUj*d{E~i=_w=&mfXKhkUS>t_$|cyYioN_T^1jC|9SD zMDk@C>sD4DuNTT9dB;IDiWM<-lq{Mkyzq9;<7v*r%%e@F`yYd??r1PN)z-nYL5BJ! zO7c#6f0o79@s_;}suX_y)(ftX5Azz-cU4|>EM4bsqpKK2{8H~7pv{C-Qt0WfXpqIz zyix2RUlFI@!Jm7%WJdp9>vH4l7KQh0;619$20x3tRZ8C1Ze8w7y)-88;#Q_u!Z71E zXt&UMQH?`+@8bC~k5>xMOJ{im+s&UpSECt!J|`WaxP`HZVIjSJ;>O~_ z>otBI;nxe4%P6y}xi3G%LUf~35<%c7 z_r`3do!aB6Y*(XKZC8Q$kP^(Xma=TC#7so#Ijzm6oJjjE!|LiLrz*6CEU_se*0MR$ z)f^~vQ@u7fVBviqVQe;ys~4lvl@xcm(?xxh!m2N|x%lLGdd# zY3k1Ro}Og-ZLOcw98XHIrm`K@Z7|zJ+b8f| z+c12H6<8!?1?tT@LwW~gl5Qn1R;<|~P&P1|buFl?6iFvVFfwt@_CB^GES#OwTEGCk z9pj2M>1CP^(VMeY$+tHpo}RSLDlr_6)G*<};xJpdPzdWh&Pwgz2ZJ$hB)!AMn$Q~< zD$#_uEnL2Bo6Xic$xNc1WXW5e?qsP_Creo1U`f^l)e5P~x#@={3{r&j?`tL5*1o>t zs)?m{n3y+0F*Z3XFe)jM&}2*J8S$_ZxVA-5^NsJ1bAFF;|5W*&S4nTx$0?#Bc8#f7 zLG;qxFR!BLlEEYsB_>d4|d>d0qq)sgee%i-aBU{9h4BQZy| zpZz7nO;Ys)47_^X2Rjx0=Pk2!QO1}N^-9mTd#c+V6XPR@0zAsp9HZ88Sj?>|^q9P> zx_z1_>TlxsZX;b!th|BiF>y8Y2s60aBVk_v%I#RkE;9Iv*2o=y_>PbYcije z>TPhRJ^Z4xE{X5o$V}Z$=LYQKscC)r*|+0-WdoFVtZ7zFp$$IMX-1sEUg;_0D6ITb zw=tL@y@eSSXajZ5BTY2Jl#Gx`L9fSzsl#%$R{oZ-yhlab#HY$DgixegKSGK zKb;^;UVD>Mj?^V$r7_p(wUcDM>=2zXYYqnsRV|P`G-#}_)tE6Xz)SdA^LjDINZxy- zJzDp2)DBGoMeVm^M3Fo$HLtjV+_ip zygi5ccdNUXp8-DbMJwhobq_0?!yaxYOwgWy6;R9gda?<#B%=D8$p=)MBOCDV50nl5 zul6u5Rkt@JhXr*PRWDKZQniS1!chfTAwXU#nBg7ft-514`PL<47QUl3{ROjiEr>~r zEg4qryrt0X$8yi;&0BiV$~{*$a6PC#x(8Z%5S-rF+^pJ_D5;kJ9>t({>$~)3Uj*mu zQ!og`p)0TPu`C`!OnOJ|`O75ydtF$6lq~dD6eAZ*1dHHNhxzl(^%ygz1&xigo?|S6 zy)NhlpWeLpA=@x!UdSo01()&rNT5VLbuSp<@7LGs!0l)L!)o?e7rYAD(t-<=o09ZT^|{e1hEXZLA+`L=M}9Uru|`2GW;YKKXK`!b9M|eObzIH4 zhQ|&n>yVYMY=Trf|AAS{| zoyOE`J!1@f{BqAX7hc%qf3Yr!VxutJa6eHA#|qPQt*E!gt+1NQdT#aRtfKgYs^7-# zUD1G=o%=b(x|xWOWA+!f@-_dcHmk zc}(!QlDd*^?4hOwZR2=1*9o+@8YPs})$*)b)eLmCpsEzqs_|0i0fpqK8Kmk@%^yEp z4&C2HTuKVkxK)i?5%Dgm@sHg!aXI>_ZR8m>mfzH7F9nYQXn*3lR@A)ghij<(#}G9y zRJRvlw*x6$=CzQ?m_@XM)1D+aL&Bxb=eO4?WFPn@!34QjduLAi;kp|CRV(nlkO$4y zoKo$Katqmm1#yuvwHnJOUG)!sNOgxO(cG|-o!myWoYO~U>3^`3SEi_Yz8Qj6vrDv8 zt*9phoKh;&S1?V_zW8Oxsq?l<3}*#xI*I~SzB}s`q6~_>Z;<=-DVI&MX(DkJk4F`& z03Sp>D{5!5sI+scMq%t7s!!DF1lqn;hlMmhK35_REpsQXXEzUX9dE?@I~D=ocOpS{ z^N?BNjU*-pM{9cr6gB=C9&sB3=Olhw&$(Ivt(i4e?TU%Z7G8|-{GrUc0O6uNDT25+2t4ReK_+lwtL0I*WQq>eB#m}$Hdo~hbKlXIQufz zI<@kPmNZ=yo_*1(krL+H;}_))Bk>uSUmE|GOZTl6)eTJQeng#XatE)7^;8uDOAtE{ z>G{_vOHmXpO92gUqi?u(()}FzvUo<9XUC6{Mo8-ketfkgiMpmFy7|9Ibd@B^O}b5@ zu_=kNFqT;VlVxoLYf&-t%+BM|_8)HkA^) zjFsaZUyE4-kOJtYQJv$|anF@-IVkJ3N4Yc~%w9X}=vi+8>zr=2Q zb(l2sCYSanptTciWxKjVwF7L~y8*u2#O?v6ctBPorx_-@x>?5i^M2e9+b>+x?1rrIFvXwwm!P4#C#YUo z!ezID-ZV3Yw@G-t4B_CGSh0Lre#ZzV!@Ks_|7l9PTkl>q5DV|a$NLsbU7)dW< z0={3I2|7u)Id9P^TgLZ8?kTseozJ-ua^?dwdRO(a4cZ;WJm2_V=Ukrgs}b%=e|KFX zYM~{oNYBf7-vHm8J2`iN>!KfV77=Z>@DacFpXB#${|T%@puNLA0hSPB%wWPZlPju3 zpMABXY?)YPf7l_G%c8W(>2!D*wTk6c)M8&%R$d`G%F3%Myi9$m^4d!u_K6j;XAP6? zUAO4odUkKURjODempXj($jNSRxVOG&^OKvLo|VSHMT!^vlwnj2EN%Hc+u`-d_}kDE6YnC7JXIrs`66NS?={!F|VVv!dvF>LO;GW zQ`BCE&ryZBe9**dbUnBjV;q%WwnQxViB&F#xYCXmugJMGv2>L~^f*>KJk(u0C52dO zht@nEh$$9$Dj=_~>b|M@NDCFR155V#SS9Ae>OJ-~>`^-@!dc;+Rt5>{t(smJc9V&G z4Ni}vnyFf#HfWT$aIH@*scc#fS|k<(I;eDJ{i^KHZI!otg|Cpb>_NAWt#SC4iRus; z`y;_5RAoRt)Q@F9W-QJwPXL5aoPNq{e_DU=+Z54JkkofcXp9CYv=>8_E~x$6UYZ_0CYSHx}3EYcnx?5z#OysfdK$>q(Rm+836w@$eae5(!f6r zHkk(cv|#{p%r*jxfn@-A&xRbc!FTqX0A!f`IdBd59-o6jXY>HzX?zjb34qSH4}i=@ z@HBn~Tx2XAx=GIgAV)gJq`wU80rmo2Ko4*NI0;}}I>x1Ao(vt324n*d0uKRLZw6$^ zfIc$L0HB-0fTw_G0LU@tRp3_u_+}OWkTnzIGMfO*n|TyC4~zge@rRa7UyH8qf=1-FK$|nLq>30{jBN+;@*M zmIXPowgPC&dIz93@V!R^K%e)xfNB8iya!|Nf&TA7KYe`2ejEq`yMZ?VjL(h%!vN;Z Uon+a literal 0 HcmV?d00001 diff --git a/src/engine/assets/octatrack-module-packages.json b/src/engine/assets/octatrack-module-packages.json index 6a2e7ae9ec..e889f259b6 100644 --- a/src/engine/assets/octatrack-module-packages.json +++ b/src/engine/assets/octatrack-module-packages.json @@ -967,7 +967,16 @@ "id": "bounce", "octabam": true, "version": "0.4.0-experimental", - "path": "octatrack-modules/bounce/0.4.0-experimental.mwrm" + "path": "octatrack-modules/bounce/0.4.0-experimental.mwrm", + "abi": 8, + "features": 128, + "sites": 0, + "copies": 0, + "fills": 0, + "name": "Bounce In Place", + "module": "4d6723e5", + "bytes": 9676, + "sha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458" } ], "usbAudio": { From 8ae0792de8c3b5c5541fda3472f3a2975af8d3db Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Fri, 4 Dec 2026 00:28:22 +0100 Subject: [PATCH 32/43] Bounce In Place 0.4.0: the module packages, built in the isolated container Co-Authored-By: Claude Opus 5.5 --- src/engine/assets/module-build.json | 13 +++++---- src/engine/assets/requested-packages.json | 34 +++++++++++++++++++++++ 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/engine/assets/module-build.json b/src/engine/assets/module-build.json index 81bc5107bf..579a967bc2 100644 --- a/src/engine/assets/module-build.json +++ b/src/engine/assets/module-build.json @@ -1,10 +1,10 @@ { "schemaVersion": 1, "kind": "source-packages", - "sourceCommit": "f3575f3bf3323c86d72667bb5879bd18f33d1a18", + "sourceCommit": "7220f83cee4b4f394cc2a58a61264a128fb41b22", "nativeRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", - "sourceTreeSha256": "e52c525da84ff57410bc880291f071741e675da3898be4587de898d356c07079", - "compilerSha256": "508d6ef9697fa1e55c990c43481c50b298483abf4ba6ca490306fbadb7d56bcd", + "sourceTreeSha256": "bea6e2ca4918e6a74b59d8635a834fb9a3adff0524dda1b72a6a53f7b5ef89c8", + "compilerSha256": "0f9c14fff5bb004ddc0b624d00c72b820f869c42db39f8a3c8fc96ba7af0769c", "moduleVersions": { "miniverb": "0.2.3-experimental", "tapeecho": "0.1.9-experimental", @@ -48,7 +48,8 @@ "stem-rec": "0.1.0-experimental", "songbook": "0.1.0-experimental", "arr-rows": "0.2.0-experimental", - "smart-reload": "0.1.0-experimental" + "smart-reload": "0.1.0-experimental", + "bounce": "0.4.0-experimental" }, "files": { "dsp-packages.json": { @@ -84,8 +85,8 @@ "sha256": "6f4823e51ae30e79f387f2e83dc684c74c7547be223f2e4246c7d51096aa6df5" }, "requested-packages.json": { - "bytes": 1475258, - "sha256": "8371b56fe724d943d4ac26152b4d0739a80656b8bab16a8bd9e8e15542ea80f5" + "bytes": 1504337, + "sha256": "8f5a7773a87a28ab53afd4b53af4cfed9d51dad1752030efd611933332075fa5" }, "utility-packages.json": { "bytes": 11735, diff --git a/src/engine/assets/requested-packages.json b/src/engine/assets/requested-packages.json index efcb07ecf7..27c53009e2 100644 --- a/src/engine/assets/requested-packages.json +++ b/src/engine/assets/requested-packages.json @@ -1544,6 +1544,29 @@ "placement": "linked", "poolBaseLiterals": 0, "variants": [] + }, + { + "label": "bounce", + "moduleId": "bounce", + "version": "0.4.0-experimental", + "key": "BOUNCE", + "author": "seniorspiz", + "nativeAuthor": "seniorspiz", + "cpu": "54455", + "dram": true, + "caveAddress": null, + "source": "modules/bounce/unit.s", + "sources": { + "modules/bounce/unit.s": "4bb576fbf6dca5b28f4a5d97cf7e4b7cc6c2bce48cf3aac8bb1d5e78570aca05", + "modules/bounce/manifest.py": "27e8a39dcedcb52242e3ffcecc5a4cd2e5a07e2863e01f43507a31b4d85753a9" + }, + "bytes": 14040, + "code": "7f454c460102010000000000000000000001000400000001000000000000000000003520000000260034000000000028000b000a2f0a206f00084280226f000cb0af00106604245f4e7545f1080011920800528060ea4feffff048d7003c263946c82456206f00141439100b14d01039100b14cf123980000000324020030680bff1de200c80009180c0630c42804cd7003c4fef00104e752a3c0009b3404c4500044a8466e67182e88866e03a097185e48866d87181e68866d24ab98000001266ca1142000411450005114100062083700160ba206f0008226f00042010b091670442804e7573a9000471a80004b08166f01029000512280005b3804a0057c07100448060de2f0b2f0a226f001440c046fc270091c847f18800246f000c15938800246f0010159388005288b1ef001866e446c0245f265f4e752f02302f000e226f0008c0fc001ed3c01029003c30401029003d1229003e340875822042741941e8ffbfb48864064280241f4e7571807419204041e8ffbfb488640c0680ffffffd07409b48065e053817381703eb08165d6206f00087401222f000c10301822b5804a0057c07100448060be41ef0004700423c000000000700142b90000000042b90000000023d00000000042b90000000023c046c7c72c4e754879000000004ebaffca588f203c0000000023c000000000700123c0000000004e7542b900000000700142b90000000023c046c7c72c4e7522390000000070094feffff42f0eb08165207001e3a8220002810000012c4a81662c0280000002404a80670642b9000000004def00042f0e4ebafe0a588f4a8066144879000000004ebaff50588f2c5f4fef000c4e754878000c2f0e4879000000004ebafdbe42b90000000073af001670014fef000ce3a813c000000000700123c00000000023c046c7c72c60c041ef0004700123d00000000023c0000000004e7541ef0004700123d00000000023c0000000004e754fefffe848d7007c282f00247a01222f00202601d6af0028d8af002cb283644c2001e7885e802f400014202f0024602c2400e68a226f001493c27407c480d3ef001c204224052c08edaa1c1130464aaf003067102c08848612825280b08465d0528160b846822c08c48660ec4cd7007c4fef00184e754fefffec48d7007c282f00207a01206f001c2608d6af0024d8af002873c8202f0020e7895e817c07cc802400e68a2241528093c2d3ef00182405edaa1c11bd821282b88062e05288b68862d04cd7007c4fef00144e754feffff048d71c04242f0014266f0018286f001c48780001487800012f2f00282f0c2f0b2f0245faff0c4e9248780001487800012f2f0040202f0048487408ff2f0b2f024e924fef0030487800012f2f0028487800012f0c2f0b2f024e92487800012f2f0040487800012f0c202f0048487308ff2f024e924cef1c0400304fef00404e754fefffe4224f207c400bf10a200f22d8b1fc400bf12666f62f6f0020000c2f2f002c4878ffff723b92af00302f012f2f00302f002f3c400ba8764eb940012bd84fef00344e75206f00041010224852884a0066f64280206f0008123008001381080052804a0166ee4e75207c46c8d198203c00000000b090661220b90000000041f90000000023d046c8d194207c460bcfc84a90660620b9000000004e754fefffec428148d70c1c43f900000000428271a9000277d1266f001891c8246f0018d5c2c0ef001ed08377a90003d7c0068000000000b6886216d483528158897009b08166cc4cd70c1c4fef00144e754aaf0020670c1833880011840800528860d41832880060f22f0a226f0008428041f90000000045f108001192080052800c80000018b266ee245f4e75202f000440c146fc270023c08000000823c0100b14d446c142a742a742a742a742a74878001a4eb9400053d84fef00184e754fefffd8720648d73cfc206f002c247c00008e55267c00008e534282287c00008e5493c94285429071b90000000079b900000000c0fc8ed82040d1f900000000d5c8d7c8d9c841e800510b0467604a12677e1c28ffff4a12677a161077837006b0836500008871864a06675a2c3c000000002a4677b53800c0c34a806748b089630222404a826626260024014c4320072c03240626074a8766f24c4610014c0018000c810000018052c275024482528541e8091a7008b08566904a82661a200174064c4200004cd73cfc4fef00284e751c13608216146084206f002c7001208020095a800c80000001856304428060d674064c42000060ce4fefffd848d77c0c246f002c97cb2c6f003049fafa8675aa000471aa0006c4fc8ed8c0fc091ad4802a422002dbd2487800592f0e06801001614e2f002f0d4e944fef0010260d06830000005941ee00592242d3fc100161a72f48002448780020206f00284870b80048739800487338002f4900304e944fef001047eb0020226f0020b7fc0000080066d2487800c1267c46c7d48c486e08590682100169a72f02486d08594e9471aa0004387c00014fef001073aa0006c0fc8ed8c2fc091a2040d1c1d1d241e8005993c9103098005289721fb289665846804a0056c07100448073aa0006240ce3aa12134a80674e828216c141e80020b7fc46c7d4cc66ca20527001d1fc0009b3322080700123c0100f85984eb940027e0071aa00064cd77c0c2f40002c4fef00284ef94009da2071800c80000000ff6792700160a44682c28260ae4feffff048d70c0c4ab946105408671877b9000000003003c0fc002c2040d1fc46c938d44a906e0c4cd70c0c4fef00106000f9fa4eb9400819fc247c40013a0820432f00486800014879000000004879000000004e92267946c823fa243946c8240a4eb940024eec4fef00104a8056c17301448123c1000000004a80670000bc42a742a74eb9400252302f004879000000004879000000004e924fef00144a8b67864a8267824879000000004e93588f4a80661248790000000020424e90588f4a806d00ff6448790000000074014879000000004879000000004eb940013a084fef000c487900000000247c40013a084879000000004879000000004879000000004e924879000000004e934fef00144a8067427063b0826700ff0e52822f024879000000004879000000004879000000004e924fef001060aa2f3c100f84804879000000004879000000004e924fef000c6000ff4a4879000000004879000000002f3c460be9f04e92068300000080247c800000a4700123c0460be9e8207c460bcfc823c3460be9ec203c0000000023d000000000207c46c8d19423d000000000207c46c8d19823d00000000042b9460bcfc823c046c8d194700841faf93423c846c8d19842b90000000042b90000000042b90000000042b90000000023c000000000700123c046c7c72c261224b9000000002f3c460be9f04eb94002416824834cef0c0c00104fef00204e754feffff048d7041c246f0014242f0018262f001c71aa00052f004879000000004eb940029a4c508f41f90000000071b02822b680671e2f43001c2f42001871aa00054cd7041c2f4000144fef00104ef9400972fc1039100b14cf122a00057803c0847781b083662c4a398000001566241039100b14ce2f42001c4cd7041c73012f41001871802f4000144fef00104ef940001f184cd7041c4fef00104e754e56ffd471b90000000048d71c7c18390000000045f900000000c0fc18b22652d7fc0008ed80d7c07584284249ec002277b3c800486efffc4ebafae02f0b2d40fff44ebafa803002508fc0fc000c22402040d3fc00000000d1fc00000000428047f10800720c119308005280b28066f030027a0143f9000000000684ffffff8042064281c0fc00051385c800387c01da138628001386280841f108003002114402cbc0fc001e5c8026417805d7fc400d320cb88165000136307c002a2a017c064c465004d1c9d1c0528111934800780cb88166d432027c7f2a3c7f7f4040c2fc00182041d1fc000000001146000b42a80003214500072f032f024879000000004ebafe604fef000c428141f90000000043f90000000047f118001193180052810c810000091a66ee428042017840118108005280b88066f27a01428041f90000000013c50000000050c65280118608ff0c800000080066f071b9000000002052d1fc00008e55c0fc8ed84a30080067184aaefff46712700241eefff713d00000000013c0000000004879000000004879000000004ebafa7c123900000000508f7001e5a84680c0817180e18880b900000000b0b98000000867082f004ebaf92a588f4878000c4879000000004879000000004ebaf4064fef000c4cee1c7cffd4720123c1000000004e5e4e75204c6000fecc4fefffe47202202f002048d74404b280660001242239000000007009b08165307001e3a8220002810000012c4a8166680280000002404a806716223c000000002f4100204cd744044fef001c6000f5124ab900000000660c203c000000002f40002060e0240f0682000000102f024ebaf39a588f45faf4ea4a8067124879000000002f024ebaf402508f4a8066144879000000004e92588f4cd744044fef001c4e7571b90000000075b9000000004df9000000002056d1fc0008ed80c0fc18b2d1c0123028221f41000f2f084ebaf804487800012f024879000000004ebaf78c71af001f2f002f022f0e4ebafc844879000000002f0e4ebaf92871b9000000004fef0024207c800000082210243900000000e188b382c082b380b09067082f004ebaf7d4588f42b9000000004879000000006000ff604a806700008e2239000000007009b08165227001e3a8220002810000012c4a816600ff400280000002404a80670642b900000000240f0682000000102f024ebaf294588f4a80660e4879000000004ebaf3da6000ff0c4878000c2f024879000000004ebaf24e42b90000000073af002270014fef000ce3a8720723c10000000013c000000000700123c046c7c72c6000fed24cd744044fef001c6000f3f471b9000000004feffff02f0e2f022c40c0fc00a8222f001c2f4100082040d1fc800049d94a10671242a7487800802f0e4eb9400051784fef000c240f06820000000c2f024ebaf1f0588f4a8067704879000000002f024ebaf25c508f4a80675e71b900000000207900000000d1fc0008ed80c0fc18b2487008004ebaf682320e588f4280c2fc000c2c412041ddfc00000000d1fc0000000043f00800720c1d9108005280b28066f071b9000000002f004879000000004eb940029a4c508f203900000000b0b98000000867082f004ebaf652588f226f00082f49001c241f2c5f4fef00106000f2a620390000000072054fefffc048d75cfcb280660000b64ab9800065b8672c71b9000000004878000174022f3c0000c0107c012f004eb94000517823c20000000023c646c7c72c4fef000c3c7c000178012f3c460ba9c04eb9400009f4428347f90000000045f90000000041f90000000042801f500033588f2840d9fc460ba98c14144a2f002f670a7bb208007382ba816704178208004a84670003cc73b9000000002c0091c8e58e7bb9000000002f41003042012246b3ef0030660002d87e012c08edaf8287600002dc7e02be80662c71b900000000c0fc00a82040d1fc800049d94a106700ff647003720123c00000000023c146c7c72c6000ff507403b480660001284ab9800065b866104879000000004ebafe04588f600000f875b90000000045f9000000003002c0fc00a82040d1fc800049d94a106600ff10260f0683000000342f034ebaf006588f4a80670e2f0a2f034ebaf076508f4a80660848790000000060ac2002068011b1ff89e58820404a906608487900000000609471b900000000261206830008ed802f02c0fc18b2d6802f034ebaf09a508f4a8067000104c4fc000c2f034ebaf46c588f428022422042d3fc00000000d1fc0000000045f10800720c119208005280b28066f071b9000000002f004879000000004eb940029a4c508f203900000000b0b98000000867082f004ebaf442588f74097c0123c20000000042b90000000023c646c7c72c2039000000007c03bc80650001664a80670001226000fe227e06be8067067209b280667a45f900000000280f06840000003424122f041639000000004ebaeefe588f4a80670e2f0a2f044ebaef6e508f4a80660e4879000000004ebaf0366000fea4778371b9000000002042d1fc0008ed80c6fc18b2d1c373b0082253814a8166d22f002f084ebaef98508f4a806600ff704ebaf8ac4ebaf5fc6000ff647c08bc80660000a24ab900000000672e4ebaf2b84ab9000000006c084ebaf0046000ff404879000000002e3c000000004ebaefc223c7000000006000fe2a4ab900000000673a4ab9000000006632700123c0000000004ab9000000006c064ebaf26a60b8247c800000a4241224b90000000042a74eb94002414824826000fde8203900000000528023c0000000000c800000070862c84a3900000000670000a442849dce6000fcfa59804a806600feb44ab90000000066de203900000000528023c000000000745ab48064ca4ebaef766000fe905b804a8066bc6000fcbe70016000fce62e090f05670000b67c022e08efae8286528954887e08be886600fd082040d1fc460ba9ae1a10bb8175827b81ba826704188176011581080053804a8066bc4a8367064eb9400136a8340e2f3c460ba9c04eb940000ab4588f13c20000000071b9000000007c187e092239800065b875b900000000c0fc00a84a8156c1484242422040d1fc800049d9203900000000eda873014481efa980b90000000080824cd75cfc80814a1056c1206f004473014481e189808120804fef00404e757c07bc89660a4a39800000346600ff467e036000fc5c123308006000ff504e56ffcc723f48d70cfc282e0008202e000cb284650004fc741fb4846d2e22390000000045f900000000741f7601c484e5ab2401c4834a8066204a82670004d64683c68124837001600004ca22390000000045f90000000060d04a8266e82039000000007208b280670004a87209b28066227406700123c20000000023c046c7c72c0684ffffffcf2d44ffecb0846428600004804a8067067206b280661e7429b4846600046e103946100b1c08000000670004604ebaede68792608a7207b280660001d67431b484660001be2c0e0686fffffff42f064ebaec08588f4a8067221a2efffa71b9000000007585b08266124879000000002f064ebaec64508f4a806608487900000000603071aefff9207c0008ed80266efff4d1cb2f02c0fc18b2d0882f002d40ffec4ebaec9a508f28004a8067104879000000004ebaecfa588f6000ff763002c0fc00a82040d1fc800049d94a10670848790000000060dc7001e5a8227c800000081d40fffb2d51fffc487818b22f2effec4879000000004ebaeb3e4878091a320271aefff8c0fc8ed8c2fc091a2040d1c14870b8004879000000004ebaeb1a41f9000000007fb028222f084ebaeff442a72f024879000000004ebaef7e4fef00243002c0fc00052040d1fc000000001145000110850685ffffff80114500042e872f022f064ebaf4584fef000c41f9000000004280220842021182080052800c800000091a66f050c043f90000000033d100000000207caaaaaaaa23c80000000023c80000000041f90000000013c00000000050c25284118248ff0c840000080066f041f90000000013d0000000002f012f064ebaf09a4878000c2f064879000000004ebaea52487900000000700123c0000000004ebaebb84fef00186000fe327232b284660002844ebaebf46000fe227201b280660002807007b0846d2871b900000000b08467127001123900000000e9a8b38013c000000000720123c146c7c72c6000fdec7031b08466000232280e0684fffffff42f044ebae9fe588f4a806700fe184879000000002f044ebaea68508f4a806700fe041c390000000071aefffa7986b8806600fdf2486efff04ebaeee6588f2e004a80660a4879000000006000fe101a39000000004a3980000034660001467001e9a87b8571802d40ffecb0856600014e3004c0fc00a82040d1fc800049d94a106600fdf671b900000000227c80000008538723d100000000207c0008ed80c0fc18b2487818b2243c0000000042b900000000267900000000d1cb4870080020424879000000004e904878091a320471b9000000002242c0fc8ed8c2fc091a2040d1c14870b8004879000000004e914879000000004ebaedd44fef001c3204c2fc000c2041d1fc00000000425011470002baaeffec6600010652864200114600041140000971b9000000002f004879000000004eb940029a4c508fbaaeffec672071b900000000223900000000484042400281ff00ffff82802f014ebaed92588f2004068011b1ff89e588204042904ab9800065b8670000ac487800012f3c0000c0102f044eb9400051784fef000c700223c000000000700123c046c7c72c6000fc3a4a056c00feb84879000000006000fcac24017008b0816700feb622025281050567ee71c2d0802040d1fc80000c514a1066de4201487900000000283c000000002f0447faec2406820000003113c1000000004e9313c20000000042024879000000002f0413c2000000004e932f044ebae9464fef00146000fbc07c0a6000fefa70056000ff6a7232b2846700fd844ebae97642804cee0cfcffcc4e5e4e7522005581e28967065b804a8066147432b48466e04879000000004ebaf5706000fc004ebae9440684ffffffcf2d44ffec70016000fb3a2239000000002f027407b48157c07401b48157c1241f44804481808171804e754e56ffbc70f748d73c1c263900000000c0834a806700009c4aae00086700009447faeb52700649fae9b645faeb024bfaea24b083660000864201487900000000240e0682ffffffe82f0242031d41ffe84e931039000000001d43fff34879000000002f020680000000311d40fff24e9342a748780008487800804878003842a72f2e00084e944fef00242e8248780039487800022f2e00084e9248780008487800804878003842a72f2e00084e954fef00244cee3c1cffbc4e5e4e75283c000000007009b083660000b04201487900000000240e0682ffffffe82f0242031d41ffe84e931039000000001d43fff14879000000002f020680000000311d40fff04e9342a74878001a4878006048780012487800102f2e00084e944fef00284878001a48780060487800124878001020442f2e00084e9048790000000048780015487800142f2e00084e924fef0024487800074878005e48780014487800112f2e00084e952f0248780020487800142f2e00084e926000ff3842a74878002c487800744878000a48780006240e0682ffffffdc2f2e00084e944878002c487800744878000a48780006204478072f2e00084e9042004fef00282ebc000000002f021d40ffdc4e931039000000004201508f0680000000311d40ffe41d41ffe5b883660000a64879000000002f021d41ffdc4e93508f1039000000000680000000311d40ffe342001d40ffe42f0276044878000d4878000a2f2e00084e9248780007487800724878000c487800072f2e00084e954fef0024203900000000b680665a2039000000004a806606203c000000002f004878001b4878000a2f2e00084e924fef00102039000000004a806700fe442f00487800234878000a2f2e00084e924fef00106000fe2c59834a836600ff7c243c000000006000ff725f804a806638487900000000487800184878000a2f2e00084e924879000000004878001f4878000a2f2e00084e924fef001c2ebc000000004878002d609e387c000a240e42830682ffffffe8705442012f02487800162f0c2f2e00081d40ffe820030680000000311d40ffe91d41ffea4e9271b9000000004fef00100700671a487800074878000c48780015486cffff2f2e00084e954fef0014528349ec000e7808b88366a62039000000007201b280660000b042034879000000002f021d43ffe84e93486effd84ebae9264fef000c4a80670000867809b88064702200780a4c44100141eeffee0681000000301d41ffed760a4c43000142040681000000301081114400014aaeffd86746203c000000002f002f024e93588f2e824878001f4878000a2f2e00084e92487900000000487800264878000a2f2e00084e924fef001c2ebc000000006000feee41eeffed60a0203c0000000060b848790000000060b27205b280673855804a80663a203c000000002f004878001f4878000a2f2e00084e924879000000004878002d4878000a2f2e00084e924fef00206000fc7a203c0000000060cc203c0000000060c40000000100000000000000030000000000000000000000004e4f542053415645443a2054414b4520494e20425546464552005341564520495420494e20415544494f20454449544f5200415544494f20545241434b53204f4e4c59004225642d25730025732f424f554e4345530025732f415544494f2f424f554e4345530025732f25732e7761760025732d256400257300424f554e4345532f25730054414b45204c45465420494e20425546464552004e4f5448494e4720544f20554e444f00554e444f3a204f50454e20495453205041545445524e00554e444f4e450053544f50504544202d204e4f20424f554e4345005041545445524e204348414e4745440054414b4520494e434f4d504c45544500424f554e4345442c20534156454420415300545241434b204348414e474544005049434b20535441544943204649525354005245434f52444552204255535900545241434b2052455345540050415353204f56455220363420535445505300543820495320544845204d415354455220545241434b00540020435545204c4556454c204953203000424f554e43452043414e43454c4c454400424f554e4345000020284c4f4e474553542900205354455053005245434f5244494e47204f4e45205041535300505245535320504c415900574149545320464f52205041545445524e20535441525400424f554e4345443a205400205049434b20464c4558004348414e474520540020544f20464c45580054414b45205245434f5244454400424f554e4345205400524553455420540053544f434b2053544154494320545241434b004e4f2054524947532c204e4f204c4f434b53005945533a205245534554204e4f3a204241434b005041535320004f564552203634205354455053005452494720312d383a204d45524745005945533a2052454320204e4f3a20434c4f5345004e4f3a2043414e43454c00424f554e434520545241434b00524553455420545241434b00554e444f00030406080c1830000000000000000000000000000408004000007f004f4000007f004f0040000040000000000000004002017f4001202020000000007f7f40407f007f004000402f007f007f00010000000140010000000140000000000000000000000000000000000140000000000000000000000001010000000000000100030000017f010000000000000000010140000901000000ffff00000001010008010100220101002a1e1e011a181801da1e1e02ca050502f21e1e06020c0c000000000000000000000000000000000000000100000000000000000400fff1000000000000000000000000030000010000000000000000000000000300000300000000000000000000000003000004000002050000000000000022020000010000000a000000220000007e0200000100000012000000a000000032020000010000001d000000d200000034020000010000002800000106000000720200000100000038000001780000002e020000010000003d000045720000000401000004000000430000455e00000004010000040000004c000000060000000401000004000000530000456200000004010000040000005b0000456600000004010000040000000000000000000000000300000500000067000001a6000000220200000100000071000001c800000016020000010000007c000001de0000008e0200000100000088000045520000000c010000040000006b0000026c00000014020000010000008c00000186000000040100000400000099000001820000000401000004000000a2000002800000001402000001000000ac0000017e0000000401000004000000b70000017a0000000401000004000000be000002940000007602000001000000c30000030a0000005602000001000000ca000003600000008402000001000000d4000003e40000004602000001000000d90000042a0000002402000001000000e00000044e0000003402000001000000f2000001660000000401000004000000fe0000016a00000004010000040000010a000001620000000401000004000001140000048200000068020000010000012a0000009a000000240100000600000136000001aa000018b2010000040000013f000004ea0000002402000001000001500000050e00000032020000010000015a00000540000000f8020000010000017100000000000000070100000600000179000006380000014202000001000001860000077a0000020e020000010000019000000132000000180100000400000199000001760000000401000004000001a8000000aa0000008801000004000001b00000014a0000001801000004000001b90000000a000000a001000004000001c2000001720000000401000004000001cc0000016e0000000401000004000001d8000009880000009e02000001000001de00000a26000001f202000001000001e900001a5c000018b201000004000001f30000330e0000091a01000004000001fe00003c280000091a010000040000020a000045460000000c010000040000020f0000454200000004010000040000021a00000c18000001d4020000010000022800000dec000000e8020000010000022f0000000200000002010000040000023a000000000000000201000004000002440000000400000001010000040000024d0000456e0000000401000004000002590000456a0000000401000004000002650000001400000086010000060000026b0000018a00000020010000040000000000000000000000000300000600000270000000080000000c010000060000027f00000ed40000046e120000010000028b00001342000005541200000100000296000018960000002012000001000002a1000018b60000044a12000001000002ad00001d00000000181100000100626f756e63652e630063757272656e740073616d655f706c6163650077726974655f7370616e006d6f647765726b5f6d616368696e650073686f77007068617365006d6573736167653200737469636b79006d6573736167650073686f776e5f7469636b73006e6f745f736176656400636c6f73655f76696577006f70656e5f73656c6563740061726d0073617665645f726573756c740073617665645f696e007761765f7361766564007761765f726573756c74007761765f696e0066696c6c00696e76657274006672616d655f626f78007465787400617070656e6400736176655f646f6e655f726573746f726500707265765f646f6e655f6200707265765f646f6e655f6100707265765f6d6f6465007075745f747261636b2e636f6e737470726f702e3000545241434b5f425954455300706172745f62756600636f70792e636f6e737470726f702e30007365745f6d7574657300706173735f73746570732e636f6e737470726f702e30007469636b732e300077726974655f7265636f726400736176655f74616b65007761765f62617365007761765f696e5f70726f6a656374007761765f646972007761765f6e616d65007761765f706174680061737369676e696e670073617665645f7469636b73007061737465006170706c795f636c697000706172745f636f7079007265636f72645f6e6577007265636f72645f636f7079006c61737400756e646f5f726561647900626f756e63655f63686f6f73650063616e63656c006c616d705f73746f636b006c616d705f6d696e65006c616d70735f6f6e00636f6e73756d65645f6c6f00636f6e73756d65645f6869004652455348006e6f746500626f756e63655f616374696f6e73006d6f64756c655f7469636b006d6f64756c655f6b6579006d6f64756c655f656e63006d6f64756c655f6472617700626f756e63655f706172745f6d656e7500000000000180000004010000457200000188000004010000455e0000018e00000401000000060000019400000401000045620000019a0000040100004566000001b4000010010000001a000001ba000004010000455e000001c20000040100000006000001ca0000040100004572000001d200000401000045620000020c00000401000045720000024600000401000045620000025800000401000045590000026000000401000045720000027400000401000001860000027a000004010000018200000288000004010000017e0000028e000004010000017a00000456000002010000026c000004b400000401000001aa000005ae0000440100000000000007f000000401000001760000090600000201000002800000090c000004010000016200000918000004010000016a00000924000004010000016600000942000004010000018200000948000004010000017a0000094e000004010000017200000954000004010000016e0000095a000004010000457200000a7a000004010000205e00000a8000000401000007ac00000b0c00000401000002c400000b6a000004010000331500000ba4000004010000335e00000baa000004010000335f00000c0a000004010000454200000c54000010010000008500000c72000010010000009900000d40000004010000454200000d7e000004010000457200000db6000004010000456200000dca000004010000457200000dd0000004010000455900000e7a00000401000007ac00000e80000004010000205e00000f10000004010000457200000fc200000401000045720000108a000004010000205e0000109000000401000007ac000010d60000040100004572000010dc0000040100004562000011b0000004010000014a000011ba000004010000455e000011d600000401000001720000120e000004010000016e0000121c0000040100000004000012460000040100004566000012c20000040100000004000013ba00000401000045720000151400000401000004740000155a000004010000335e00001566000004010000334e0000156c0000040100003352000015780000040100003361000015940000040100003c27000015ba0000040100004542000016000000040100004559000016b4000004010000455a000016c80000020100000000000016ce00000401000045420000172600000401000007ac000017b20000040100004572000017fe000004010000018a00001810000004010000018a00001818000004010000018b00001828000004010000018c00001974000002010000036000001a70000010010000021a00001b02000010010000019b00001b48000010010000019400001b84000010010000025100001c5e000010010000019c00001c94000010010000028900001ca400001001000001a700001cc000001001000001cc00001cf200001001000001c100001cfa00001001000001ae00001d04000010010000019400001d0c000044010000000800001d100000020100000c18000001a80000100100000000000001e000000401000045720000022200001001000000320000023c000004010000455200000460000004010000016600000466000004010000016a0000047c00000401000001620000048e000044010000009a000004f400000401000001aa0000056a00000401000045560000057000000401000045590000057c00000401000045520000078c0000040100004558000007c40000100100000044000007ca000004010000013200000808000010010000004b0000080e00000401000000aa0000082200000401000000aa0000083000000401000000aa0000084200000401000001320000084a000010010000007700000850000004010000014a00000860000004010000014a0000086c00000401000000aa00000872000010010000006700000878000004010000000a00000880000004010000000a0000089c0000040100000132000008a20000100100000071000008a8000004010000014a000008bc0000100100000056000008c200000401000000aa000008d2000004010000014a000008d8000010010000007a0000096a0000040100000176000009a400000401000001aa000009b200000401000001aa00000a2c000004010000455700000a36000004010000455800000a3c000004010000455200000a9c00000401000001aa00000b22000004010000455200000b32000004010000330e00000b380000040100003c2800000b64000004010000336700000b80000004010000455600000bb0000004010000330e00000bb6000004010000455200000bc0000004010000455900000bd4000004010000455a00000bee000004010000455200000bf4000004010000454600000c2e000004010000457200000c6a000004010000454200000c96000004010000454600000ca800001001000000a900000cbc000004010000454b00000cc2000004010000454c00000cc8000004010000454600000cf00000040100001a5c00000d080000040100003c2800000d14000004010000454d00000d26000004010000454e00000d4600001001000000c000000d56000004010000457200000d98000010010000003200000dac000004010000455200000dee000004010000455800000e3c000004010000455200000e4e000004010000455700000e54000004010000455200000e96000004010000455700000e9e00000401000001aa00000eac000004010000455a00000ed6000004010000457200000ef4000004010000455800000f34000004010000000200000f3a000004010000000000000f40000004010000000400000f72000004010000455800000f7e000004010000455900000fa6000004010000455800000fe200001001000000c700000ff2000004010000455800000ff800000401000045520000103400001001000000db0000104c00001001000000eb000010540000040100004557000010a60000040100004557000010ae00000401000001aa000010bc000004010000455a000010e800000401000045720000110c00000401000045520000111e00000401000045570000113c00001001000000850000114c00000401000045580000118e00000401000001820000119a0000040100000186000011aa00001001000000fb000011c4000004010000017a000011cc0000040100000172000011dc000004010000017e000011f2000004010000017600001206000004010000016e0000123600000401000000060000123e0000040100004566000012c80000040100004558000012d80000040100004559000012f2000004010000457200001300000004010000454200001362000004010000456e00001368000004010000456e00001390000004010000456a00001396000004010000456a000013a2000004010000457200001428000004010000455800001434000004010000455200001446000010010000010d00001478000010010000011b0000149a000010010000012d000014bc0000040100001a5c000014e00000040100003c28000014ea0000040100001a5c000014fe000044010000001400001538000004010000330e000015540000040100003c780000157200000401000033670000158e0000040100004541000015a80000040100004546000015b2000010010000013b000015ea0000040100004558000015f60000040100004559000016300000040100004552000016440000040100004558000016660000100100000147000016700000040100004559000016a60000040100004557000016d40000040100004552000016e20000040100001a5c000016f00000040100004556000017080000040100003c28000017100000040100001a5c0000174600000401000045570000174e00000401000001aa00001762000004010000455900001768000004010000455a000017ca000010010000015a000017f80000100100000171000018200000100100000173000018760000100100000183000018980000040100004572000018c20000040100004572000018f200001001000001e40000190a00000401000045580000191400001001000001ef0000198400001001000001fa0000199c0000040100004558000019a60000100100000203000019ee000010010000020c00001a7e000004010000455800001a9c000010010000022300001aac000004010000455800001aee000004010000457200001af8000004010000456200001b1c000004010000455e00001b58000010010000022b00001b6c000010010000023e00001bc4000004010000455900001bf8000004010000457200001c08000010010000026500001c7c000010010000027900001cac000010010000026b00001cd6000010010000029d0000000800001001000002a80000000c00001001000002b50000001000001001000002c1002e73796d746162002e737472746162002e7368737472746162002e72656c612e74657874002e64617461002e627373002e726f646174612e737472312e31002e72656c612e726f646174610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000100000006000000000000003400001d18000000000000000000000004000000000000001b0000000400000040000000000000284000000c6c0000000800000001000000040000000c0000002600000001000000030000000000001d4c00000000000000000000000000000004000000000000002c00000008000000030000000000001d4c00004576000000000000000000000004000000000000003100000001000000320000000000001d4c000002c6000000000000000000000001000000010000004500000001000000020000000000002012000000be0000000000000000000000020000000000000040000000040000004000000000000034ac000000240000000800000006000000040000000c00000001000000020000000000000000000020d0000004b0000000090000004600000004000000100000000900000003000000000000000000002580000002be0000000000000000000000010000000000000011000000030000000000000000000034d00000004d00000000000000000000000100000000", + "sha256": "21f5ed5bf4a460036c84ac6a58c582e6649f0c0b906a5a97d40eaee16d22c24f", + "stockCopies": [], + "placement": "linked", + "poolBaseLiterals": 0, + "variants": [] } ], "groups": [ @@ -6055,6 +6078,17 @@ "refs": [], "pokes": [], "tables": [] + }, + { + "moduleId": "bounce", + "key": "BOUNCE", + "author": "seniorspiz", + "nativeAuthor": "seniorspiz", + "activeWith": null, + "detours": [], + "refs": [], + "pokes": [], + "tables": [] } ], "composition": { From 8ff1acb1de7b19e1517d5908d0cbd023096597dd Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Fri, 4 Dec 2026 00:41:40 +0100 Subject: [PATCH 33/43] Bounce In Place 0.4.0: author registry, device tool's Part menu reaches PART past 8 rows, header comment Co-Authored-By: Claude Opus 5.5 --- .github/module-authors.json | 1 + scripts/device.mjs | 5 +++-- sdk/octatrack/modules/bounce/bounce.c | 2 +- sdk/octatrack/modules/bounce/evidence/performance.json | 2 +- sdk/octatrack/modules/bounce/octamod.module.json | 2 +- src/catalog/module-documents.json | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/module-authors.json b/.github/module-authors.json index 6e5fbc3f7a..a33f727bc0 100644 --- a/.github/module-authors.json +++ b/.github/module-authors.json @@ -20,6 +20,7 @@ "npp1993": 833410, "repeat98": 67785539, "sambanks": 3905846, + "seniorspiz": 137111931, "soejrd": 34421739, "stigmagit": 288131171, "sumedho": 8923447, diff --git a/scripts/device.mjs b/scripts/device.mjs index 75775c7cf1..c4cd09a100 100644 --- a/scripts/device.mjs +++ b/scripts/device.mjs @@ -320,8 +320,9 @@ async function part(n) { * the Part window (FUNC + MIDI), which NO closes afterwards (#2099). The menu keeps its cursor and stops at RENAME. */ async function partMenu(steps) { // With a module's Part Edit row (ot_part_menu) the base opens two columns and remembers the cursor, on BOUNCE say: LEFT, - // UP to PART and RIGHT put it on PART's actions first. Stock's one-column menu ignores LEFT and RIGHT (MKII, 3 Dec 2026). - if (await mkii()) await run('FUNC+PART w600 LEFT w200 UP w150 UP w150 UP w150 RIGHT w200 ' + steps) + // UP past every row the table holds (PART and up to 8 modules) and RIGHT put it on PART's actions first. Stock's + // one-column menu ignores LEFT and RIGHT (MKII, 3 Dec 2026). + if (await mkii()) await run('FUNC+PART w600 LEFT w200 ' + 'UP w150 '.repeat(8) + 'RIGHT w200 ' + steps) else await run('FUNC+MIDI w300 FUNC+BANK w600 ' + steps + ' w300 NO w200') } /** Pick an effect by name through the stock chooser, then wait until the track runs it (effectTables: id -> descriptor diff --git a/sdk/octatrack/modules/bounce/bounce.c b/sdk/octatrack/modules/bounce/bounce.c index e9164acafb..51385e527b 100644 --- a/sdk/octatrack/modules/bounce/bounce.c +++ b/sdk/octatrack/modules/bounce/bounce.c @@ -3,7 +3,7 @@ * * Bounce In Place, OS 1.40C: record tracks for one pattern pass into the active track's * recorder buffer, then make that track a Flex machine playing the take. - * Prototype 0.4.0: 0.3.0 ran on one MKII; 0.4.0 (the trig key lamps) in the emulator only (TESTING.md). + * 0.4.0: passed the test procedure on one MKII, and its developer's own test (TESTING.md). * * DOWN+REC (or FUNC+PART > BOUNCE > BOUNCE TRACK) opens BOUNCE. Trig keys 1-8 * add or remove tracks to merge; YES arms; NO closes or cancels. diff --git a/sdk/octatrack/modules/bounce/evidence/performance.json b/sdk/octatrack/modules/bounce/evidence/performance.json index b0dee1e6f8..dab5a696b6 100644 --- a/sdk/octatrack/modules/bounce/evidence/performance.json +++ b/sdk/octatrack/modules/bounce/evidence/performance.json @@ -2,7 +2,7 @@ "schema": 1, "module": "bounce", "version": "0.4.0-experimental", - "sourceSha256": "079cf45f00e7d9e18170c992bda43852a67afc655f3ca84fcac4f82631154dcc", + "sourceSha256": "30b683cffdebd1385cd067f565c3877186b7a59807532f28280f160b68d79a97", "kind": "coldfire", "trigger": "key", "cycles": { diff --git a/sdk/octatrack/modules/bounce/octamod.module.json b/sdk/octatrack/modules/bounce/octamod.module.json index 0dbdba0076..f3595892de 100644 --- a/sdk/octatrack/modules/bounce/octamod.module.json +++ b/sdk/octatrack/modules/bounce/octamod.module.json @@ -114,7 +114,7 @@ ], "qualification": { "moduleVersion": "0.4.0-experimental", - "sourceSha256": "dbd69915be55222063b329c449bcb89e93aefad2564fa2bfe180dec4cc503dd0", + "sourceSha256": "b59be8ed9888cc624f861ad809b22975aae6db14fc5f26b013fa8908ac716fb4", "cycles": [ { "processor": "coldfire", diff --git a/src/catalog/module-documents.json b/src/catalog/module-documents.json index f13063ecdc..61a6d69ea5 100644 --- a/src/catalog/module-documents.json +++ b/src/catalog/module-documents.json @@ -18137,7 +18137,7 @@ "screenshotStyle": "black-and-white" }, "moduleVersion": "0.4.0-experimental", - "sourceSha256": "dbd69915be55222063b329c449bcb89e93aefad2564fa2bfe180dec4cc503dd0", + "sourceSha256": "b59be8ed9888cc624f861ad809b22975aae6db14fc5f26b013fa8908ac716fb4", "imageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", "cycles": [ { From ad21dd870d7cf11a3c964501ef43b85e5fe9da2f Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Fri, 4 Dec 2026 00:42:25 +0100 Subject: [PATCH 34/43] Bounce In Place 0.4.0: packages rebuilt in the isolated container for the edited header comment (USB package still 196de6d7) Co-Authored-By: Claude Opus 5.5 --- src/engine/assets/module-build.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/assets/module-build.json b/src/engine/assets/module-build.json index 579a967bc2..829a9dd3c5 100644 --- a/src/engine/assets/module-build.json +++ b/src/engine/assets/module-build.json @@ -1,9 +1,9 @@ { "schemaVersion": 1, "kind": "source-packages", - "sourceCommit": "7220f83cee4b4f394cc2a58a61264a128fb41b22", + "sourceCommit": "8ff1acb1de7b19e1517d5908d0cbd023096597dd", "nativeRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", - "sourceTreeSha256": "bea6e2ca4918e6a74b59d8635a834fb9a3adff0524dda1b72a6a53f7b5ef89c8", + "sourceTreeSha256": "b556299062232a91df0c5875c880f794217a68c7f8e92f6817b087af39635fd0", "compilerSha256": "0f9c14fff5bb004ddc0b624d00c72b820f869c42db39f8a3c8fc96ba7af0769c", "moduleVersions": { "miniverb": "0.2.3-experimental", From e53e97bc4fbe5a8e50ef0bff1e17cf1e5e8950da Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Fri, 4 Dec 2026 01:30:38 +0100 Subject: [PATCH 35/43] Bounce In Place 0.4.0: a cancelled take keeps UNDO, the recorder setup and the player's mutes; armed screen reads WAIT UNDO's copy is taken when a take finishes, not when it is armed. Cancel puts the recorder setup back while the same bank and Part are loaded, whatever the pattern, and puts back only the cue bits a merged take set. Co-Authored-By: Claude Opus 5.5 --- .../bounce/0.4.0-experimental.mwrm | Bin 9676 -> 9632 bytes sdk/octatrack/modules/bounce/bounce.c | 67 +- .../modules/bounce/evidence/performance.json | 8 +- .../modules/bounce/octamod.module.json | 2 +- sdk/octatrack/modules/bounce/unit.s | 1136 +++++++++-------- src/catalog/module-documents.json | 2 +- .../assets/octatrack-module-packages.json | 4 +- 7 files changed, 624 insertions(+), 595 deletions(-) diff --git a/public/octatrack-modules/bounce/0.4.0-experimental.mwrm b/public/octatrack-modules/bounce/0.4.0-experimental.mwrm index b407a7044181757086f88bf722b0270f1b4cb466..9261a2a1558eab5ff469b63be52b54900c5e7db5 100644 GIT binary patch delta 5264 zcmaKw4Ny~87RT=k;qeFo!lwZOJVJD+MS|AtfVJBYm8L1CEVeeatW8--x}CNgsaR}T z^Z3x(?v6p8<2X*Y<90eq8Ar3=I+$@Zur9Ss2bE#e%{Y$L>QalM*0!1=+5f!{s=L!! zXMT_O?mPFKbI(2J+!w!mcK5UC%U`TnP6UE~Vl5%d+6m!=ZRt-WjuD~{5R$eAe>=9l zdTg6FR$WO9kzNzm#=RQ$a@NCy)DP0DSXX!o_d{%CxG+@t`RB!sM%xBLa#J0_=#bMd zF2;RvVTjJ~a`dlQ=V)Z|Gn$5G<{8T&6_$mVM}6Vt6GUxJas;O|PQP7pr!$>Pp|jfQ zFMj2@38ICaCZaVb(Kq!$NAUhprgiA;10>VSQHjf4Y1D4NVz)l5*l~p_pc`ZGyxMiG(I;G9k;gF z&T0)yASaf|hhk@QynH_PDO?S_&G$A0>qB1dau>VnUn>P#JVj!&M2H}k31|5%PUWqR>I6p+gY`?hiVJD*Xzo43F#+GEjp^<*c_oz zGFsQg47MKnz`e>QWzx|Q-$I1zFGylVXj0!}^9odD-r6>&pL)8eFEmNCqQxqmo+PA5 zSawSw4ce4Wfz(JnlKbXbYUr4m(C8X@$6vY3N9eBI=PNFrybouW%@&tThED> z)6iKTlt1O?b05oR_+6@df!>C=3ht>;X$&kCLt?V>i?UIB$6MN}vs$LbMedoPS;(3+ zHCwnvg17|sULzda>y`9cuvNY-%=V4gB@ZD-tb46{sV6n1ieI_EWiq^@6F#Ne|K!gb@)Z<6R5MejPr$}0A>2U=mD=8W>J_@m6VZFn6iyn#N5Zb#?z zUzwSdJXY`T0<9hrO{!@%tJs9C^qSko?)Na)bgpjmVqJ2(#NNEd-Y8CMT_kE(B-y(U zIyH~IauivHTx0n;$nJNt`vL1=ntjM(y!8qdk-Mu4PvCwh&HI82?0SY>huIZ%g*`!) zDS1C9)kNh+y4gqC3xySXM|?!tTBrK;**Oqr*Z zl#yprrd0JVM^g*xjwd|H8Dy1q{yZ_Ik|bEWNKC;p5@(K4VnoYzs*Z-++Cm*zv7XMW z?T}sCM{`f6{Sza9tRAe9QZ@@wEiDu>osdW6E^Xn9gS4zyd`=^_Vm-Z5eUXi+<+$sw z_ItT2T}pjbN}-mu(pOugj+vUe>va07ZWx-QqYYePKjga|s~wGEm5WSWl@}*wabbC7 z;%wh`a|IEr&MsBMM}v#paoP`4S+|z8vo5oRh^~vKWWJRUqBE-;!P^&|{$-InrASnk za`pS^=y$g22hFR`(FxnrIvtIyz(^tOgtd!?D>|CsIc z)7+@E~j#wN>f8-uOUEy^%I6qx?aV!54mbjkm(Aq*%kvMJxVJ#B?od!YuRY zF5KGA)YB#mHFSqBcQwSZNQWOZV|q*=;v+NBaFOp8DSh%Kf5`zNlyYbpU7}^-=}Cz^ z^Dn#3lWN@yLz0<8rIOz?QN@Tz7g%F{kqAz|i`?#H?KCV;CFgP>*`Uk8W|rv+6Iau0 z7Hesui7xpy-J?&06=TI@+leb%-=p#9$A*_$Ib&t-1SxeB)zyt$v2guB>-#REy0%eu zRB{)y7>DFxU5+nY*sm-hTD>mjpyVdpw~Nl zVp%h*a+9cTI=~BQx=h@r0rn)B6X?^;I+i>F(|FCbPmJNEl)ptkxU$73T5tp@FCwn( zj^OutNAS+5(z1(In6$`CRrc|?<9b?BF!5inNSBL~~vL|v&XuhbewUL zd>fD*i(Tg*oIOuRzFm-OiT*UNIyy-!(HuuJ2#s8(mA60z^LHPvJYz|8+~(EKRG&=S z)uQ9RK#`HL*Q zCva3AV%H#jS$pv@)bNTyCU}w^r(ejsGc$ajrD43*Z{}#kZdI`sz)!aTnU#Qj`fIw| z5&U)sjOmeT3mO*mV2f0>7#qQ}v4NunrE+@X0_|@WDfN;sv5y;Z zbi0f^l@JqFNY?5U3sEr_gqqEEE1@FzW>RA~UNQc^AK`tQJR*D3&uVSJX0ck7-wv(x zfDB&WiJx6@@*aIbdEA5J(yLP1^33NTIzpX2_6;(1kwxhDcpf!zUID*O$W*v9EB~c) zMYP#nHLIVFjL&7CI`h-;$y9LFA*Z2q3;u0o$9|qq2+ax0?niv36mSNf+ z?SU%Y1*OAD0gNa4Kp2Z=Gz;N{r3<1v_qR@{Nic(d(|=bWM46u0ATC z_p+;}Ar?Kq>;>xoBKB^Gt@j~sndWz)b)KzBR_A5pA9H=lB=@bYXJFpOo-P55zGOP1K5eT0S8zK8bA{vzW9x}flKi_ zK^NE$&I1^azX2kIXrN4!2TWitz*;nLNb@e(LP&xNXhAA~kpvh>@Pdor2LuBSY4KiL z27V2m2QaSPNPI+#)o4Ei+re=#Mo3~3fU(44Pz|u!#Py&Vw1RFh0EPjKB*IBdAxSy_ zBT0x-k{iH@BBXyw*Wb=K@fs z>i|2!C!h}uf^*;!xC^ETNzs53U;(SaTOa_C>M37>5r7D%Tm`-xxL{%mCZ?u?B2Wqt zrc@_@;ndf_*8tw9Vx?)2OEUtjEDbA5>j8b>IDq1GJ6H)YFMSt);q;4yWMDxV2vY{; zW|V017f|fE#Q9odA)@90BJD znMDBPW?2E8nFT|$>cBn#CuiLTckzFA8tlJ56*t)cO7&g@2E5CX&y{%M2&j}Sdtm50=Gg!9@Em8Pk_QnViRm^SU1#B;1hiWY5# zJdje`>xudt$8mZ+r{gGR9m|2^NXFrivzDQb63;{Hc(%1CqY(j-T1}DMclY6+I&(L3 z&U`lS?c4qBZ-4)GanFmVUQAi^o3cejOYo1cCS(ENblXyXHQ^i~#v_Cz+wi+{+Z%t| z=8aaDkPOml;Wlw^guI-sjSyEaZTXs<9z0)UJ(qJjO1}JZy1351fshQN7>IP2H}Z4w zT#(a2XLvdK%h!nO*!TyMEMobb_9KadnG<`|V8X#kW5v6TKWA@qJS=T{oz#>k29BI6I0V8-36`dyHz7 z9TwL;)^{hTLygYi)+13tPPklr4=-18dP=&2J9uA7{FyGtR=0+4L+?d#-AjX!ep{{m zyv{Ta}=#~q-HHdMpZh2$OOzxxB4D`=a2K<n`1|x!H2BZsv@+i6tc7)I^l(O?{NQe)a` z>2ix3XlPXIk!MYqmhnyU7wGw8>B%xFu|XTrNdzhA9$MRmd8cLHgdBe_4cf)$siegX z59Eb?Nre~@EN%31SDQ+tj@q@-cbg?T>uhry72?qfL=4<}y1bF5g))z|?P6d=L$z5r zVDd%IRdPAUF)JXxCa&WbI?326gz&#BRlGoW`}z55U5n%-D$-h`g|{!3Ht)dT6iC|jM-o*gvgWMZEmgWsB4v)w<@;!@mzT$4IEd1&d&HJ zg3}3=3E84--W%Io>oR+}@0-l>yaba!^!Of!cd-0o)h7dW>GnlT*RhK9FbIZ4CZ1L# zh@md{zNs>XnLqTXGSQj|H=KQ74JWxh!nV)@#|#O2K{efqaBT9M1!96Lv?w8?5_#ck zhryF%+m9tB?7PiMUaqD~j4P?5CciaAmGpR(XrMjA71Rly*VqDQc53hw>#J1qY(pv+ zk{23sCTyhn%2(6m;(fBuFwKAJ?KZ5~Go5Vfy1M0E`W%F*@@<^Cq;-(wyNT*T4L4nT z^Ygm*okVr1M%6C4$E8!-K4wx>NN*I91WAY!7 zllaM97QEwyBwzJ&p>7f}Oij>iLW0Z^qQth1f3BB17i;@p%w#!tC=N~q}mNT&4#4C?`%@SK;D^@<=@3dkcd|d z+&w4;ei%jCE%#}U(XjcH7N+d5Cl7Icls%8F(n5+FW31G=nTEW%?3fA+cIJEu4SFH} zX*P1$Q^bBl?gHhykR4+0cUEa2ZKd<5h1Qb2e#`i&V%twolw!N3&PncHqgKf7E0fr5 zqK_8!810)~4)pRq6qLQT`ahj^lF{(15-K1WJ4{9MHSWvIdY6@XuFF-+4ok~%cnq$G zT3dfh#~#D1b}xsvFE2JB+9S6nr>gF2Z!x^ZlYdoC@e9=o9NXPf}CRDW}j?L<^BCy z7A)qpyhvEt`?~j<>)gs2(=EVJ{mUPvQl{CNzxGh%9`B>+GIe!iB>0t*G(DRIGQ%3_ z$9UvTEo2XYJLoX$2}Qf0thRI!9yE;ELmR?@?ALEB0Va8ZBQ%=lspNW&u$;IAYtcoNrmD z@K!_5FQ!B^bs`~_e%U$E=pQMkMP9j9AiuRXRbm~@W*T#`Y3`xY4tCiXdM1eLLoe?; zfPXn%cs|M6ZZ`89dipH>y0o*bKC#Xo(IGAAC4_!+wI$aNa2;R+=94+Q5$s5yL|CVwp_cYgglDwR9 zm$}~5Dp5sTL3$@q3hn)V@62W@r65<&LS;liUAV4P2{LA6_fS_i?F_9@YTlUIR0ttG zFm`xD!%-}Gf7re{GKAvNSKgQh@4Dld(iKq3kVeM_9mp3l3-!Fj%Uy4J_r0|ejfdv< z&?DxnpDf<@?ti zP%}}d&9?s%7u&{12X3B&T}=gQdJ6N!<2TUKrHRiIRp3yhADU{)8f*j?P<5h}#3~v- zc@EQ&9-e&*vV1*jx7w_#+6ak6>Lh_fYT+KntK~h$>_YXUON3YT^Sdf6&X9q zEV%~n2Q8de+g$4*V@Kq$G3(V^xiElPC8(bd_gmOqaAq|HI&%(W%hW{Q*i)ZvSRf5P5qWZy~}N*;0_p>%z{Tse74&Q6qiFIL6%6M=~O`CEZCaQd$9uITa(gH>rAB|>xHhGI_68DO{&-5G@l>1E2WQUY|B+a%c zHsbftXCB=!lH~%-I#n*pSitRW*B)=aH87Llz+;r}tdS$L~D(-*7*-{ye zB0uL9szVX`*28qpdO`~s?=v3t!PPvRxRK5H!g-4Qwm459aX8$-uj4lg`|lt`XC$O` zR%Sbww3sh>sf;fzUb19CnaD3*Qd}nA$_l2ED78kbGv;GT)+gXI%x{x>`Gc~Q{f>Vn zA<VX+Rgw_TepcFX4Do_ckfdoDVpMoZE40M9C-~x)S z2Iv4ZjD^2gfoAc7@e8Gu5udqE2!anr$U0F%aT1Xv&r3&cZ6ycraLIbb=!ym)+% z$K3b>pc&x*X5u>l{+}j(0F1y~aUc(1J>5!NM|IF%w-Z2P9W>TKV_g@(?k8wL3YZG4 zpad)hHDDJw2(ZY6ZqNg;h#t!7MSunLP+AYA^pLNI?e!S1?*&jK!2o8VN+uKm2v2|_ z2@ssH4?u~8D_|Jh#UG2az(N3_h7ZA3fN_RH07@Gm)Nl!0BP0>lNz4RLBoT8Gw}9Q? z0B8mQZ~~kHeoRcn#6&EVqyc(h0<*!h06R{CGD)yV(glEV$ppL!RsblHyc2v1AUGu# zK-m<`OQ{A}IOQ1l7KFeUA*m@~4!~yosmt)-2CD!pkcvsE&^UDmXaX$&f>SX$^$sBu zvG~M%FdtyvL@(F}4g)AT@iaIGV7-Y$giO)`1DFa*fC!-cq!pkA{-4y1hr0lp88Ogk z1U$$E>%lJ239$3YaUca$fqL*Uz~Yk!2uXt?X*B?SX$JxAgWPl#fJM{opd4VM>6n`i r7o^{{5<+iprq_TE>;QWK1eiKNFTld4Fp^dcbO1`y#Lt3&tgin6!K#z= diff --git a/sdk/octatrack/modules/bounce/bounce.c b/sdk/octatrack/modules/bounce/bounce.c index 51385e527b..ff13b90528 100644 --- a/sdk/octatrack/modules/bounce/bounce.c +++ b/sdk/octatrack/modules/bounce/bounce.c @@ -187,7 +187,8 @@ static struct ctx last; /* the last finished bounce, for UNDO */ static unsigned undo_ready; static uint8_t record_copy[TRK_BYTES]; /* the track's pattern record as it was (UNDO) */ static uint8_t record_new[TRK_BYTES]; -static uint8_t part_copy[PART_BYTES]; /* the Part as it was (UNDO; the recorder setup on cancel) */ +static uint8_t part_copy[PART_BYTES]; /* the Part as it was before the last finished bounce (UNDO) */ +static uint8_t rec_copy[12]; /* the armed track's recorder setup, put back after the take */ static uint8_t part_buf[PART_BYTES]; static char note[32]; /* a message built at run time */ static volatile int saved_result, saved_in, wav_result, wav_in; @@ -375,12 +376,10 @@ static void start(void) } if (recording(t)) { show("RECORDER BUSY"); return; } uint32_t part = part_at(&arm); - arm.mutes = U32(MUTES); - undo_ready = 0; /* Bounce's copy now holds this track */ - copy(part_copy, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); - copy(record_copy, (const volatile uint8_t *)(uintptr_t)record_at(&arm), TRK_BYTES); + arm.mutes = U32(MUTES); /* the cue bits, put back after the take; UNDO's copy waits for the take */ + copy(rec_copy, (const volatile uint8_t *)(uintptr_t)(part + P_REC + 12u * t), 12u); - copy(part_buf, part_copy, PART_BYTES); + copy(part_buf, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); uint8_t *r = part_buf + P_REC + 12u * t; r[REC_INAB] = 0; r[REC_INCD] = 0; r[REC_RLEN] = (uint8_t)(steps - 1u); r[REC_SRC3] = (uint8_t)(merge ? SRC3_CUE : t + 1u); r[REC_QREC] = QREC_PLEN; @@ -392,22 +391,44 @@ static void start(void) redraw(); } -/* Put back the recorder setup (and the cue bits) without any bounce. */ +/* The armed track's recorder setup back in its Part, while that bank and Part are + * loaded (any pattern: the setup lives in the Part). */ +static void restore_rec(void) +{ + unsigned t = arm.track; + if (U32(BANK_PTR) != arm.bank || (U8(CUR_PART) & 3u) != arm.part) return; + copy(part_buf, (const volatile uint8_t *)(uintptr_t)part_at(&arm), PART_BYTES); + for (unsigned i = 0; i < 12u; ++i) part_buf[P_REC + 12u * t + i] = rec_copy[i]; + call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, arm.part); +} + +/* Only the cue bits a merged take set go back: mutes the player changed meanwhile stay. */ +static void restore_cues(void) +{ + if (arm.merged == (uint8_t)(1u << arm.track)) return; + uint32_t mutes = (U32(MUTES) & ~0x00ff0000u) | (arm.mutes & 0x00ff0000u); + if (U32(MUTES) != mutes) set_mutes(mutes); +} + +/* Put back the recorder setup and the cue bits without any bounce. UNDO keeps the last bounce. */ static void cancel(const char *why) { unsigned t = arm.track; if (recording(t)) call3(REC_POST, t, STOP_WORD, 0); - struct ctx now; - if (current(&now) && same_place(&now, &arm)) { - uint32_t part = part_at(&arm); - copy(part_buf, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); - for (unsigned i = 0; i < 12u; ++i) part_buf[P_REC + 12u * t + i] = part_copy[P_REC + 12u * t + i]; - call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, arm.part); - } - if (U32(MUTES) != arm.mutes) set_mutes(arm.mutes); + restore_rec(); + restore_cues(); show(why); } +/* The take is in: UNDO's copy is the Part, record and mutes as they are now, before the clip. */ +static void snapshot(void) +{ + copy(part_copy, (const volatile uint8_t *)(uintptr_t)part_at(&arm), PART_BYTES); + copy(record_copy, (const volatile uint8_t *)(uintptr_t)record_at(&arm), TRK_BYTES); + copy_ctx(&last, &arm); last.mutes = U32(MUTES); + undo_ready = 0; /* ready again once the clip is applied */ +} + /* The Part and the record of a FLEX track playing the take, from the Part as * it is now (a machine track: after the player picked FLEX). */ static void apply_clip(void) @@ -416,7 +437,7 @@ static void apply_clip(void) uint32_t part = part_at(&arm); unsigned old = U8(part + P_MACHINE + t), steps = pass_steps(&arm, &longest); copy(part_buf, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); - for (unsigned i = 0; i < 12u; ++i) part_buf[P_REC + 12u * t + i] = part_copy[P_REC + 12u * t + i]; + for (unsigned i = 0; i < 12u; ++i) part_buf[P_REC + 12u * t + i] = rec_copy[i]; part_buf[P_MACHINE + t] = FLEX; part_buf[P_FX1 + t] = 0; part_buf[P_FX2 + t] = 0; part_buf[P_SLOTS + 5u * t + FLEX] = (uint8_t)(0x80u + t); for (unsigned k = 0; k < 12u; ++k) /* stock's FLEX page and setup */ @@ -433,9 +454,9 @@ static void apply_clip(void) if (per_track(&arm) && steps) { record_new[TRK_LEN] = (uint8_t)steps; record_new[TRK_SCALE] = 2; } /* 1X: one pass */ write_record(&arm, record_new); - uint32_t mutes = arm.mutes | ((uint32_t)(arm.merged & (uint8_t)~(1u << t)) << 8); + uint32_t mutes = U32(MUTES) | ((uint32_t)(arm.merged & (uint8_t)~(1u << t)) << 8); if (U32(MUTES) != mutes) set_mutes(mutes); - copy_ctx(&last, &arm); undo_ready = 1; + undo_ready = 1; } /* The WAV. Stock names it B-YYMMDD-HHMM (-2 .. -99 while that file @@ -510,12 +531,10 @@ static void finish(void) unsigned t = arm.track; if (!current(&now) || !same_place(&now, &arm)) { cancel("PATTERN CHANGED"); return; } if (!U32(LIMIT + 4u * t)) { cancel("TAKE INCOMPLETE"); return; } + restore_rec(); + restore_cues(); + snapshot(); if (modwerk_machine(part_at(&arm), t)) { /* the take is in; the machine plays on until the player picks FLEX */ - uint32_t part = part_at(&arm); - copy(part_buf, (const volatile uint8_t *)(uintptr_t)part, PART_BYTES); - for (unsigned i = 0; i < 12u; ++i) part_buf[P_REC + 12u * t + i] = part_copy[P_REC + 12u * t + i]; - call2(PART_PASTE, (uint32_t)(uintptr_t)part_buf, arm.part); - if (U32(MUTES) != arm.mutes) set_mutes(arm.mutes); phase = PICK_INFO; message = 0; redraw(); /* a popup says what to do, until a key */ return; } @@ -787,7 +806,7 @@ void module_draw(unsigned char *frame) text(frame, 10, 38, "TRIG 1-8: MERGE"); text(frame, 10, 45, "YES: REC NO: CLOSE"); } else { - text(frame, 10, 31, phase == WAIT_PLAY ? "PRESS PLAY" : phase == ARMED ? "WAITS FOR PATTERN START" : "RECORDING ONE PASS"); + text(frame, 10, 31, phase == WAIT_PLAY ? "PRESS PLAY" : phase == ARMED ? "WAIT" : "RECORDING ONE PASS"); text(frame, 10, 45, "NO: CANCEL"); } } diff --git a/sdk/octatrack/modules/bounce/evidence/performance.json b/sdk/octatrack/modules/bounce/evidence/performance.json index dab5a696b6..35222a6067 100644 --- a/sdk/octatrack/modules/bounce/evidence/performance.json +++ b/sdk/octatrack/modules/bounce/evidence/performance.json @@ -2,20 +2,20 @@ "schema": 1, "module": "bounce", "version": "0.4.0-experimental", - "sourceSha256": "30b683cffdebd1385cd067f565c3877186b7a59807532f28280f160b68d79a97", + "sourceSha256": "d76a262ef326504c4920439e996880888c5afbae9082e4be9aa2aeb444649b84", "kind": "coldfire", "trigger": "key", "cycles": { "unit": "cycles/event", "static": null, - "measured": 2394862, + "measured": 2447620, "budget": 26600000, - "method": "Executed instructions between the base's call sites and their returns, read with ot_emu's watch/hits (octabam f7d72906, --dsp --frame, MKII panel) on the development twin 4813a3e5 of base 0.8.5, package 196de6d7 (the release candidate), 3 December 2026. Key presses (core_key 0x40061dc8 to 0x40061dce): RESET TRACK's YES 247,170 (the dearest press: it snapshots the Part bytes and the 2,330-byte pattern record and writes a fresh track), UNDO 145,880 and 159,433, YES arming a merge 161,103, DOWN+REC 10,486, a merge tap 253. The take's end is not a key press but one bounded edit in the UI tick (core_tick 0x40061e94 to 0x40061e9a): the dearest tick of a two-track bounce while playing, the Flex conversion and the start of stock's save, 2,394,862; a tick otherwise about 6,000. Every count includes the stock code and interrupts that ran inside the call. Instructions, not cycles: at a few cycles each, still several times under the budget." + "method": "Executed instructions between the base's call sites and their returns, read with ot_emu's watch/hits (octabam f7d72906, --dsp --frame, MKII panel) on the development twin 4813a3e5 of base 0.8.5, package ad2b4cfe (the release candidate, with UNDO's copy taken at the take's end), 4 December 2026. Key presses (core_key 0x40061dc8 to 0x40061dce): RESET TRACK's YES 247,832 (the dearest press: it snapshots the Part bytes and the 2,330-byte pattern record and writes a fresh track), UNDO of a bounce 138,506 and of a reset 145,079, YES arming a merge 67,320, DOWN+REC 427, a merge tap 253. The take's end is not a key press but one bounded edit in the UI tick (core_tick 0x40061e94 to 0x40061e9a): the dearest tick of a two-track bounce while playing, UNDO's copy, the Flex conversion and the start of stock's save, 2,447,620; a tick otherwise about 6,000 to 10,000. Every count includes the stock code and interrupts that ran inside the call. Instructions, not cycles: at a few cycles each, still several times under the budget." }, "stress": { "events": 40, "playing": true, "hangs": 0, - "method": "ot_emu, the same build and package: with B01 playing, ten times RESET TRACK (FUNC+PART > BOUNCE > RESET TRACK, YES, YES) and UNDO (FUNC+PART > BOUNCE > UNDO, YES) on T1 in Part 1; then STOP, PLAY and a Part change to Part 2 (PART held, RIGHT); then ten more pairs on Part 2. The trial's readout showed 20 resets and 20 undos (its undo bit rising and falling), the transport on throughout but for the STOP, the UI tick count rising steadily (2,914 to 5,184), the slot running. After the run the screen read UNDONE and T1 was FLEX again, as before it." + "method": "ot_emu, the same build and package ad2b4cfe, 4 December 2026: with A01 playing, ten times RESET TRACK (FUNC+PART > BOUNCE > RESET TRACK, YES, YES) and UNDO (FUNC+PART > BOUNCE > UNDO, YES) on T1 in Part 1; then STOP, PLAY and a Part change to Part 2 (PART held, RIGHT); then ten more pairs on Part 2. The trial's readout showed 20 resets and 20 undos (its undo bit rising and falling), the transport on throughout but for the STOP, the UI tick count rising steadily (to 7,182), the slot running. After the run the screen read UNDONE and T1 was FLEX again, as before it." } } diff --git a/sdk/octatrack/modules/bounce/octamod.module.json b/sdk/octatrack/modules/bounce/octamod.module.json index f3595892de..ad5f2041a2 100644 --- a/sdk/octatrack/modules/bounce/octamod.module.json +++ b/sdk/octatrack/modules/bounce/octamod.module.json @@ -114,7 +114,7 @@ ], "qualification": { "moduleVersion": "0.4.0-experimental", - "sourceSha256": "b59be8ed9888cc624f861ad809b22975aae6db14fc5f26b013fa8908ac716fb4", + "sourceSha256": "e4790b5943d99a17d46362e813395e1364f8d414dcd64678981a095c8001ca34", "cycles": [ { "processor": "coldfire", diff --git a/sdk/octatrack/modules/bounce/unit.s b/sdk/octatrack/modules/bounce/unit.s index 9c9701a425..a1c42d8c94 100644 --- a/sdk/octatrack/modules/bounce/unit.s +++ b/sdk/octatrack/modules/bounce/unit.s @@ -98,7 +98,7 @@ write_span: move.l %a2,-(%sp) move.l 20(%sp),%a1 #APP -| 312 "bounce.c" 1 +| 313 "bounce.c" 1 move.w %sr,%d0 move.w #0x2700,%sr | 0 "" 2 @@ -114,7 +114,7 @@ write_span: cmp.l 24(%sp),%a0 jne .L13 #APP -| 314 "bounce.c" 1 +| 315 "bounce.c" 1 move.w %d0,%sr | 0 "" 2 #NO_APP @@ -552,7 +552,7 @@ copy.constprop.0: set_mutes: move.l 4(%sp),%d0 #APP -| 288 "bounce.c" 1 +| 289 "bounce.c" 1 move.w %sr,%d1 move.w #0x2700,%sr | 0 "" 2 @@ -560,7 +560,7 @@ set_mutes: move.l %d0,-2147483640 move.l %d0,269161684 #APP -| 290 "bounce.c" 1 +| 291 "bounce.c" 1 move.w %d1,%sr | 0 "" 2 #NO_APP @@ -575,6 +575,79 @@ set_mutes: rts .size set_mutes, .-set_mutes .align 2 + .type restore_cues, @function +restore_cues: + mvz.b arm+6,%d1 + moveq #1,%d0 + lsl.l %d1,%d0 + mvz.b arm+7,%d1 + mvz.b %d0,%d0 + cmp.l %d1,%d0 + jeq .L67 + move.l #-2147483640,%a0 + move.l arm+8,%d0 + move.l (%a0),%d1 + and.l #16711680,%d0 + and.l #-16711681,%d1 + or.l %d1,%d0 + cmp.l (%a0),%d0 + jeq .L67 + move.l %d0,-(%sp) + jsr set_mutes + addq.l #4,%sp +.L67: + rts + .size restore_cues, .-restore_cues + .align 2 + .type restore_rec, @function +restore_rec: + move.l 1187521622,%d1 + lea (-16,%sp),%sp + movem.l #1036,(%sp) + cmp.l arm.l,%d1 + jne .L69 + move.b 269161679,%d0 + move.w %d0,%a0 + move.b arm+5,%d0 + move.l %a0,%d3 + mvz.b %d0,%d2 + move.l %d2,%a1 + moveq #3,%d2 + and.l %d2,%d3 + cmp.l %a1,%d3 + jne .L69 + ext.w %d0 + move.b arm+6,%d3 + add.l #585088,%d1 + move.l %d1,%a0 + mulu.w #6322,%d0 + pea (%a0,%d0.l) + jsr (copy.constprop.0) + mvz.b %d3,%d0 + addq.l #4,%sp + lea rec_copy,%a1 + mulu.w #12,%d0 + move.l %d0,%a0 + clr.l %d0 + add.l #part_buf+1538,%a0 +.L71: + lea (%a1,%d0.l),%a2 + moveq #12,%d1 + move.b (%a2),(%a0,%d0.l) + addq.l #1,%d0 + cmp.l %d0,%d1 + jne .L71 + mvz.b arm+5,%d0 + move.l %d0,-(%sp) + pea part_buf + jsr 1073912396 + addq.l #8,%sp +.L69: + movem.l (%sp),#1036 + lea (16,%sp),%sp + rts + .size restore_rec, .-restore_rec + .align 2 .type pass_steps.constprop.0, @function pass_steps.constprop.0: lea (-40,%sp),%sp @@ -597,87 +670,87 @@ pass_steps.constprop.0: add.l %a0,%a3 add.l %a0,%a4 lea (81,%a0),%a0 -.L77: +.L83: btst %d5,%d4 - jeq .L68 + jeq .L74 tst.b (%a2) - jeq .L69 + jeq .L75 move.b -1(%a0),%d6 -.L70: +.L76: tst.b (%a2) - jeq .L71 + jeq .L77 move.b (%a0),%d3 -.L72: +.L78: mvz.b %d3,%d3 moveq #6,%d0 cmp.l %d3,%d0 - jcs .L73 + jcs .L79 mvz.b %d6,%d0 tst.b %d6 - jeq .L67 + jeq .L73 move.l #ticks.0,%d6 move.l %d6,%a5 mvz.b (%a5,%d3.l),%d3 mulu.w %d3,%d0 tst.l %d0 - jeq .L67 + jeq .L73 cmp.l %a1,%d0 - jls .L75 + jls .L81 move.l %d0,%a1 -.L75: +.L81: tst.l %d2 - jne .L68 + jne .L74 move.l %d0,%d3 move.l %d1,%d2 -.L76: +.L82: remu.l %d3,%d7:%d2 move.l %d3,%d6 move.l %d6,%d2 move.l %d7,%d3 tst.l %d7 - jne .L76 + jne .L82 divu.l %d6,%d1 muls.l %d0,%d1 cmp.l #384,%d1 shi %d2 mvs.b %d2,%d2 neg.l %d2 -.L68: +.L74: addq.l #1,%d5 lea (2330,%a0),%a0 moveq #8,%d0 cmp.l %d5,%d0 - jne .L77 + jne .L83 tst.l %d2 - jne .L78 + jne .L84 move.l %d1,%d0 moveq #6,%d2 divu.l %d2,%d0 -.L67: +.L73: movem.l (%sp),#15612 lea (40,%sp),%sp rts -.L69: +.L75: move.b (%a3),%d6 - jra .L70 -.L71: + jra .L76 +.L77: move.b (%a4),%d3 - jra .L72 -.L78: + jra .L78 +.L84: move.l 44(%sp),%a0 moveq #1,%d0 move.l %d0,(%a0) move.l %a1,%d0 addq.l #5,%d0 cmp.l #389,%d0 - jls .L79 -.L73: - clr.l %d0 - jra .L67 + jls .L85 .L79: + clr.l %d0 + jra .L73 +.L85: moveq #6,%d2 divu.l %d2,%d0 - jra .L67 + jra .L73 .size pass_steps.constprop.0, .-pass_steps.constprop.0 .align 2 .type write_record, @function @@ -709,7 +782,7 @@ write_record: move.l %d2,%a1 add.l #268525991,%a1 move.l %a0,36(%sp) -.L92: +.L98: pea 32.w move.l 40(%sp),%a0 pea (%a0,%a3.l) @@ -721,7 +794,7 @@ write_record: lea (32,%a3),%a3 move.l 32(%sp),%a1 cmp.l #2048,%a3 - jne .L92 + jne .L98 pea 193.w move.l #1187501196,%a3 pea 2137(%a6) @@ -739,32 +812,32 @@ write_record: add.l %d1,%a0 add.l (%a2),%a0 lea (89,%a0),%a0 -.L93: +.L99: sub.l %a1,%a1 -.L96: +.L102: move.b (%a0,%a1.l),%d0 addq.l #1,%a1 moveq #31,%d1 cmp.l %a1,%d1 - jne .L94 + jne .L100 not.l %d0 tst.b %d0 sne %d0 mvs.b %d0,%d0 neg.l %d0 -.L95: +.L101: mvz.b 6(%a2),%d1 move.l %a4,%d2 lsl.l %d1,%d2 move.b (%a3),%d1 tst.l %d0 - jeq .L97 + jeq .L103 or.l %d2,%d1 -.L98: +.L104: move.b %d1,(%a3)+ lea (32,%a0),%a0 cmp.l #1187501260,%a3 - jne .L93 + jne .L99 move.l (%a2),%a0 moveq #1,%d0 add.l #635698,%a0 @@ -777,16 +850,16 @@ write_record: move.l %d0,44(%sp) lea (40,%sp),%sp jmp 1074387488 -.L94: +.L100: mvz.b %d0,%d0 cmp.l #255,%d0 - jeq .L96 + jeq .L102 moveq #1,%d0 - jra .L95 -.L97: + jra .L101 +.L103: not.l %d2 and.l %d2,%d1 - jra .L98 + jra .L104 .size write_record, .-write_record .section .rodata.str1.1 .LC3: @@ -810,19 +883,19 @@ save_take: lea (-16,%sp),%sp movem.l #3084,(%sp) tst.l 1175475208 - jeq .L104 + jeq .L110 mvz.b arm+6,%d3 move.w %d3,%d0 mulu.w #44,%d0 move.l %d0,%a0 add.l #1187592404,%a0 tst.l (%a0) - jgt .L105 -.L104: + jgt .L111 +.L110: movem.l (%sp),#3084 lea (16,%sp),%sp jra not_saved -.L105: +.L111: jsr 1074272764 move.l #1073822216,%a2 move.l %d3,%a0 @@ -841,7 +914,7 @@ save_take: neg.l %d1 move.l %d1,wav_in_project tst.l %d0 - jeq .L106 + jeq .L112 clr.l -(%sp) clr.l -(%sp) jsr 1073893936 @@ -850,30 +923,30 @@ save_take: pea wav_dir jsr (%a2) lea (20,%sp),%sp -.L107: +.L113: tst.l %a3 - jeq .L104 + jeq .L110 tst.l %d2 - jeq .L104 + jeq .L110 pea wav_dir jsr (%a3) addq.l #4,%sp tst.l %d0 - jne .L108 + jne .L114 pea wav_dir move.l %d2,%a0 jsr (%a0) addq.l #4,%sp tst.l %d0 - jlt .L104 -.L108: + jlt .L110 +.L114: pea wav_base moveq #1,%d2 pea .LC8 pea wav_name jsr 1073822216 lea (12,%sp),%sp -.L110: +.L116: pea wav_name move.l #1073822216,%a2 pea wav_dir @@ -884,10 +957,10 @@ save_take: jsr (%a3) lea (20,%sp),%sp tst.l %d0 - jeq .L109 + jeq .L115 moveq #99,%d0 cmp.l %d2,%d0 - jeq .L104 + jeq .L110 addq.l #1,%d2 move.l %d2,-(%sp) pea wav_base @@ -895,15 +968,15 @@ save_take: pea wav_name jsr (%a2) lea (16,%sp),%sp - jra .L110 -.L106: + jra .L116 +.L112: move.l #269452416,-(%sp) pea .LC5 pea wav_dir jsr (%a2) lea (12,%sp),%sp - jra .L107 -.L109: + jra .L113 +.L115: pea wav_name pea .LC9 move.l #1175185904,-(%sp) @@ -957,7 +1030,7 @@ paste: lea part_buf,%a0 mvz.b 34(%a0,%d2.l),%d0 cmp.l %d0,%d3 - jeq .L124 + jeq .L130 move.l %d3,28(%sp) move.l %d2,24(%sp) mvz.b 5(%a2),%d0 @@ -965,16 +1038,16 @@ paste: move.l %d0,20(%sp) lea (16,%sp),%sp jmp 1074361084 -.L124: +.L130: move.b 269161679,%d0 move.b 5(%a2),%d1 moveq #3,%d4 and.l %d4,%d0 mvz.b %d1,%d3 cmp.l %d3,%d0 - jne .L123 + jne .L129 tst.b -2147483627.l - jne .L123 + jne .L129 move.b 269161678,%d0 move.l %d2,28(%sp) movem.l (%sp),#1052 @@ -984,7 +1057,7 @@ paste: move.l %d0,20(%sp) lea (16,%sp),%sp jmp 1073749784 -.L123: +.L129: movem.l (%sp),#1052 lea (16,%sp),%sp rts @@ -1012,19 +1085,18 @@ apply_clip: jsr (copy.constprop.0) move.w %d2,%d0 addq.l #8,%sp + lea rec_copy,%a1 mulu.w #12,%d0 - move.l %d0,%a1 move.l %d0,%a0 - add.l #part_copy+1538,%a1 - add.l #part_buf+1538,%a0 clr.l %d0 -.L127: + add.l #part_buf+1538,%a0 +.L133: lea (%a1,%d0.l),%a3 moveq #12,%d1 move.b (%a3),(%a0,%d0.l) addq.l #1,%d0 cmp.l %d0,%d1 - jne .L127 + jne .L133 move.w %d2,%d0 moveq #1,%d5 lea part_buf,%a1 @@ -1041,14 +1113,14 @@ apply_clip: move.b %d4,715(%a0) mulu.w #30,%d0 addq.l #6,%d0 -.L129: +.L135: move.l %d1,%a3 moveq #5,%d4 add.l #1074606604,%a3 cmp.l %d1,%d4 - jcs .L135 + jcs .L141 move.w #42,%a0 -.L128: +.L134: move.l %d1,%d5 moveq #6,%d6 remu.l %d6,%d4:%d5 @@ -1058,7 +1130,7 @@ apply_clip: move.b (%a3),(%a0,%d4.l) moveq #12,%d4 cmp.l %d1,%d4 - jne .L129 + jne .L135 move.w %d2,%d1 moveq #127,%d6 move.l #2139045952,%d5 @@ -1076,43 +1148,43 @@ apply_clip: clr.l %d1 lea record_new,%a0 lea record_copy,%a1 -.L130: +.L136: lea (%a1,%d1.l),%a3 move.b (%a3),(%a0,%d1.l) addq.l #1,%d1 cmp.l #2330,%d1 - jne .L130 + jne .L136 clr.l %d0 -.L131: +.L137: clr.b %d1 moveq #64,%d4 move.b %d1,(%a0,%d0.l) addq.l #1,%d0 cmp.l %d0,%d4 - jne .L131 + jne .L137 moveq #1,%d5 clr.l %d0 lea record_new+89,%a0 move.b %d5,record_new+7 -.L132: +.L138: st %d6 addq.l #1,%d0 move.b %d6,-1(%a0,%d0.l) cmp.l #2048,%d0 - jne .L132 + jne .L138 mvz.b arm+4,%d0 move.l (%a2),%a0 add.l #36437,%a0 mulu.w #36568,%d0 tst.b (%a0,%d0.l) - jeq .L133 + jeq .L139 tst.l -12(%fp) - jeq .L133 + jeq .L139 moveq #2,%d0 lea (-9,%fp),%a0 move.b (%a0),record_new+80 move.b %d0,record_new+81 -.L133: +.L139: pea record_new pea arm jsr write_record @@ -1120,30 +1192,26 @@ apply_clip: addq.l #8,%sp moveq #1,%d0 lsl.l %d2,%d0 + move.l #-2147483640,%a0 not.l %d0 and.l %d1,%d0 mvz.b %d0,%d0 lsl.l #8,%d0 - or.l arm+8,%d0 - cmp.l -2147483640.l,%d0 - jeq .L134 + or.l (%a0),%d0 + cmp.l (%a0),%d0 + jeq .L140 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L134: - pea 12.w - pea arm - pea last - jsr copy - lea (12,%sp),%sp +.L140: movem.l -44(%fp),#7292 moveq #1,%d1 move.l %d1,undo_ready unlk %fp rts -.L135: +.L141: move.l %a4,%a0 - jra .L128 + jra .L134 .size apply_clip, .-apply_clip .section .rodata.str1.1 .LC10: @@ -1163,33 +1231,33 @@ bounce_choose: move.l 32(%sp),%d0 movem.l #17412,(%sp) cmp.l %d0,%d1 - jne .L148 + jne .L154 move.l phase,%d1 moveq #9,%d0 cmp.l %d1,%d0 - jcs .L149 + jcs .L155 moveq #1,%d0 lsl.l %d1,%d0 move.l %d0,%d1 and.l #300,%d1 tst.l %d1 - jne .L147 + jne .L153 and.l #576,%d0 tst.l %d0 - jeq .L149 + jeq .L155 move.l #.LC10,%d1 move.l %d1,32(%sp) -.L170: +.L176: movem.l (%sp),#17412 lea (28,%sp),%sp jra show -.L149: +.L155: tst.l undo_ready - jne .L151 + jne .L157 move.l #.LC11,%d0 move.l %d0,32(%sp) - jra .L170 -.L151: + jra .L176 +.L157: move.l %sp,%d2 add.l #16,%d2 move.l %d2,-(%sp) @@ -1197,24 +1265,24 @@ bounce_choose: addq.l #4,%sp lea show,%a2 tst.l %d0 - jeq .L152 + jeq .L158 pea last move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L153 -.L152: + jne .L159 +.L158: pea .LC12 -.L171: +.L177: jsr (%a2) -.L169: +.L175: addq.l #4,%sp -.L147: +.L153: movem.l (%sp),#17412 lea (28,%sp),%sp rts -.L153: +.L159: mvz.b last+5,%d0 mvz.b last+6,%d2 lea last,%a6 @@ -1248,43 +1316,43 @@ bounce_choose: and.l %d2,%d0 eor.l %d1,%d0 cmp.l (%a0),%d0 - jeq .L154 + jeq .L160 move.l %d0,-(%sp) jsr set_mutes addq.l #4,%sp -.L154: +.L160: clr.l undo_ready pea .LC13 - jra .L171 -.L148: + jra .L177 +.L154: tst.l %d0 - jeq .L156 + jeq .L162 move.l phase,%d1 moveq #9,%d0 cmp.l %d1,%d0 - jcs .L157 + jcs .L163 moveq #1,%d0 lsl.l %d1,%d0 move.l %d0,%d1 and.l #300,%d1 tst.l %d1 - jne .L147 + jne .L153 and.l #576,%d0 tst.l %d0 - jeq .L157 + jeq .L163 clr.l phase -.L157: +.L163: move.l %sp,%d2 add.l #16,%d2 move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jne .L159 + jne .L165 pea .LC2 jsr show - jra .L169 -.L159: + jra .L175 +.L165: pea 12.w move.l %d2,-(%sp) pea arm @@ -1299,8 +1367,8 @@ bounce_choose: move.b %d0,arm+7 moveq #1,%d0 move.l %d0,1187497772 - jra .L147 -.L156: + jra .L153 +.L162: movem.l (%sp),#17412 lea (28,%sp),%sp jra open_select @@ -1308,76 +1376,25 @@ bounce_choose: .align 2 .type cancel, @function cancel: - mvz.b arm+6,%d0 - lea (-16,%sp),%sp - move.l %a6,-(%sp) - move.l %d2,-(%sp) - move.l %d0,%a6 + mvz.b arm+6,%d1 + subq.l #4,%sp + move.l 8(%sp),(%sp) + move.w %d1,%d0 mulu.w #168,%d0 - move.l 28(%sp),%d1 - move.l %d1,8(%sp) move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L173 + jeq .L179 clr.l -(%sp) pea 128.w - move.l %a6,-(%sp) + move.l %d1,-(%sp) jsr 1073762680 lea (12,%sp),%sp -.L173: - move.l %sp,%d2 - add.l #12,%d2 - move.l %d2,-(%sp) - jsr current +.L179: + jsr restore_rec + jsr restore_cues + move.l (%sp),8(%sp) addq.l #4,%sp - tst.l %d0 - jeq .L174 - pea arm - move.l %d2,-(%sp) - jsr same_place - addq.l #8,%sp - tst.l %d0 - jeq .L174 - mvz.b arm+5,%d0 - move.l arm,%a0 - add.l #585088,%a0 - mulu.w #6322,%d0 - pea (%a0,%d0.l) - jsr (copy.constprop.0) - move.w %a6,%d1 - addq.l #4,%sp - clr.l %d0 - mulu.w #12,%d1 - move.l %d1,%a6 - move.l %d1,%a0 - add.l #part_buf+1538,%a6 - add.l #part_copy+1538,%a0 -.L175: - lea (%a0,%d0.l),%a1 - moveq #12,%d1 - move.b (%a1),(%a6,%d0.l) - addq.l #1,%d0 - cmp.l %d0,%d1 - jne .L175 - mvz.b arm+5,%d0 - move.l %d0,-(%sp) - pea part_buf - jsr 1073912396 - addq.l #8,%sp -.L174: - move.l arm+8,%d0 - cmp.l -2147483640.l,%d0 - jeq .L176 - move.l %d0,-(%sp) - jsr set_mutes - addq.l #4,%sp -.L176: - move.l 8(%sp),%a1 - move.l %a1,28(%sp) - move.l (%sp)+,%d2 - move.l (%sp)+,%a6 - lea (16,%sp),%sp jra show .size cancel, .-cancel .section .rodata.str1.1 @@ -1399,9 +1416,9 @@ module_tick: lea (-64,%sp),%sp movem.l #23804,(%sp) cmp.l %d0,%d1 - jne .L188 + jne .L184 tst.l -2147457608 - jeq .L189 + jeq .L185 mvz.b arm+6,%d0 pea 1.w moveq #2,%d2 @@ -1412,10 +1429,10 @@ module_tick: move.l %d2,phase move.l %d6,1187497772 lea (12,%sp),%sp -.L189: +.L185: move.w #1,%a6 moveq #1,%d4 -.L214: +.L208: move.l #1175169472,-(%sp) jsr 1073744372 clr.l %d3 @@ -1425,21 +1442,21 @@ module_tick: clr.l %d0 move.b (%a0),51(%sp) addq.l #4,%sp -.L226: +.L220: move.l %d0,%a4 add.l #1175169420,%a4 move.b (%a4),%d2 tst.b 47(%sp) - jeq .L216 + jeq .L210 mvz.b (%a2,%d0.l),%d5 mvz.b %d2,%d1 cmp.l %d1,%d5 - jeq .L217 -.L216: + jeq .L211 +.L210: move.b %d2,(%a3,%d0.l) -.L217: +.L211: tst.l %d4 - jeq .L218 + jeq .L212 mvz.b arm+6,%d1 move.l %d0,%d6 sub.l %a0,%a0 @@ -1448,137 +1465,135 @@ module_tick: move.l %d1,48(%sp) clr.b %d1 move.l %d6,%a1 -.L223: +.L217: cmp.l 48(%sp),%a1 - jne .L219 + jne .L213 moveq #1,%d7 -.L258: +.L251: move.l %a0,%d6 lsl.l %d6,%d7 or.l %d7,%d1 - jra .L220 -.L188: + jra .L214 +.L184: moveq #2,%d7 cmp.l %d0,%d7 - jne .L190 + jne .L186 mvz.b arm+6,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L189 + jeq .L185 moveq #3,%d0 moveq #1,%d1 move.l %d0,phase move.l %d1,1187497772 - jra .L189 -.L190: + jra .L185 +.L186: moveq #3,%d2 cmp.l %d0,%d2 - jne .L191 + jne .L187 tst.l -2147457608 - jne .L192 + jne .L188 pea .LC14 -.L259: +.L252: jsr cancel -.L255: +.L248: addq.l #4,%sp - jra .L193 -.L192: - mvz.b arm+6,%d2 - lea arm,%a2 - move.w %d2,%d0 + jra .L189 +.L188: + mvz.b arm+6,%d3 + lea arm,%a3 + move.w %d3,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jne .L189 - move.l %sp,%d3 - add.l #52,%d3 - move.l %d3,-(%sp) + jne .L185 + move.l %sp,%d2 + add.l #52,%d2 + move.l %d2,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L194 - move.l %a2,-(%sp) - move.l %d3,-(%sp) + jeq .L190 + move.l %a3,-(%sp) + move.l %d2,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L195 -.L194: + jne .L191 +.L190: pea .LC15 - jra .L259 -.L195: - move.l %d2,%d0 + jra .L252 +.L191: + move.l %d3,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 tst.l (%a0) - jne .L197 + jne .L193 pea .LC16 - jra .L259 -.L197: + jra .L252 +.L193: + jsr restore_rec + jsr restore_cues mvz.b arm+5,%d0 - move.l (%a2),%d3 - add.l #585088,%d3 - move.l %d2,-(%sp) + move.l (%a3),%a4 + move.l %a4,%d2 + add.l #585088,%d2 + pea 6322.w mulu.w #6322,%d0 - add.l %d0,%d3 - move.l %d3,-(%sp) + lea copy,%a2 + add.l %d0,%d2 + move.l %d2,-(%sp) + pea part_copy + jsr (%a2) + mvz.b arm+4,%d0 + pea 2330.w + mvz.b arm+6,%d1 + mulu.w #36568,%d0 + mulu.w #2330,%d1 + move.l %d0,%a0 + add.l %d1,%a0 + pea (%a0,%a4.l) + pea record_copy + jsr (%a2) + pea 12.w + move.l %a3,-(%sp) + pea last + jsr (%a2) + lea (32,%sp),%sp + move.l #-2147483640,%a0 + move.l (%a0),last+8 + move.l %d3,(%sp) + move.l %d2,-(%sp) + clr.l undo_ready jsr modwerk_machine addq.l #8,%sp tst.l %d0 - jeq .L256 - mulu.w #12,%d2 - move.l %d3,-(%sp) - jsr (copy.constprop.0) - addq.l #4,%sp - clr.l %d0 - move.l %d2,%a1 - move.l %d2,%a0 - add.l #part_copy+1538,%a1 - add.l #part_buf+1538,%a0 -.L199: - lea (%a1,%d0.l),%a2 - moveq #12,%d1 - move.b (%a2),(%a0,%d0.l) - addq.l #1,%d0 - cmp.l %d0,%d1 - jne .L199 - mvz.b arm+5,%d0 - move.l %d0,-(%sp) - pea part_buf - jsr 1073912396 - addq.l #8,%sp - move.l arm+8,%d0 - cmp.l -2147483640.l,%d0 - jeq .L200 - move.l %d0,-(%sp) - jsr set_mutes - addq.l #4,%sp -.L200: - moveq #9,%d2 - moveq #1,%d6 - move.l %d2,phase + jeq .L249 + moveq #9,%d0 + moveq #1,%d1 + move.l %d0,phase clr.l message - move.l %d6,1187497772 -.L193: + move.l %d1,1187497772 +.L189: move.l phase,%d0 - moveq #3,%d6 - cmp.l %d0,%d6 - jcs .L213 + moveq #3,%d2 + cmp.l %d0,%d2 + jcs .L207 tst.l %d0 - jeq .L212 - jra .L189 -.L191: - moveq #6,%d7 - cmp.l %d0,%d7 - jeq .L201 - moveq #9,%d1 - cmp.l %d0,%d1 - jne .L202 -.L201: + jeq .L206 + jra .L185 +.L187: + moveq #6,%d2 + cmp.l %d0,%d2 + jeq .L195 + moveq #9,%d6 + cmp.l %d0,%d6 + jne .L196 +.L195: lea arm,%a2 move.l %sp,%d4 add.l #52,%d4 @@ -1588,18 +1603,18 @@ module_tick: jsr current addq.l #4,%sp tst.l %d0 - jeq .L203 + jeq .L197 move.l %a2,-(%sp) move.l %d4,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L204 -.L203: + jne .L198 +.L197: pea .LC10 jsr show - jra .L255 -.L204: + jra .L248 +.L198: mvz.b %d3,%d3 mvz.b arm+6,%d0 move.l %d2,%a0 @@ -1609,129 +1624,129 @@ module_tick: mvz.b 34(%a0,%d0.l),%d1 subq.l #1,%d1 tst.l %d1 - jne .L203 + jne .L197 move.l %d0,-(%sp) move.l %a0,-(%sp) jsr modwerk_machine addq.l #8,%sp tst.l %d0 - jne .L193 -.L256: + jne .L189 +.L249: jsr apply_clip jsr save_take - jra .L193 -.L202: - moveq #8,%d6 - cmp.l %d0,%d6 - jne .L206 + jra .L189 +.L196: + moveq #8,%d1 + cmp.l %d0,%d1 + jne .L200 tst.l saved_in - jeq .L207 + jeq .L201 jsr save_done_restore tst.l saved_result - jge .L208 -.L257: + jge .L202 +.L250: jsr not_saved - jra .L193 -.L208: + jra .L189 +.L202: pea .LC17 - move.l #wav_name,%d7 + move.l #wav_name,%d2 jsr show - move.l %d7,message2 - jra .L255 -.L207: + move.l %d2,message2 + jra .L248 +.L201: tst.l wav_in - jeq .L209 + jeq .L203 tst.l assigning - jne .L209 - moveq #1,%d0 - move.l %d0,assigning + jne .L203 + moveq #1,%d6 + move.l %d6,assigning tst.l wav_result - jge .L210 -.L211: + jge .L204 +.L205: jsr save_done_restore - jra .L257 -.L210: + jra .L250 +.L204: move.l #-2147483484,%a2 move.l (%a2),%d2 move.l wav_in_project,(%a2) clr.l -(%sp) jsr 1073889608 move.l %d2,(%a2) - jra .L255 -.L209: + jra .L248 +.L203: move.l saved_ticks,%d0 addq.l #1,%d0 move.l %d0,saved_ticks cmp.l #1800,%d0 - jhi .L211 -.L212: + jhi .L205 +.L206: tst.b lamps_on.l - jeq .L215 + jeq .L209 clr.l %d4 sub.l %a6,%a6 - jra .L214 -.L206: + jra .L208 +.L200: subq.l #4,%d0 tst.l %d0 - jne .L193 + jne .L189 tst.l sticky - jne .L212 + jne .L206 move.l shown_ticks,%d0 addq.l #1,%d0 move.l %d0,shown_ticks - moveq #90,%d2 - cmp.l %d0,%d2 - jcc .L212 + moveq #90,%d1 + cmp.l %d0,%d1 + jcc .L206 jsr close_view - jra .L193 -.L213: + jra .L189 +.L207: subq.l #5,%d0 tst.l %d0 - jne .L212 - jra .L189 -.L228: + jne .L206 + jra .L185 +.L222: moveq #1,%d0 - jra .L226 -.L219: + jra .L220 +.L213: move.l %a1,%d7 btst %d7,%d5 - jeq .L221 + jeq .L215 moveq #2,%d6 move.l %a0,%d7 lsl.l %d7,%d6 or.l %d6,%d1 -.L220: +.L214: addq.l #1,%a1 addq.l #2,%a0 moveq #8,%d7 cmp.l %a0,%d7 - jne .L223 + jne .L217 move.l %d0,%a0 add.l #1175169454,%a0 move.b (%a0),%d5 eor.l %d5,%d1 -.L224: +.L218: mvz.b %d2,%d2 mvz.b %d1,%d5 cmp.l %d2,%d5 - jeq .L225 + jeq .L219 move.b %d1,(%a4) moveq #1,%d3 -.L225: +.L219: move.b %d1,(%a2,%d0.l) subq.l #1,%d0 tst.l %d0 - jne .L228 + jne .L222 tst.l %d3 - jeq .L227 + jeq .L221 jsr 1073821352 -.L227: +.L221: move.w %a6,%d2 move.l #1175169472,-(%sp) jsr 1073744564 addq.l #4,%sp move.b %d2,lamps_on -.L215: +.L209: mvz.b arm+6,%d0 moveq #24,%d6 moveq #9,%d7 @@ -1763,18 +1778,18 @@ module_tick: move.l %d0,(%a0) lea (64,%sp),%sp rts -.L221: +.L215: moveq #7,%d6 cmp.l %a1,%d6 - jne .L222 + jne .L216 tst.b -2147483596.l - jne .L220 -.L222: + jne .L214 +.L216: moveq #3,%d7 - jra .L258 -.L218: + jra .L251 +.L212: move.b (%a3,%d0.l),%d1 - jra .L224 + jra .L218 .size module_tick, .-module_tick .section .rodata.str1.1 .LC18: @@ -1806,13 +1821,13 @@ module_key: move.l 8(%fp),%d4 move.l 12(%fp),%d0 cmp.l %d4,%d1 - jcs .L261 + jcs .L254 moveq #31,%d2 cmp.l %d4,%d2 - jlt .L262 + jlt .L255 move.l consumed_lo,%d1 lea consumed_lo,%a2 -.L263: +.L256: moveq #31,%d2 moveq #1,%d3 and.l %d4,%d2 @@ -1820,125 +1835,126 @@ module_key: move.l %d1,%d2 and.l %d3,%d2 tst.l %d0 - jne .L264 + jne .L257 tst.l %d2 - jeq .L265 + jeq .L258 not.l %d3 and.l %d1,%d3 move.l %d3,(%a2) -.L266: +.L259: moveq #1,%d0 - jra .L265 -.L262: + jra .L258 +.L255: move.l consumed_hi,%d1 lea consumed_hi,%a2 - jra .L263 -.L264: + jra .L256 +.L257: tst.l %d2 - jne .L266 + jne .L259 move.l phase,%d0 moveq #8,%d1 cmp.l %d0,%d1 - jeq .L261 + jeq .L254 moveq #9,%d1 cmp.l %d0,%d1 - jne .L267 + jne .L260 moveq #6,%d2 moveq #1,%d0 move.l %d2,phase move.l %d0,1187497772 add.l #-49,%d4 move.l %d4,-20(%fp) -.L335: +.L328: cmp.l %d4,%d0 - jcc .L268 - jra .L261 -.L267: + jcc .L261 + jra .L254 +.L260: tst.l %d0 - jeq .L269 + jeq .L262 moveq #6,%d1 cmp.l %d0,%d1 - jne .L270 -.L269: + jne .L263 +.L262: moveq #41,%d2 cmp.l %d4,%d2 - jne .L261 + jne .L254 move.b 1175456540,%d0 btst #0,%d0 - jeq .L261 + jeq .L254 jsr open_select -.L268: +.L261: or.l %d3,(%a2) - jra .L266 -.L270: + jra .L259 +.L263: moveq #7,%d1 cmp.l %d0,%d1 - jne .L271 + jne .L264 moveq #49,%d2 cmp.l %d4,%d2 - jne .L272 + jne .L265 move.l %fp,%d6 add.l #-12,%d6 move.l %d6,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L284 + jeq .L277 move.b -6(%fp),%d5 mvz.b arm+6,%d0 mvz.b %d5,%d2 cmp.l %d2,%d0 - jne .L284 + jne .L277 pea arm move.l %d6,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jne .L274 -.L284: + jne .L267 +.L277: pea .LC18 - jra .L336 -.L274: + jra .L329 +.L267: mvz.b -7(%fp),%d0 - move.l #585088,%a0 - move.l -12(%fp),%a3 - add.l %a3,%a0 + move.l -12(%fp),%a0 + move.l %a0,%d7 + add.l #585088,%d7 move.l %d2,-(%sp) mulu.w #6322,%d0 - add.l %a0,%d0 - move.l %d0,-(%sp) - move.l %d0,-20(%fp) + move.l %a0,-20(%fp) + add.l %d0,%d7 + move.l %d7,-(%sp) jsr modwerk_machine addq.l #8,%sp move.l %d0,%d4 tst.l %d0 - jeq .L276 + jeq .L269 pea .LC19 -.L336: +.L329: jsr show -.L338: +.L331: addq.l #4,%sp - jra .L268 -.L276: + jra .L261 +.L269: move.w %d2,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jeq .L277 -.L337: + jeq .L270 +.L330: pea .LC20 - jra .L336 -.L277: + jra .L329 +.L270: moveq #1,%d0 lsl.l %d2,%d0 - move.l #-2147483640,%a1 + move.l #-2147483640,%a0 + lea copy,%a3 move.b %d0,-5(%fp) - move.l (%a1),-4(%fp) + move.l (%a0),-4(%fp) pea 6322.w - move.l -20(%fp),-(%sp) + move.l %d7,-(%sp) pea part_copy - jsr copy + jsr (%a3) pea 2330.w move.w %d2,%d1 mvz.b -8(%fp),%d0 @@ -1946,9 +1962,10 @@ module_key: mulu.w #2330,%d1 move.l %d0,%a0 add.l %d1,%a0 - pea (%a0,%a3.l) + move.l -20(%fp),%d1 + pea (%a0,%d1.l) pea record_copy - jsr copy + jsr (%a3) lea part_copy,%a0 mvz.b 34(%a0,%d2.l),%d7 move.l %a0,-(%sp) @@ -1974,26 +1991,26 @@ module_key: lea record_new,%a0 clr.l %d0 move.l %a0,%d1 -.L278: +.L271: clr.b %d2 move.b %d2,(%a0,%d0.l) addq.l #1,%d0 cmp.l #2330,%d0 - jne .L278 + jne .L271 st %d0 - lea record_copy+80,%a1 - move.w (%a1),record_new+80 move.l #-1431655766,%a0 move.l %a0,record_new+64 move.l %a0,record_new+68 + lea record_copy+80,%a0 + move.w (%a0),record_new+80 lea record_new+89,%a0 move.b %d0,record_new+83 -.L279: +.L272: st %d2 addq.l #1,%d4 move.b %d2,-1(%a0,%d4.l) cmp.l #2048,%d4 - jne .L279 + jne .L272 lea record_copy+2329,%a0 move.b (%a0),record_new+2329 move.l %d1,-(%sp) @@ -2002,128 +2019,119 @@ module_key: pea 12.w move.l %d6,-(%sp) pea last - jsr copy + jsr (%a3) pea .LC21 moveq #1,%d0 move.l %d0,undo_ready jsr show lea (24,%sp),%sp - jra .L268 -.L272: + jra .L261 +.L265: moveq #50,%d1 cmp.l %d4,%d1 - jne .L261 -.L298: + jne .L254 +.L291: jsr close_view - jra .L268 -.L271: + jra .L261 +.L264: moveq #1,%d1 cmp.l %d0,%d1 - jne .L280 + jne .L273 moveq #7,%d0 cmp.l %d4,%d0 - jlt .L281 + jlt .L274 mvz.b arm+6,%d0 cmp.l %d4,%d0 - jeq .L282 + jeq .L275 moveq #1,%d0 move.b arm+7,%d1 lsl.l %d4,%d0 eor.l %d1,%d0 move.b %d0,arm+7 -.L282: +.L275: moveq #1,%d1 move.l %d1,1187497772 - jra .L268 -.L281: + jra .L261 +.L274: moveq #49,%d0 cmp.l %d4,%d0 - jne .L283 + jne .L276 move.l %fp,%d4 add.l #-12,%d4 move.l %d4,-(%sp) jsr current addq.l #4,%sp tst.l %d0 - jeq .L284 + jeq .L277 pea arm move.l %d4,-(%sp) jsr same_place addq.l #8,%sp tst.l %d0 - jeq .L284 + jeq .L277 move.b arm+6,%d6 mvz.b -6(%fp),%d0 - mvz.b %d6,%d4 - cmp.l %d0,%d4 - jne .L284 + mvz.b %d6,%d7 + cmp.l %d0,%d7 + jne .L277 pea -16(%fp) jsr (pass_steps.constprop.0) addq.l #4,%sp - move.l %d0,%d7 + move.l %d0,%a3 tst.l %d0 - jne .L287 + jne .L280 pea .LC22 - jra .L336 -.L287: + jra .L329 +.L280: move.b arm+7,%d5 tst.b -2147483596.l - jne .L288 -.L291: - moveq #1,%d0 - lsl.l %d4,%d0 + jne .L281 +.L284: + moveq #1,%d4 + lsl.l %d7,%d4 mvz.b %d5,%d5 - mvz.b %d0,%d0 - move.l %d0,-20(%fp) - cmp.l %d5,%d0 - jne .L293 -.L290: - move.w %d4,%d0 + mvz.b %d4,%d4 + cmp.l %d5,%d4 + jne .L286 +.L283: + move.w %d7,%d0 mulu.w #168,%d0 move.l %d0,%a0 add.l #-2147464743,%a0 tst.b (%a0) - jne .L337 + jne .L330 + move.w %d7,%d1 mvz.b arm+5,%d0 - move.l #-2147483640,%a1 - subq.l #1,%d7 - move.l (%a1),arm+8 - move.l #585088,%a0 + move.l #-2147483640,%a0 + move.l (%a0),arm+8 + move.l arm,%d2 + add.l #585088,%d2 mulu.w #6322,%d0 - pea 6322.w - move.l #copy,%d2 - clr.l undo_ready - move.l arm,%a3 - add.l %a3,%a0 - pea (%a0,%d0.l) - move.l %d2,%a0 - pea part_copy - jsr (%a0) - pea 2330.w - move.w %d4,%d1 - mvz.b arm+4,%d0 - move.l %d2,%a1 - mulu.w #36568,%d0 - mulu.w #2330,%d1 - move.l %d0,%a0 - add.l %d1,%a0 - pea (%a0,%a3.l) - pea record_copy - jsr (%a1) - pea part_copy - jsr (copy.constprop.0) - lea (28,%sp),%sp - move.w %d4,%d1 + pea 12.w mulu.w #12,%d1 + add.l %d0,%d2 move.l %d1,%a0 - add.l #part_buf+1538,%a0 + lea (1538,%a0),%a0 + pea (%a0,%d2.l) + move.l %a0,-20(%fp) + pea rec_copy + jsr copy + move.l %d2,-(%sp) + jsr (copy.constprop.0) + lea (16,%sp),%sp + move.l -20(%fp),%a0 + add.l #part_buf,%a0 + move.l %a0,-20(%fp) + move.l %a3,%d0 + subq.l #1,%d0 clr.w (%a0) - move.b %d7,2(%a0) - cmp.l -20(%fp),%d5 - jne .L301 + move.b %d0,2(%a0) + cmp.l %d5,%d4 + jne .L294 addq.l #1,%d6 -.L295: +.L288: clr.b %d0 + move.l -20(%fp),%a0 move.b %d6,4(%a0) move.b %d0,9(%a0) mvz.b arm+5,%d0 @@ -2131,8 +2139,8 @@ module_key: pea part_buf jsr 1073912396 addq.l #8,%sp - cmp.l -20(%fp),%d5 - jeq .L296 + cmp.l %d5,%d4 + jeq .L289 mvz.b arm+7,%d0 move.l arm+8,%d1 swap %d0 @@ -2142,46 +2150,46 @@ module_key: move.l %d1,-(%sp) jsr set_mutes addq.l #4,%sp -.L296: - move.l %d4,%d0 +.L289: + move.l %d7,%d0 add.l #296877961,%d0 lsl.l #2,%d0 move.l %d0,%a0 clr.l (%a0) tst.l -2147457608 - jeq .L302 + jeq .L295 pea 1.w move.l #49168,-(%sp) - move.l %d4,-(%sp) + move.l %d7,-(%sp) jsr 1073762680 lea (12,%sp),%sp moveq #2,%d0 -.L297: +.L290: move.l %d0,phase moveq #1,%d0 move.l %d0,1187497772 - jra .L268 -.L288: + jra .L261 +.L281: tst.b %d5 - jge .L291 + jge .L284 pea .LC23 - jra .L336 -.L292: + jra .L329 +.L285: move.l %d1,%d2 moveq #8,%d0 cmp.l %d1,%d0 - jeq .L290 -.L293: + jeq .L283 +.L286: move.l %d2,%d1 addq.l #1,%d1 btst %d2,%d5 - jeq .L292 + jeq .L285 mvz.w %d2,%d0 add.l %d0,%d0 move.l %d0,%a0 add.l #-2147480495,%a0 tst.b (%a0) - jne .L292 + jne .L285 clr.b %d1 pea .LC24 move.l #note,%d4 @@ -2199,45 +2207,45 @@ module_key: move.l %d4,-(%sp) jsr show lea (20,%sp),%sp - jra .L268 -.L301: + jra .L261 +.L294: moveq #10,%d6 - jra .L295 -.L302: + jra .L288 +.L295: moveq #5,%d0 - jra .L297 -.L283: + jra .L290 +.L276: moveq #50,%d1 cmp.l %d4,%d1 - jeq .L298 + jeq .L291 jsr close_view -.L261: +.L254: clr.l %d0 -.L265: +.L258: movem.l -52(%fp),#3324 unlk %fp rts -.L280: +.L273: move.l %d0,%d1 subq.l #2,%d1 lsr.l #1,%d1 - jeq .L299 + jeq .L292 subq.l #5,%d0 tst.l %d0 - jne .L300 -.L299: + jne .L293 +.L292: moveq #50,%d2 cmp.l %d4,%d2 - jne .L261 + jne .L254 pea .LC26 jsr cancel - jra .L338 -.L300: + jra .L331 +.L293: jsr close_view add.l #-49,%d4 move.l %d4,-20(%fp) moveq #1,%d0 - jra .L335 + jra .L328 .size module_key, .-module_key .align 2 .globl module_enc @@ -2272,7 +2280,7 @@ module_enc: .LC32: .string "PRESS PLAY" .LC33: - .string "WAITS FOR PATTERN START" + .string "WAIT" .LC34: .string "BOUNCED: T" .LC35: @@ -2314,16 +2322,16 @@ module_draw: move.l phase,%d3 and.l %d3,%d0 tst.l %d0 - jeq .L340 + jeq .L333 tst.l 8(%fp) - jeq .L340 + jeq .L333 lea append,%a3 moveq #6,%d0 lea fill,%a4 lea text,%a2 lea invert,%a5 cmp.l %d3,%d0 - jne .L342 + jne .L335 clr.b %d1 pea .LC34 move.l %fp,%d2 @@ -2358,17 +2366,17 @@ module_draw: clr.l -(%sp) move.l 8(%fp),-(%sp) jsr (%a5) -.L377: +.L370: lea (36,%sp),%sp -.L340: +.L333: movem.l -68(%fp),#15388 unlk %fp rts -.L342: +.L335: move.l #frame_box,%d4 moveq #9,%d0 cmp.l %d3,%d0 - jne .L343 + jne .L336 clr.b %d1 pea .LC36 move.l %fp,%d2 @@ -2416,8 +2424,8 @@ module_draw: pea 20.w move.l 8(%fp),-(%sp) jsr (%a2) - jra .L377 -.L343: + jra .L370 +.L336: clr.l -(%sp) pea 44.w pea 116.w @@ -2448,7 +2456,7 @@ module_draw: move.b %d0,-28(%fp) move.b %d1,-27(%fp) cmp.l %d3,%d4 - jne .L344 + jne .L337 pea .LC40 move.l %d2,-(%sp) move.b %d1,-36(%fp) @@ -2459,7 +2467,7 @@ module_draw: move.b %d0,-29(%fp) clr.b %d0 move.b %d0,-28(%fp) -.L345: +.L338: move.l %d2,-(%sp) moveq #4,%d3 pea 13.w @@ -2475,12 +2483,12 @@ module_draw: lea (36,%sp),%sp move.l phase,%d0 cmp.l %d0,%d3 - jne .L346 + jne .L339 move.l message,%d0 tst.l %d0 - jne .L347 + jne .L340 move.l #.LC28,%d0 -.L347: +.L340: move.l %d0,-(%sp) pea 27.w pea 10.w @@ -2489,25 +2497,25 @@ module_draw: lea (16,%sp),%sp move.l message2,%d0 tst.l %d0 - jeq .L340 + jeq .L333 move.l %d0,-(%sp) pea 35.w -.L378: +.L371: pea 10.w move.l 8(%fp),-(%sp) jsr (%a2) lea (16,%sp),%sp - jra .L340 -.L344: + jra .L333 +.L337: subq.l #4,%d3 tst.l %d3 - jne .L345 + jne .L338 move.l #.LC27,%d2 - jra .L345 -.L346: + jra .L338 +.L339: subq.l #7,%d0 tst.l %d0 - jne .L357 + jne .L350 pea .LC41 pea 24.w pea 10.w @@ -2520,15 +2528,15 @@ module_draw: jsr (%a2) lea (28,%sp),%sp move.l #.LC43,(%sp) -.L376: +.L369: pea 45.w - jra .L378 -.L357: + jra .L371 +.L350: move.w #10,%a4 move.l %fp,%d2 clr.l %d3 add.l #-24,%d2 -.L348: +.L341: moveq #84,%d0 clr.b %d1 move.l %d2,-(%sp) @@ -2544,7 +2552,7 @@ module_draw: mvz.b arm+7,%d0 lea (16,%sp),%sp btst %d3,%d0 - jeq .L349 + jeq .L342 pea 7.w pea 12.w pea 21.w @@ -2552,16 +2560,16 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a5) lea (20,%sp),%sp -.L349: +.L342: addq.l #1,%d3 lea (14,%a4),%a4 moveq #8,%d4 cmp.l %d3,%d4 - jne .L348 + jne .L341 move.l phase,%d0 moveq #1,%d1 cmp.l %d0,%d1 - jne .L350 + jne .L343 clr.b %d3 pea .LC44 move.l %d2,-(%sp) @@ -2571,17 +2579,17 @@ module_draw: jsr (pass_steps.constprop.0) lea (12,%sp),%sp tst.l %d0 - jeq .L351 + jeq .L344 moveq #9,%d4 cmp.l %d0,%d4 - jcc .L358 + jcc .L351 move.l %d0,%d1 moveq #10,%d4 divu.l %d4,%d1 lea (-18,%fp),%a0 add.l #48,%d1 move.b %d1,-19(%fp) -.L352: +.L345: moveq #10,%d3 remu.l %d3,%d1:%d0 clr.b %d4 @@ -2589,11 +2597,11 @@ module_draw: move.b %d1,(%a0) move.b %d4,1(%a0) tst.l -40(%fp) - jeq .L359 + jeq .L352 move.l #.LC29,%d0 -.L353: +.L346: move.l %d0,-(%sp) -.L375: +.L368: move.l %d2,-(%sp) jsr (%a3) addq.l #4,%sp @@ -2609,25 +2617,25 @@ module_draw: jsr (%a2) lea (28,%sp),%sp move.l #.LC47,(%sp) - jra .L376 -.L358: + jra .L369 +.L351: lea (-19,%fp),%a0 - jra .L352 -.L359: + jra .L345 +.L352: move.l #.LC30,%d0 - jra .L353 -.L351: + jra .L346 +.L344: pea .LC45 - jra .L375 -.L350: + jra .L368 +.L343: moveq #5,%d1 cmp.l %d0,%d1 - jeq .L360 + jeq .L353 subq.l #2,%d0 tst.l %d0 - jne .L361 + jne .L354 move.l #.LC33,%d0 -.L355: +.L348: move.l %d0,-(%sp) pea 31.w pea 10.w @@ -2639,13 +2647,13 @@ module_draw: move.l 8(%fp),-(%sp) jsr (%a2) lea (32,%sp),%sp - jra .L340 -.L360: + jra .L333 +.L353: move.l #.LC32,%d0 - jra .L355 -.L361: + jra .L348 +.L354: move.l #.LC31,%d0 - jra .L355 + jra .L348 .size module_draw, .-module_draw .section .rodata .type ticks.0, @object @@ -2719,6 +2727,8 @@ bounce_actions: .comm note,32,1 .local part_buf .comm part_buf,6322,1 + .local rec_copy + .comm rec_copy,12,1 .local part_copy .comm part_copy,6322,1 .local record_new diff --git a/src/catalog/module-documents.json b/src/catalog/module-documents.json index 61a6d69ea5..0f01a87b65 100644 --- a/src/catalog/module-documents.json +++ b/src/catalog/module-documents.json @@ -18137,7 +18137,7 @@ "screenshotStyle": "black-and-white" }, "moduleVersion": "0.4.0-experimental", - "sourceSha256": "b59be8ed9888cc624f861ad809b22975aae6db14fc5f26b013fa8908ac716fb4", + "sourceSha256": "e4790b5943d99a17d46362e813395e1364f8d414dcd64678981a095c8001ca34", "imageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", "cycles": [ { diff --git a/src/engine/assets/octatrack-module-packages.json b/src/engine/assets/octatrack-module-packages.json index e889f259b6..5f32205123 100644 --- a/src/engine/assets/octatrack-module-packages.json +++ b/src/engine/assets/octatrack-module-packages.json @@ -975,8 +975,8 @@ "fills": 0, "name": "Bounce In Place", "module": "4d6723e5", - "bytes": 9676, - "sha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458" + "bytes": 9632, + "sha256": "ad2b4cfeab5688dea5c003cb56ebb07be92454035b051df2b608fc07c81188ea" } ], "usbAudio": { From 7fb68a442c3f87329bee7f12613f49f5fa41ce70 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Fri, 4 Dec 2026 01:31:11 +0100 Subject: [PATCH 36/43] Bounce In Place 0.4.0: packages rebuilt in the isolated container (USB package ad2b4cfe) Co-Authored-By: Claude Opus 5.5 --- src/engine/assets/module-build.json | 8 ++++---- src/engine/assets/requested-packages.json | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/engine/assets/module-build.json b/src/engine/assets/module-build.json index 829a9dd3c5..e06d7f7b46 100644 --- a/src/engine/assets/module-build.json +++ b/src/engine/assets/module-build.json @@ -1,9 +1,9 @@ { "schemaVersion": 1, "kind": "source-packages", - "sourceCommit": "8ff1acb1de7b19e1517d5908d0cbd023096597dd", + "sourceCommit": "e53e97bc4fbe5a8e50ef0bff1e17cf1e5e8950da", "nativeRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", - "sourceTreeSha256": "b556299062232a91df0c5875c880f794217a68c7f8e92f6817b087af39635fd0", + "sourceTreeSha256": "aa4e173c8e7d085151fb822ea16e8fa609ee05a70c62e35df6f2f17847907d40", "compilerSha256": "0f9c14fff5bb004ddc0b624d00c72b820f869c42db39f8a3c8fc96ba7af0769c", "moduleVersions": { "miniverb": "0.2.3-experimental", @@ -85,8 +85,8 @@ "sha256": "6f4823e51ae30e79f387f2e83dc684c74c7547be223f2e4246c7d51096aa6df5" }, "requested-packages.json": { - "bytes": 1504337, - "sha256": "8f5a7773a87a28ab53afd4b53af4cfed9d51dad1752030efd611933332075fa5" + "bytes": 1504361, + "sha256": "1a3fdc29e8545b7e02ca2380df1088ad69de7885592b5170a36a2669741894d8" }, "utility-packages.json": { "bytes": 11735, diff --git a/src/engine/assets/requested-packages.json b/src/engine/assets/requested-packages.json index 27c53009e2..a20e9b6371 100644 --- a/src/engine/assets/requested-packages.json +++ b/src/engine/assets/requested-packages.json @@ -1557,12 +1557,12 @@ "caveAddress": null, "source": "modules/bounce/unit.s", "sources": { - "modules/bounce/unit.s": "4bb576fbf6dca5b28f4a5d97cf7e4b7cc6c2bce48cf3aac8bb1d5e78570aca05", + "modules/bounce/unit.s": "c77fa99d0d4e05bc77b1cf628f7d41e842f84e9762e1823105558d0f06b4bc7d", "modules/bounce/manifest.py": "27e8a39dcedcb52242e3ffcecc5a4cd2e5a07e2863e01f43507a31b4d85753a9" }, - "bytes": 14040, - "code": "7f454c460102010000000000000000000001000400000001000000000000000000003520000000260034000000000028000b000a2f0a206f00084280226f000cb0af00106604245f4e7545f1080011920800528060ea4feffff048d7003c263946c82456206f00141439100b14d01039100b14cf123980000000324020030680bff1de200c80009180c0630c42804cd7003c4fef00104e752a3c0009b3404c4500044a8466e67182e88866e03a097185e48866d87181e68866d24ab98000001266ca1142000411450005114100062083700160ba206f0008226f00042010b091670442804e7573a9000471a80004b08166f01029000512280005b3804a0057c07100448060de2f0b2f0a226f001440c046fc270091c847f18800246f000c15938800246f0010159388005288b1ef001866e446c0245f265f4e752f02302f000e226f0008c0fc001ed3c01029003c30401029003d1229003e340875822042741941e8ffbfb48864064280241f4e7571807419204041e8ffbfb488640c0680ffffffd07409b48065e053817381703eb08165d6206f00087401222f000c10301822b5804a0057c07100448060be41ef0004700423c000000000700142b90000000042b90000000023d00000000042b90000000023c046c7c72c4e754879000000004ebaffca588f203c0000000023c000000000700123c0000000004e7542b900000000700142b90000000023c046c7c72c4e7522390000000070094feffff42f0eb08165207001e3a8220002810000012c4a81662c0280000002404a80670642b9000000004def00042f0e4ebafe0a588f4a8066144879000000004ebaff50588f2c5f4fef000c4e754878000c2f0e4879000000004ebafdbe42b90000000073af001670014fef000ce3a813c000000000700123c00000000023c046c7c72c60c041ef0004700123d00000000023c0000000004e7541ef0004700123d00000000023c0000000004e754fefffe848d7007c282f00247a01222f00202601d6af0028d8af002cb283644c2001e7885e802f400014202f0024602c2400e68a226f001493c27407c480d3ef001c204224052c08edaa1c1130464aaf003067102c08848612825280b08465d0528160b846822c08c48660ec4cd7007c4fef00184e754fefffec48d7007c282f00207a01206f001c2608d6af0024d8af002873c8202f0020e7895e817c07cc802400e68a2241528093c2d3ef00182405edaa1c11bd821282b88062e05288b68862d04cd7007c4fef00144e754feffff048d71c04242f0014266f0018286f001c48780001487800012f2f00282f0c2f0b2f0245faff0c4e9248780001487800012f2f0040202f0048487408ff2f0b2f024e924fef0030487800012f2f0028487800012f0c2f0b2f024e92487800012f2f0040487800012f0c202f0048487308ff2f024e924cef1c0400304fef00404e754fefffe4224f207c400bf10a200f22d8b1fc400bf12666f62f6f0020000c2f2f002c4878ffff723b92af00302f012f2f00302f002f3c400ba8764eb940012bd84fef00344e75206f00041010224852884a0066f64280206f0008123008001381080052804a0166ee4e75207c46c8d198203c00000000b090661220b90000000041f90000000023d046c8d194207c460bcfc84a90660620b9000000004e754fefffec428148d70c1c43f900000000428271a9000277d1266f001891c8246f0018d5c2c0ef001ed08377a90003d7c0068000000000b6886216d483528158897009b08166cc4cd70c1c4fef00144e754aaf0020670c1833880011840800528860d41832880060f22f0a226f0008428041f90000000045f108001192080052800c80000018b266ee245f4e75202f000440c146fc270023c08000000823c0100b14d446c142a742a742a742a742a74878001a4eb9400053d84fef00184e754fefffd8720648d73cfc206f002c247c00008e55267c00008e534282287c00008e5493c94285429071b90000000079b900000000c0fc8ed82040d1f900000000d5c8d7c8d9c841e800510b0467604a12677e1c28ffff4a12677a161077837006b0836500008871864a06675a2c3c000000002a4677b53800c0c34a806748b089630222404a826626260024014c4320072c03240626074a8766f24c4610014c0018000c810000018052c275024482528541e8091a7008b08566904a82661a200174064c4200004cd73cfc4fef00284e751c13608216146084206f002c7001208020095a800c80000001856304428060d674064c42000060ce4fefffd848d77c0c246f002c97cb2c6f003049fafa8675aa000471aa0006c4fc8ed8c0fc091ad4802a422002dbd2487800592f0e06801001614e2f002f0d4e944fef0010260d06830000005941ee00592242d3fc100161a72f48002448780020206f00284870b80048739800487338002f4900304e944fef001047eb0020226f0020b7fc0000080066d2487800c1267c46c7d48c486e08590682100169a72f02486d08594e9471aa0004387c00014fef001073aa0006c0fc8ed8c2fc091a2040d1c1d1d241e8005993c9103098005289721fb289665846804a0056c07100448073aa0006240ce3aa12134a80674e828216c141e80020b7fc46c7d4cc66ca20527001d1fc0009b3322080700123c0100f85984eb940027e0071aa00064cd77c0c2f40002c4fef00284ef94009da2071800c80000000ff6792700160a44682c28260ae4feffff048d70c0c4ab946105408671877b9000000003003c0fc002c2040d1fc46c938d44a906e0c4cd70c0c4fef00106000f9fa4eb9400819fc247c40013a0820432f00486800014879000000004879000000004e92267946c823fa243946c8240a4eb940024eec4fef00104a8056c17301448123c1000000004a80670000bc42a742a74eb9400252302f004879000000004879000000004e924fef00144a8b67864a8267824879000000004e93588f4a80661248790000000020424e90588f4a806d00ff6448790000000074014879000000004879000000004eb940013a084fef000c487900000000247c40013a084879000000004879000000004879000000004e924879000000004e934fef00144a8067427063b0826700ff0e52822f024879000000004879000000004879000000004e924fef001060aa2f3c100f84804879000000004879000000004e924fef000c6000ff4a4879000000004879000000002f3c460be9f04e92068300000080247c800000a4700123c0460be9e8207c460bcfc823c3460be9ec203c0000000023d000000000207c46c8d19423d000000000207c46c8d19823d00000000042b9460bcfc823c046c8d194700841faf93423c846c8d19842b90000000042b90000000042b90000000042b90000000023c000000000700123c046c7c72c261224b9000000002f3c460be9f04eb94002416824834cef0c0c00104fef00204e754feffff048d7041c246f0014242f0018262f001c71aa00052f004879000000004eb940029a4c508f41f90000000071b02822b680671e2f43001c2f42001871aa00054cd7041c2f4000144fef00104ef9400972fc1039100b14cf122a00057803c0847781b083662c4a398000001566241039100b14ce2f42001c4cd7041c73012f41001871802f4000144fef00104ef940001f184cd7041c4fef00104e754e56ffd471b90000000048d71c7c18390000000045f900000000c0fc18b22652d7fc0008ed80d7c07584284249ec002277b3c800486efffc4ebafae02f0b2d40fff44ebafa803002508fc0fc000c22402040d3fc00000000d1fc00000000428047f10800720c119308005280b28066f030027a0143f9000000000684ffffff8042064281c0fc00051385c800387c01da138628001386280841f108003002114402cbc0fc001e5c8026417805d7fc400d320cb88165000136307c002a2a017c064c465004d1c9d1c0528111934800780cb88166d432027c7f2a3c7f7f4040c2fc00182041d1fc000000001146000b42a80003214500072f032f024879000000004ebafe604fef000c428141f90000000043f90000000047f118001193180052810c810000091a66ee428042017840118108005280b88066f27a01428041f90000000013c50000000050c65280118608ff0c800000080066f071b9000000002052d1fc00008e55c0fc8ed84a30080067184aaefff46712700241eefff713d00000000013c0000000004879000000004879000000004ebafa7c123900000000508f7001e5a84680c0817180e18880b900000000b0b98000000867082f004ebaf92a588f4878000c4879000000004879000000004ebaf4064fef000c4cee1c7cffd4720123c1000000004e5e4e75204c6000fecc4fefffe47202202f002048d74404b280660001242239000000007009b08165307001e3a8220002810000012c4a8166680280000002404a806716223c000000002f4100204cd744044fef001c6000f5124ab900000000660c203c000000002f40002060e0240f0682000000102f024ebaf39a588f45faf4ea4a8067124879000000002f024ebaf402508f4a8066144879000000004e92588f4cd744044fef001c4e7571b90000000075b9000000004df9000000002056d1fc0008ed80c0fc18b2d1c0123028221f41000f2f084ebaf804487800012f024879000000004ebaf78c71af001f2f002f022f0e4ebafc844879000000002f0e4ebaf92871b9000000004fef0024207c800000082210243900000000e188b382c082b380b09067082f004ebaf7d4588f42b9000000004879000000006000ff604a806700008e2239000000007009b08165227001e3a8220002810000012c4a816600ff400280000002404a80670642b900000000240f0682000000102f024ebaf294588f4a80660e4879000000004ebaf3da6000ff0c4878000c2f024879000000004ebaf24e42b90000000073af002270014fef000ce3a8720723c10000000013c000000000700123c046c7c72c6000fed24cd744044fef001c6000f3f471b9000000004feffff02f0e2f022c40c0fc00a8222f001c2f4100082040d1fc800049d94a10671242a7487800802f0e4eb9400051784fef000c240f06820000000c2f024ebaf1f0588f4a8067704879000000002f024ebaf25c508f4a80675e71b900000000207900000000d1fc0008ed80c0fc18b2487008004ebaf682320e588f4280c2fc000c2c412041ddfc00000000d1fc0000000043f00800720c1d9108005280b28066f071b9000000002f004879000000004eb940029a4c508f203900000000b0b98000000867082f004ebaf652588f226f00082f49001c241f2c5f4fef00106000f2a620390000000072054fefffc048d75cfcb280660000b64ab9800065b8672c71b9000000004878000174022f3c0000c0107c012f004eb94000517823c20000000023c646c7c72c4fef000c3c7c000178012f3c460ba9c04eb9400009f4428347f90000000045f90000000041f90000000042801f500033588f2840d9fc460ba98c14144a2f002f670a7bb208007382ba816704178208004a84670003cc73b9000000002c0091c8e58e7bb9000000002f41003042012246b3ef0030660002d87e012c08edaf8287600002dc7e02be80662c71b900000000c0fc00a82040d1fc800049d94a106700ff647003720123c00000000023c146c7c72c6000ff507403b480660001284ab9800065b866104879000000004ebafe04588f600000f875b90000000045f9000000003002c0fc00a82040d1fc800049d94a106600ff10260f0683000000342f034ebaf006588f4a80670e2f0a2f034ebaf076508f4a80660848790000000060ac2002068011b1ff89e58820404a906608487900000000609471b900000000261206830008ed802f02c0fc18b2d6802f034ebaf09a508f4a8067000104c4fc000c2f034ebaf46c588f428022422042d3fc00000000d1fc0000000045f10800720c119208005280b28066f071b9000000002f004879000000004eb940029a4c508f203900000000b0b98000000867082f004ebaf442588f74097c0123c20000000042b90000000023c646c7c72c2039000000007c03bc80650001664a80670001226000fe227e06be8067067209b280667a45f900000000280f06840000003424122f041639000000004ebaeefe588f4a80670e2f0a2f044ebaef6e508f4a80660e4879000000004ebaf0366000fea4778371b9000000002042d1fc0008ed80c6fc18b2d1c373b0082253814a8166d22f002f084ebaef98508f4a806600ff704ebaf8ac4ebaf5fc6000ff647c08bc80660000a24ab900000000672e4ebaf2b84ab9000000006c084ebaf0046000ff404879000000002e3c000000004ebaefc223c7000000006000fe2a4ab900000000673a4ab9000000006632700123c0000000004ab9000000006c064ebaf26a60b8247c800000a4241224b90000000042a74eb94002414824826000fde8203900000000528023c0000000000c800000070862c84a3900000000670000a442849dce6000fcfa59804a806600feb44ab90000000066de203900000000528023c000000000745ab48064ca4ebaef766000fe905b804a8066bc6000fcbe70016000fce62e090f05670000b67c022e08efae8286528954887e08be886600fd082040d1fc460ba9ae1a10bb8175827b81ba826704188176011581080053804a8066bc4a8367064eb9400136a8340e2f3c460ba9c04eb940000ab4588f13c20000000071b9000000007c187e092239800065b875b900000000c0fc00a84a8156c1484242422040d1fc800049d9203900000000eda873014481efa980b90000000080824cd75cfc80814a1056c1206f004473014481e189808120804fef00404e757c07bc89660a4a39800000346600ff467e036000fc5c123308006000ff504e56ffcc723f48d70cfc282e0008202e000cb284650004fc741fb4846d2e22390000000045f900000000741f7601c484e5ab2401c4834a8066204a82670004d64683c68124837001600004ca22390000000045f90000000060d04a8266e82039000000007208b280670004a87209b28066227406700123c20000000023c046c7c72c0684ffffffcf2d44ffecb0846428600004804a8067067206b280661e7429b4846600046e103946100b1c08000000670004604ebaede68792608a7207b280660001d67431b484660001be2c0e0686fffffff42f064ebaec08588f4a8067221a2efffa71b9000000007585b08266124879000000002f064ebaec64508f4a806608487900000000603071aefff9207c0008ed80266efff4d1cb2f02c0fc18b2d0882f002d40ffec4ebaec9a508f28004a8067104879000000004ebaecfa588f6000ff763002c0fc00a82040d1fc800049d94a10670848790000000060dc7001e5a8227c800000081d40fffb2d51fffc487818b22f2effec4879000000004ebaeb3e4878091a320271aefff8c0fc8ed8c2fc091a2040d1c14870b8004879000000004ebaeb1a41f9000000007fb028222f084ebaeff442a72f024879000000004ebaef7e4fef00243002c0fc00052040d1fc000000001145000110850685ffffff80114500042e872f022f064ebaf4584fef000c41f9000000004280220842021182080052800c800000091a66f050c043f90000000033d100000000207caaaaaaaa23c80000000023c80000000041f90000000013c00000000050c25284118248ff0c840000080066f041f90000000013d0000000002f012f064ebaf09a4878000c2f064879000000004ebaea52487900000000700123c0000000004ebaebb84fef00186000fe327232b284660002844ebaebf46000fe227201b280660002807007b0846d2871b900000000b08467127001123900000000e9a8b38013c000000000720123c146c7c72c6000fdec7031b08466000232280e0684fffffff42f044ebae9fe588f4a806700fe184879000000002f044ebaea68508f4a806700fe041c390000000071aefffa7986b8806600fdf2486efff04ebaeee6588f2e004a80660a4879000000006000fe101a39000000004a3980000034660001467001e9a87b8571802d40ffecb0856600014e3004c0fc00a82040d1fc800049d94a106600fdf671b900000000227c80000008538723d100000000207c0008ed80c0fc18b2487818b2243c0000000042b900000000267900000000d1cb4870080020424879000000004e904878091a320471b9000000002242c0fc8ed8c2fc091a2040d1c14870b8004879000000004e914879000000004ebaedd44fef001c3204c2fc000c2041d1fc00000000425011470002baaeffec6600010652864200114600041140000971b9000000002f004879000000004eb940029a4c508fbaaeffec672071b900000000223900000000484042400281ff00ffff82802f014ebaed92588f2004068011b1ff89e588204042904ab9800065b8670000ac487800012f3c0000c0102f044eb9400051784fef000c700223c000000000700123c046c7c72c6000fc3a4a056c00feb84879000000006000fcac24017008b0816700feb622025281050567ee71c2d0802040d1fc80000c514a1066de4201487900000000283c000000002f0447faec2406820000003113c1000000004e9313c20000000042024879000000002f0413c2000000004e932f044ebae9464fef00146000fbc07c0a6000fefa70056000ff6a7232b2846700fd844ebae97642804cee0cfcffcc4e5e4e7522005581e28967065b804a8066147432b48466e04879000000004ebaf5706000fc004ebae9440684ffffffcf2d44ffec70016000fb3a2239000000002f027407b48157c07401b48157c1241f44804481808171804e754e56ffbc70f748d73c1c263900000000c0834a806700009c4aae00086700009447faeb52700649fae9b645faeb024bfaea24b083660000864201487900000000240e0682ffffffe82f0242031d41ffe84e931039000000001d43fff34879000000002f020680000000311d40fff24e9342a748780008487800804878003842a72f2e00084e944fef00242e8248780039487800022f2e00084e9248780008487800804878003842a72f2e00084e954fef00244cee3c1cffbc4e5e4e75283c000000007009b083660000b04201487900000000240e0682ffffffe82f0242031d41ffe84e931039000000001d43fff14879000000002f020680000000311d40fff04e9342a74878001a4878006048780012487800102f2e00084e944fef00284878001a48780060487800124878001020442f2e00084e9048790000000048780015487800142f2e00084e924fef0024487800074878005e48780014487800112f2e00084e952f0248780020487800142f2e00084e926000ff3842a74878002c487800744878000a48780006240e0682ffffffdc2f2e00084e944878002c487800744878000a48780006204478072f2e00084e9042004fef00282ebc000000002f021d40ffdc4e931039000000004201508f0680000000311d40ffe41d41ffe5b883660000a64879000000002f021d41ffdc4e93508f1039000000000680000000311d40ffe342001d40ffe42f0276044878000d4878000a2f2e00084e9248780007487800724878000c487800072f2e00084e954fef0024203900000000b680665a2039000000004a806606203c000000002f004878001b4878000a2f2e00084e924fef00102039000000004a806700fe442f00487800234878000a2f2e00084e924fef00106000fe2c59834a836600ff7c243c000000006000ff725f804a806638487900000000487800184878000a2f2e00084e924879000000004878001f4878000a2f2e00084e924fef001c2ebc000000004878002d609e387c000a240e42830682ffffffe8705442012f02487800162f0c2f2e00081d40ffe820030680000000311d40ffe91d41ffea4e9271b9000000004fef00100700671a487800074878000c48780015486cffff2f2e00084e954fef0014528349ec000e7808b88366a62039000000007201b280660000b042034879000000002f021d43ffe84e93486effd84ebae9264fef000c4a80670000867809b88064702200780a4c44100141eeffee0681000000301d41ffed760a4c43000142040681000000301081114400014aaeffd86746203c000000002f002f024e93588f2e824878001f4878000a2f2e00084e92487900000000487800264878000a2f2e00084e924fef001c2ebc000000006000feee41eeffed60a0203c0000000060b848790000000060b27205b280673855804a80663a203c000000002f004878001f4878000a2f2e00084e924879000000004878002d4878000a2f2e00084e924fef00206000fc7a203c0000000060cc203c0000000060c40000000100000000000000030000000000000000000000004e4f542053415645443a2054414b4520494e20425546464552005341564520495420494e20415544494f20454449544f5200415544494f20545241434b53204f4e4c59004225642d25730025732f424f554e4345530025732f415544494f2f424f554e4345530025732f25732e7761760025732d256400257300424f554e4345532f25730054414b45204c45465420494e20425546464552004e4f5448494e4720544f20554e444f00554e444f3a204f50454e20495453205041545445524e00554e444f4e450053544f50504544202d204e4f20424f554e4345005041545445524e204348414e4745440054414b4520494e434f4d504c45544500424f554e4345442c20534156454420415300545241434b204348414e474544005049434b20535441544943204649525354005245434f52444552204255535900545241434b2052455345540050415353204f56455220363420535445505300543820495320544845204d415354455220545241434b00540020435545204c4556454c204953203000424f554e43452043414e43454c4c454400424f554e4345000020284c4f4e474553542900205354455053005245434f5244494e47204f4e45205041535300505245535320504c415900574149545320464f52205041545445524e20535441525400424f554e4345443a205400205049434b20464c4558004348414e474520540020544f20464c45580054414b45205245434f5244454400424f554e4345205400524553455420540053544f434b2053544154494320545241434b004e4f2054524947532c204e4f204c4f434b53005945533a205245534554204e4f3a204241434b005041535320004f564552203634205354455053005452494720312d383a204d45524745005945533a2052454320204e4f3a20434c4f5345004e4f3a2043414e43454c00424f554e434520545241434b00524553455420545241434b00554e444f00030406080c1830000000000000000000000000000408004000007f004f4000007f004f0040000040000000000000004002017f4001202020000000007f7f40407f007f004000402f007f007f00010000000140010000000140000000000000000000000000000000000140000000000000000000000001010000000000000100030000017f010000000000000000010140000901000000ffff00000001010008010100220101002a1e1e011a181801da1e1e02ca050502f21e1e06020c0c000000000000000000000000000000000000000100000000000000000400fff1000000000000000000000000030000010000000000000000000000000300000300000000000000000000000003000004000002050000000000000022020000010000000a000000220000007e0200000100000012000000a000000032020000010000001d000000d200000034020000010000002800000106000000720200000100000038000001780000002e020000010000003d000045720000000401000004000000430000455e00000004010000040000004c000000060000000401000004000000530000456200000004010000040000005b0000456600000004010000040000000000000000000000000300000500000067000001a6000000220200000100000071000001c800000016020000010000007c000001de0000008e0200000100000088000045520000000c010000040000006b0000026c00000014020000010000008c00000186000000040100000400000099000001820000000401000004000000a2000002800000001402000001000000ac0000017e0000000401000004000000b70000017a0000000401000004000000be000002940000007602000001000000c30000030a0000005602000001000000ca000003600000008402000001000000d4000003e40000004602000001000000d90000042a0000002402000001000000e00000044e0000003402000001000000f2000001660000000401000004000000fe0000016a00000004010000040000010a000001620000000401000004000001140000048200000068020000010000012a0000009a000000240100000600000136000001aa000018b2010000040000013f000004ea0000002402000001000001500000050e00000032020000010000015a00000540000000f8020000010000017100000000000000070100000600000179000006380000014202000001000001860000077a0000020e020000010000019000000132000000180100000400000199000001760000000401000004000001a8000000aa0000008801000004000001b00000014a0000001801000004000001b90000000a000000a001000004000001c2000001720000000401000004000001cc0000016e0000000401000004000001d8000009880000009e02000001000001de00000a26000001f202000001000001e900001a5c000018b201000004000001f30000330e0000091a01000004000001fe00003c280000091a010000040000020a000045460000000c010000040000020f0000454200000004010000040000021a00000c18000001d4020000010000022800000dec000000e8020000010000022f0000000200000002010000040000023a000000000000000201000004000002440000000400000001010000040000024d0000456e0000000401000004000002590000456a0000000401000004000002650000001400000086010000060000026b0000018a00000020010000040000000000000000000000000300000600000270000000080000000c010000060000027f00000ed40000046e120000010000028b00001342000005541200000100000296000018960000002012000001000002a1000018b60000044a12000001000002ad00001d00000000181100000100626f756e63652e630063757272656e740073616d655f706c6163650077726974655f7370616e006d6f647765726b5f6d616368696e650073686f77007068617365006d6573736167653200737469636b79006d6573736167650073686f776e5f7469636b73006e6f745f736176656400636c6f73655f76696577006f70656e5f73656c6563740061726d0073617665645f726573756c740073617665645f696e007761765f7361766564007761765f726573756c74007761765f696e0066696c6c00696e76657274006672616d655f626f78007465787400617070656e6400736176655f646f6e655f726573746f726500707265765f646f6e655f6200707265765f646f6e655f6100707265765f6d6f6465007075745f747261636b2e636f6e737470726f702e3000545241434b5f425954455300706172745f62756600636f70792e636f6e737470726f702e30007365745f6d7574657300706173735f73746570732e636f6e737470726f702e30007469636b732e300077726974655f7265636f726400736176655f74616b65007761765f62617365007761765f696e5f70726f6a656374007761765f646972007761765f6e616d65007761765f706174680061737369676e696e670073617665645f7469636b73007061737465006170706c795f636c697000706172745f636f7079007265636f72645f6e6577007265636f72645f636f7079006c61737400756e646f5f726561647900626f756e63655f63686f6f73650063616e63656c006c616d705f73746f636b006c616d705f6d696e65006c616d70735f6f6e00636f6e73756d65645f6c6f00636f6e73756d65645f6869004652455348006e6f746500626f756e63655f616374696f6e73006d6f64756c655f7469636b006d6f64756c655f6b6579006d6f64756c655f656e63006d6f64756c655f6472617700626f756e63655f706172745f6d656e7500000000000180000004010000457200000188000004010000455e0000018e00000401000000060000019400000401000045620000019a0000040100004566000001b4000010010000001a000001ba000004010000455e000001c20000040100000006000001ca0000040100004572000001d200000401000045620000020c00000401000045720000024600000401000045620000025800000401000045590000026000000401000045720000027400000401000001860000027a000004010000018200000288000004010000017e0000028e000004010000017a00000456000002010000026c000004b400000401000001aa000005ae0000440100000000000007f000000401000001760000090600000201000002800000090c000004010000016200000918000004010000016a00000924000004010000016600000942000004010000018200000948000004010000017a0000094e000004010000017200000954000004010000016e0000095a000004010000457200000a7a000004010000205e00000a8000000401000007ac00000b0c00000401000002c400000b6a000004010000331500000ba4000004010000335e00000baa000004010000335f00000c0a000004010000454200000c54000010010000008500000c72000010010000009900000d40000004010000454200000d7e000004010000457200000db6000004010000456200000dca000004010000457200000dd0000004010000455900000e7a00000401000007ac00000e80000004010000205e00000f10000004010000457200000fc200000401000045720000108a000004010000205e0000109000000401000007ac000010d60000040100004572000010dc0000040100004562000011b0000004010000014a000011ba000004010000455e000011d600000401000001720000120e000004010000016e0000121c0000040100000004000012460000040100004566000012c20000040100000004000013ba00000401000045720000151400000401000004740000155a000004010000335e00001566000004010000334e0000156c0000040100003352000015780000040100003361000015940000040100003c27000015ba0000040100004542000016000000040100004559000016b4000004010000455a000016c80000020100000000000016ce00000401000045420000172600000401000007ac000017b20000040100004572000017fe000004010000018a00001810000004010000018a00001818000004010000018b00001828000004010000018c00001974000002010000036000001a70000010010000021a00001b02000010010000019b00001b48000010010000019400001b84000010010000025100001c5e000010010000019c00001c94000010010000028900001ca400001001000001a700001cc000001001000001cc00001cf200001001000001c100001cfa00001001000001ae00001d04000010010000019400001d0c000044010000000800001d100000020100000c18000001a80000100100000000000001e000000401000045720000022200001001000000320000023c000004010000455200000460000004010000016600000466000004010000016a0000047c00000401000001620000048e000044010000009a000004f400000401000001aa0000056a00000401000045560000057000000401000045590000057c00000401000045520000078c0000040100004558000007c40000100100000044000007ca000004010000013200000808000010010000004b0000080e00000401000000aa0000082200000401000000aa0000083000000401000000aa0000084200000401000001320000084a000010010000007700000850000004010000014a00000860000004010000014a0000086c00000401000000aa00000872000010010000006700000878000004010000000a00000880000004010000000a0000089c0000040100000132000008a20000100100000071000008a8000004010000014a000008bc0000100100000056000008c200000401000000aa000008d2000004010000014a000008d8000010010000007a0000096a0000040100000176000009a400000401000001aa000009b200000401000001aa00000a2c000004010000455700000a36000004010000455800000a3c000004010000455200000a9c00000401000001aa00000b22000004010000455200000b32000004010000330e00000b380000040100003c2800000b64000004010000336700000b80000004010000455600000bb0000004010000330e00000bb6000004010000455200000bc0000004010000455900000bd4000004010000455a00000bee000004010000455200000bf4000004010000454600000c2e000004010000457200000c6a000004010000454200000c96000004010000454600000ca800001001000000a900000cbc000004010000454b00000cc2000004010000454c00000cc8000004010000454600000cf00000040100001a5c00000d080000040100003c2800000d14000004010000454d00000d26000004010000454e00000d4600001001000000c000000d56000004010000457200000d98000010010000003200000dac000004010000455200000dee000004010000455800000e3c000004010000455200000e4e000004010000455700000e54000004010000455200000e96000004010000455700000e9e00000401000001aa00000eac000004010000455a00000ed6000004010000457200000ef4000004010000455800000f34000004010000000200000f3a000004010000000000000f40000004010000000400000f72000004010000455800000f7e000004010000455900000fa6000004010000455800000fe200001001000000c700000ff2000004010000455800000ff800000401000045520000103400001001000000db0000104c00001001000000eb000010540000040100004557000010a60000040100004557000010ae00000401000001aa000010bc000004010000455a000010e800000401000045720000110c00000401000045520000111e00000401000045570000113c00001001000000850000114c00000401000045580000118e00000401000001820000119a0000040100000186000011aa00001001000000fb000011c4000004010000017a000011cc0000040100000172000011dc000004010000017e000011f2000004010000017600001206000004010000016e0000123600000401000000060000123e0000040100004566000012c80000040100004558000012d80000040100004559000012f2000004010000457200001300000004010000454200001362000004010000456e00001368000004010000456e00001390000004010000456a00001396000004010000456a000013a2000004010000457200001428000004010000455800001434000004010000455200001446000010010000010d00001478000010010000011b0000149a000010010000012d000014bc0000040100001a5c000014e00000040100003c28000014ea0000040100001a5c000014fe000044010000001400001538000004010000330e000015540000040100003c780000157200000401000033670000158e0000040100004541000015a80000040100004546000015b2000010010000013b000015ea0000040100004558000015f60000040100004559000016300000040100004552000016440000040100004558000016660000100100000147000016700000040100004559000016a60000040100004557000016d40000040100004552000016e20000040100001a5c000016f00000040100004556000017080000040100003c28000017100000040100001a5c0000174600000401000045570000174e00000401000001aa00001762000004010000455900001768000004010000455a000017ca000010010000015a000017f80000100100000171000018200000100100000173000018760000100100000183000018980000040100004572000018c20000040100004572000018f200001001000001e40000190a00000401000045580000191400001001000001ef0000198400001001000001fa0000199c0000040100004558000019a60000100100000203000019ee000010010000020c00001a7e000004010000455800001a9c000010010000022300001aac000004010000455800001aee000004010000457200001af8000004010000456200001b1c000004010000455e00001b58000010010000022b00001b6c000010010000023e00001bc4000004010000455900001bf8000004010000457200001c08000010010000026500001c7c000010010000027900001cac000010010000026b00001cd6000010010000029d0000000800001001000002a80000000c00001001000002b50000001000001001000002c1002e73796d746162002e737472746162002e7368737472746162002e72656c612e74657874002e64617461002e627373002e726f646174612e737472312e31002e72656c612e726f646174610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000100000006000000000000003400001d18000000000000000000000004000000000000001b0000000400000040000000000000284000000c6c0000000800000001000000040000000c0000002600000001000000030000000000001d4c00000000000000000000000000000004000000000000002c00000008000000030000000000001d4c00004576000000000000000000000004000000000000003100000001000000320000000000001d4c000002c6000000000000000000000001000000010000004500000001000000020000000000002012000000be0000000000000000000000020000000000000040000000040000004000000000000034ac000000240000000800000006000000040000000c00000001000000020000000000000000000020d0000004b0000000090000004600000004000000100000000900000003000000000000000000002580000002be0000000000000000000000010000000000000011000000030000000000000000000034d00000004d00000000000000000000000100000000", - "sha256": "21f5ed5bf4a460036c84ac6a58c582e6649f0c0b906a5a97d40eaee16d22c24f", + "bytes": 14052, + "code": "7f454c46010201000000000000000000000100040000000100000000000000000000352c000000260034000000000028000b000a2f0a206f00084280226f000cb0af00106604245f4e7545f1080011920800528060ea4feffff048d7003c263946c82456206f00141439100b14d01039100b14cf123980000000324020030680bff1de200c80009180c0630c42804cd7003c4fef00104e752a3c0009b3404c4500044a8466e67182e88866e03a097185e48866d87181e68866d24ab98000001266ca1142000411450005114100062083700160ba206f0008226f00042010b091670442804e7573a9000471a80004b08166f01029000512280005b3804a0057c07100448060de2f0b2f0a226f001440c046fc270091c847f18800246f000c15938800246f0010159388005288b1ef001866e446c0245f265f4e752f02302f000e226f0008c0fc001ed3c01029003c30401029003d1229003e340875822042741941e8ffbfb48864064280241f4e7571807419204041e8ffbfb488640c0680ffffffd07409b48065e053817381703eb08165d6206f00087401222f000c10301822b5804a0057c07100448060be41ef0004700423c000000000700142b90000000042b90000000023d00000000042b90000000023c046c7c72c4e754879000000004ebaffca588f203c0000000023c000000000700123c0000000004e7542b900000000700142b90000000023c046c7c72c4e7522390000000070094feffff42f0eb08165207001e3a8220002810000012c4a81662c0280000002404a80670642b9000000004def00042f0e4ebafe0a588f4a8066144879000000004ebaff50588f2c5f4fef000c4e754878000c2f0e4879000000004ebafdbe42b90000000073af001670014fef000ce3a813c000000000700123c00000000023c046c7c72c60c041ef0004700123d00000000023c0000000004e7541ef0004700123d00000000023c0000000004e754fefffe848d7007c282f00247a01222f00202601d6af0028d8af002cb283644c2001e7885e802f400014202f0024602c2400e68a226f001493c27407c480d3ef001c204224052c08edaa1c1130464aaf003067102c08848612825280b08465d0528160b846822c08c48660ec4cd7007c4fef00184e754fefffec48d7007c282f00207a01206f001c2608d6af0024d8af002873c8202f0020e7895e817c07cc802400e68a2241528093c2d3ef00182405edaa1c11bd821282b88062e05288b68862d04cd7007c4fef00144e754feffff048d71c04242f0014266f0018286f001c48780001487800012f2f00282f0c2f0b2f0245faff0c4e9248780001487800012f2f0040202f0048487408ff2f0b2f024e924fef0030487800012f2f0028487800012f0c2f0b2f024e92487800012f2f0040487800012f0c202f0048487308ff2f024e924cef1c0400304fef00404e754fefffe4224f207c400bf10a200f22d8b1fc400bf12666f62f6f0020000c2f2f002c4878ffff723b92af00302f012f2f00302f002f3c400ba8764eb940012bd84fef00344e75206f00041010224852884a0066f64280206f0008123008001381080052804a0166ee4e75207c46c8d198203c00000000b090661220b90000000041f90000000023d046c8d194207c460bcfc84a90660620b9000000004e754fefffec428148d70c1c43f900000000428271a9000277d1266f001891c8246f0018d5c2c0ef001ed08377a90003d7c0068000000000b6886216d483528158897009b08166cc4cd70c1c4fef00144e754aaf0020670c1833880011840800528860d41832880060f22f0a226f0008428041f90000000045f108001192080052800c80000018b266ee245f4e75202f000440c146fc270023c08000000823c0100b14d446c142a742a742a742a742a74878001a4eb9400053d84fef00184e7573b9000000007001e3a873b9000000007180b0816728207c800000082039000000002210028000ff00000281ff00ffff8081b09067082f004ebaff94588f4e75223946c824564feffff048d7040cb2b90000000066761039100b14cf30401039000000002608758022427403c682b689665a488016390000000006810008ed802041c0fc18b2487008004ebaff1e7183588f43f900000000c0fc000c20404280d1fc0000000045f10800720c119208005280b28066f071b9000000002f004879000000004eb940029a4c508f4cd7040c4fef00104e754fefffd8720648d73cfc206f002c247c00008e55267c00008e534282287c00008e5493c94285429071b90000000079b900000000c0fc8ed82040d1f900000000d5c8d7c8d9c841e800510b0467604a12677e1c28ffff4a12677a161077837006b0836500008871864a06675a2c3c000000002a4677b53800c0c34a806748b089630222404a826626260024014c4320072c03240626074a8766f24c4610014c0018000c810000018052c275024482528541e8091a7008b08566904a82661a200174064c4200004cd73cfc4fef00284e751c13608216146084206f002c7001208020095a800c80000001856304428060d674064c42000060ce4fefffd848d77c0c246f002c97cb2c6f003049faf9b075aa000471aa0006c4fc8ed8c0fc091ad4802a422002dbd2487800592f0e06801001614e2f002f0d4e944fef0010260d06830000005941ee00592242d3fc100161a72f48002448780020206f00284870b80048739800487338002f4900304e944fef001047eb0020226f0020b7fc0000080066d2487800c1267c46c7d48c486e08590682100169a72f02486d08594e9471aa0004387c00014fef001073aa0006c0fc8ed8c2fc091a2040d1c1d1d241e8005993c9103098005289721fb289665846804a0056c07100448073aa0006240ce3aa12134a80674e828216c141e80020b7fc46c7d4cc66ca20527001d1fc0009b3322080700123c0100f85984eb940027e0071aa00064cd77c0c2f40002c4fef00284ef94009da2071800c80000000ff6792700160a44682c28260ae4feffff048d70c0c4ab946105408671877b9000000003003c0fc002c2040d1fc46c938d44a906e0c4cd70c0c4fef00106000f9244eb9400819fc247c40013a0820432f00486800014879000000004879000000004e92267946c823fa243946c8240a4eb940024eec4fef00104a8056c17301448123c1000000004a80670000bc42a742a74eb9400252302f004879000000004879000000004e924fef00144a8b67864a8267824879000000004e93588f4a80661248790000000020424e90588f4a806d00ff6448790000000074014879000000004879000000004eb940013a084fef000c487900000000247c40013a084879000000004879000000004879000000004e924879000000004e934fef00144a8067427063b0826700ff0e52822f024879000000004879000000004879000000004e924fef001060aa2f3c100f84804879000000004879000000004e924fef000c6000ff4a4879000000004879000000002f3c460be9f04e92068300000080247c800000a4700123c0460be9e8207c460bcfc823c3460be9ec203c0000000023d000000000207c46c8d19423d000000000207c46c8d19823d00000000042b9460bcfc823c046c8d194700841faf85e23c846c8d19842b90000000042b90000000042b90000000042b90000000023c000000000700123c046c7c72c261224b9000000002f3c460be9f04eb94002416824834cef0c0c00104fef00204e754feffff048d7041c246f0014242f0018262f001c71aa00052f004879000000004eb940029a4c508f41f90000000071b02822b680671e2f43001c2f42001871aa00054cd7041c2f4000144fef00104ef9400972fc1039100b14cf122a00057803c0847781b083662c4a398000001566241039100b14ce2f42001c4cd7041c73012f41001871802f4000144fef00104ef940001f184cd7041c4fef00104e754e56ffd471b90000000048d71c7c18390000000045f900000000c0fc18b22652d7fc0008ed80d7c07584284249ec002277b3c800486efffc4ebafae02f0b2d40fff44ebaf9aa3002508f43f900000000c0fc000c20404280d1fc0000000047f10800720c119308005280b28066f030027a0143f9000000000684ffffff8042064281c0fc00051385c800387c01da138628001386280841f108003002114402cbc0fc001e5c8026417805d7fc400d320cb8816500011c307c002a2a017c064c465004d1c9d1c0528111934800780cb88166d432027c7f2a3c7f7f4040c2fc00182041d1fc000000001146000b42a80003214500072f032f024879000000004ebafe624fef000c428141f90000000043f90000000047f118001193180052810c810000091a66ee428042017840118108005280b88066f27a01428041f90000000013c50000000050c65280118608ff0c800000080066f071b9000000002052d1fc00008e55c0fc8ed84a30080067184aaefff46712700241eefff713d00000000013c0000000004879000000004879000000004ebafa7e123900000000508f7001e5a8207c800000084680c0817180e1888090b09067082f004ebaf858588f4cee1c7cffd4720123c1000000004e5e4e75204c6000fee64fefffe47202202f002048d74404b280660001242239000000007009b08165307001e3a8220002810000012c4a8166680280000002404a806716223c000000002f4100204cd744044fef001c6000f4584ab900000000660c203c000000002f40002060e0240f0682000000102f024ebaf2e0588f45faf4304a8067124879000000002f024ebaf348508f4a8066144879000000004e92588f4cd744044fef001c4e7571b90000000075b9000000004df9000000002056d1fc0008ed80c0fc18b2d1c0123028221f41000f2f084ebaf74a487800012f024879000000004ebaf6d271af001f2f002f022f0e4ebafca04879000000002f0e4ebaf94471b9000000004fef0024207c800000082210243900000000e188b382c082b380b09067082f004ebaf71a588f42b9000000004879000000006000ff604a806700008e2239000000007009b08165227001e3a8220002810000012c4a816600ff400280000002404a80670642b900000000240f0682000000102f024ebaf1da588f4a80660e4879000000004ebaf3206000ff0c4878000c2f024879000000004ebaf19442b90000000073af002270014fef000ce3a8720723c10000000013c000000000700123c046c7c72c6000fed24cd744044fef001c6000f33a73b900000000598f2eaf00083001c0fc00a82040d1fc800049d94a10671242a7487800802f014eb9400051784fef000c4ebaf6a84ebaf6642f570008588f6000f29220390000000072054fefffc048d75cfcb280660000b64ab9800065b8672c71b9000000004878000174022f3c0000c0107c012f004eb94000517823c20000000023c646c7c72c4fef000c3c7c000178012f3c460ba9c04eb9400009f4428347f90000000045f90000000041f90000000042801f500033588f2840d9fc460ba98c14144a2f002f670a7bb208007382ba816704178208004a84670003da73b9000000002c0091c8e58e7bb9000000002f41003042012246b3ef0030660002e67e012c08edaf8287600002ea7e02be80662c71b900000000c0fc00a82040d1fc800049d94a106700ff647003720123c00000000023c146c7c72c6000ff507403b480660001364ab9800065b866104879000000004ebafeaa588f6000010677b90000000047f9000000003003c0fc00a82040d1fc800049d94a106600ff10240f0682000000342f024ebaeff2588f4a80670e2f0b2f024ebaf062508f4a80660848790000000060ac2003068011b1ff89e58820404a90660848790000000060944ebaf5184ebaf4d471b9000000002853240c06820008ed80487818b2c0fc18b245faef78d4802f024879000000004e9271b9000000004878091a73b900000000c0fc8ed8c2fc091a2040d1c14870c8004879000000004e924878000c2f0b4879000000004e924fef0020207c8000000823d0000000002e832f0242b9000000004ebaf01e508f4a80670000aa7009720123c00000000042b90000000023c146c7c72c2039000000007403b480650001664a80670001226000fe147406b48067067c09bc80667a45f900000000280f06840000003424122f041639000000004ebaeedc588f4a80670e2f0a2f044ebaef4c508f4a80660e4879000000004ebaf0146000fe96778371b9000000002042d1fc0008ed80c6fc18b2d1c373b0082253814a8166d22f002f084ebaef76508f4a806600ff704ebaf9604ebaf6b06000ff647208b280660000a24ab900000000672e4ebaf2964ab9000000006c084ebaefe26000ff40487900000000243c000000004ebaefa023c2000000006000fe1c4ab900000000673a4ab90000000066327c0123c6000000004ab9000000006c064ebaf24860b8247c800000a4241224b90000000042a74eb94002414824826000fdda203900000000528023c0000000000c800000070862c84a3900000000670000a442849dce6000fcec59804a806600feb44ab90000000066de203900000000528023c000000000725ab28064ca4ebaef546000fe905b804a8066bc6000fcb070016000fcd82e090f05670000b67c022e08efae8286528954887e08be886600fcfa2040d1fc460ba9ae1a10bb8175827b81ba826704188176011581080053804a8066bc4a8367064eb9400136a8340e2f3c460ba9c04eb940000ab4588f13c20000000071b9000000007c187e092239800065b875b900000000c0fc00a84a8156c1484242422040d1fc800049d9203900000000eda873014481efa980b90000000080824cd75cfc80814a1056c1206f004473014481e189808120804fef00404e757c07bc89660a4a39800000346600ff467e036000fc4e123308006000ff504e56ffcc723f48d70cfc282e0008202e000cb284650004d4741fb4846d2e22390000000045f900000000741f7601c484e5ab2401c4834a8066204a82670004ae4683c68124837001600004a222390000000045f90000000060d04a8266e82039000000007208b280670004807209b28066227406700123c20000000023c046c7c72c0684ffffffcf2d44ffecb0846428600004584a8067067206b280661e7429b48466000446103946100b1c08000000670004384ebaedc48792608a7207b280660001d67431b484660001be2c0e0686fffffff42f064ebaebe6588f4a8067221a2efffa71b9000000007585b08266124879000000002f064ebaec42508f4a806608487900000000603071aefff9206efff42e0806870008ed802f02c0fc18b22d48ffecde802f074ebaec78508f28004a8067104879000000004ebaecd8588f6000ff763002c0fc00a82040d1fc800049d94a10670848790000000060dc7001e5a8207c8000000847faeb321d40fffb2d50fffc487818b22f074879000000004e934878091a320271aefff8c0fc8ed8c2fc091a2040d1c1222effec487018004879000000004e9341f9000000007fb028222f084ebaefd042a72f024879000000004ebaef5a4fef00243002c0fc00052040d1fc000000001145000110850685ffffff80114500042e872f022f064ebaf50a4fef000c41f9000000004280220842021182080052800c800000091a66f050c0207caaaaaaaa23c80000000023c80000000041f90000000033d00000000041f90000000013c00000000050c25284118248ff0c840000080066f041f90000000013d0000000002f012f064ebaf14c4878000c2f064879000000004e93487900000000700123c0000000004ebaeb964fef00186000fe327232b2846600025c4ebaebd26000fe227201b280660002587007b0846d2871b900000000b08467127001123900000000e9a8b38013c000000000720123c146c7c72c6000fdec7031b0846600020a280e0684fffffff42f044ebae9dc588f4a806700fe184879000000002f044ebaea46508f4a806700fe041c390000000071aefffa7f86be806600fdf2486efff04ebaef9a588f26404a80660a4879000000006000fe101a39000000004a39800000346600011e7801efac7b857984b8856600012a3007c0fc00a82040d1fc800049d94a106600fdfa320771b900000000207c8000000823d00000000024390000000006820008ed80c0fc18b24878000cc2fc000cd480204141e80602487028002d48ffec4879000000004ebae8fa2f024ebaedde4fef0010206effecd1fc000000002d48ffec200b5380425011400002b8856600010852864200206effec114600041140000971b9000000002f004879000000004eb940029a4c508fb885672071b900000000223900000000484042400281ff00ffff82802f014ebaed98588f2007068011b1ff89e588204042904ab9800065b8670000ac487800012f3c0000c0102f074eb9400051784fef000c700223c000000000700123c046c7c72c6000fc624a056c00fee04879000000006000fcd424017008b0816700feda22025281050567ee71c2d0802040d1fc80000c514a1066de4201487900000000283c000000002f0447faec2a06820000003113c1000000004e9313c20000000042024879000000002f0413c2000000004e932f044ebae94c4fef00146000fbe87c0a6000fef870056000ff6a7232b2846700fdac4ebae97c42804cee0cfcffcc4e5e4e7522005581e28967065b804a8066147432b48466e04879000000004ebaf6306000fc284ebae94a0684ffffffcf2d44ffec70016000fb622239000000002f027407b48157c07401b48157c1241f44804481808171804e754e56ffbc70f748d73c1c263900000000c0834a806700009c4aae00086700009447faeb58700649fae9bc45faeb084bfaea2ab083660000864201487900000000240e0682ffffffe82f0242031d41ffe84e931039000000001d43fff34879000000002f020680000000311d40fff24e9342a748780008487800804878003842a72f2e00084e944fef00242e8248780039487800022f2e00084e9248780008487800804878003842a72f2e00084e954fef00244cee3c1cffbc4e5e4e75283c000000007009b083660000b04201487900000000240e0682ffffffe82f0242031d41ffe84e931039000000001d43fff14879000000002f020680000000311d40fff04e9342a74878001a4878006048780012487800102f2e00084e944fef00284878001a48780060487800124878001020442f2e00084e9048790000000048780015487800142f2e00084e924fef0024487800074878005e48780014487800112f2e00084e952f0248780020487800142f2e00084e926000ff3842a74878002c487800744878000a48780006240e0682ffffffdc2f2e00084e944878002c487800744878000a48780006204478072f2e00084e9042004fef00282ebc000000002f021d40ffdc4e931039000000004201508f0680000000311d40ffe41d41ffe5b883660000a64879000000002f021d41ffdc4e93508f1039000000000680000000311d40ffe342001d40ffe42f0276044878000d4878000a2f2e00084e9248780007487800724878000c487800072f2e00084e954fef0024203900000000b680665a2039000000004a806606203c000000002f004878001b4878000a2f2e00084e924fef00102039000000004a806700fe442f00487800234878000a2f2e00084e924fef00106000fe2c59834a836600ff7c243c000000006000ff725f804a806638487900000000487800184878000a2f2e00084e924879000000004878001f4878000a2f2e00084e924fef001c2ebc000000004878002d609e387c000a240e42830682ffffffe8705442012f02487800162f0c2f2e00081d40ffe820030680000000311d40ffe91d41ffea4e9271b9000000004fef00100700671a487800074878000c48780015486cffff2f2e00084e954fef0014528349ec000e7808b88366a62039000000007201b280660000b042034879000000002f021d43ffe84e93486effd84ebaea024fef000c4a80670000867809b88064702200780a4c44100141eeffee0681000000301d41ffed760a4c43000142040681000000301081114400014aaeffd86746203c000000002f002f024e93588f2e824878001f4878000a2f2e00084e92487900000000487800264878000a2f2e00084e924fef001c2ebc000000006000feee41eeffed60a0203c0000000060b848790000000060b27205b280673855804a80663a203c000000002f004878001f4878000a2f2e00084e924879000000004878002d4878000a2f2e00084e924fef00206000fc7a203c0000000060cc203c0000000060c400000001000000000000000300000000000000000000000000004e4f542053415645443a2054414b4520494e20425546464552005341564520495420494e20415544494f20454449544f5200415544494f20545241434b53204f4e4c59004225642d25730025732f424f554e4345530025732f415544494f2f424f554e4345530025732f25732e7761760025732d256400257300424f554e4345532f25730054414b45204c45465420494e20425546464552004e4f5448494e4720544f20554e444f00554e444f3a204f50454e20495453205041545445524e00554e444f4e450053544f50504544202d204e4f20424f554e4345005041545445524e204348414e4745440054414b4520494e434f4d504c45544500424f554e4345442c20534156454420415300545241434b204348414e474544005049434b20535441544943204649525354005245434f52444552204255535900545241434b2052455345540050415353204f56455220363420535445505300543820495320544845204d415354455220545241434b00540020435545204c4556454c204953203000424f554e43452043414e43454c4c454400424f554e4345000020284c4f4e474553542900205354455053005245434f5244494e47204f4e45205041535300505245535320504c4159005741495400424f554e4345443a205400205049434b20464c4558004348414e474520540020544f20464c45580054414b45205245434f5244454400424f554e4345205400524553455420540053544f434b2053544154494320545241434b004e4f2054524947532c204e4f204c4f434b53005945533a205245534554204e4f3a204241434b005041535320004f564552203634205354455053005452494720312d383a204d45524745005945533a2052454320204e4f3a20434c4f5345004e4f3a2043414e43454c00424f554e434520545241434b00524553455420545241434b00554e444f0000030406080c1830000000000000000000000000000408004000007f004f4000007f004f0040000040000000000000004002017f4001202020000000007f7f40407f007f004000402f007f007f00010000000140010000000140000000000000000000000000000000000140000000000000000000000001010000000000000100030000017f010000000000000000010140000901000000ffff00000001010008010100220101002a1e1e011a181801da1e1e02ca050502f21e1e06020c0c0000000000000000000000000000000000000000000100000000000000000400fff1000000000000000000000000030000010000000000000000000000000300000300000000000000000000000003000004000001770000000000000022020000010000000a000000220000007e0200000100000012000000a000000032020000010000001d000000d200000034020000010000002800000106000000720200000100000038000001780000002e020000010000003d0000457e0000000401000004000000430000456a00000004010000040000004c000000060000000401000004000000530000456e00000004010000040000005b0000457200000004010000040000000000000000000000000300000500000067000001a6000000220200000100000071000001c800000016020000010000007c000001de0000008e02000001000000880000455e0000000c010000040000006b0000026c00000014020000010000008c00000186000000040100000400000099000001820000000401000004000000a2000002800000001402000001000000ac0000017e0000000401000004000000b70000017a0000000401000004000000be000002940000007602000001000000c30000030a0000005602000001000000ca000003600000008402000001000000d4000003e40000004602000001000000d90000042a0000002402000001000000e00000044e0000003402000001000000f2000001660000000401000004000000fe0000016a00000004010000040000010a000001620000000401000004000001140000048200000068020000010000012a0000009a000000240100000600000136000001aa000018b2010000040000013f000004ea0000002402000001000001500000050e00000032020000010000015a000005400000004002000001000001670000058000000096020000010000017300001a5c0000000c010000040000017c00000616000000f802000001000001930000000000000007010000060000019b0000070e0000014202000001000001a8000008500000020e02000001000001b2000001320000001801000004000001bb000001760000000401000004000001ca000000aa0000008801000004000001d20000014a0000001801000004000001db0000000a000000a001000004000001e4000001720000000401000004000001ee0000016e0000000401000004000001fa00000a5e0000009e020000010000020000000afc000001d6020000010000020b0000331a0000091a010000040000021600003c340000091a01000004000002220000454e00000004010000040000022d00000cd2000001d4020000010000023b000045520000000c010000040000024000001a68000018b2010000040000024a00000ea60000004202000001000002510000000200000002010000040000025c000000000000000201000004000002660000000400000001010000040000026f0000457a00000004010000040000027b000045760000000401000004000002870000001400000086010000060000028d0000018a00000020010000040000000000000000000000000300000600000292000000080000000c01000006000002a100000ee80000047c12000001000002ad000013640000052c12000001000002b8000018900000002012000001000002c3000018b00000044a12000001000002cf00001cfa000000181100000100626f756e63652e630063757272656e740073616d655f706c6163650077726974655f7370616e006d6f647765726b5f6d616368696e650073686f77007068617365006d6573736167653200737469636b79006d6573736167650073686f776e5f7469636b73006e6f745f736176656400636c6f73655f76696577006f70656e5f73656c6563740061726d0073617665645f726573756c740073617665645f696e007761765f7361766564007761765f726573756c74007761765f696e0066696c6c00696e76657274006672616d655f626f78007465787400617070656e6400736176655f646f6e655f726573746f726500707265765f646f6e655f6200707265765f646f6e655f6100707265765f6d6f6465007075745f747261636b2e636f6e737470726f702e3000545241434b5f425954455300706172745f62756600636f70792e636f6e737470726f702e30007365745f6d7574657300726573746f72655f6375657300726573746f72655f726563007265635f636f707900706173735f73746570732e636f6e737470726f702e30007469636b732e300077726974655f7265636f726400736176655f74616b65007761765f62617365007761765f696e5f70726f6a656374007761765f646972007761765f6e616d65007761765f706174680061737369676e696e670073617665645f7469636b73007061737465006170706c795f636c6970007265636f72645f6e6577007265636f72645f636f707900756e646f5f726561647900626f756e63655f63686f6f7365006c61737400706172745f636f70790063616e63656c006c616d705f73746f636b006c616d705f6d696e65006c616d70735f6f6e00636f6e73756d65645f6c6f00636f6e73756d65645f6869004652455348006e6f746500626f756e63655f616374696f6e73006d6f64756c655f7469636b006d6f64756c655f6b6579006d6f64756c655f656e63006d6f64756c655f6472617700626f756e63655f706172745f6d656e750000000180000004010000457e00000188000004010000456a0000018e000004010000000600000194000004010000456e0000019a0000040100004572000001b4000010010000001a000001ba000004010000456a000001c20000040100000006000001ca000004010000457e000001d2000004010000456e0000020c000004010000457e00000246000004010000456e00000258000004010000456500000260000004010000457e0000027400000401000001860000027a000004010000018200000288000004010000017e0000028e000004010000017a00000456000002010000026c000004b400000401000001aa00000590000004010000455e000005e200000401000007ac000006840000470100000000000008c60000040100000176000009dc0000020100000280000009e20000040100000162000009ee000004010000016a000009fa000004010000016600000a18000004010000018200000a1e000004010000017a00000a24000004010000017200000a2a000004010000016e00000a30000004010000457e00000b5600000401000007ac00000be000000401000002c400000c3e000004010000332100000c78000004010000336a00000c7e000004010000336b00000cc4000004010000454e00000d0e000010010000008500000d2c000010010000009900000dfa000004010000454e00000e38000004010000457e00000e70000004010000456e00000e84000004010000457e00000e8a000004010000456500000f24000004010000457e00000fd6000004010000457e000010d8000004010000455a000010e2000004010000454e000010f8000004010000457e000010fe000004010000456e000011d2000004010000014a000011dc000004010000456a000011f8000004010000017200001230000004010000016e0000123e0000040100000004000012680000040100004572000012e40000040100000004000013dc000004010000457e0000153800000401000004740000157e000004010000335a00001584000004010000335e00001590000004010000336a0000159c000004010000336d000015b80000040100003c33000015dc000004010000454e000016220000040100004565000016d200000401000045660000171800000401000001aa000017ac000004010000457e000017f8000004010000018a0000180a000004010000018a00001812000004010000018b00001822000004010000018c0000196e000002010000036000001a6a000010010000020700001afc000010010000019b00001b42000010010000019400001b7e000010010000023e00001c58000010010000019c00001c8e000010010000027600001c9e00001001000001a700001cba00001001000001cc00001cec00001001000001c100001cf400001001000001ae00001cfe000010010000019400001d06000047010000000800001d0a0000020100000cd2000001a80000100100000000000001e0000004010000457e0000022200001001000000320000023c000004010000455e00000460000004010000016600000466000004010000016a0000047c00000401000001620000048e000047010000009a000004f400000401000001aa0000054200000401000045640000054c00000401000045650000055e0000040100004566000005a00000040100004563000005b60000040100004564000005d40000040100001a5c000005f800000401000045630000060000000401000001aa00000640000004010000456200000646000004010000456500000652000004010000455e0000086200000401000045640000089a0000100100000044000008a00000040100000132000008de000010010000004b000008e400000401000000aa000008f800000401000000aa0000090600000401000000aa00000918000004010000013200000920000010010000007700000926000004010000014a00000936000004010000014a0000094200000401000000aa0000094800001001000000670000094e000004010000000a00000956000004010000000a0000097200000401000001320000097800001001000000710000097e000004010000014a0000099200001001000000560000099800000401000000aa000009a8000004010000014a000009ae000010010000007a00000a40000004010000017600000a7a00000401000001aa00000a8800000401000001aa00000b02000004010000456300000b0c000004010000456400000b12000004010000455e00000b480000040100001a5c00000b7000000401000001aa00000bf6000004010000455e00000c06000004010000331a00000c0c0000040100003c3400000c38000004010000337300000c54000004010000456200000c84000004010000331a00000c8a000004010000455e00000c94000004010000456500000ce8000004010000457e00000d24000004010000454e00000d50000004010000455200000d6200001001000000a900000d76000004010000455700000d7c000004010000455800000d82000004010000455200000daa0000040100001a6800000dc20000040100003c3400000dce000004010000455900000de0000004010000455a00000e0000001001000000c000000e10000004010000457e00000e52000010010000003200000e66000004010000455e00000ea8000004010000456400000eea000004010000457e00000f08000004010000456400000f48000004010000000200000f4e000004010000000000000f54000004010000000400000f86000004010000456400000f92000004010000456500000fba000004010000456400000ff600001001000000c70000100600000401000045640000100c000004010000455e0000104800001001000000db0000106000001001000000eb000010700000040100004563000010900000040100001a68000010980000040100004562000010a20000040100004564000010b80000040100003c34000010c600000401000045520000110a000004010000457e0000112e000004010000455e0000114000000401000045630000115e00001001000000850000116e0000040100004564000011b00000040100000182000011bc0000040100000186000011cc00001001000000fb000011e6000004010000017a000011ee0000040100000172000011fe000004010000017e00001214000004010000017600001228000004010000016e000012580000040100000006000012600000040100004572000012ea0000040100004564000012fa000004010000456500001314000004010000457e00001322000004010000454e00001384000004010000457a0000138a000004010000457a000013b20000040100004576000013b80000040100004576000013c4000004010000457e0000144a000004010000456400001456000004010000455e00001468000010010000010d0000149a000010010000011b000014bc000010010000012d000014e00000040100001a68000015060000040100003c340000150e0000040100001a680000152200004701000000140000155c000004010000331a0000158a0000040100003c84000015960000040100003373000015b2000004010000454d000015cc0000040100004552000015d4000010010000013b0000160c000004010000456400001618000004010000456500001652000004010000455e000016660000040100004564000016880000100100000147000016920000040100004565000016c60000040100004563000016d8000004010000455e000017000000040100001a5c0000174200000401000045630000174a00000401000001aa0000175c0000040100004565000017620000040100004566000017c4000010010000015a000017f200001001000001710000181a000010010000017300001870000010010000018300001892000004010000457e000018bc000004010000457e000018ec00001001000001d10000190400000401000045640000190e00001001000001dc0000197e00001001000001e7000019960000040100004564000019a000001001000001f0000019e800001001000001f900001a78000004010000456400001a96000010010000021000001aa6000004010000456400001ae8000004010000457e00001af2000004010000456e00001b16000004010000456a00001b52000010010000021800001b66000010010000022b00001bbe000004010000456500001bf2000004010000457e00001c02000010010000025200001c76000010010000026600001ca6000010010000025800001cd0000010010000028a0000000800001001000002950000000c00001001000002a20000001000001001000002ae002e73796d746162002e737472746162002e7368737472746162002e72656c612e74657874002e64617461002e627373002e726f646174612e737472312e31002e72656c612e726f646174610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000100000006000000000000003400001d12000000000000000000000004000000000000001b0000000400000040000000000000287c00000c3c0000000800000001000000040000000c0000002600000001000000030000000000001d4800000000000000000000000000000004000000000000002c00000008000000030000000000001d4800004582000000000000000000000004000000000000003100000001000000320000000000001d48000002b3000000000000000000000001000000010000004500000001000000020000000000001ffc000000be0000000000000000000000020000000000000040000000040000004000000000000034b8000000240000000800000006000000040000000c00000001000000020000000000000000000020bc000004e000000009000000490000000400000010000000090000000300000000000000000000259c000002e00000000000000000000000010000000000000011000000030000000000000000000034dc0000004d00000000000000000000000100000000", + "sha256": "3589ca991d5d7fd56385076e0c7409ded6eb63e373db35967ee9110d2afd5f7d", "stockCopies": [], "placement": "linked", "poolBaseLiterals": 0, From 819162bc660cfb480605b47c3c035b17c7a9de62 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Fri, 4 Dec 2026 01:36:50 +0100 Subject: [PATCH 37/43] Bounce In Place 0.4.0: README, memory and cost numbers for package ad2b4cfe; TESTING: the review fixes on the unit Co-Authored-By: Claude Opus 5.5 --- sdk/octatrack/modules/bounce/README.md | 7 ++-- sdk/octatrack/modules/bounce/TESTING.md | 35 +++++++++++++++++++ .../modules/bounce/octamod.module.json | 32 ++++++++--------- src/catalog/module-documents.json | 32 ++++++++--------- 4 files changed, 71 insertions(+), 35 deletions(-) diff --git a/sdk/octatrack/modules/bounce/README.md b/sdk/octatrack/modules/bounce/README.md index 2ede363b75..9cfa785077 100644 --- a/sdk/octatrack/modules/bounce/README.md +++ b/sdk/octatrack/modules/bounce/README.md @@ -21,7 +21,7 @@ Category: **system**. It rewrites a track's Part and pattern when the musician a | After bouncing a Grain or synth track | The take is in, and a small popup reads TAKE RECORDED, CHANGE T*n* TO FLEX. Any key closes it; FUNC and SRC go straight on to the chooser. The bottom line then reads BOUNCED: T*n* PICK FLEX until you do. Pick FLEX for that track in the machine chooser: Bounce then makes it play the take. Until then the machine plays on unchanged. | | FUNC+PART > BOUNCE > UNDO | Restores the last bounce's or reset's track: machine, FX, every page, slots, trigs, locks, and the merged tracks' mutes. | -BOUNCE shows the merge as inverted track names and on trig keys 1-8 (the active track red, merged tracks green, every other track you can tap yellow; T8 dark while MASTER TRACK is on) until the take ends, then PRESS PLAY, WAITS FOR PATTERN START or RECORDING ONE PASS, and at the end BOUNCED, SAVED AS with the file's name, or the reason it refused. While stock writes the WAV, its own screens show. +BOUNCE shows the merge as inverted track names and on trig keys 1-8 (the active track red, merged tracks green, every other track you can tap yellow; T8 dark while MASTER TRACK is on) until the take ends, then PRESS PLAY, WAIT or RECORDING ONE PASS, and at the end BOUNCED, SAVED AS with the file's name, or the reason it refused. While stock writes the WAV, its own screens show. ## Usage @@ -44,13 +44,14 @@ Every piece of work runs on a key press, once a step while a take is armed, or a | Step | Where it runs | | --- | --- | | Check: audio tracks only, the pass fits RLEN (64 master steps), MASTER TRACK and T8, the merged tracks' cue levels, the active track's recorder is free | key press | -| Snapshot the active track's Part bytes, its whole pattern record (trigs, locks, conditions, 2,330 bytes) and every merged track's mute, for UNDO (module memory, not stock's shared undo buffer) | key press | +| Keep the active track's 12 recorder bytes, to put them back after the take | key press | | One track: set its recorder's source to itself. Several: send the merged tracks to CUE for the take and record CUE | key press | | Set the length to the pattern's (or the track's) and arm for the next step 1 | key press | | Record, on the instrument's own tempo, scale and length | stock's recorder | | See that the take ended | the UI tick, a few compares, only while armed | | Light trig keys 1-8 with the merge: stock's steady LED bytes for those keys, put back as stock last drew them when the window closes | the UI tick, only while BOUNCE is open or armed | -| Make the active track a Flex machine playing the take, FX1 and FX2 off, one trig on step 1 at full length; mute the merged tracks; restore the CUE routing | one bounded edit | +| Snapshot the active track's Part bytes, its whole pattern record (trigs, locks, conditions, 2,330 bytes) and the mutes, for UNDO (module memory, not stock's shared undo buffer); a cancelled take leaves the last UNDO as it was | one bounded edit, at the take's end | +| Make the active track a Flex machine playing the take, FX1 and FX2 off, one trig on step 1 at full length; mute the merged tracks; restore the CUE routing (only the cue bits it set: mutes changed during the take stay) | one bounded edit | | Save the take as a WAV in `/BOUNCES/` (made with stock's folder call the first time) and assign the track's recorder buffer to it: stock's SAVE THIS RECORDING past its naming keyboard, then its ASSIGN TO SELF (the chain stock's SAVE ALL RECORDINGS runs), a name that is free, and stock's done callbacks. SAVE SAMPLES TO is set to PROJ DIR for the two calls that build a path, and put back straight after each | stock's card jobs after the take | It has no code in the frame interrupt (no detour, no `rests` hook), so there is nothing for `ev_in_use` to rest. Its UI tick compares its phase and returns while BOUNCE is closed. It contributes its BOUNCE row to the base's `ot_part_menu` table. diff --git a/sdk/octatrack/modules/bounce/TESTING.md b/sdk/octatrack/modules/bounce/TESTING.md index f76d1d1d95..6abdbd0f6b 100644 --- a/sdk/octatrack/modules/bounce/TESTING.md +++ b/sdk/octatrack/modules/bounce/TESTING.md @@ -332,6 +332,41 @@ Steps 11 and 12 (by hand, and the developer's stage) are the runs on the same pa **A test-tool fix found on the way.** The first run of this procedure failed at the soak's put-back: the device tool's RELOAD sent FUNC+PART, UP x3, DOWN, YES, made for stock's one-column PART menu. With Bounce installed the base opens its two-column Part Edit window, which remembers its cursor (it was on BOUNCE > UNDO), so those keys landed on BOUNCE's actions: the readout showed RESET TRACK's confirm (phase 7), then NO cancelled it and nothing was reset. The tool now presses LEFT, UP x3 and RIGHT first, which reaches PART's actions in the two-column window and changes nothing in stock's menu (both seen on the unit, screenshots, 3 December 2026). Commit `02cd1555`. +## The review fixes, package ad2b4cfe (unit) + +A code review of 196de6d7 found four faults: arming a take dropped the last UNDO even when the take was then cancelled; a cancel after a pattern change on the same Part left the recorder setup as Bounce had set it; a cancel or a take's end put back every mute as it was when the take was armed, undoing mutes the player changed meanwhile; and WAITS FOR PATTERN START was long for the window. Package `ad2b4cfe` takes UNDO's copy at the take's end, keeps only the track's 12 recorder bytes while armed, puts them back while the same bank and Part are loaded (any pattern), puts back only the cue bits a merged take set, and reads WAIT. + +**4 December 2026, the developer's MKII**, OS 1.40C, development twin `7d1223b1` (RAM-booted), package `ad2b4cfe` in a RAM trial, rolled back. Bank B, Part 1, T4; T1, T2, T6 and T7 muted (`0x6300`). Readings from the trial's readout (phase, UNDO bit), `mem` reads of the mutes and of Part 1's working and saved copies, and screenshots: + +| Case | Seen | +| --- | --- | +| A bounce of T4 (stopped, YES, PLAY) | the take in 4.8 s, T4 FLEX on `B4-261204-0104`, UNDO ready, T4's recorder bytes back (`010140000901000000ffff00`), mutes unchanged | +| Arm again stopped, NO | BOUNCE CANCELLED, UNDO still ready, recorder bytes back | +| Arm while playing, NO | the armed window read WAIT; cancelled, UNDO still ready | +| Merge T3, arm, mute T5 (FUNC+T5), NO | cue bits set while armed (`0xc6300`), T5 muted (`0xc7300`); after NO `0x7300`: T5 stays muted, the cue bits gone | +| Arm on B01 (recorder bytes `00000f0004...`), PATTERN+TRIG2 (B02, Part 1 too), NO | recorder bytes back to `010140000901000000ffff00`, the screen on B02 | +| UNDO of the first bounce, after those cancels | UNDONE, T4 STATIC on its sample again, Part 1 working = saved, mutes `0x6300` | +| Merge T3, play, mute T5 near the take's end | mutes after the take `0x7700`: T3 muted by the bounce, T5 kept, no cue bits; UNDO then `0x7300` (T3 back, T5 kept), Part 1 working = saved | + +Not run again on this package: a Modwerk machine track (the take's end now snapshots before the PICK FLEX popup; with the popup abandoned, UNDO is not ready). + +## Key-press cost, package ad2b4cfe (emulator) + +**4 December 2026, `ot_emu`**, the same setup as below (octabam `f7d72906`, `--dsp --frame`, MKII panel, twin `4813a3e5`, the BOUNCE card), package `ad2b4cfe` in a trial. Not hardware evidence. + +| Press | Executed instructions | +| --- | --- | +| DOWN+REC (opens BOUNCE) | 427 | +| Trig key 2 (merge T2) | 253 | +| YES (arms the merge, stopped) | 67,320 | +| The take's end, in the UI tick while playing (UNDO's snapshot, Flex conversion, mutes, the save started) | 2,447,620 | +| UNDO of that bounce | 138,506 | +| RESET TRACK's YES | 247,832 | +| UNDO of the reset | 145,079 | +| A UI tick otherwise | about 6,000 to 10,000 | + +**Stress run:** as below, with A01 playing: 20 RESET TRACK and UNDO pairs, 10 on Part 1 and 10 on Part 2 after STOP, PLAY and a Part change. The readout counted 20 resets and 20 undos, the UI tick count rose throughout (to 7,182), the slot stayed running. `npm run perf:audit -- check evidence/performance.json`: worst event 2,447,620 of 26,600,000 (9 %), 40 presses while playing, no hang. + ## Key-press cost, package 196de6d7 (emulator) **3 December 2026, `ot_emu`** (octabam `f7d72906`, `--dsp --frame`, MKII panel) on the development twin `4813a3e5` of base 0.8.5, the developer's MAIN OS 1.40C, an emulated card with the BOUNCE project. Package `196de6d7` in a trial (`device.mjs try`), the same package the unit ran. Instructions counted with `watch`/`hits` between the base's key call (`0x40061dc8`) and its return, and its UI tick call (`0x40061e94`) and its return; each count includes the stock code and interrupts that ran inside the call. Not hardware evidence. diff --git a/sdk/octatrack/modules/bounce/octamod.module.json b/sdk/octatrack/modules/bounce/octamod.module.json index ad5f2041a2..bab6ed0ad7 100644 --- a/sdk/octatrack/modules/bounce/octamod.module.json +++ b/sdk/octatrack/modules/bounce/octamod.module.json @@ -55,20 +55,20 @@ "recorded": "2026-12-03", "storage": { "label": "ColdFire code", - "display": "26096 bytes", + "display": "26080 bytes", "value": null, "unit": "see display", "method": "static", - "conditions": "The USB package 196de6d7: 8,312 bytes of ColdFire code and data and 17,784 bytes of bss (the Part and pattern snapshots for UNDO, 2,330 bytes of pattern record among them). No DSP memory.", + "conditions": "The USB package 196de6d7: 8,284 bytes of ColdFire code and data and 17,796 bytes of bss (the Part and pattern snapshots for UNDO, 2,330 bytes of pattern record among them). No DSP memory.", "source": "TESTING.md" }, "processing": { "label": "ColdFire worst event", - "display": "2394862 cycles/event", + "display": "2447620 cycles/event", "value": null, "unit": "see display", "method": "emulator", - "conditions": "The dearest event in ot_emu (evidence/performance.json): the take's end, one bounded edit in the UI tick, 2,394,862 executed instructions against a 26,600,000-cycle responsiveness deadline; the dearest key press, RESET TRACK's YES, 247,170. Nothing runs in the frame interrupt.", + "conditions": "The dearest event in ot_emu (evidence/performance.json): the take's end, one bounded edit in the UI tick, 2,447,620 executed instructions against a 26,600,000-cycle responsiveness deadline; the dearest key press, RESET TRACK's YES, 247,832. Nothing runs in the frame interrupt.", "source": "evidence/performance.json" }, "cpuPrice": { @@ -97,14 +97,14 @@ "memory": { "level": "moderate", "basis": "source-estimate", - "rationale": "26,096 bytes of ColdFire RAM for the one instance, most of it the UNDO snapshot (tests.qualification.memory).", + "rationale": "26,080 bytes of ColdFire RAM for the one instance, most of it the UNDO snapshot (tests.qualification.memory).", "source": "TESTING.md" } } }, "tests": { "report": "TESTING.md", - "summary": "npm run test:procedure on the developer's MKII (3 December 2026, development twin 7d1223b1 of base 0.8.5): steps 1, 3-10 passed on package 196de6d7, including a 122 s soak of 2,400 operations and a CPU price of 0 points at rest. By hand on the same package: bounce, merge, RESET TRACK and UNDO, each restoring the Part byte for byte. The developer's own test (the popup, a project save, reload and power cycle, playing the bounces) worked, as reported. perf:audit: worst event 2,394,862 instructions in ot_emu.", + "summary": "npm run test:procedure on the developer's MKII (3 December 2026, development twin 7d1223b1 of base 0.8.5): steps 1, 3-10 passed on package 196de6d7, including a 122 s soak of 2,400 operations and a CPU price of 0 points at rest. By hand on the same package: bounce, merge, RESET TRACK and UNDO, each restoring the Part byte for byte. The developer's own test (the popup, a project save, reload and power cycle, playing the bounces) worked, as reported. perf:audit: worst event 2,447,620 instructions in ot_emu.", "hardwareStatus": "reported", "evidenceRevision": "02cd155533cefe41bfe598247f50f69a3b314b49", "gates": [ @@ -118,14 +118,14 @@ "cycles": [ { "processor": "coldfire", - "worstCase": 2394862, - "maxConfiguration": 2394862, + "worstCase": 2447620, + "maxConfiguration": 2447620, "maxInstances": 1, "budget": 26600000, "unit": "cycles/event", "method": "emulator", "conditions": { - "parameterExtremes": "The dearest event: the end of a two-track take while playing (Flex conversion, mutes, stock's save started), 2,394,862 executed instructions in the UI tick; the dearest key press, RESET TRACK's YES, 247,170 (it snapshots the Part bytes and the 2,330-byte pattern record and writes a fresh track); UNDO 145,880-159,433; YES arming a merge 161,103. Read with ot_emu's watch/hits between the base's core_key (0x40061dc8-0x40061dce) and core_tick (0x40061e94-0x40061e9a) calls and their returns (octabam f7d72906, --dsp --frame, MKII panel, twin 4813a3e5 of base 0.8.5, package 196de6d7, 3 December 2026); each count includes stock code and interrupts inside the call. Instructions, not cycles.", + "parameterExtremes": "The dearest event: the end of a two-track take while playing (Flex conversion, UNDO's snapshot, mutes, stock's save started), 2,447,620 executed instructions in the UI tick; the dearest key press, RESET TRACK's YES, 247,832 (it snapshots the Part bytes and the 2,330-byte pattern record and writes a fresh track); UNDO 138,506-145,079; YES arming a merge 67,320. Read with ot_emu's watch/hits between the base's core_key (0x40061dc8-0x40061dce) and core_tick (0x40061e94-0x40061e9a) calls and their returns (octabam f7d72906, --dsp --frame, MKII panel, twin 4813a3e5 of base 0.8.5, package ad2b4cfe, 4 December 2026); each count includes stock code and interrupts inside the call. Instructions, not cycles.", "parameterModulation": "Not applicable: the module has no parameters, LFO destinations or MIDI CCs; it acts on key presses and once per UI tick only while a take is armed.", "modeSwitching": "In ot_emu, STOP, PLAY and a Part change (Part 1 to Part 2) between the stress run's two halves of ten RESET TRACK and UNDO pairs; on the unit, 12 Part switches in device:test with the package installed (test:procedure step 7).", "maxLoad": "One instance (a ColdFire key and tick handler). The dearest edit touches one track's Part and pattern record and the merged tracks' mutes, at most eight tracks; the stress run kept the pattern playing throughout.", @@ -139,25 +139,25 @@ { "name": "ColdFire code and data of the USB package", "space": "cpu-ram", - "words": 8312, + "words": 8284, "wordBits": 8, - "bytes": 8312, + "bytes": 8284, "scope": "shared" }, { "name": "ColdFire bss of the USB package", "space": "cpu-ram", - "words": 17784, + "words": 17796, "wordBits": 8, - "bytes": 17784, + "bytes": 17796, "scope": "shared" } ], "perInstanceBytes": 0, - "sharedBytes": 26096, + "sharedBytes": 26080, "maxInstances": 1, - "totalBytes": 26096, - "conditions": "From the header of the USB package 196de6d7 (ABI 8): code and data 8,312 bytes, bss 17,784 (the UNDO snapshot of one track's Part bytes, its 2,330-byte pattern record and the mutes). No DSP memory and no stock blocks reused; the stack is the UI task's own; the WAV is written by stock's own save jobs.", + "totalBytes": 26080, + "conditions": "From the header of the USB package 196de6d7 (ABI 8): code and data 8,284 bytes, bss 17,796 (the UNDO snapshot of one track's Part bytes, its 2,330-byte pattern record and the mutes). No DSP memory and no stock blocks reused; the stack is the UI task's own; the WAV is written by stock's own save jobs.", "report": "TESTING.md" }, "imageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", diff --git a/src/catalog/module-documents.json b/src/catalog/module-documents.json index 0f01a87b65..81427b03d0 100644 --- a/src/catalog/module-documents.json +++ b/src/catalog/module-documents.json @@ -18059,20 +18059,20 @@ "recorded": "2026-12-03", "storage": { "label": "ColdFire code", - "display": "26096 bytes", + "display": "26080 bytes", "value": null, "unit": "see display", "method": "static", - "conditions": "The USB package 196de6d7: 8,312 bytes of ColdFire code and data and 17,784 bytes of bss (the Part and pattern snapshots for UNDO, 2,330 bytes of pattern record among them). No DSP memory.", + "conditions": "The USB package 196de6d7: 8,284 bytes of ColdFire code and data and 17,796 bytes of bss (the Part and pattern snapshots for UNDO, 2,330 bytes of pattern record among them). No DSP memory.", "source": "TESTING.md" }, "processing": { "label": "ColdFire worst event", - "display": "2394862 cycles/event", + "display": "2447620 cycles/event", "value": null, "unit": "see display", "method": "emulator", - "conditions": "The dearest event in ot_emu (evidence/performance.json): the take's end, one bounded edit in the UI tick, 2,394,862 executed instructions against a 26,600,000-cycle responsiveness deadline; the dearest key press, RESET TRACK's YES, 247,170. Nothing runs in the frame interrupt.", + "conditions": "The dearest event in ot_emu (evidence/performance.json): the take's end, one bounded edit in the UI tick, 2,447,620 executed instructions against a 26,600,000-cycle responsiveness deadline; the dearest key press, RESET TRACK's YES, 247,832. Nothing runs in the frame interrupt.", "source": "evidence/performance.json" }, "impact": { @@ -18092,7 +18092,7 @@ "memory": { "level": "moderate", "basis": "source-estimate", - "rationale": "26,096 bytes of ColdFire RAM for the one instance, most of it the UNDO snapshot (tests.qualification.memory).", + "rationale": "26,080 bytes of ColdFire RAM for the one instance, most of it the UNDO snapshot (tests.qualification.memory).", "source": "TESTING.md" } }, @@ -18108,7 +18108,7 @@ }, "tests": { "report": "TESTING.md", - "summary": "npm run test:procedure on the developer's MKII (3 December 2026, development twin 7d1223b1 of base 0.8.5): steps 1, 3-10 passed on package 196de6d7, including a 122 s soak of 2,400 operations and a CPU price of 0 points at rest. By hand on the same package: bounce, merge, RESET TRACK and UNDO, each restoring the Part byte for byte. The developer's own test (the popup, a project save, reload and power cycle, playing the bounces) worked, as reported. perf:audit: worst event 2,394,862 instructions in ot_emu.", + "summary": "npm run test:procedure on the developer's MKII (3 December 2026, development twin 7d1223b1 of base 0.8.5): steps 1, 3-10 passed on package 196de6d7, including a 122 s soak of 2,400 operations and a CPU price of 0 points at rest. By hand on the same package: bounce, merge, RESET TRACK and UNDO, each restoring the Part byte for byte. The developer's own test (the popup, a project save, reload and power cycle, playing the bounces) worked, as reported. perf:audit: worst event 2,447,620 instructions in ot_emu.", "hardwareStatus": "reported", "evidenceRevision": "02cd155533cefe41bfe598247f50f69a3b314b49", "gates": [ @@ -18142,14 +18142,14 @@ "cycles": [ { "processor": "coldfire", - "worstCase": 2394862, - "maxConfiguration": 2394862, + "worstCase": 2447620, + "maxConfiguration": 2447620, "maxInstances": 1, "budget": 26600000, "unit": "cycles/event", "method": "emulator", "conditions": { - "parameterExtremes": "The dearest event: the end of a two-track take while playing (Flex conversion, mutes, stock's save started), 2,394,862 executed instructions in the UI tick; the dearest key press, RESET TRACK's YES, 247,170 (it snapshots the Part bytes and the 2,330-byte pattern record and writes a fresh track); UNDO 145,880-159,433; YES arming a merge 161,103. Read with ot_emu's watch/hits between the base's core_key (0x40061dc8-0x40061dce) and core_tick (0x40061e94-0x40061e9a) calls and their returns (octabam f7d72906, --dsp --frame, MKII panel, twin 4813a3e5 of base 0.8.5, package 196de6d7, 3 December 2026); each count includes stock code and interrupts inside the call. Instructions, not cycles.", + "parameterExtremes": "The dearest event: the end of a two-track take while playing (Flex conversion, UNDO's snapshot, mutes, stock's save started), 2,447,620 executed instructions in the UI tick; the dearest key press, RESET TRACK's YES, 247,832 (it snapshots the Part bytes and the 2,330-byte pattern record and writes a fresh track); UNDO 138,506-145,079; YES arming a merge 67,320. Read with ot_emu's watch/hits between the base's core_key (0x40061dc8-0x40061dce) and core_tick (0x40061e94-0x40061e9a) calls and their returns (octabam f7d72906, --dsp --frame, MKII panel, twin 4813a3e5 of base 0.8.5, package ad2b4cfe, 4 December 2026); each count includes stock code and interrupts inside the call. Instructions, not cycles.", "parameterModulation": "Not applicable: the module has no parameters, LFO destinations or MIDI CCs; it acts on key presses and once per UI tick only while a take is armed.", "modeSwitching": "In ot_emu, STOP, PLAY and a Part change (Part 1 to Part 2) between the stress run's two halves of ten RESET TRACK and UNDO pairs; on the unit, 12 Part switches in device:test with the package installed (test:procedure step 7).", "maxLoad": "One instance (a ColdFire key and tick handler). The dearest edit touches one track's Part and pattern record and the merged tracks' mutes, at most eight tracks; the stress run kept the pattern playing throughout.", @@ -18163,25 +18163,25 @@ { "name": "ColdFire code and data of the USB package", "space": "cpu-ram", - "words": 8312, + "words": 8284, "wordBits": 8, - "bytes": 8312, + "bytes": 8284, "scope": "shared" }, { "name": "ColdFire bss of the USB package", "space": "cpu-ram", - "words": 17784, + "words": 17796, "wordBits": 8, - "bytes": 17784, + "bytes": 17796, "scope": "shared" } ], "perInstanceBytes": 0, - "sharedBytes": 26096, + "sharedBytes": 26080, "maxInstances": 1, - "totalBytes": 26096, - "conditions": "From the header of the USB package 196de6d7 (ABI 8): code and data 8,312 bytes, bss 17,784 (the UNDO snapshot of one track's Part bytes, its 2,330-byte pattern record and the mutes). No DSP memory and no stock blocks reused; the stack is the UI task's own; the WAV is written by stock's own save jobs.", + "totalBytes": 26080, + "conditions": "From the header of the USB package 196de6d7 (ABI 8): code and data 8,284 bytes, bss 17,796 (the UNDO snapshot of one track's Part bytes, its 2,330-byte pattern record and the mutes). No DSP memory and no stock blocks reused; the stack is the UI task's own; the WAV is written by stock's own save jobs.", "report": "TESTING.md" }, "hardware": { From 7d9173a519443eff46edc712b410cff56c6e28f1 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Fri, 4 Dec 2026 01:44:36 +0100 Subject: [PATCH 38/43] Bounce In Place 0.4.0: release record from test:procedure on package ad2b4cfe Co-Authored-By: Claude Opus 5.5 --- sdk/octatrack/modules/bounce/TESTING.md | 19 +++++++ .../modules/bounce/evidence/cpu-price.json | 50 +++++++++---------- .../modules/bounce/octamod.module.json | 30 +++++------ src/catalog/module-documents.json | 30 +++++------ 4 files changed, 74 insertions(+), 55 deletions(-) diff --git a/sdk/octatrack/modules/bounce/TESTING.md b/sdk/octatrack/modules/bounce/TESTING.md index 6abdbd0f6b..3addc56161 100644 --- a/sdk/octatrack/modules/bounce/TESTING.md +++ b/sdk/octatrack/modules/bounce/TESTING.md @@ -332,6 +332,25 @@ Steps 11 and 12 (by hand, and the developer's stage) are the runs on the same pa **A test-tool fix found on the way.** The first run of this procedure failed at the soak's put-back: the device tool's RELOAD sent FUNC+PART, UP x3, DOWN, YES, made for stock's one-column PART menu. With Bounce installed the base opens its two-column Part Edit window, which remembers its cursor (it was on BOUNCE > UNDO), so those keys landed on BOUNCE's actions: the readout showed RESET TRACK's confirm (phase 7), then NO cancelled it and nothing was reset. The tool now presses LEFT, UP x3 and RIGHT first, which reaches PART's actions in the two-column window and changes nothing in stock's menu (both seen on the unit, screenshots, 3 December 2026). Commit `02cd1555`. +## The release run: test:procedure on package ad2b4cfe + +**4 December 2026, the developer's MKII**, OS 1.40C. Development twin `7d1223b1` of base 0.8.5 (built from the developer's own 1.40C with USB MIDI, RAM-booted, never flashed); release base 0.8.5 stays flashed. Source `819162bc`. Package SHA-256 `ad2b4cfeab5688dea5c003cb56ebb07be92454035b051df2b608fc07c81188ea`. Bank B, pattern B01, Part 1. `npm run test:procedure -- bounce`, 411 s: + +| Step | Result | +| --- | --- | +| 1 Software checks | passed (`module:doctor -- bounce`) | +| 2 Beside every other module | passed | +| 3 Name the build | passed: `ad2b4cfe` | +| 4 DSP cost model | passed | +| 5 Emulator rehearsal | passed (twin `7d1223b1` in `ot_emu`, not hardware evidence) | +| 6 Read the unit | passed: Part 1 on B01, working = saved | +| 7 Scripted unit pass | passed (`device:test`) | +| 8 Soak | passed: 2,400 operations in 120 s (20 a second), no crash, stall, freeze or skipped track; Part 1 reloaded, working = saved | +| 9 Cost on the unit | passed: frame interrupt 28.6 % before and 28.6 % installed and unused (0 points), CPU meter 41.1 % and 40.9 % | +| 10 Put back | passed: nothing to put back, Part 1 working = saved | + +Step 11 (by hand) is the review-fix table below, on the same package. Step 12, the developer's own stage, was on `196de6d7` (below) and was not repeated on `ad2b4cfe`. + ## The review fixes, package ad2b4cfe (unit) A code review of 196de6d7 found four faults: arming a take dropped the last UNDO even when the take was then cancelled; a cancel after a pattern change on the same Part left the recorder setup as Bounce had set it; a cancel or a take's end put back every mute as it was when the take was armed, undoing mutes the player changed meanwhile; and WAITS FOR PATTERN START was long for the window. Package `ad2b4cfe` takes UNDO's copy at the take's end, keeps only the track's 12 recorder bytes while armed, puts them back while the same bank and Part are loaded (any pattern), puts back only the cue bits a merged take set, and reads WAIT. diff --git a/sdk/octatrack/modules/bounce/evidence/cpu-price.json b/sdk/octatrack/modules/bounce/evidence/cpu-price.json index 77dab0f9c7..c0ab12b4f0 100644 --- a/sdk/octatrack/modules/bounce/evidence/cpu-price.json +++ b/sdk/octatrack/modules/bounce/evidence/cpu-price.json @@ -1,48 +1,48 @@ { "module": "bounce", "version": "0.4.0-experimental", - "base": "development twin 7d1223b1 of base 0.8.5 (ddb56b72 flashed)", + "base": "development twin 7d1223b1 of base 0.8.5, built from the developer's own 1.40C with USB MIDI, RAM-booted, never flashed", "scene": "the bank, pattern and Part the unit was on, transport stopped (test:procedure)", "inputs": { "transport": "playing" }, "seconds": 8, "readings": 3, - "measuredAt": "2026-12-03T23:01:02.446Z", + "measuredAt": "2026-12-04T00:42:23.184Z", "result": { "id": "bounce", - "version": "file", - "packageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", + "version": "0.4.0-experimental", + "packageSha256": "ad2b4cfeab5688dea5c003cb56ebb07be92454035b051df2b608fc07c81188ea", "before": { - "frame": 28.4, - "frameMax": 39.1, - "frames": 67326, + "frame": 28.6, + "frameMax": 39, + "frames": 67342, "skipped": 0, - "cpu": 41, - "dsp1to4": 38.6, + "cpu": 41.1, + "dsp1to4": 40.5, "dsp5to8": 47, - "dsp1to4Peak": 39.6, - "dsp5to8Peak": 48, + "dsp1to4Peak": 41.6, + "dsp5to8Peak": 48.1, "readings": 3, "spread": { - "frame": 0.1, - "cpu": 0.5, + "frame": 0, + "cpu": 0.2, "dsp1to4": 0, "dsp5to8": 0, - "frameMax": 0.4, - "dsp1to4Peak": 0, - "dsp5to8Peak": 0.8 + "frameMax": 0.3, + "dsp1to4Peak": 0.1, + "dsp5to8Peak": 0.9 } }, "atRest": { - "frame": 28.4, - "frameMax": 38.8, - "frames": 67337, + "frame": 28.6, + "frameMax": 38.9, + "frames": 67338, "skipped": 0, - "cpu": 40.7, - "dsp1to4": 38.6, + "cpu": 40.9, + "dsp1to4": 40.5, "dsp5to8": 47, - "dsp1to4Peak": 39.7, + "dsp1to4Peak": 41.6, "dsp5to8Peak": 48, "readings": 3, "spread": { @@ -57,11 +57,11 @@ }, "atRestAdds": { "frame": 0, - "cpu": -0.3, + "cpu": -0.2, "dsp1to4": 0, "dsp5to8": 0, - "dsp1to4Peak": 0.1, - "dsp5to8Peak": 0 + "dsp1to4Peak": 0, + "dsp5to8Peak": -0.1 }, "rolledBack": true } diff --git a/sdk/octatrack/modules/bounce/octamod.module.json b/sdk/octatrack/modules/bounce/octamod.module.json index bab6ed0ad7..94ad943fe7 100644 --- a/sdk/octatrack/modules/bounce/octamod.module.json +++ b/sdk/octatrack/modules/bounce/octamod.module.json @@ -39,7 +39,7 @@ "key:TRIG@BOUNCE" ], "limitations": [ - "Experimental: 0.4.0 (package 196de6d7) passed the test procedure's unit steps on one MKII (a development twin in RAM; bounce, merge, RESET TRACK and UNDO), the soak not run. Its developer's own test on the same MKII (the popup, a project save, reload and power cycle, playing the bounces) worked, as reported.", + "Experimental: 0.4.0 (package ad2b4cfe) passed the test procedure on one MKII (a development twin in RAM), soak included, and by hand: bounce, cancel, UNDO. Its developer's own test (the popup, a project save, reload and power cycle, playing the bounces) was on the build before the review fixes, as reported.", "The WAV is saved at once, but the track only keeps pointing to it after you save the project (as stock's own SAVE THIS RECORDING).", "A full card: BOUNCE says NOT SAVED and the take stays in the recorder buffer; save it from the Audio Editor.", "A pass longer than 64 master steps (4 bars at 1X) is refused.", @@ -52,14 +52,14 @@ "effectId": null }, "resources": { - "recorded": "2026-12-03", + "recorded": "2026-12-04", "storage": { "label": "ColdFire code", "display": "26080 bytes", "value": null, "unit": "see display", "method": "static", - "conditions": "The USB package 196de6d7: 8,284 bytes of ColdFire code and data and 17,796 bytes of bss (the Part and pattern snapshots for UNDO, 2,330 bytes of pattern record among them). No DSP memory.", + "conditions": "The USB package ad2b4cfe: 8,284 bytes of ColdFire code and data and 17,796 bytes of bss (the Part and pattern snapshots for UNDO, 2,330 bytes of pattern record among them). No DSP memory.", "source": "TESTING.md" }, "processing": { @@ -76,8 +76,8 @@ "unit": "percent-of-frame", "measure": "frame-interrupt", "tool": "npm run device:price -- --write", - "date": "2026-12-03", - "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 7d1223b1 of base 0.8.5 (ddb56b72 flashed); 3 readings of 8 s a state. Frame interrupt 28.4 % before, 28.4 % installed and used nowhere; CPU meter 41 % before, 40.7 % at rest.", + "date": "2026-12-04", + "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 7d1223b1 of base 0.8.5, built from the developer's own 1.40C with USB MIDI, RAM-booted, never flashed; 3 readings of 8 s a state. Frame interrupt 28.6 % before, 28.6 % installed and used nowhere; CPU meter 41.1 % before, 40.9 % at rest.", "source": "evidence/cpu-price.json" }, "impact": { @@ -104,9 +104,9 @@ }, "tests": { "report": "TESTING.md", - "summary": "npm run test:procedure on the developer's MKII (3 December 2026, development twin 7d1223b1 of base 0.8.5): steps 1, 3-10 passed on package 196de6d7, including a 122 s soak of 2,400 operations and a CPU price of 0 points at rest. By hand on the same package: bounce, merge, RESET TRACK and UNDO, each restoring the Part byte for byte. The developer's own test (the popup, a project save, reload and power cycle, playing the bounces) worked, as reported. perf:audit: worst event 2,447,620 instructions in ot_emu.", + "summary": "npm run test:procedure on the developer's MKII (4 December 2026, development twin 7d1223b1 of base 0.8.5): steps 1-10 passed on package ad2b4cfe, including a 120 s soak of 2,400 operations and a CPU price of 0 points at rest. By hand on the same package: bounce, merge, cancel (UNDO, the recorder setup and the player's mutes kept) and UNDO, restoring the Part byte for byte; on 196de6d7 also RESET TRACK. The developer's own test (the popup, a project save, reload and power cycle, playing the bounces) was on 196de6d7, as reported. perf:audit: worst event 2,447,620 instructions in ot_emu.", "hardwareStatus": "reported", - "evidenceRevision": "02cd155533cefe41bfe598247f50f69a3b314b49", + "evidenceRevision": "819162bc660cfb480605b47c3c035b17c7a9de62", "gates": [ "Worst-case cycles under parameter modulation and maximum load", "Exact memory region and maximum-instance totals", @@ -157,24 +157,24 @@ "sharedBytes": 26080, "maxInstances": 1, "totalBytes": 26080, - "conditions": "From the header of the USB package 196de6d7 (ABI 8): code and data 8,284 bytes, bss 17,796 (the UNDO snapshot of one track's Part bytes, its 2,330-byte pattern record and the mutes). No DSP memory and no stock blocks reused; the stack is the UI task's own; the WAV is written by stock's own save jobs.", + "conditions": "From the header of the USB package ad2b4cfe (ABI 8): code and data 8,284 bytes, bss 17,796 (the UNDO snapshot of one track's Part bytes, its 2,330-byte pattern record and the mutes). No DSP memory and no stock blocks reused; the stack is the UI task's own; the WAV is written by stock's own save jobs.", "report": "TESTING.md" }, - "imageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", + "imageSha256": "ad2b4cfeab5688dea5c003cb56ebb07be92454035b051df2b608fc07c81188ea", "hardware": { "kind": "functional", "status": "reported", "model": "MKII", - "testedOn": "2026-12-03", + "testedOn": "2026-12-04", "tester": "seniorspiz", - "sourceRevision": "02cd155533cefe41bfe598247f50f69a3b314b49", - "imageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", - "summary": "On the developer's Octatrack MKII (OS 1.40C), 3 December 2026, npm run test:procedure ran on package 196de6d7 built from 02cd1555 on development twin 7d1223b1 of base 0.8.5 (RAM-booted, never flashed): software checks, cost model, emulator rehearsal, unit read, scripted pass (12 Part switches), a 122 s soak of 2,400 operations, the CPU price (0 points at rest) and put back passed. By hand on the same package (twin 4813a3e5): bounce, merge, RESET TRACK and UNDO, each restoring the Part byte for byte; about 6 points of the frame interrupt while a take records. The developer then tested the popup, a project save, reload and power cycle and playing the bounces, as reported.", + "sourceRevision": "819162bc660cfb480605b47c3c035b17c7a9de62", + "imageSha256": "ad2b4cfeab5688dea5c003cb56ebb07be92454035b051df2b608fc07c81188ea", + "summary": "On the developer's Octatrack MKII (OS 1.40C), 4 December 2026, npm run test:procedure ran on package ad2b4cfe built from 819162bc on development twin 7d1223b1 of base 0.8.5 (RAM-booted, never flashed): software checks, beside every other module, cost model, emulator rehearsal, unit read, scripted pass, a 120 s soak of 2,400 operations, the CPU price (0 points of the frame interrupt at rest) and put back passed. By hand on the same package: a bounce, a cancelled take that kept UNDO, a cancel after a pattern change that put the recorder setup back, mutes changed during a take kept, and UNDO restoring the Part byte for byte. The developer's own test (popup, project save, reload, power cycle, playing the bounces) was on the earlier package 196de6d7, as reported.", "limitations": [ - "Not run: step 2, beside every other module on the unit; modules:compat installs it beside every active module and the base.", + "The developer's own stage (save, reload, power cycle, listening) was on package 196de6d7, as reported; not repeated on ad2b4cfe, whose changes are in cancel, UNDO's copy and the mutes.", + "Not tested on ad2b4cfe: a Modwerk machine track (Grain, a synth) bounced through the PICK FLEX popup.", "Not tested: a WAV save onto a full card, Studio cue mode, MAIN TO CUE, and an MKI.", "Not tested: another module with Part Edit rows (Kits, Pattern Sample Locks) installed at the same time.", - "The developer's save, reload and power cycle test is as reported, without a record of each step.", "No audio was recorded for evidence: how a take sounds is the developer's report." ], "report": "TESTING.md" diff --git a/src/catalog/module-documents.json b/src/catalog/module-documents.json index 81427b03d0..db36a26b07 100644 --- a/src/catalog/module-documents.json +++ b/src/catalog/module-documents.json @@ -18044,7 +18044,7 @@ "key:TRIG@BOUNCE" ], "limitations": [ - "Experimental: 0.4.0 (package 196de6d7) passed the test procedure's unit steps on one MKII (a development twin in RAM; bounce, merge, RESET TRACK and UNDO), the soak not run. Its developer's own test on the same MKII (the popup, a project save, reload and power cycle, playing the bounces) worked, as reported.", + "Experimental: 0.4.0 (package ad2b4cfe) passed the test procedure on one MKII (a development twin in RAM), soak included, and by hand: bounce, cancel, UNDO. Its developer's own test (the popup, a project save, reload and power cycle, playing the bounces) was on the build before the review fixes, as reported.", "The WAV is saved at once, but the track only keeps pointing to it after you save the project (as stock's own SAVE THIS RECORDING).", "A full card: BOUNCE says NOT SAVED and the take stays in the recorder buffer; save it from the Audio Editor.", "A pass longer than 64 master steps (4 bars at 1X) is refused.", @@ -18056,14 +18056,14 @@ ] }, "resources": { - "recorded": "2026-12-03", + "recorded": "2026-12-04", "storage": { "label": "ColdFire code", "display": "26080 bytes", "value": null, "unit": "see display", "method": "static", - "conditions": "The USB package 196de6d7: 8,284 bytes of ColdFire code and data and 17,796 bytes of bss (the Part and pattern snapshots for UNDO, 2,330 bytes of pattern record among them). No DSP memory.", + "conditions": "The USB package ad2b4cfe: 8,284 bytes of ColdFire code and data and 17,796 bytes of bss (the Part and pattern snapshots for UNDO, 2,330 bytes of pattern record among them). No DSP memory.", "source": "TESTING.md" }, "processing": { @@ -18101,16 +18101,16 @@ "unit": "percent-of-frame", "measure": "frame-interrupt", "tool": "npm run device:price -- --write", - "date": "2026-12-03", - "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 7d1223b1 of base 0.8.5 (ddb56b72 flashed); 3 readings of 8 s a state. Frame interrupt 28.4 % before, 28.4 % installed and used nowhere; CPU meter 41 % before, 40.7 % at rest.", + "date": "2026-12-04", + "conditions": "the bank, pattern and Part the unit was on, transport stopped (test:procedure); base development twin 7d1223b1 of base 0.8.5, built from the developer's own 1.40C with USB MIDI, RAM-booted, never flashed; 3 readings of 8 s a state. Frame interrupt 28.6 % before, 28.6 % installed and used nowhere; CPU meter 41.1 % before, 40.9 % at rest.", "source": "evidence/cpu-price.json" } }, "tests": { "report": "TESTING.md", - "summary": "npm run test:procedure on the developer's MKII (3 December 2026, development twin 7d1223b1 of base 0.8.5): steps 1, 3-10 passed on package 196de6d7, including a 122 s soak of 2,400 operations and a CPU price of 0 points at rest. By hand on the same package: bounce, merge, RESET TRACK and UNDO, each restoring the Part byte for byte. The developer's own test (the popup, a project save, reload and power cycle, playing the bounces) worked, as reported. perf:audit: worst event 2,447,620 instructions in ot_emu.", + "summary": "npm run test:procedure on the developer's MKII (4 December 2026, development twin 7d1223b1 of base 0.8.5): steps 1-10 passed on package ad2b4cfe, including a 120 s soak of 2,400 operations and a CPU price of 0 points at rest. By hand on the same package: bounce, merge, cancel (UNDO, the recorder setup and the player's mutes kept) and UNDO, restoring the Part byte for byte; on 196de6d7 also RESET TRACK. The developer's own test (the popup, a project save, reload and power cycle, playing the bounces) was on 196de6d7, as reported. perf:audit: worst event 2,447,620 instructions in ot_emu.", "hardwareStatus": "reported", - "evidenceRevision": "02cd155533cefe41bfe598247f50f69a3b314b49", + "evidenceRevision": "819162bc660cfb480605b47c3c035b17c7a9de62", "gates": [ "Worst-case cycles under parameter modulation and maximum load", "Exact memory region and maximum-instance totals", @@ -18138,7 +18138,7 @@ }, "moduleVersion": "0.4.0-experimental", "sourceSha256": "e4790b5943d99a17d46362e813395e1364f8d414dcd64678981a095c8001ca34", - "imageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", + "imageSha256": "ad2b4cfeab5688dea5c003cb56ebb07be92454035b051df2b608fc07c81188ea", "cycles": [ { "processor": "coldfire", @@ -18181,23 +18181,23 @@ "sharedBytes": 26080, "maxInstances": 1, "totalBytes": 26080, - "conditions": "From the header of the USB package 196de6d7 (ABI 8): code and data 8,284 bytes, bss 17,796 (the UNDO snapshot of one track's Part bytes, its 2,330-byte pattern record and the mutes). No DSP memory and no stock blocks reused; the stack is the UI task's own; the WAV is written by stock's own save jobs.", + "conditions": "From the header of the USB package ad2b4cfe (ABI 8): code and data 8,284 bytes, bss 17,796 (the UNDO snapshot of one track's Part bytes, its 2,330-byte pattern record and the mutes). No DSP memory and no stock blocks reused; the stack is the UI task's own; the WAV is written by stock's own save jobs.", "report": "TESTING.md" }, "hardware": { "kind": "functional", "status": "reported", "model": "MKII", - "testedOn": "2026-12-03", + "testedOn": "2026-12-04", "tester": "seniorspiz", - "sourceRevision": "02cd155533cefe41bfe598247f50f69a3b314b49", - "imageSha256": "196de6d7ea754be27946d6090b2f1346b00f6eb172d5e5e928fe2aa029571458", - "summary": "On the developer's Octatrack MKII (OS 1.40C), 3 December 2026, npm run test:procedure ran on package 196de6d7 built from 02cd1555 on development twin 7d1223b1 of base 0.8.5 (RAM-booted, never flashed): software checks, cost model, emulator rehearsal, unit read, scripted pass (12 Part switches), a 122 s soak of 2,400 operations, the CPU price (0 points at rest) and put back passed. By hand on the same package (twin 4813a3e5): bounce, merge, RESET TRACK and UNDO, each restoring the Part byte for byte; about 6 points of the frame interrupt while a take records. The developer then tested the popup, a project save, reload and power cycle and playing the bounces, as reported.", + "sourceRevision": "819162bc660cfb480605b47c3c035b17c7a9de62", + "imageSha256": "ad2b4cfeab5688dea5c003cb56ebb07be92454035b051df2b608fc07c81188ea", + "summary": "On the developer's Octatrack MKII (OS 1.40C), 4 December 2026, npm run test:procedure ran on package ad2b4cfe built from 819162bc on development twin 7d1223b1 of base 0.8.5 (RAM-booted, never flashed): software checks, beside every other module, cost model, emulator rehearsal, unit read, scripted pass, a 120 s soak of 2,400 operations, the CPU price (0 points of the frame interrupt at rest) and put back passed. By hand on the same package: a bounce, a cancelled take that kept UNDO, a cancel after a pattern change that put the recorder setup back, mutes changed during a take kept, and UNDO restoring the Part byte for byte. The developer's own test (popup, project save, reload, power cycle, playing the bounces) was on the earlier package 196de6d7, as reported.", "limitations": [ - "Not run: step 2, beside every other module on the unit; modules:compat installs it beside every active module and the base.", + "The developer's own stage (save, reload, power cycle, listening) was on package 196de6d7, as reported; not repeated on ad2b4cfe, whose changes are in cancel, UNDO's copy and the mutes.", + "Not tested on ad2b4cfe: a Modwerk machine track (Grain, a synth) bounced through the PICK FLEX popup.", "Not tested: a WAV save onto a full card, Studio cue mode, MAIN TO CUE, and an MKI.", "Not tested: another module with Part Edit rows (Kits, Pattern Sample Locks) installed at the same time.", - "The developer's save, reload and power cycle test is as reported, without a record of each step.", "No audio was recorded for evidence: how a take sounds is the developer's report." ], "report": "TESTING.md" From aeb2cbdac3372b9de4f0e057e8801f9f0a315541 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Fri, 4 Dec 2026 01:54:51 +0100 Subject: [PATCH 39/43] Bounce In Place 0.4.0: the developer's own test of package ad2b4cfe, as reported Co-Authored-By: Claude Opus 5.5 --- sdk/octatrack/modules/bounce/TESTING.md | 6 ++++-- sdk/octatrack/modules/bounce/octamod.module.json | 9 ++++----- src/catalog/module-documents.json | 9 ++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sdk/octatrack/modules/bounce/TESTING.md b/sdk/octatrack/modules/bounce/TESTING.md index 3addc56161..66e966b2e6 100644 --- a/sdk/octatrack/modules/bounce/TESTING.md +++ b/sdk/octatrack/modules/bounce/TESTING.md @@ -349,7 +349,9 @@ Steps 11 and 12 (by hand, and the developer's stage) are the runs on the same pa | 9 Cost on the unit | passed: frame interrupt 28.6 % before and 28.6 % installed and unused (0 points), CPU meter 41.1 % and 40.9 % | | 10 Put back | passed: nothing to put back, Part 1 working = saved | -Step 11 (by hand) is the review-fix table below, on the same package. Step 12, the developer's own stage, was on `196de6d7` (below) and was not repeated on `ad2b4cfe`. +Step 11 (by hand) is the review-fix table below, on the same package. + +**Step 12, the developer's own test of package `ad2b4cfe`, as reported** (4 December 2026, the same MKII, a 30-minute RAM trial, never kept). The developer was asked to check a plain and a merged bounce by ear, a cancel followed by UNDO of the earlier bounce, a mute changed while a take was armed, a project save, reload and power cycle with the bounced tracks, and a Modwerk machine track through the PICK FLEX popup, and reported "all tested", without details per step. ## The review fixes, package ad2b4cfe (unit) @@ -367,7 +369,7 @@ A code review of 196de6d7 found four faults: arming a take dropped the last UNDO | UNDO of the first bounce, after those cancels | UNDONE, T4 STATIC on its sample again, Part 1 working = saved, mutes `0x6300` | | Merge T3, play, mute T5 near the take's end | mutes after the take `0x7700`: T3 muted by the bounce, T5 kept, no cue bits; UNDO then `0x7300` (T3 back, T5 kept), Part 1 working = saved | -Not run again on this package: a Modwerk machine track (the take's end now snapshots before the PICK FLEX popup; with the popup abandoned, UNDO is not ready). +Not run by the agent on this package: a Modwerk machine track (the take's end now snapshots before the PICK FLEX popup; with the popup abandoned, UNDO is not ready). The developer's report covers it, as reported. ## Key-press cost, package ad2b4cfe (emulator) diff --git a/sdk/octatrack/modules/bounce/octamod.module.json b/sdk/octatrack/modules/bounce/octamod.module.json index 94ad943fe7..6ee031161d 100644 --- a/sdk/octatrack/modules/bounce/octamod.module.json +++ b/sdk/octatrack/modules/bounce/octamod.module.json @@ -39,7 +39,7 @@ "key:TRIG@BOUNCE" ], "limitations": [ - "Experimental: 0.4.0 (package ad2b4cfe) passed the test procedure on one MKII (a development twin in RAM), soak included, and by hand: bounce, cancel, UNDO. Its developer's own test (the popup, a project save, reload and power cycle, playing the bounces) was on the build before the review fixes, as reported.", + "Experimental: 0.4.0 (package ad2b4cfe) passed the test procedure on one MKII (a development twin in RAM), soak included, and by hand: bounce, cancel, UNDO. Its developer's own test of the same package (bounces, cancel and UNDO, a project save, reload and power cycle) worked, as reported.", "The WAV is saved at once, but the track only keeps pointing to it after you save the project (as stock's own SAVE THIS RECORDING).", "A full card: BOUNCE says NOT SAVED and the take stays in the recorder buffer; save it from the Audio Editor.", "A pass longer than 64 master steps (4 bars at 1X) is refused.", @@ -104,7 +104,7 @@ }, "tests": { "report": "TESTING.md", - "summary": "npm run test:procedure on the developer's MKII (4 December 2026, development twin 7d1223b1 of base 0.8.5): steps 1-10 passed on package ad2b4cfe, including a 120 s soak of 2,400 operations and a CPU price of 0 points at rest. By hand on the same package: bounce, merge, cancel (UNDO, the recorder setup and the player's mutes kept) and UNDO, restoring the Part byte for byte; on 196de6d7 also RESET TRACK. The developer's own test (the popup, a project save, reload and power cycle, playing the bounces) was on 196de6d7, as reported. perf:audit: worst event 2,447,620 instructions in ot_emu.", + "summary": "npm run test:procedure on the developer's MKII (4 December 2026, development twin 7d1223b1 of base 0.8.5): steps 1-10 passed on package ad2b4cfe, including a 120 s soak of 2,400 operations and a CPU price of 0 points at rest. By hand on the same package: bounce, merge, cancel (UNDO, the recorder setup and the player's mutes kept) and UNDO, restoring the Part byte for byte; on 196de6d7 also RESET TRACK. The developer's own test of the same package (bounces, cancel and UNDO, mutes, a project save, reload and power cycle, a machine track) worked, as reported. perf:audit: worst event 2,447,620 instructions in ot_emu.", "hardwareStatus": "reported", "evidenceRevision": "819162bc660cfb480605b47c3c035b17c7a9de62", "gates": [ @@ -169,10 +169,9 @@ "tester": "seniorspiz", "sourceRevision": "819162bc660cfb480605b47c3c035b17c7a9de62", "imageSha256": "ad2b4cfeab5688dea5c003cb56ebb07be92454035b051df2b608fc07c81188ea", - "summary": "On the developer's Octatrack MKII (OS 1.40C), 4 December 2026, npm run test:procedure ran on package ad2b4cfe built from 819162bc on development twin 7d1223b1 of base 0.8.5 (RAM-booted, never flashed): software checks, beside every other module, cost model, emulator rehearsal, unit read, scripted pass, a 120 s soak of 2,400 operations, the CPU price (0 points of the frame interrupt at rest) and put back passed. By hand on the same package: a bounce, a cancelled take that kept UNDO, a cancel after a pattern change that put the recorder setup back, mutes changed during a take kept, and UNDO restoring the Part byte for byte. The developer's own test (popup, project save, reload, power cycle, playing the bounces) was on the earlier package 196de6d7, as reported.", + "summary": "On the developer's Octatrack MKII (OS 1.40C), 4 December 2026, npm run test:procedure ran on package ad2b4cfe built from 819162bc on development twin 7d1223b1 of base 0.8.5 (RAM-booted, never flashed): software checks, beside every other module, cost model, emulator rehearsal, unit read, scripted pass, a 120 s soak of 2,400 operations, the CPU price (0 points of the frame interrupt at rest) and put back passed. By hand on the same package: a bounce, a cancelled take that kept UNDO, a cancel after a pattern change that put the recorder setup back, mutes changed during a take kept, and UNDO restoring the Part byte for byte. The developer then tested the same package (bounces by ear, cancel and UNDO, mutes, a project save, reload and power cycle, a machine track through PICK FLEX) and reported all of it working, without details per step.", "limitations": [ - "The developer's own stage (save, reload, power cycle, listening) was on package 196de6d7, as reported; not repeated on ad2b4cfe, whose changes are in cancel, UNDO's copy and the mutes.", - "Not tested on ad2b4cfe: a Modwerk machine track (Grain, a synth) bounced through the PICK FLEX popup.", + "The developer's own test of ad2b4cfe is as reported (\"all tested\"), without a record of each step; a Modwerk machine track through PICK FLEX was not run by the agent on this package.", "Not tested: a WAV save onto a full card, Studio cue mode, MAIN TO CUE, and an MKI.", "Not tested: another module with Part Edit rows (Kits, Pattern Sample Locks) installed at the same time.", "No audio was recorded for evidence: how a take sounds is the developer's report." diff --git a/src/catalog/module-documents.json b/src/catalog/module-documents.json index db36a26b07..07e4bb468e 100644 --- a/src/catalog/module-documents.json +++ b/src/catalog/module-documents.json @@ -18044,7 +18044,7 @@ "key:TRIG@BOUNCE" ], "limitations": [ - "Experimental: 0.4.0 (package ad2b4cfe) passed the test procedure on one MKII (a development twin in RAM), soak included, and by hand: bounce, cancel, UNDO. Its developer's own test (the popup, a project save, reload and power cycle, playing the bounces) was on the build before the review fixes, as reported.", + "Experimental: 0.4.0 (package ad2b4cfe) passed the test procedure on one MKII (a development twin in RAM), soak included, and by hand: bounce, cancel, UNDO. Its developer's own test of the same package (bounces, cancel and UNDO, a project save, reload and power cycle) worked, as reported.", "The WAV is saved at once, but the track only keeps pointing to it after you save the project (as stock's own SAVE THIS RECORDING).", "A full card: BOUNCE says NOT SAVED and the take stays in the recorder buffer; save it from the Audio Editor.", "A pass longer than 64 master steps (4 bars at 1X) is refused.", @@ -18108,7 +18108,7 @@ }, "tests": { "report": "TESTING.md", - "summary": "npm run test:procedure on the developer's MKII (4 December 2026, development twin 7d1223b1 of base 0.8.5): steps 1-10 passed on package ad2b4cfe, including a 120 s soak of 2,400 operations and a CPU price of 0 points at rest. By hand on the same package: bounce, merge, cancel (UNDO, the recorder setup and the player's mutes kept) and UNDO, restoring the Part byte for byte; on 196de6d7 also RESET TRACK. The developer's own test (the popup, a project save, reload and power cycle, playing the bounces) was on 196de6d7, as reported. perf:audit: worst event 2,447,620 instructions in ot_emu.", + "summary": "npm run test:procedure on the developer's MKII (4 December 2026, development twin 7d1223b1 of base 0.8.5): steps 1-10 passed on package ad2b4cfe, including a 120 s soak of 2,400 operations and a CPU price of 0 points at rest. By hand on the same package: bounce, merge, cancel (UNDO, the recorder setup and the player's mutes kept) and UNDO, restoring the Part byte for byte; on 196de6d7 also RESET TRACK. The developer's own test of the same package (bounces, cancel and UNDO, mutes, a project save, reload and power cycle, a machine track) worked, as reported. perf:audit: worst event 2,447,620 instructions in ot_emu.", "hardwareStatus": "reported", "evidenceRevision": "819162bc660cfb480605b47c3c035b17c7a9de62", "gates": [ @@ -18192,10 +18192,9 @@ "tester": "seniorspiz", "sourceRevision": "819162bc660cfb480605b47c3c035b17c7a9de62", "imageSha256": "ad2b4cfeab5688dea5c003cb56ebb07be92454035b051df2b608fc07c81188ea", - "summary": "On the developer's Octatrack MKII (OS 1.40C), 4 December 2026, npm run test:procedure ran on package ad2b4cfe built from 819162bc on development twin 7d1223b1 of base 0.8.5 (RAM-booted, never flashed): software checks, beside every other module, cost model, emulator rehearsal, unit read, scripted pass, a 120 s soak of 2,400 operations, the CPU price (0 points of the frame interrupt at rest) and put back passed. By hand on the same package: a bounce, a cancelled take that kept UNDO, a cancel after a pattern change that put the recorder setup back, mutes changed during a take kept, and UNDO restoring the Part byte for byte. The developer's own test (popup, project save, reload, power cycle, playing the bounces) was on the earlier package 196de6d7, as reported.", + "summary": "On the developer's Octatrack MKII (OS 1.40C), 4 December 2026, npm run test:procedure ran on package ad2b4cfe built from 819162bc on development twin 7d1223b1 of base 0.8.5 (RAM-booted, never flashed): software checks, beside every other module, cost model, emulator rehearsal, unit read, scripted pass, a 120 s soak of 2,400 operations, the CPU price (0 points of the frame interrupt at rest) and put back passed. By hand on the same package: a bounce, a cancelled take that kept UNDO, a cancel after a pattern change that put the recorder setup back, mutes changed during a take kept, and UNDO restoring the Part byte for byte. The developer then tested the same package (bounces by ear, cancel and UNDO, mutes, a project save, reload and power cycle, a machine track through PICK FLEX) and reported all of it working, without details per step.", "limitations": [ - "The developer's own stage (save, reload, power cycle, listening) was on package 196de6d7, as reported; not repeated on ad2b4cfe, whose changes are in cancel, UNDO's copy and the mutes.", - "Not tested on ad2b4cfe: a Modwerk machine track (Grain, a synth) bounced through the PICK FLEX popup.", + "The developer's own test of ad2b4cfe is as reported (\"all tested\"), without a record of each step; a Modwerk machine track through PICK FLEX was not run by the agent on this package.", "Not tested: a WAV save onto a full card, Studio cue mode, MAIN TO CUE, and an MKI.", "Not tested: another module with Part Edit rows (Kits, Pattern Sample Locks) installed at the same time.", "No audio was recorded for evidence: how a take sounds is the developer's report." From 5a94e9310b07709c350279a4d6e92742130cc0b7 Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Fri, 4 Dec 2026 01:57:57 +0100 Subject: [PATCH 40/43] Bounce In Place 0.4.0: packages rebuilt on current main in the isolated container Co-Authored-By: Claude Opus 5.5 --- src/engine/assets/module-build.json | 13 +++++---- src/engine/assets/requested-packages.json | 34 +++++++++++++++++++++++ 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/engine/assets/module-build.json b/src/engine/assets/module-build.json index 7e8c72224a..d83d72f5c5 100644 --- a/src/engine/assets/module-build.json +++ b/src/engine/assets/module-build.json @@ -1,10 +1,10 @@ { "schemaVersion": 1, "kind": "source-packages", - "sourceCommit": "02b1b07491ab66a9870315ca0ada1cdc8e97f708", + "sourceCommit": "3f5bdb0bd793716eb66b20eb12daee23c6ad433c", "nativeRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", - "sourceTreeSha256": "69c5cca3009533f3204695328fa6c355c4425ab979c683ae60925cca0eb24f5c", - "compilerSha256": "13ad4c0384a1261db9d74603ed5c3666fa47a0307326b46ab24f32b112d72777", + "sourceTreeSha256": "8bb920e6565704b54ede2373524f0036b273ed7e339ae4cf43973d5b78f29fc7", + "compilerSha256": "be968250953fa2b5c07818e937a92a231052f0c923d097a15b28e0c90001d176", "moduleVersions": { "miniverb": "0.2.3-experimental", "tapeecho": "0.1.9-experimental", @@ -49,7 +49,8 @@ "songbook": "0.1.0-experimental", "arr-rows": "0.2.0-experimental", "smart-reload": "0.1.0-experimental", - "defrost": "0.1.0-experimental" + "defrost": "0.1.0-experimental", + "bounce": "0.4.0-experimental" }, "files": { "dsp-packages.json": { @@ -85,8 +86,8 @@ "sha256": "6f4823e51ae30e79f387f2e83dc684c74c7547be223f2e4246c7d51096aa6df5" }, "requested-packages.json": { - "bytes": 1479316, - "sha256": "eabbb13105d5f6f4d97488d229c2f5d5ed60bc75056106dccfc1cbff99567023" + "bytes": 1508419, + "sha256": "dbfd1c800b9a8fb817ead0a5af382d0058b5d4c884cd57becc0793793315e6d7" }, "utility-packages.json": { "bytes": 11735, diff --git a/src/engine/assets/requested-packages.json b/src/engine/assets/requested-packages.json index 3f4ef2ea85..0dcd8d9725 100644 --- a/src/engine/assets/requested-packages.json +++ b/src/engine/assets/requested-packages.json @@ -1567,6 +1567,29 @@ "placement": "linked", "poolBaseLiterals": 0, "variants": [] + }, + { + "label": "bounce", + "moduleId": "bounce", + "version": "0.4.0-experimental", + "key": "BOUNCE", + "author": "seniorspiz", + "nativeAuthor": "seniorspiz", + "cpu": "54455", + "dram": true, + "caveAddress": null, + "source": "modules/bounce/unit.s", + "sources": { + "modules/bounce/unit.s": "c77fa99d0d4e05bc77b1cf628f7d41e842f84e9762e1823105558d0f06b4bc7d", + "modules/bounce/manifest.py": "27e8a39dcedcb52242e3ffcecc5a4cd2e5a07e2863e01f43507a31b4d85753a9" + }, + "bytes": 14052, + "code": "7f454c46010201000000000000000000000100040000000100000000000000000000352c000000260034000000000028000b000a2f0a206f00084280226f000cb0af00106604245f4e7545f1080011920800528060ea4feffff048d7003c263946c82456206f00141439100b14d01039100b14cf123980000000324020030680bff1de200c80009180c0630c42804cd7003c4fef00104e752a3c0009b3404c4500044a8466e67182e88866e03a097185e48866d87181e68866d24ab98000001266ca1142000411450005114100062083700160ba206f0008226f00042010b091670442804e7573a9000471a80004b08166f01029000512280005b3804a0057c07100448060de2f0b2f0a226f001440c046fc270091c847f18800246f000c15938800246f0010159388005288b1ef001866e446c0245f265f4e752f02302f000e226f0008c0fc001ed3c01029003c30401029003d1229003e340875822042741941e8ffbfb48864064280241f4e7571807419204041e8ffbfb488640c0680ffffffd07409b48065e053817381703eb08165d6206f00087401222f000c10301822b5804a0057c07100448060be41ef0004700423c000000000700142b90000000042b90000000023d00000000042b90000000023c046c7c72c4e754879000000004ebaffca588f203c0000000023c000000000700123c0000000004e7542b900000000700142b90000000023c046c7c72c4e7522390000000070094feffff42f0eb08165207001e3a8220002810000012c4a81662c0280000002404a80670642b9000000004def00042f0e4ebafe0a588f4a8066144879000000004ebaff50588f2c5f4fef000c4e754878000c2f0e4879000000004ebafdbe42b90000000073af001670014fef000ce3a813c000000000700123c00000000023c046c7c72c60c041ef0004700123d00000000023c0000000004e7541ef0004700123d00000000023c0000000004e754fefffe848d7007c282f00247a01222f00202601d6af0028d8af002cb283644c2001e7885e802f400014202f0024602c2400e68a226f001493c27407c480d3ef001c204224052c08edaa1c1130464aaf003067102c08848612825280b08465d0528160b846822c08c48660ec4cd7007c4fef00184e754fefffec48d7007c282f00207a01206f001c2608d6af0024d8af002873c8202f0020e7895e817c07cc802400e68a2241528093c2d3ef00182405edaa1c11bd821282b88062e05288b68862d04cd7007c4fef00144e754feffff048d71c04242f0014266f0018286f001c48780001487800012f2f00282f0c2f0b2f0245faff0c4e9248780001487800012f2f0040202f0048487408ff2f0b2f024e924fef0030487800012f2f0028487800012f0c2f0b2f024e92487800012f2f0040487800012f0c202f0048487308ff2f024e924cef1c0400304fef00404e754fefffe4224f207c400bf10a200f22d8b1fc400bf12666f62f6f0020000c2f2f002c4878ffff723b92af00302f012f2f00302f002f3c400ba8764eb940012bd84fef00344e75206f00041010224852884a0066f64280206f0008123008001381080052804a0166ee4e75207c46c8d198203c00000000b090661220b90000000041f90000000023d046c8d194207c460bcfc84a90660620b9000000004e754fefffec428148d70c1c43f900000000428271a9000277d1266f001891c8246f0018d5c2c0ef001ed08377a90003d7c0068000000000b6886216d483528158897009b08166cc4cd70c1c4fef00144e754aaf0020670c1833880011840800528860d41832880060f22f0a226f0008428041f90000000045f108001192080052800c80000018b266ee245f4e75202f000440c146fc270023c08000000823c0100b14d446c142a742a742a742a742a74878001a4eb9400053d84fef00184e7573b9000000007001e3a873b9000000007180b0816728207c800000082039000000002210028000ff00000281ff00ffff8081b09067082f004ebaff94588f4e75223946c824564feffff048d7040cb2b90000000066761039100b14cf30401039000000002608758022427403c682b689665a488016390000000006810008ed802041c0fc18b2487008004ebaff1e7183588f43f900000000c0fc000c20404280d1fc0000000045f10800720c119208005280b28066f071b9000000002f004879000000004eb940029a4c508f4cd7040c4fef00104e754fefffd8720648d73cfc206f002c247c00008e55267c00008e534282287c00008e5493c94285429071b90000000079b900000000c0fc8ed82040d1f900000000d5c8d7c8d9c841e800510b0467604a12677e1c28ffff4a12677a161077837006b0836500008871864a06675a2c3c000000002a4677b53800c0c34a806748b089630222404a826626260024014c4320072c03240626074a8766f24c4610014c0018000c810000018052c275024482528541e8091a7008b08566904a82661a200174064c4200004cd73cfc4fef00284e751c13608216146084206f002c7001208020095a800c80000001856304428060d674064c42000060ce4fefffd848d77c0c246f002c97cb2c6f003049faf9b075aa000471aa0006c4fc8ed8c0fc091ad4802a422002dbd2487800592f0e06801001614e2f002f0d4e944fef0010260d06830000005941ee00592242d3fc100161a72f48002448780020206f00284870b80048739800487338002f4900304e944fef001047eb0020226f0020b7fc0000080066d2487800c1267c46c7d48c486e08590682100169a72f02486d08594e9471aa0004387c00014fef001073aa0006c0fc8ed8c2fc091a2040d1c1d1d241e8005993c9103098005289721fb289665846804a0056c07100448073aa0006240ce3aa12134a80674e828216c141e80020b7fc46c7d4cc66ca20527001d1fc0009b3322080700123c0100f85984eb940027e0071aa00064cd77c0c2f40002c4fef00284ef94009da2071800c80000000ff6792700160a44682c28260ae4feffff048d70c0c4ab946105408671877b9000000003003c0fc002c2040d1fc46c938d44a906e0c4cd70c0c4fef00106000f9244eb9400819fc247c40013a0820432f00486800014879000000004879000000004e92267946c823fa243946c8240a4eb940024eec4fef00104a8056c17301448123c1000000004a80670000bc42a742a74eb9400252302f004879000000004879000000004e924fef00144a8b67864a8267824879000000004e93588f4a80661248790000000020424e90588f4a806d00ff6448790000000074014879000000004879000000004eb940013a084fef000c487900000000247c40013a084879000000004879000000004879000000004e924879000000004e934fef00144a8067427063b0826700ff0e52822f024879000000004879000000004879000000004e924fef001060aa2f3c100f84804879000000004879000000004e924fef000c6000ff4a4879000000004879000000002f3c460be9f04e92068300000080247c800000a4700123c0460be9e8207c460bcfc823c3460be9ec203c0000000023d000000000207c46c8d19423d000000000207c46c8d19823d00000000042b9460bcfc823c046c8d194700841faf85e23c846c8d19842b90000000042b90000000042b90000000042b90000000023c000000000700123c046c7c72c261224b9000000002f3c460be9f04eb94002416824834cef0c0c00104fef00204e754feffff048d7041c246f0014242f0018262f001c71aa00052f004879000000004eb940029a4c508f41f90000000071b02822b680671e2f43001c2f42001871aa00054cd7041c2f4000144fef00104ef9400972fc1039100b14cf122a00057803c0847781b083662c4a398000001566241039100b14ce2f42001c4cd7041c73012f41001871802f4000144fef00104ef940001f184cd7041c4fef00104e754e56ffd471b90000000048d71c7c18390000000045f900000000c0fc18b22652d7fc0008ed80d7c07584284249ec002277b3c800486efffc4ebafae02f0b2d40fff44ebaf9aa3002508f43f900000000c0fc000c20404280d1fc0000000047f10800720c119308005280b28066f030027a0143f9000000000684ffffff8042064281c0fc00051385c800387c01da138628001386280841f108003002114402cbc0fc001e5c8026417805d7fc400d320cb8816500011c307c002a2a017c064c465004d1c9d1c0528111934800780cb88166d432027c7f2a3c7f7f4040c2fc00182041d1fc000000001146000b42a80003214500072f032f024879000000004ebafe624fef000c428141f90000000043f90000000047f118001193180052810c810000091a66ee428042017840118108005280b88066f27a01428041f90000000013c50000000050c65280118608ff0c800000080066f071b9000000002052d1fc00008e55c0fc8ed84a30080067184aaefff46712700241eefff713d00000000013c0000000004879000000004879000000004ebafa7e123900000000508f7001e5a8207c800000084680c0817180e1888090b09067082f004ebaf858588f4cee1c7cffd4720123c1000000004e5e4e75204c6000fee64fefffe47202202f002048d74404b280660001242239000000007009b08165307001e3a8220002810000012c4a8166680280000002404a806716223c000000002f4100204cd744044fef001c6000f4584ab900000000660c203c000000002f40002060e0240f0682000000102f024ebaf2e0588f45faf4304a8067124879000000002f024ebaf348508f4a8066144879000000004e92588f4cd744044fef001c4e7571b90000000075b9000000004df9000000002056d1fc0008ed80c0fc18b2d1c0123028221f41000f2f084ebaf74a487800012f024879000000004ebaf6d271af001f2f002f022f0e4ebafca04879000000002f0e4ebaf94471b9000000004fef0024207c800000082210243900000000e188b382c082b380b09067082f004ebaf71a588f42b9000000004879000000006000ff604a806700008e2239000000007009b08165227001e3a8220002810000012c4a816600ff400280000002404a80670642b900000000240f0682000000102f024ebaf1da588f4a80660e4879000000004ebaf3206000ff0c4878000c2f024879000000004ebaf19442b90000000073af002270014fef000ce3a8720723c10000000013c000000000700123c046c7c72c6000fed24cd744044fef001c6000f33a73b900000000598f2eaf00083001c0fc00a82040d1fc800049d94a10671242a7487800802f014eb9400051784fef000c4ebaf6a84ebaf6642f570008588f6000f29220390000000072054fefffc048d75cfcb280660000b64ab9800065b8672c71b9000000004878000174022f3c0000c0107c012f004eb94000517823c20000000023c646c7c72c4fef000c3c7c000178012f3c460ba9c04eb9400009f4428347f90000000045f90000000041f90000000042801f500033588f2840d9fc460ba98c14144a2f002f670a7bb208007382ba816704178208004a84670003da73b9000000002c0091c8e58e7bb9000000002f41003042012246b3ef0030660002e67e012c08edaf8287600002ea7e02be80662c71b900000000c0fc00a82040d1fc800049d94a106700ff647003720123c00000000023c146c7c72c6000ff507403b480660001364ab9800065b866104879000000004ebafeaa588f6000010677b90000000047f9000000003003c0fc00a82040d1fc800049d94a106600ff10240f0682000000342f024ebaeff2588f4a80670e2f0b2f024ebaf062508f4a80660848790000000060ac2003068011b1ff89e58820404a90660848790000000060944ebaf5184ebaf4d471b9000000002853240c06820008ed80487818b2c0fc18b245faef78d4802f024879000000004e9271b9000000004878091a73b900000000c0fc8ed8c2fc091a2040d1c14870c8004879000000004e924878000c2f0b4879000000004e924fef0020207c8000000823d0000000002e832f0242b9000000004ebaf01e508f4a80670000aa7009720123c00000000042b90000000023c146c7c72c2039000000007403b480650001664a80670001226000fe147406b48067067c09bc80667a45f900000000280f06840000003424122f041639000000004ebaeedc588f4a80670e2f0a2f044ebaef4c508f4a80660e4879000000004ebaf0146000fe96778371b9000000002042d1fc0008ed80c6fc18b2d1c373b0082253814a8166d22f002f084ebaef76508f4a806600ff704ebaf9604ebaf6b06000ff647208b280660000a24ab900000000672e4ebaf2964ab9000000006c084ebaefe26000ff40487900000000243c000000004ebaefa023c2000000006000fe1c4ab900000000673a4ab90000000066327c0123c6000000004ab9000000006c064ebaf24860b8247c800000a4241224b90000000042a74eb94002414824826000fdda203900000000528023c0000000000c800000070862c84a3900000000670000a442849dce6000fcec59804a806600feb44ab90000000066de203900000000528023c000000000725ab28064ca4ebaef546000fe905b804a8066bc6000fcb070016000fcd82e090f05670000b67c022e08efae8286528954887e08be886600fcfa2040d1fc460ba9ae1a10bb8175827b81ba826704188176011581080053804a8066bc4a8367064eb9400136a8340e2f3c460ba9c04eb940000ab4588f13c20000000071b9000000007c187e092239800065b875b900000000c0fc00a84a8156c1484242422040d1fc800049d9203900000000eda873014481efa980b90000000080824cd75cfc80814a1056c1206f004473014481e189808120804fef00404e757c07bc89660a4a39800000346600ff467e036000fc4e123308006000ff504e56ffcc723f48d70cfc282e0008202e000cb284650004d4741fb4846d2e22390000000045f900000000741f7601c484e5ab2401c4834a8066204a82670004ae4683c68124837001600004a222390000000045f90000000060d04a8266e82039000000007208b280670004807209b28066227406700123c20000000023c046c7c72c0684ffffffcf2d44ffecb0846428600004584a8067067206b280661e7429b48466000446103946100b1c08000000670004384ebaedc48792608a7207b280660001d67431b484660001be2c0e0686fffffff42f064ebaebe6588f4a8067221a2efffa71b9000000007585b08266124879000000002f064ebaec42508f4a806608487900000000603071aefff9206efff42e0806870008ed802f02c0fc18b22d48ffecde802f074ebaec78508f28004a8067104879000000004ebaecd8588f6000ff763002c0fc00a82040d1fc800049d94a10670848790000000060dc7001e5a8207c8000000847faeb321d40fffb2d50fffc487818b22f074879000000004e934878091a320271aefff8c0fc8ed8c2fc091a2040d1c1222effec487018004879000000004e9341f9000000007fb028222f084ebaefd042a72f024879000000004ebaef5a4fef00243002c0fc00052040d1fc000000001145000110850685ffffff80114500042e872f022f064ebaf50a4fef000c41f9000000004280220842021182080052800c800000091a66f050c0207caaaaaaaa23c80000000023c80000000041f90000000033d00000000041f90000000013c00000000050c25284118248ff0c840000080066f041f90000000013d0000000002f012f064ebaf14c4878000c2f064879000000004e93487900000000700123c0000000004ebaeb964fef00186000fe327232b2846600025c4ebaebd26000fe227201b280660002587007b0846d2871b900000000b08467127001123900000000e9a8b38013c000000000720123c146c7c72c6000fdec7031b0846600020a280e0684fffffff42f044ebae9dc588f4a806700fe184879000000002f044ebaea46508f4a806700fe041c390000000071aefffa7f86be806600fdf2486efff04ebaef9a588f26404a80660a4879000000006000fe101a39000000004a39800000346600011e7801efac7b857984b8856600012a3007c0fc00a82040d1fc800049d94a106600fdfa320771b900000000207c8000000823d00000000024390000000006820008ed80c0fc18b24878000cc2fc000cd480204141e80602487028002d48ffec4879000000004ebae8fa2f024ebaedde4fef0010206effecd1fc000000002d48ffec200b5380425011400002b8856600010852864200206effec114600041140000971b9000000002f004879000000004eb940029a4c508fb885672071b900000000223900000000484042400281ff00ffff82802f014ebaed98588f2007068011b1ff89e588204042904ab9800065b8670000ac487800012f3c0000c0102f074eb9400051784fef000c700223c000000000700123c046c7c72c6000fc624a056c00fee04879000000006000fcd424017008b0816700feda22025281050567ee71c2d0802040d1fc80000c514a1066de4201487900000000283c000000002f0447faec2a06820000003113c1000000004e9313c20000000042024879000000002f0413c2000000004e932f044ebae94c4fef00146000fbe87c0a6000fef870056000ff6a7232b2846700fdac4ebae97c42804cee0cfcffcc4e5e4e7522005581e28967065b804a8066147432b48466e04879000000004ebaf6306000fc284ebae94a0684ffffffcf2d44ffec70016000fb622239000000002f027407b48157c07401b48157c1241f44804481808171804e754e56ffbc70f748d73c1c263900000000c0834a806700009c4aae00086700009447faeb58700649fae9bc45faeb084bfaea2ab083660000864201487900000000240e0682ffffffe82f0242031d41ffe84e931039000000001d43fff34879000000002f020680000000311d40fff24e9342a748780008487800804878003842a72f2e00084e944fef00242e8248780039487800022f2e00084e9248780008487800804878003842a72f2e00084e954fef00244cee3c1cffbc4e5e4e75283c000000007009b083660000b04201487900000000240e0682ffffffe82f0242031d41ffe84e931039000000001d43fff14879000000002f020680000000311d40fff04e9342a74878001a4878006048780012487800102f2e00084e944fef00284878001a48780060487800124878001020442f2e00084e9048790000000048780015487800142f2e00084e924fef0024487800074878005e48780014487800112f2e00084e952f0248780020487800142f2e00084e926000ff3842a74878002c487800744878000a48780006240e0682ffffffdc2f2e00084e944878002c487800744878000a48780006204478072f2e00084e9042004fef00282ebc000000002f021d40ffdc4e931039000000004201508f0680000000311d40ffe41d41ffe5b883660000a64879000000002f021d41ffdc4e93508f1039000000000680000000311d40ffe342001d40ffe42f0276044878000d4878000a2f2e00084e9248780007487800724878000c487800072f2e00084e954fef0024203900000000b680665a2039000000004a806606203c000000002f004878001b4878000a2f2e00084e924fef00102039000000004a806700fe442f00487800234878000a2f2e00084e924fef00106000fe2c59834a836600ff7c243c000000006000ff725f804a806638487900000000487800184878000a2f2e00084e924879000000004878001f4878000a2f2e00084e924fef001c2ebc000000004878002d609e387c000a240e42830682ffffffe8705442012f02487800162f0c2f2e00081d40ffe820030680000000311d40ffe91d41ffea4e9271b9000000004fef00100700671a487800074878000c48780015486cffff2f2e00084e954fef0014528349ec000e7808b88366a62039000000007201b280660000b042034879000000002f021d43ffe84e93486effd84ebaea024fef000c4a80670000867809b88064702200780a4c44100141eeffee0681000000301d41ffed760a4c43000142040681000000301081114400014aaeffd86746203c000000002f002f024e93588f2e824878001f4878000a2f2e00084e92487900000000487800264878000a2f2e00084e924fef001c2ebc000000006000feee41eeffed60a0203c0000000060b848790000000060b27205b280673855804a80663a203c000000002f004878001f4878000a2f2e00084e924879000000004878002d4878000a2f2e00084e924fef00206000fc7a203c0000000060cc203c0000000060c400000001000000000000000300000000000000000000000000004e4f542053415645443a2054414b4520494e20425546464552005341564520495420494e20415544494f20454449544f5200415544494f20545241434b53204f4e4c59004225642d25730025732f424f554e4345530025732f415544494f2f424f554e4345530025732f25732e7761760025732d256400257300424f554e4345532f25730054414b45204c45465420494e20425546464552004e4f5448494e4720544f20554e444f00554e444f3a204f50454e20495453205041545445524e00554e444f4e450053544f50504544202d204e4f20424f554e4345005041545445524e204348414e4745440054414b4520494e434f4d504c45544500424f554e4345442c20534156454420415300545241434b204348414e474544005049434b20535441544943204649525354005245434f52444552204255535900545241434b2052455345540050415353204f56455220363420535445505300543820495320544845204d415354455220545241434b00540020435545204c4556454c204953203000424f554e43452043414e43454c4c454400424f554e4345000020284c4f4e474553542900205354455053005245434f5244494e47204f4e45205041535300505245535320504c4159005741495400424f554e4345443a205400205049434b20464c4558004348414e474520540020544f20464c45580054414b45205245434f5244454400424f554e4345205400524553455420540053544f434b2053544154494320545241434b004e4f2054524947532c204e4f204c4f434b53005945533a205245534554204e4f3a204241434b005041535320004f564552203634205354455053005452494720312d383a204d45524745005945533a2052454320204e4f3a20434c4f5345004e4f3a2043414e43454c00424f554e434520545241434b00524553455420545241434b00554e444f0000030406080c1830000000000000000000000000000408004000007f004f4000007f004f0040000040000000000000004002017f4001202020000000007f7f40407f007f004000402f007f007f00010000000140010000000140000000000000000000000000000000000140000000000000000000000001010000000000000100030000017f010000000000000000010140000901000000ffff00000001010008010100220101002a1e1e011a181801da1e1e02ca050502f21e1e06020c0c0000000000000000000000000000000000000000000100000000000000000400fff1000000000000000000000000030000010000000000000000000000000300000300000000000000000000000003000004000001770000000000000022020000010000000a000000220000007e0200000100000012000000a000000032020000010000001d000000d200000034020000010000002800000106000000720200000100000038000001780000002e020000010000003d0000457e0000000401000004000000430000456a00000004010000040000004c000000060000000401000004000000530000456e00000004010000040000005b0000457200000004010000040000000000000000000000000300000500000067000001a6000000220200000100000071000001c800000016020000010000007c000001de0000008e02000001000000880000455e0000000c010000040000006b0000026c00000014020000010000008c00000186000000040100000400000099000001820000000401000004000000a2000002800000001402000001000000ac0000017e0000000401000004000000b70000017a0000000401000004000000be000002940000007602000001000000c30000030a0000005602000001000000ca000003600000008402000001000000d4000003e40000004602000001000000d90000042a0000002402000001000000e00000044e0000003402000001000000f2000001660000000401000004000000fe0000016a00000004010000040000010a000001620000000401000004000001140000048200000068020000010000012a0000009a000000240100000600000136000001aa000018b2010000040000013f000004ea0000002402000001000001500000050e00000032020000010000015a000005400000004002000001000001670000058000000096020000010000017300001a5c0000000c010000040000017c00000616000000f802000001000001930000000000000007010000060000019b0000070e0000014202000001000001a8000008500000020e02000001000001b2000001320000001801000004000001bb000001760000000401000004000001ca000000aa0000008801000004000001d20000014a0000001801000004000001db0000000a000000a001000004000001e4000001720000000401000004000001ee0000016e0000000401000004000001fa00000a5e0000009e020000010000020000000afc000001d6020000010000020b0000331a0000091a010000040000021600003c340000091a01000004000002220000454e00000004010000040000022d00000cd2000001d4020000010000023b000045520000000c010000040000024000001a68000018b2010000040000024a00000ea60000004202000001000002510000000200000002010000040000025c000000000000000201000004000002660000000400000001010000040000026f0000457a00000004010000040000027b000045760000000401000004000002870000001400000086010000060000028d0000018a00000020010000040000000000000000000000000300000600000292000000080000000c01000006000002a100000ee80000047c12000001000002ad000013640000052c12000001000002b8000018900000002012000001000002c3000018b00000044a12000001000002cf00001cfa000000181100000100626f756e63652e630063757272656e740073616d655f706c6163650077726974655f7370616e006d6f647765726b5f6d616368696e650073686f77007068617365006d6573736167653200737469636b79006d6573736167650073686f776e5f7469636b73006e6f745f736176656400636c6f73655f76696577006f70656e5f73656c6563740061726d0073617665645f726573756c740073617665645f696e007761765f7361766564007761765f726573756c74007761765f696e0066696c6c00696e76657274006672616d655f626f78007465787400617070656e6400736176655f646f6e655f726573746f726500707265765f646f6e655f6200707265765f646f6e655f6100707265765f6d6f6465007075745f747261636b2e636f6e737470726f702e3000545241434b5f425954455300706172745f62756600636f70792e636f6e737470726f702e30007365745f6d7574657300726573746f72655f6375657300726573746f72655f726563007265635f636f707900706173735f73746570732e636f6e737470726f702e30007469636b732e300077726974655f7265636f726400736176655f74616b65007761765f62617365007761765f696e5f70726f6a656374007761765f646972007761765f6e616d65007761765f706174680061737369676e696e670073617665645f7469636b73007061737465006170706c795f636c6970007265636f72645f6e6577007265636f72645f636f707900756e646f5f726561647900626f756e63655f63686f6f7365006c61737400706172745f636f70790063616e63656c006c616d705f73746f636b006c616d705f6d696e65006c616d70735f6f6e00636f6e73756d65645f6c6f00636f6e73756d65645f6869004652455348006e6f746500626f756e63655f616374696f6e73006d6f64756c655f7469636b006d6f64756c655f6b6579006d6f64756c655f656e63006d6f64756c655f6472617700626f756e63655f706172745f6d656e750000000180000004010000457e00000188000004010000456a0000018e000004010000000600000194000004010000456e0000019a0000040100004572000001b4000010010000001a000001ba000004010000456a000001c20000040100000006000001ca000004010000457e000001d2000004010000456e0000020c000004010000457e00000246000004010000456e00000258000004010000456500000260000004010000457e0000027400000401000001860000027a000004010000018200000288000004010000017e0000028e000004010000017a00000456000002010000026c000004b400000401000001aa00000590000004010000455e000005e200000401000007ac000006840000470100000000000008c60000040100000176000009dc0000020100000280000009e20000040100000162000009ee000004010000016a000009fa000004010000016600000a18000004010000018200000a1e000004010000017a00000a24000004010000017200000a2a000004010000016e00000a30000004010000457e00000b5600000401000007ac00000be000000401000002c400000c3e000004010000332100000c78000004010000336a00000c7e000004010000336b00000cc4000004010000454e00000d0e000010010000008500000d2c000010010000009900000dfa000004010000454e00000e38000004010000457e00000e70000004010000456e00000e84000004010000457e00000e8a000004010000456500000f24000004010000457e00000fd6000004010000457e000010d8000004010000455a000010e2000004010000454e000010f8000004010000457e000010fe000004010000456e000011d2000004010000014a000011dc000004010000456a000011f8000004010000017200001230000004010000016e0000123e0000040100000004000012680000040100004572000012e40000040100000004000013dc000004010000457e0000153800000401000004740000157e000004010000335a00001584000004010000335e00001590000004010000336a0000159c000004010000336d000015b80000040100003c33000015dc000004010000454e000016220000040100004565000016d200000401000045660000171800000401000001aa000017ac000004010000457e000017f8000004010000018a0000180a000004010000018a00001812000004010000018b00001822000004010000018c0000196e000002010000036000001a6a000010010000020700001afc000010010000019b00001b42000010010000019400001b7e000010010000023e00001c58000010010000019c00001c8e000010010000027600001c9e00001001000001a700001cba00001001000001cc00001cec00001001000001c100001cf400001001000001ae00001cfe000010010000019400001d06000047010000000800001d0a0000020100000cd2000001a80000100100000000000001e0000004010000457e0000022200001001000000320000023c000004010000455e00000460000004010000016600000466000004010000016a0000047c00000401000001620000048e000047010000009a000004f400000401000001aa0000054200000401000045640000054c00000401000045650000055e0000040100004566000005a00000040100004563000005b60000040100004564000005d40000040100001a5c000005f800000401000045630000060000000401000001aa00000640000004010000456200000646000004010000456500000652000004010000455e0000086200000401000045640000089a0000100100000044000008a00000040100000132000008de000010010000004b000008e400000401000000aa000008f800000401000000aa0000090600000401000000aa00000918000004010000013200000920000010010000007700000926000004010000014a00000936000004010000014a0000094200000401000000aa0000094800001001000000670000094e000004010000000a00000956000004010000000a0000097200000401000001320000097800001001000000710000097e000004010000014a0000099200001001000000560000099800000401000000aa000009a8000004010000014a000009ae000010010000007a00000a40000004010000017600000a7a00000401000001aa00000a8800000401000001aa00000b02000004010000456300000b0c000004010000456400000b12000004010000455e00000b480000040100001a5c00000b7000000401000001aa00000bf6000004010000455e00000c06000004010000331a00000c0c0000040100003c3400000c38000004010000337300000c54000004010000456200000c84000004010000331a00000c8a000004010000455e00000c94000004010000456500000ce8000004010000457e00000d24000004010000454e00000d50000004010000455200000d6200001001000000a900000d76000004010000455700000d7c000004010000455800000d82000004010000455200000daa0000040100001a6800000dc20000040100003c3400000dce000004010000455900000de0000004010000455a00000e0000001001000000c000000e10000004010000457e00000e52000010010000003200000e66000004010000455e00000ea8000004010000456400000eea000004010000457e00000f08000004010000456400000f48000004010000000200000f4e000004010000000000000f54000004010000000400000f86000004010000456400000f92000004010000456500000fba000004010000456400000ff600001001000000c70000100600000401000045640000100c000004010000455e0000104800001001000000db0000106000001001000000eb000010700000040100004563000010900000040100001a68000010980000040100004562000010a20000040100004564000010b80000040100003c34000010c600000401000045520000110a000004010000457e0000112e000004010000455e0000114000000401000045630000115e00001001000000850000116e0000040100004564000011b00000040100000182000011bc0000040100000186000011cc00001001000000fb000011e6000004010000017a000011ee0000040100000172000011fe000004010000017e00001214000004010000017600001228000004010000016e000012580000040100000006000012600000040100004572000012ea0000040100004564000012fa000004010000456500001314000004010000457e00001322000004010000454e00001384000004010000457a0000138a000004010000457a000013b20000040100004576000013b80000040100004576000013c4000004010000457e0000144a000004010000456400001456000004010000455e00001468000010010000010d0000149a000010010000011b000014bc000010010000012d000014e00000040100001a68000015060000040100003c340000150e0000040100001a680000152200004701000000140000155c000004010000331a0000158a0000040100003c84000015960000040100003373000015b2000004010000454d000015cc0000040100004552000015d4000010010000013b0000160c000004010000456400001618000004010000456500001652000004010000455e000016660000040100004564000016880000100100000147000016920000040100004565000016c60000040100004563000016d8000004010000455e000017000000040100001a5c0000174200000401000045630000174a00000401000001aa0000175c0000040100004565000017620000040100004566000017c4000010010000015a000017f200001001000001710000181a000010010000017300001870000010010000018300001892000004010000457e000018bc000004010000457e000018ec00001001000001d10000190400000401000045640000190e00001001000001dc0000197e00001001000001e7000019960000040100004564000019a000001001000001f0000019e800001001000001f900001a78000004010000456400001a96000010010000021000001aa6000004010000456400001ae8000004010000457e00001af2000004010000456e00001b16000004010000456a00001b52000010010000021800001b66000010010000022b00001bbe000004010000456500001bf2000004010000457e00001c02000010010000025200001c76000010010000026600001ca6000010010000025800001cd0000010010000028a0000000800001001000002950000000c00001001000002a20000001000001001000002ae002e73796d746162002e737472746162002e7368737472746162002e72656c612e74657874002e64617461002e627373002e726f646174612e737472312e31002e72656c612e726f646174610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000100000006000000000000003400001d12000000000000000000000004000000000000001b0000000400000040000000000000287c00000c3c0000000800000001000000040000000c0000002600000001000000030000000000001d4800000000000000000000000000000004000000000000002c00000008000000030000000000001d4800004582000000000000000000000004000000000000003100000001000000320000000000001d48000002b3000000000000000000000001000000010000004500000001000000020000000000001ffc000000be0000000000000000000000020000000000000040000000040000004000000000000034b8000000240000000800000006000000040000000c00000001000000020000000000000000000020bc000004e000000009000000490000000400000010000000090000000300000000000000000000259c000002e00000000000000000000000010000000000000011000000030000000000000000000034dc0000004d00000000000000000000000100000000", + "sha256": "3589ca991d5d7fd56385076e0c7409ded6eb63e373db35967ee9110d2afd5f7d", + "stockCopies": [], + "placement": "linked", + "poolBaseLiterals": 0, + "variants": [] } ], "groups": [ @@ -6089,6 +6112,17 @@ "refs": [], "pokes": [], "tables": [] + }, + { + "moduleId": "bounce", + "key": "BOUNCE", + "author": "seniorspiz", + "nativeAuthor": "seniorspiz", + "activeWith": null, + "detours": [], + "refs": [], + "pokes": [], + "tables": [] } ], "composition": { From 5dbf921a3bafec48b0cec14988ab28ad33fb19ef Mon Sep 17 00:00:00 2001 From: seniorspiz <137111931+seniorspiz@users.noreply.github.com> Date: Fri, 4 Dec 2026 02:10:29 +0100 Subject: [PATCH 41/43] Bounce In Place 0.4.0: the developer's test ran on release base 0.8.5; what its readout shows Co-Authored-By: Claude Opus 5.5 --- sdk/octatrack/modules/bounce/TESTING.md | 2 +- sdk/octatrack/modules/bounce/octamod.module.json | 2 +- src/catalog/module-documents.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/octatrack/modules/bounce/TESTING.md b/sdk/octatrack/modules/bounce/TESTING.md index 66e966b2e6..348e012527 100644 --- a/sdk/octatrack/modules/bounce/TESTING.md +++ b/sdk/octatrack/modules/bounce/TESTING.md @@ -351,7 +351,7 @@ Steps 11 and 12 (by hand, and the developer's stage) are the runs on the same pa Step 11 (by hand) is the review-fix table below, on the same package. -**Step 12, the developer's own test of package `ad2b4cfe`, as reported** (4 December 2026, the same MKII, a 30-minute RAM trial, never kept). The developer was asked to check a plain and a merged bounce by ear, a cancel followed by UNDO of the earlier bounce, a mute changed while a take was armed, a project save, reload and power cycle with the bounced tracks, and a Modwerk machine track through the PICK FLEX popup, and reported "all tested", without details per step. +**Step 12, the developer's own test of package `ad2b4cfe`, as reported** (4 December 2026, the same MKII, a 30-minute RAM trial, never kept). The developer was asked to check a plain and a merged bounce by ear, a cancel followed by UNDO of the earlier bounce, a mute changed while a take was armed, a project save, reload and power cycle with the bounced tracks, and a Modwerk machine track through the PICK FLEX popup, and reported "all tested", without details per step. The trial ran on the flashed release base 0.8.5 (`ddb56b72`), not the development twin. Its readout (phase, merged tracks, transport, recorder, UNDO bit) shows a T1 take whose track was a Modwerk machine: the PICK FLEX popup and strip (phases 9 and 6), then the bounce finished and UNDO ready; a merged take of T2 with T3 and T4, finished and saved, UNDO ready; and an UNDO about two minutes later. ## The review fixes, package ad2b4cfe (unit) diff --git a/sdk/octatrack/modules/bounce/octamod.module.json b/sdk/octatrack/modules/bounce/octamod.module.json index 6ee031161d..c9d241a908 100644 --- a/sdk/octatrack/modules/bounce/octamod.module.json +++ b/sdk/octatrack/modules/bounce/octamod.module.json @@ -169,7 +169,7 @@ "tester": "seniorspiz", "sourceRevision": "819162bc660cfb480605b47c3c035b17c7a9de62", "imageSha256": "ad2b4cfeab5688dea5c003cb56ebb07be92454035b051df2b608fc07c81188ea", - "summary": "On the developer's Octatrack MKII (OS 1.40C), 4 December 2026, npm run test:procedure ran on package ad2b4cfe built from 819162bc on development twin 7d1223b1 of base 0.8.5 (RAM-booted, never flashed): software checks, beside every other module, cost model, emulator rehearsal, unit read, scripted pass, a 120 s soak of 2,400 operations, the CPU price (0 points of the frame interrupt at rest) and put back passed. By hand on the same package: a bounce, a cancelled take that kept UNDO, a cancel after a pattern change that put the recorder setup back, mutes changed during a take kept, and UNDO restoring the Part byte for byte. The developer then tested the same package (bounces by ear, cancel and UNDO, mutes, a project save, reload and power cycle, a machine track through PICK FLEX) and reported all of it working, without details per step.", + "summary": "On the developer's Octatrack MKII (OS 1.40C), 4 December 2026, npm run test:procedure ran on package ad2b4cfe built from 819162bc on development twin 7d1223b1 of base 0.8.5 (RAM-booted, never flashed): software checks, beside every other module, cost model, emulator rehearsal, unit read, scripted pass, a 120 s soak of 2,400 operations, the CPU price (0 points of the frame interrupt at rest) and put back passed. By hand on the same package: a bounce, a cancelled take that kept UNDO, a cancel after a pattern change that put the recorder setup back, mutes changed during a take kept, and UNDO restoring the Part byte for byte. The developer then tested the same package (bounces by ear, cancel and UNDO, mutes, a project save, reload and power cycle, a machine track through PICK FLEX) and reported all of it working, without details per step; that trial ran on the flashed release base 0.8.5 (ddb56b72), and its readout shows a machine track through PICK FLEX, a merged take of three tracks and an UNDO.", "limitations": [ "The developer's own test of ad2b4cfe is as reported (\"all tested\"), without a record of each step; a Modwerk machine track through PICK FLEX was not run by the agent on this package.", "Not tested: a WAV save onto a full card, Studio cue mode, MAIN TO CUE, and an MKI.", diff --git a/src/catalog/module-documents.json b/src/catalog/module-documents.json index 640c95aea7..ff39b2feb5 100644 --- a/src/catalog/module-documents.json +++ b/src/catalog/module-documents.json @@ -18605,7 +18605,7 @@ "tester": "seniorspiz", "sourceRevision": "819162bc660cfb480605b47c3c035b17c7a9de62", "imageSha256": "ad2b4cfeab5688dea5c003cb56ebb07be92454035b051df2b608fc07c81188ea", - "summary": "On the developer's Octatrack MKII (OS 1.40C), 4 December 2026, npm run test:procedure ran on package ad2b4cfe built from 819162bc on development twin 7d1223b1 of base 0.8.5 (RAM-booted, never flashed): software checks, beside every other module, cost model, emulator rehearsal, unit read, scripted pass, a 120 s soak of 2,400 operations, the CPU price (0 points of the frame interrupt at rest) and put back passed. By hand on the same package: a bounce, a cancelled take that kept UNDO, a cancel after a pattern change that put the recorder setup back, mutes changed during a take kept, and UNDO restoring the Part byte for byte. The developer then tested the same package (bounces by ear, cancel and UNDO, mutes, a project save, reload and power cycle, a machine track through PICK FLEX) and reported all of it working, without details per step.", + "summary": "On the developer's Octatrack MKII (OS 1.40C), 4 December 2026, npm run test:procedure ran on package ad2b4cfe built from 819162bc on development twin 7d1223b1 of base 0.8.5 (RAM-booted, never flashed): software checks, beside every other module, cost model, emulator rehearsal, unit read, scripted pass, a 120 s soak of 2,400 operations, the CPU price (0 points of the frame interrupt at rest) and put back passed. By hand on the same package: a bounce, a cancelled take that kept UNDO, a cancel after a pattern change that put the recorder setup back, mutes changed during a take kept, and UNDO restoring the Part byte for byte. The developer then tested the same package (bounces by ear, cancel and UNDO, mutes, a project save, reload and power cycle, a machine track through PICK FLEX) and reported all of it working, without details per step; that trial ran on the flashed release base 0.8.5 (ddb56b72), and its readout shows a machine track through PICK FLEX, a merged take of three tracks and an UNDO.", "limitations": [ "The developer's own test of ad2b4cfe is as reported (\"all tested\"), without a record of each step; a Modwerk machine track through PICK FLEX was not run by the agent on this package.", "Not tested: a WAV save onto a full card, Studio cue mode, MAIN TO CUE, and an MKI.", From 0e5f053a5a47ac7d7f303c002ddfd2850a1a2562 Mon Sep 17 00:00:00 2001 From: repeat98 Date: Fri, 4 Dec 2026 09:14:43 +0100 Subject: [PATCH 42/43] Bounce In Place 0.4.0: the device tool fix moves to its own pull request Co-Authored-By: Claude Opus 5.5 --- scripts/device.mjs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/device.mjs b/scripts/device.mjs index c4cd09a100..51b9dc712f 100644 --- a/scripts/device.mjs +++ b/scripts/device.mjs @@ -319,10 +319,7 @@ async function part(n) { /** The Part menu (RENAME, RELOAD, SAVE, SAVE ALL), then `steps` in it. FUNC + PART on an MKII; on an MKI, FUNC + BANK in * the Part window (FUNC + MIDI), which NO closes afterwards (#2099). The menu keeps its cursor and stops at RENAME. */ async function partMenu(steps) { - // With a module's Part Edit row (ot_part_menu) the base opens two columns and remembers the cursor, on BOUNCE say: LEFT, - // UP past every row the table holds (PART and up to 8 modules) and RIGHT put it on PART's actions first. Stock's - // one-column menu ignores LEFT and RIGHT (MKII, 3 Dec 2026). - if (await mkii()) await run('FUNC+PART w600 LEFT w200 ' + 'UP w150 '.repeat(8) + 'RIGHT w200 ' + steps) + if (await mkii()) await run('FUNC+PART w600 ' + steps) else await run('FUNC+MIDI w300 FUNC+BANK w600 ' + steps + ' w300 NO w200') } /** Pick an effect by name through the stock chooser, then wait until the track runs it (effectTables: id -> descriptor From 04a124621876cdb33a1b99d651006f9dd115f577 Mon Sep 17 00:00:00 2001 From: repeat98 Date: Fri, 4 Dec 2026 09:15:37 +0100 Subject: [PATCH 43/43] Bounce In Place 0.4.0: packages rebuilt on main with Fuzzbox in the isolated build Package bytes unchanged; module-build.json now pins this merge. Co-Authored-By: Claude Opus 5.5 --- src/engine/assets/module-build.json | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/engine/assets/module-build.json b/src/engine/assets/module-build.json index 748c440632..d10e05ecd9 100644 --- a/src/engine/assets/module-build.json +++ b/src/engine/assets/module-build.json @@ -1,10 +1,10 @@ { "schemaVersion": 1, "kind": "source-packages", - "sourceCommit": "aeab9f2c62f7eb212cba35a9762bbd780f85b98c", + "sourceCommit": "33ba4c6faff81bfe7fe90426ddaa0f168cbc3332", "nativeRevision": "b8deefc88b2c3e5f3c6158e364eb741df1924e1d", - "sourceTreeSha256": "1d04cebce91c1b3602fc31b38a7eac7ce7ed1aad073e379ccc2f1e7442d6c595", - "compilerSha256": "f7df23786c873b87f5d6f4c781f3cefe798a1ae0d1be46a873e31d0731b7da45", + "sourceTreeSha256": "66e9d69f32f72510f0f7b4aa9329562527f30a8f397634ec5c5f79c4dc66c55b", + "compilerSha256": "300a345e5a1cef4a1e241c3160c1aba0cec57c7b4b492d14e5b88ae90d34e949", "moduleVersions": { "miniverb": "0.2.3-experimental", "tapeecho": "0.1.9-experimental", @@ -50,7 +50,8 @@ "songbook": "0.1.0-experimental", "arr-rows": "0.2.0-experimental", "smart-reload": "0.1.0-experimental", - "defrost": "0.1.0-experimental" + "defrost": "0.1.0-experimental", + "bounce": "0.4.0-experimental" }, "files": { "dsp-packages.json": { @@ -86,8 +87,8 @@ "sha256": "6f4823e51ae30e79f387f2e83dc684c74c7547be223f2e4246c7d51096aa6df5" }, "requested-packages.json": { - "bytes": 1479316, - "sha256": "eabbb13105d5f6f4d97488d229c2f5d5ed60bc75056106dccfc1cbff99567023" + "bytes": 1508419, + "sha256": "dbfd1c800b9a8fb817ead0a5af382d0058b5d4c884cd57becc0793793315e6d7" }, "utility-packages.json": { "bytes": 11735,