feat: AnaMark .tun microtuning (Load / Reset / host state) - #41
Open
Megagoth1702 wants to merge 4 commits into
Open
feat: AnaMark .tun microtuning (Load / Reset / host state)#41Megagoth1702 wants to merge 4 commits into
Megagoth1702 wants to merge 4 commits into
Conversation
Load .tun files into a double-buffered pitch map (A4 / master tune policy), wire Open303 note frequencies from the active table, and add TuningFileControl under the Tuning knob (Load, Reset, scale name, dim when custom). Includes smoke test, README, and build ignore hygiene.
Fail closed on malformed Exact/Functional entries instead of silently skipping bad values or falling back to Functional when Exact is present but broken. Surface specific messages (line number + cause) in the load failure dialog, and extend smoke tests for non-numeric notes, bad BaseFreq/InitEqual, incomplete Exact, and no Exact-to-Functional fallback.
Prepare the AnaMark TUN feature for a clean PR onto midilab/jc303 develop. Resolve trivial dual-ownership conflicts by keeping both LFO (dfl_LFO) and tuning (TuningFileLoader / TuningTable) sources and includes. Pitch LFO remains a multiplier on oscFreq after noteToHz table lookup.
|
noice! 🤘 |
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.
Summary
Adds AnaMark
.tunmicrotuning support to JC-303:.tunfile into a validated 128-note Hz table.tuncontent, with a line-level error dialog (no silent accept)UI
Controls sit under the Tuning knob (above the MOD strip) inside the existing 930×363 amadeusp skin (no editor size change).
[Reset]left ·[Load]center · scale name rightWhile a custom map is active:
Behaviour / formats
Supported: AnaMark
.tunv2 only (no Scala.scl/.kbm, no MTS-ESP).[Exact Tuning]presentBaseFreq+ all 128Note n = <cents>. Non-numeric / incomplete → error. No fallback to Functional if Exact is present but broken.InitEqual = (refNote, refHz)seeds 12-TET; optionalNote T = "#=B %C"overrides in file order (base chaining). Malformed lines → error, not silent skip.Conversion: cents → Hz via
f = BaseFreq * 2^(cents/1200)(Exact) or chained Functional bases.Technical notes
src/dsp/tuning/(TuningTable,TuningFileLoader, smoke test).noteToHz()against a double-buffered 128-entry bank (installPitchMap). ET is just another full map.CustomTuning(active,name,freqsCSV of 128 Hz, optionalpath). Malformed payloads fall back to clean 12-TET.develop): destinations filter / volume / pitch still apply ingetSample. Pitch LFO is a frequency multiplier onoscFreqafter table lookup + slew — works with custom maps and 12-TET.JC303/J303, full format set); private builds may pass-DJC303_PRODUCT_NAME=…,-DJC303_PLUGIN_CODE=…,-DPLUGIN_FORMATS=….Testing
develop— BUILD OK.tun→ scale name + audible pitch changesrc/dsp/tuning/tuning_smoke_test.cppCovers Exact complete/incomplete/non-numeric, bad BaseFreq/InitEqual, no Exact→Functional fallback, Functional init/override/chain/garbage, CSV round-trip, validation — all passed after develop merge
Out of scope / known limits
.scl/.kbmdevelopalready ships (this PR does not add LFO widgets)Merge note for maintainers
develop(merge commit0597f0c). Merging this PR intodevelopshould be conflict-free at tip8e16c3e.dfl_LFO.cppandTuningFileLoader.cpp; Open303 includes bothdfl_LFO.handTuningTable.h.