238 lines
12 KiB
Markdown
238 lines
12 KiB
Markdown
```
|
||
Step 5 fix report — explicitly labeled Standard MIDI fallback
|
||
Date: 2026-10-19
|
||
|
||
CURRENT EXECUTABLE OBJECTIVE: IMPLEMENTED AND VERIFIED.
|
||
STEP 6 READINESS: YES, using Standard MIDI fallback only.
|
||
VERIFIED VENDOR MAPS: NONE; Eclips/Ray/SD3 mapping gates remain open.
|
||
NATIVE/APPLICATION ACCEPTANCE: UNVERIFIED; no native support claimed.
|
||
|
||
SCOPE AND PERSISTENT CHANGES
|
||
|
||
Implemented only the current objective at the top of prompts\step_5_fix.md,
|
||
following the amended continuation decision in prompts\plan.md and reviewing
|
||
report_5.md, existing contracts, profile/compiler code and tests. Historical
|
||
vendor-only stop wording was not treated as a blocker for standard fallback.
|
||
|
||
Created:
|
||
- src\riff_groove_builder\data\profiles\standard-midi-lead-v1.json
|
||
- src\riff_groove_builder\data\profiles\standard-midi-bass-v1.json
|
||
- src\riff_groove_builder\data\profiles\general-midi-percussion-v1.json
|
||
- tests\unit\test_standard_profiles.py
|
||
- prompts\report_5_fix.md
|
||
|
||
Updated:
|
||
- src\riff_groove_builder\schemas.py
|
||
- src\riff_groove_builder\profiles.py
|
||
- src\riff_groove_builder\errors.py
|
||
- src\riff_groove_builder\data\profiles\__init__.py
|
||
- tests\unit\test_profiles.py
|
||
- tests\unit\test_schemas.py
|
||
- tests\integration\test_contracts.py
|
||
- tests\integration\test_articulation_midi.py
|
||
- README.md
|
||
- docs\architecture.md
|
||
- docs\articulation-profiles.md
|
||
- docs\compatibility.md
|
||
- docs\formats\agp.md
|
||
|
||
No delegation, commits, later prompts, parser/composer, native codecs, service
|
||
wiring, dependency-manifest changes or dependency restoration. Existing server,
|
||
CLI, generic compiler, MIDI writer, synthetic fixtures and previous reports
|
||
were not edited. The Step 3 server still lists no profiles and returns its
|
||
unfinished generation error until Step 9; no service completion is claimed.
|
||
|
||
PUBLIC CONTRACT AND PROVENANCE
|
||
|
||
ProfileSummary.mapping_kind is precisely typed as instrument | standard_midi.
|
||
Its backward-compatible default is instrument. Existing fixtures/models retain
|
||
that default; serialized summaries expose the discriminator. JSON Schema and
|
||
model validation agree on the new enum and standard normal-only/native-false
|
||
conditions. Existing strict/extra-forbid/numeric validation is preserved.
|
||
|
||
Provenance adds status=standard_midi, distinct from verified and test_only.
|
||
Standard mapping kind and provenance must agree. Standard profiles require
|
||
public standard identity/range-or-voice facts and separately referenced
|
||
generator channel/action/state/timing/velocity policy. New standard_public
|
||
and generator_policy source kinds cannot satisfy verified vendor provenance.
|
||
Existing verified profiles still require complete official/lawful evidence.
|
||
Test-only identities remain excluded from production, with no fixture promotion.
|
||
|
||
Standard profiles are constrained to canonical normal, alias sustain,
|
||
latched/action-free behavior, explicit Standard/General MIDI product labels,
|
||
and no native capability. Unsupported techniques are explicit named errors.
|
||
Error wording no longer calls an arbitrary selected standard profile verified;
|
||
error codes and envelope shapes were not changed.
|
||
|
||
THREE PRODUCTION PROFILES, NOT VERIFIED INSTRUMENT MAPS
|
||
|
||
ID Standard/product version Mapping version Channel
|
||
standard.lead.v1 MIDI 1.0 standard-fallback-1 0
|
||
standard.bass.v1 MIDI 1.0 standard-fallback-1 1
|
||
standard.gm-drums.v1 General MIDI Level 1 standard-fallback-1 9
|
||
|
||
Exactly these three JSON resources are declared and packaged. Each is the unique
|
||
default for its part; explicit-ID selection remains available and defensive.
|
||
Pitched profiles accept inclusive legal MIDI note numbers 0–127, not asserted
|
||
Eclips/Ray playable ranges. The drum profile explicitly declares all 47 GM Level
|
||
1 sounds, note numbers 35–81. It is NOT the SD3 default map.
|
||
|
||
Channels 0/1 are generator routing policy; channel 9 explicitly selects GM's
|
||
human-numbered percussion channel 10. Intended instrument routing fields remain
|
||
eclips/ray/sd3, disambiguated by mapping_kind, product names and public limitations.
|
||
No installed vendor build or preset is asserted: target_build/mapping_preset
|
||
explicitly identify standards/policy and the absence of verified vendor setup.
|
||
|
||
All three profiles use normal/sustain only, no keyswitches, CC actions, pedal,
|
||
program/bank changes or GM initialization. Sustain is a normal-technique alias,
|
||
not CC64. Every undeclared requested technique fails rather than being simulated.
|
||
Single-interval dynamics use round(1 + 126 * intensity), ties to even:
|
||
0 -> 1, .25 -> 32, .5 -> 64, .75 -> 96, 1 -> 127.
|
||
These are positive MIDI velocities and generator policy, not vendor layers.
|
||
Exact score starts/durations are retained; no control pre-roll/tails are added.
|
||
Receiver configuration and drum choke behavior remain external.
|
||
|
||
EVIDENCE AND SOURCE IDS — CHECKED 2026-10-19
|
||
|
||
MIDI1-MESSAGES:
|
||
https://midi.org/summary-of-midi-1-0-messages
|
||
Official MIDI Association table exposes seven-bit note/velocity fields and
|
||
zero-based channels 0–15. Supports legal pitched-note numbers 0–127 and MIDI
|
||
message identity, not vendor playable ranges or routing defaults.
|
||
Used by standard.lead.v1 and standard.bass.v1 as standard_public provenance.
|
||
|
||
GM1-OVERVIEW:
|
||
https://midi.org/general-midi-level-1
|
||
Official MIDI Association overview establishes GM Level 1 and standardized
|
||
sound names, not acoustic timbre. It alone is not a numerical percussion map.
|
||
Used by standard.gm-drums.v1 for standard identity.
|
||
|
||
GM1-PERCUSSION-TABLE:
|
||
https://computermusicresource.com/GM.Percussion.KeyMap.html
|
||
Accessible Computer Music Resource teaching table identifies Vanderbilt
|
||
University's Blair School of Music, explicitly gives GM channel 10 and all
|
||
47 number-to-sound pairs 35–81. Independently checked core entries:
|
||
35 acoustic bass drum; 36 bass drum 1; 38 acoustic snare; 42 closed hi-hat;
|
||
44 pedal hi-hat; 46 open hi-hat; 49 crash cymbal 1; 51 ride cymbal 1;
|
||
81 open triangle. Tests independently transcribe/assert all 47 pairs.
|
||
Octave labels were not used to derive numeric notes.
|
||
Used by standard.gm-drums.v1 for percussion facts, never SD3 verification.
|
||
|
||
GENERATOR-POLICY-V1:
|
||
docs/articulation-profiles.md#standard-fallback-policy-v1
|
||
Separately documents routing, aliases, legal pitched acceptance, action-free
|
||
normal/sustain, timing and intensity policy. All three profiles reference it.
|
||
External facts are not misrepresented as evidence for generator-specific policy.
|
||
|
||
CORRECTED AMPLE DOCUMENTATION
|
||
|
||
The raw HTML of https://www.amplesound.net/en/manual.asp was checked in memory.
|
||
It exposes these exact relative public links under https://www.amplesound.net/en/:
|
||
- Main_Panel_Manual-AME.pdf
|
||
- Main_Panel_Manual-AMR.pdf
|
||
- Guitar_Riffer.pdf
|
||
- Guitar_Strummer.pdf
|
||
- Settings_and_CPCv2.pdf
|
||
|
||
Compatibility, profile, architecture/README status and AGP evidence documentation
|
||
were corrected. The earlier simplified extraction missed links; it did not prove
|
||
that the manual page contained only a domain label. Discovering public manuals
|
||
does not verify installed versions/maps, resolve octave-label interpretation
|
||
or establish native layouts. No manual or factory MIDI song was copied into
|
||
the repository, and no authenticated vendor access was attempted.
|
||
|
||
ACTUAL VALIDATION COMMANDS AND RESULTS
|
||
|
||
Environment: existing repository .venv, Windows AMD64, CPython 3.13.13.
|
||
No other Python/OS/plugin configurations are certified by these runs.
|
||
Commands below ran from the repository root. Repository-local scratch setup:
|
||
|
||
$scratch = New-Item -ItemType Directory -Force '.test-artifacts\scratch'
|
||
$env:TEMP = $scratch.FullName
|
||
$env:TMP = $scratch.FullName
|
||
$env:TMPDIR = $scratch.FullName
|
||
$env:PIP_NO_INDEX = '1'
|
||
|
||
Focused schema/profile/compiler/MIDI/wheel validation:
|
||
& '.\.venv\Scripts\python.exe' -m pytest tests\unit\test_profiles.py tests\unit\test_standard_profiles.py tests\unit\test_schemas.py tests\integration\test_contracts.py tests\integration\test_articulation_midi.py -q -s --tb=short
|
||
PASS: 453 passed in 4.24s; 0 failed, 0 skipped.
|
||
Includes installed and ZIP-wheel profile evidence, independent standard MIDI
|
||
events/read-back, defaults, all GM numbers, provenance and schema regressions.
|
||
|
||
Final full current suite, after all code corrections:
|
||
& '.\.venv\Scripts\python.exe' -m pytest -q --tb=short
|
||
PASS: 700 passed in 31.00s; 0 failed, 0 skipped; no warnings reported.
|
||
This is 48 additional cases over the previous 652-test suite. Existing generic
|
||
switch/CC/state/timing, contract, errors, writer, distribution and real stdio
|
||
skeleton regressions remain passing. Unsupported standard techniques/voices
|
||
fail honestly; no synthetic/vendor maps appear in the production registry.
|
||
|
||
& '.\.venv\Scripts\python.exe' -m ruff check .
|
||
PASS: All checks passed!
|
||
& '.\.venv\Scripts\python.exe' -m ruff format --check .
|
||
PASS: 41 files already formatted.
|
||
& '.\.venv\Scripts\python.exe' -m mypy
|
||
PASS: Success: no issues found in 23 source files.
|
||
& '.\.venv\Scripts\python.exe' -m pip check
|
||
PASS: No broken requirements found.
|
||
git --no-pager diff --check
|
||
PASS: no tracked-diff whitespace errors. Existing implementation files are
|
||
untracked in this worktree; Ruff checks cover the actual Python files too.
|
||
|
||
Additional final wheel-only verification:
|
||
& '.\.venv\Scripts\python.exe' -m pytest tests\integration\test_articulation_midi.py -k built_wheel_standard_registry -q -s --tb=short
|
||
PASS: 1 passed, 8 deselected in 2.73s; 0 failed, 0 skipped.
|
||
The test builds through an actual sdist/wheel using build --no-isolation,
|
||
installs the package offline/no-deps into its isolated target, and probes both
|
||
the installed target and wheel ZIP with Python -I -B from ROOT.parent, outside
|
||
the checkout. Both actual module locations were printed and validated; both
|
||
reported isolated=1 and exactly:
|
||
standard.bass.v1, standard.gm-drums.v1, standard.lead.v1
|
||
Probes check the exact JSON manifest, standard-only metadata, no synthetic
|
||
identity or verified vendor status, normal/sustain, default channels 0/1/9 and
|
||
core drum numbers. Full-suite distribution tests additionally build both
|
||
artifacts and import from a real isolated wheel venv outside the checkout.
|
||
These are packaging/MIDI tests, not target-application acceptance.
|
||
|
||
Editor problems checks reported no errors in all changed Python modules/tests.
|
||
Editor runTests found no discovered tests for the supplied absolute paths;
|
||
the actual repository-venv pytest runs above provide execution evidence instead.
|
||
|
||
ISSUES RESOLVED AND CLEANUP
|
||
|
||
- Initial strict typing identified an unannotated heterogeneous test-update
|
||
collection and a test assuming channel lived on EventTrack. Added a precise
|
||
list annotation and asserted actual per-event channels; no suppressions.
|
||
- Ruff found one 102-column error-message line; wrapped it without changing
|
||
its value. Final full suite and all static checks pass on the corrected code.
|
||
- Two candidate CMU table URLs returned 404; the accessible Vanderbilt teaching
|
||
table supplied the numerical evidence. Missing vendor maps were not treated
|
||
as a standard-fallback implementation blocker.
|
||
- Final owned articulation/distribution/MIDI/stdio workspace count: 0.
|
||
Root build directory: absent. Unique wheel/test workspaces clean themselves.
|
||
Existing venv, caches, dist products and repository scratch were preserved.
|
||
No background services were started.
|
||
|
||
REMAINING GATES AND FINAL DECISION
|
||
|
||
Standard MIDI fallback registry, selection, compilation, real SMF read-back and
|
||
wheel resources: VERIFIED and persistent.
|
||
|
||
Verified Eclips/Ray/SD3 maps: STILL OPEN. Exact installed products/builds,
|
||
libraries/presets/active maps, numeric playable ranges/controls, switching and
|
||
reset timing, vendor layers and target behavior require separate evidence.
|
||
Public manual links and GM facts do not verify those configurations.
|
||
|
||
Native AGP/SDP: STILL OPEN. Musical-content semantics, actual supported layouts,
|
||
lawful controlled exports/permissions and plugin/Cubase load/save/reload
|
||
acceptance remain unverified. No native files were serialized.
|
||
|
||
Actual application acceptance: NOT RUN, not counted as a passing test or skip.
|
||
Future generation results must expose standard-only identity and warnings;
|
||
the unchanged server remains development-only until Step 9 service wiring.
|
||
|
||
Ready for Step 6: YES, STANDARD FALLBACK ONLY, as permitted by the amended plan.
|
||
No later prompt or implementation was started. This is not completion of the
|
||
vendor mapping, native, application, service or full-project gates. Stop here.
|
||
```
|