From 6b8b7a859095e76cfc141664a7a4fc3acb235b5a Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 14 May 2026 15:49:21 +0100 Subject: [PATCH] Retune DX7 max feedback brightness --- docs/dx7-calibration-plan.md | 5 +++++ src/AquariumSynth.Dsl/Dx7SysEx.cs | 2 +- state/evidence.jsonl | 1 + state/memory.json | 6 +++--- state/scratch.md | 16 ++++++++++++++++ state/spine.yaml | 17 +++++++++++++++-- tests/AquariumSynth.Dsl.Tests/Dx7SysExTests.cs | 2 +- 7 files changed, 42 insertions(+), 7 deletions(-) diff --git a/docs/dx7-calibration-plan.md b/docs/dx7-calibration-plan.md index 3a66626..e271e31 100644 --- a/docs/dx7-calibration-plan.md +++ b/docs/dx7-calibration-plan.md @@ -125,6 +125,11 @@ math is still fake in the places that matter perceptually. Hz by the graph base frequency. This restores the low fixed-frequency carrier/modulation buzz for op1/op3 instead of flattening the voice into the wrong drone. + - `ANLGSYN 1` also exposed that the previous max-feedback value was too tame + for audible community patches. DX7 feedback value `7` now lowers to + Aquarium feedback `2.2`, while feedback value `5` remains at `0.19` for + the hard PRC target. The hotter value restores much more of the 1.2-5 kHz + buzzing-harmonic band, with envelope/RMS still imperfect. - A first survey also tried `DX1 LEAD B`, `MELLOWSOLO`, and `RES SYNTH1`; they were left out of the passing gate because listening and log-mel/zero-crossing evidence do not justify calling them parity yet. diff --git a/src/AquariumSynth.Dsl/Dx7SysEx.cs b/src/AquariumSynth.Dsl/Dx7SysEx.cs index a14ffb5..d7fd5c4 100644 --- a/src/AquariumSynth.Dsl/Dx7SysEx.cs +++ b/src/AquariumSynth.Dsl/Dx7SysEx.cs @@ -865,7 +865,7 @@ public static class Dx7SysEx private static readonly float[] FeedbackAmounts = [ - 0f, 0.01f, 0.02f, 0.05f, 0.10f, 0.19f, 0.38f, 0.66f + 0f, 0.01f, 0.02f, 0.05f, 0.10f, 0.19f, 0.38f, 2.2f ]; private static readonly int[] LevelLookup = diff --git a/state/evidence.jsonl b/state/evidence.jsonl index cebb669..ca1af0b 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -49,3 +49,4 @@ {"kind":"dx7_community_voice_parity","lesson":"Actual public-domain analog1.syx community voices are useful broader probes, but listening rejected the first loose gate. ANLGSYN 1, RES SYNTH1, DX1 LEAD B, and MELLOWSOLO should remain pressure until their timbre/zero-crossing mismatch is understood. Only Mooger and fixed Piano Bass are currently defensible rendered community parity targets.","source":"Community DX7 analog1.syx survey on 2026-05-14"} {"kind":"dx7_voice_transpose","lesson":"Piano Bass in analog1.syx proved imported DX7 voices must lower the voice transpose byte into graph frequency. Transpose 24 is neutral; transpose 12 lowers MIDI note 60 to 130.8128 Hz. Hardcoding 261.6256 made Piano Bass a full octave too high. After the fix, Piano Bass improves to log-mel 0.16180529, zero-crossing 0.905511, score 0.64267576. Do not call the broader analog1.syx survey passing; only Mooger and fixed Piano Bass are currently defensible.","source":"Piano Bass listening correction on 2026-05-14"} {"kind":"dx7_fixed_frequency","lesson":"ANLGSYN 1 proved DX7 fixed-frequency operators must lower as absolute Hz divided by the graph base frequency, not as note ratios. Dexed fixed mode uses a log-frequency formula; op1 fixed 0/0 is about 1 Hz and op3 fixed 0/8 detune 14 is about 1.207 Hz, yielding ratios 0.007615 and 0.009227 against the transposed 130.8128 Hz graph base. This restores the low buzzing modulation and improves ANLGSYN 1 to log-mel 0.19427659, zero-crossing 0.94662774, score 0.659334.","source":"ANLGSYN 1 listening correction on 2026-05-14"} +{"kind":"dx7_max_feedback","lesson":"ANLGSYN 1 still sounded too 'woooh' after fixed-frequency lowering because high-band buzz was missing. Route-index sweeps did not help; increasing only DX7 feedback value 7 from 0.66 to 2.2 restored much more 1.2-5 kHz energy while leaving feedback value 5 at 0.19 for PRC. Latest ANLGSYN 1: log-mel 0.17553389, centroid 0.9519112, zero-crossing 0.90904, score 0.6448498. Envelope/RMS worsened, so this is a timbre correction, not final ANLGSYN parity.","source":"ANLGSYN 1 max-feedback listening correction on 2026-05-14"} diff --git a/state/memory.json b/state/memory.json index 6627603..4acfd2c 100644 --- a/state/memory.json +++ b/state/memory.json @@ -75,7 +75,7 @@ }, "dx7_reference_path": { "status": "DX7 SysEx parser extracts voice edit buffers, packed voices, packed 32-voice banks, six operators, envelopes, algorithm, feedback, oscillator sync, LFO, transpose, voice name, checksum validation, ReferencePatch features, algorithm topology from the reverse-engineered OPS algorithm ROM table, envelope-to-ADSR approximations, measured carrier output amplitude, isolated two-op modulation route scale, summed/cascaded route scale, calibrated feedback amount table, ratio detune lowering, voice transpose lowering, fixed-frequency operator lowering, ROM COM output compensation, topology-aware route lowering, staged operator envelopes with per-segment curves, raw and block-interpolated DX7 envelope tracing, applied-envelope curved lowering, two Aquarium DSL rebuild attempts, first-class OperatorGraph support, public-domain SysEx fixture coverage, dexed-py reference rendering, project-authored Dexed patch rendering, Aquarium candidate rendering through Faust-generated C#, one thresholded rendered parity test for analog1.syx voice 13, a hard PRC SYNTH1 parity probe with listening WAV artifacts and log-mel <= 0.18, project-authored algorithm-8 summed-stack/cascade/summed-pair parity, rendered community parity for Mooger, Piano Bass, and ANLGSYN 1, and renderable delayed operator feedback.", - "lesson": "Algorithm 32's additive six-carrier shape maps cleanly to six Aquarium voices. Algorithm 8 justified OperatorGraph: operators, modulation edges, carriers, and feedback belong to a graph authority, not Voice fields. The first rendered parity rung is behavioral and sine-like, not exact DX7 operator execution. A harder algorithm-8 target exposed that feedback must be delayed recursion in Faust, not a direct cyclic self-reference. Static DX7 output-level approximation helped import/rebuild math but was mathematically wrong for carrier amplitude. A single-carrier Dexed sweep shows carrier amplitude follows 2^((outputLevel - 99) / 8). Isolated two-op DX7 FM maps full-level modulation to Aquarium route index 6.275; summed/cascaded algorithm-8 branches now use 6.0 after PRC listening, a project-authored combined stack probe, and split cascade/summed-pair probes showed lower values were under-bright. Feedback lowers through a fitted table instead of PRC-local constants. Ratio-mode detune belongs in operator frequency lowering. DX7 voice transpose belongs in graph base frequency: transpose 24 is neutral, transpose 12 lowers MIDI note 60 to 130.8128 Hz. DX7 fixed-frequency operators are absolute Hz, not note ratios; ANLGSYN 1 proved fixed op1/op3 must lower to ratios around 0.007615/0.009227 against a 130.8128 Hz graph base to preserve low buzzing modulation. ROM COM values carry output-count compensation; because the amplitude curve was fitted against algorithm 32, DX7 carriers scale by 6/(COM+1). Project-authored Dexed patch rendering now gives lawful calibration targets. Reusing the operator output curve for EG levels was tested and cut because it failed hard-target log-mel. Direct envelope tracing shows current linear `env=rl` cannot express DX7 EG spike/drop behavior. Dexed-style audio samples EG once per 64-sample block and interpolates applied gain, so raw EG parity alone is not audio parity. Staged operator envelopes now support linear/exponential segments and supranormal levels. `ApproximateAppliedRateLevelEnvelope` uses that surface and now picks the first near-peak before gate so slower rising modulators hit early instead of swelling late. PRC log-mel is down to 0.13874426 with RMS at unity; remaining community voices still expose timbre/zero-crossing mismatch and must not be called passing.", + "lesson": "Algorithm 32's additive six-carrier shape maps cleanly to six Aquarium voices. Algorithm 8 justified OperatorGraph: operators, modulation edges, carriers, and feedback belong to a graph authority, not Voice fields. The first rendered parity rung is behavioral and sine-like, not exact DX7 operator execution. A harder algorithm-8 target exposed that feedback must be delayed recursion in Faust, not a direct cyclic self-reference. Static DX7 output-level approximation helped import/rebuild math but was mathematically wrong for carrier amplitude. A single-carrier Dexed sweep shows carrier amplitude follows 2^((outputLevel - 99) / 8). Isolated two-op DX7 FM maps full-level modulation to Aquarium route index 6.275; summed/cascaded algorithm-8 branches now use 6.0 after PRC listening, a project-authored combined stack probe, and split cascade/summed-pair probes showed lower values were under-bright. Feedback lowers through a fitted table instead of PRC-local constants; ANLGSYN 1 showed max feedback value 7 needs a hotter Aquarium amount 2.2 to recover buzzy high bands, while value 5 remains 0.19 for PRC. Ratio-mode detune belongs in operator frequency lowering. DX7 voice transpose belongs in graph base frequency: transpose 24 is neutral, transpose 12 lowers MIDI note 60 to 130.8128 Hz. DX7 fixed-frequency operators are absolute Hz, not note ratios; ANLGSYN 1 proved fixed op1/op3 must lower to ratios around 0.007615/0.009227 against a 130.8128 Hz graph base to preserve low buzzing modulation. ROM COM values carry output-count compensation; because the amplitude curve was fitted against algorithm 32, DX7 carriers scale by 6/(COM+1). Project-authored Dexed patch rendering now gives lawful calibration targets. Reusing the operator output curve for EG levels was tested and cut because it failed hard-target log-mel. Direct envelope tracing shows current linear `env=rl` cannot express DX7 EG spike/drop behavior. Dexed-style audio samples EG once per 64-sample block and interpolates applied gain, so raw EG parity alone is not audio parity. Staged operator envelopes now support linear/exponential segments and supranormal levels. `ApproximateAppliedRateLevelEnvelope` uses that surface and now picks the first near-peak before gate so slower rising modulators hit early instead of swelling late. PRC log-mel is down to 0.13874426 with RMS at unity; remaining community voices still expose timbre/zero-crossing mismatch and must not be called passing.", "next": "Use the now-validated algorithm-8 route scale, transpose lowering, and fixed-frequency lowering as fixed inputs while isolating remaining community-voice timbre mismatch, then expand to broader public-domain banks." }, "note_and_envelope_model": { @@ -91,7 +91,7 @@ }, "last_verified": { "command": "AQUARIUM_DX7_PYTHON= dotnet test AquariumSynthCSharp.slnx --no-restore", - "result": "73 passed; ANLGSYN 1 fixed-frequency lowering restores low buzzing modulation and passes focused parity", - "commit": "pending DX7 fixed-frequency fix" + "result": "73 passed; ANLGSYN 1 max-feedback lowering restores much more high-band buzz while PRC remains passing", + "commit": "pending DX7 max-feedback retune" } } diff --git a/state/scratch.md b/state/scratch.md index 4537619..8f7cc5a 100644 --- a/state/scratch.md +++ b/state/scratch.md @@ -15,6 +15,22 @@ Doctrine update: Completed this slice: +- Retuned DX7 max-feedback lowering for `ANLGSYN 1`. Route-index sweeps did not + materially improve the missing high-band buzz; hotter feedback did. +- Changed only feedback value `7` from `.66` to `2.2`. Feedback value `5` + remains `.19`, so the hard PRC target keeps its existing feedback amount. +- Fresh `ANLGSYN 1` with `feedback=2.2`: log-mel `.17553389`, envelope + `.16478956`, zero-crossing `.90904`, centroid `.9519112`, score `.6448498`. + This improves spectral buzz while making envelope/RMS less tidy. +- Band evidence versus the previous fixed-frequency candidate: + - 1.2-2.5 kHz candidate/reference energy: `.008 -> .656` + - 2.5-5 kHz candidate/reference energy: near zero -> `.321` +- Verified with bundled Python/dexed-py: + `AQUARIUM_DX7_PYTHON= dotnet test AquariumSynthCSharp.slnx --no-restore`: + 73 passed. + +Previous slice: + - Fixed DX7 fixed-frequency operator lowering after `ANLGSYN 1` exposed the missing buzzing modulation. The old lowering treated fixed mode as a fake note ratio, so fixed carriers op1/op3 became `0.5` ratio against the graph diff --git a/state/spine.yaml b/state/spine.yaml index 9223521..62c8d59 100644 --- a/state/spine.yaml +++ b/state/spine.yaml @@ -1,6 +1,6 @@ project: AquariumSynthCSharp spine_version: 1 -updated: 2026-05-14T14:40:00+01:00 +updated: 2026-05-14T14:51:00+01:00 prime_directive: > Build coherent synth machinery. References exist to reveal missing structure, @@ -47,7 +47,7 @@ live_invariants: - DX7 operator output level approximation belongs in reference import/rebuild helpers, not the generic DSL model. - DX7 carrier output amplitude follows the measured `2^((outputLevel - 99) / 8)` curve; do not restore the old internal-level proxy. - DX7 isolated two-operator modulation uses Aquarium route index `6.275` for full-level modulators; do not apply that blindly to cascaded stacks before algorithm output compensation is modeled. - - DX7 feedback lowers through `Dx7SysEx.OperatorFeedbackAmount`; do not restore PRC-local `feedback * constant` folklore. + - DX7 feedback lowers through `Dx7SysEx.OperatorFeedbackAmount`; feedback value 5 remains 0.19 for PRC, while feedback value 7 is much hotter at 2.2 to restore community-patch buzz. Do not restore PRC-local `feedback * constant` folklore. - DX7 ratio-mode detune lowers through `Dx7SysEx.OperatorFrequencyRatio`; do not silently drop detune from operator graph scripts. - DX7 voice transpose lowers through `Dx7SysEx.NoteFrequencyHz`; transpose 24 is neutral, 12 is one octave down. Do not hardcode `freq=261.6256` for imported voices. - DX7 fixed-frequency operators lower through `Dx7SysEx.FixedOperatorFrequencyHz` as absolute Hz divided by the graph base frequency; do not treat fixed mode as a note ratio. @@ -142,6 +142,19 @@ next_agent_start_here: - "dotnet test AquariumSynthCSharp.slnx --no-restore" completed_slices: + - date: 2026-05-14 + summary: > + Retuned DX7 max-feedback lowering after listening found `ANLGSYN 1` still + sounded like `woooh` instead of Dexed's buzzier `deeeh`. Route-index + sweeps did not help; increasing only DX7 feedback value 7 from 0.66 to + 2.2 restored high-band energy while leaving feedback value 5, and + therefore PRC's feedback amount, unchanged. For `ANLGSYN 1`, log-mel + improves from 0.19427659 to 0.17553389 and centroid ratio from 0.9182808 + to 0.9519112. Band evidence: 1.2-2.5 kHz candidate/reference energy + rises from 0.8% to 65.6%, and 2.5-5 kHz from near zero to 32.1%. + Envelope/RMS are still imperfect, so this is a timbre correction rather + than the final word on ANLGSYN. + verification: "AQUARIUM_DX7_PYTHON= dotnet test AquariumSynthCSharp.slnx --no-restore: 73 passed" - date: 2026-05-14 summary: > Fixed DX7 fixed-frequency operator lowering after listening caught diff --git a/tests/AquariumSynth.Dsl.Tests/Dx7SysExTests.cs b/tests/AquariumSynth.Dsl.Tests/Dx7SysExTests.cs index 6844978..8c856a7 100644 --- a/tests/AquariumSynth.Dsl.Tests/Dx7SysExTests.cs +++ b/tests/AquariumSynth.Dsl.Tests/Dx7SysExTests.cs @@ -255,7 +255,7 @@ public sealed class Dx7SysExTests { Assert.Equal(0, Dx7SysEx.OperatorFeedbackAmount(0)); Assert.Equal(0.19f, Dx7SysEx.OperatorFeedbackAmount(5)); - Assert.Equal(0.66f, Dx7SysEx.OperatorFeedbackAmount(7)); + Assert.Equal(2.2f, Dx7SysEx.OperatorFeedbackAmount(7)); } [Fact]