Repository navigation
Improvement: a shared scale file for the Octatrack SDK, with its host test - #1631
Merged
Merged
Conversation
sdk/machines/octatrack/modwerk_scale.s with include/modwerk_scale.h: octabam's 52-ID scale masks and modwerk_scale_snap(note, id, root), Scale Quantizer's rule (qz_scale_mask's rotation and qz_msnap's search, ties down), stateless and PC-relative so the base and card builds link the same file. A 25-byte table maps Scale Quantizer's saved SCALE 0..24 to the catalogue IDs with the same masks (1..7 equal, 8..24 differ). The masks are re-vendored from sambanks/octabam modules/scales at 755a02ac: scales.s and octabam's LICENSE unchanged under vendor/octabam-scales/, pinned by sdk/imports/octabam-scales-755a02ac.json through sdk:imports:check. sdk/tests/test_shared_scale.py: the table equals the vendored sc_masks; the translation maps every one of the 24 to an identical mask; with ColdFire binutils and Unicorn, the shared snap equals Scale Quantizer's own qz_msnap (assembled from the module's sources) for 24 x 12 x 128 cases and octabam's sc_snap for 52 x 12 x 128; the file assembles to the same bytes for -mcpu=5475 and -mcpu=54455 at three addresses, passes the MCF54455 codegen check, and a C runtime package calls it through the header.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements the shared scale file from #1145 as an independent SDK change. The base rows, saved bytes and
ev_scale_snapwill be a separate pull request.sdk/machines/octatrack/modwerk_scale.sandinclude/modwerk_scale.hprovide octabam's 52-ID mask table andmodwerk_scale_snap(note, id, root). It returns the nearest scale note, choosing the lower note on a tie, with the C calling convention and PC-relative table access without stock addresses.modwerk_scale_from_quantizer[]maps all 24 saved Scale Quantizer IDs to catalogue IDs with identical masks, preserving the saved scale choice.scales.sand MIT licence from sambanks/octabam revision755a02acare retained undervendor/octabam-scales/, with an import record. The Octatrack SDK guide and changelog describe the interface.sdk/machines/octatrack/elekloader/. Nothing links this routine yet; it adds no base input, event index or module change. The FM Synth/Scale Quantizer card-build conflict remains unchanged.1737f320b334c01a9af88f33f9863d1111c1ae7dis merged without rebasing. Full readiness on the precedingeaae18b9snapshot passes all 359 Vitest files: 3,052 tests passed and eight skipped. Typecheck, lint, application bundle and generated-file checks pass.qz_msnap(36,864 cases) and octabam'ssc_snap(79,872 cases). Import checking passes for 159 files and five editable guides.dsp_packages.pystill names removed modulation/spectrum entries. Jannik confirmed both repairs and is folding them into Octatrack base: DSP hook chains, so several packaged DSP machines share a hook site #1418 with one base update; Fix: refresh stale Octatrack SDK check inputs #1585 was closed for that reason. This SDK PR is independent of that repair.1737f320bmerge changes the base status display and patch-version naming, not this SDK routine. Its affected host tests pass (two cases), and its UI/version tests pass (12 cases in three files). A private default-layout base 0.7.1 reproduction matches the committed package, fill, source and binding inputs and browser/native output. This is a scoped default-layout check; the separate full seven-layout reproduction passed on base 0.7. The unchanged full queue was not repeated after this merge.Related to #1145