Cubase-MCP-GAJ3T.MusicGen.R.../prompts/step_4_fix.md

27 KiB

Step 4 correction: Active iteration 4, additional evidenced capabilities

Only "Correction iteration 4" at the end of this prompt is active. Earlier iterations below are retained as completed history, not instructions to repeat or prohibitions on already accepted Steps 5, 8 and supported Step 9.

Archived iteration 2: Extensible instrument catalog

Status: catalog extension accepted; Step 5 MIDI writer subsequently accepted.

Objective and review findings

The orchestrator read the Step 4 report, inspected profile validation, embedded catalog handling and event planning, and independently ran the Release build/tests: 485 passed, 0 failed, 0 skipped. Locked restore also passed.

Generic infrastructure is implemented and tested. Full Step 4 is not accepted: the production profile catalog is empty. Official Ample manuals and the owner's Eclipse screenshots now provide partial source evidence, but complete numeric/ timing and installed-version mappings are not established.

The owner has now explicitly requested ABJ, AGLP, AGM, AGT, AME and AMR, with the ability to add instruments later. Execute the catalog extension below now. Missing production mappings do NOT block metadata/abstraction work. They DO block falsely declaring these instruments playable or Step 4 fully accepted. This iteration replaces the earlier evidence-only correction objective.

Files and existing contracts

Read before editing:

prompts\plan.md
prompts\step_4.md
prompts\report_4.md
docs\format-compatibility.md
docs\articulation-mappings.md
src\GAJ3T.MusicGen.RiffGrooveBuilder.Core\Articulations\InstrumentProfile.cs
src\GAJ3T.MusicGen.RiffGrooveBuilder.Core\Articulations\ArticulationRule.cs
src\GAJ3T.MusicGen.RiffGrooveBuilder.Core\Articulations\InstrumentProfileValidator.cs
src\GAJ3T.MusicGen.RiffGrooveBuilder.Core\Articulations\ArticulationPlanner.cs
src\GAJ3T.MusicGen.RiffGrooveBuilder.Generation\Profiles\InstrumentProfileCatalog.cs

Create/modify these directly related surfaces:

src\GAJ3T.MusicGen.RiffGrooveBuilder.Core\Instruments\InstrumentDefinition.cs
src\GAJ3T.MusicGen.RiffGrooveBuilder.Core\Articulations\InstrumentProfile.cs
src\GAJ3T.MusicGen.RiffGrooveBuilder.Core\Articulations\InstrumentProfileValidator.cs
src\GAJ3T.MusicGen.RiffGrooveBuilder.Generation\Instruments\InstrumentCatalog.cs
src\GAJ3T.MusicGen.RiffGrooveBuilder.Generation\Instruments\instruments.json
src\GAJ3T.MusicGen.RiffGrooveBuilder.Generation\GAJ3T.MusicGen.RiffGrooveBuilder.Generation.csproj
src\GAJ3T.MusicGen.RiffGrooveBuilder.Generation\Profiles\InstrumentProfileCatalog.cs
tests\GAJ3T.MusicGen.RiffGrooveBuilder.UnitTests\Instruments\InstrumentCatalogTests.cs
tests\GAJ3T.MusicGen.RiffGrooveBuilder.UnitTests\Articulations\
tests\GAJ3T.MusicGen.RiffGrooveBuilder.IntegrationTests\Instruments\InstrumentCatalogPipelineTests.cs
tests\GAJ3T.MusicGen.RiffGrooveBuilder.IntegrationTests\Articulations\
docs\articulation-mappings.md
docs\format-compatibility.md
README.md
prompts\report_4.md

Small directly needed result/validation/JSON helper files are allowed. No new packages or projects. Preserve the existing composition/event planner behavior; update synthetic test factories for any explicit profile-contract change. Do not modify orchestrator prompts/plan or create any later step prompt.

Active catalog-extension implementation

Initial target definitions

Add exactly these identities to a separate embedded instrument catalog:

ID Code Display name Role Official documentation
ample-abj ABJ Ample Bass J Bass https://www.amplesound.net/en/Main_Panel_Manual-ABJ.pdf
ample-aglp AGLP Ample Guitar LP Lead https://www.amplesound.net/en/Main_Panel_Manual-AGLP.pdf
ample-agm AGM Ample Guitar M Lead https://www.amplesound.net/en/Main_Panel_Manual-AGM.pdf
ample-agt AGT Ample Guitar T Lead https://www.amplesound.net/en/Main_Panel_Manual-AGT.pdf
ample-ame AME Ample Metal Eclipse Lead https://www.amplesound.net/en/Main_Panel_Manual-AME.pdf
ample-amr AMR Ample Metal Ray5 Bass https://www.amplesound.net/en/Main_Panel_Manual-AMR.pdf
toontrack-sd3 SD3 Superior Drummer 3 Drums https://www.toontrack.com/manual/superior-drummer-3/

Ample names/manual URLs were confirmed through the rendered official website. These are requested identities, not proof of installed versions or executable mapping support. Keep the existing three roles; acoustic guitars occupy the existing Lead/guitar slot. No new rhythm/chord/strum patterns or extra track slots.

Minimal abstractions

  • InstrumentDefinition: immutable vendor-neutral ID, vendor, product code, display name, role and documentation URL. Vendor is data, not an enum listing individual manufacturers/products. Do not add instrument-specific subclasses.
  • InstrumentCatalog: strict, immutable, deterministic embedded JSON loading, lookup and role filtering. Reject malformed/null/unknown/duplicate fields, duplicate IDs, invalid roles and invalid required identity/URL values. A malformed resource must never become a successful empty catalog.
  • Add a required InstrumentId to InstrumentProfile and validate its ID shape. Profiles remain versioned mappings; definitions do not need fabricated product versions, playable ranges, switches, CCs or native capabilities.
  • Update InstrumentProfileCatalog to bind each loaded profile to a declared instrument. Reject dangling IDs, role mismatches and mismatched product identities. Retain existing verified/synthetic/unverified validation. Keep strict JSON and no silent default/fallback behavior.
  • Preserve the existing role/profile-ID selection API. Add an explicit instrument-based selection path; diagnostics distinguish unknown instrument, known instrument without a verified mapping, wrong-instrument/wrong-role profile and multiple candidate mappings without an explicit choice. Never select the first candidate or substitute another bass/guitar.
  • Expose instrument metadata alongside derived mapping availability, either through a small catalog-result API or joined catalog view. Use mapping_unavailable / profile_available; these are not native-format or installed-plugin acceptance flags.
  • Keep Profiles\instrument-profiles.json honestly empty. Do not synthesize mapping values just to populate six instruments. Synthetic mapped fixtures belong only in tests and are not shipped or returned as production support.
  • Current production resources should have seven identities and zero verified mapping profiles. The MCP registry remains empty; final discovery/tool integration still belongs to Step 8, using the updated plan contract.

Extensibility boundary

Adding another instrument with existing mechanisms should require only a JSON definition plus an evidence-backed profile, not a product-name switch, enum member, subclass or planner change. Prove this with a test-only extra target. Initially JSON is embedded and changes require build/publish. Do not add runtime profile directories, hot reload, VST scanning/loading, reflection plugins, external services or a configuration framework.

Keep native writer selection format-based in the architecture. No writer implementation or speculative IAmpleVst/per-instrument export hierarchy is needed in this step. Reuse actual existing models/helpers rather than creating parallel profile types or unused interfaces.

Documentation

Update README and existing mapping/compatibility documents to list the six requested Ample targets plus SD3, explain identity versus verified mapping, show how to add an instrument as data, state the rebuild requirement and clearly separate mapping availability from native/application compatibility. Do not imply the folder screenshot provides versions, directory paths or maps. Do not assume identical articulations across all Ample products.

Remaining production mapping evidence (not a catalog-work prerequisite)

Before admitting actual mappings, obtain lawfully usable, version-specific evidence:

  1. Exact product/version contract and relevant settings for each selected Ample target; use official documentation first, not an owner-reconstructed chart.
  2. Exact SD3 version, content library, selected MIDI map and any custom overrides.
  3. Authorized mapping sources/records and permission for any checked-in fixture data; no audio samples, vendor libraries or unrelated user projects.
  4. Absolute playable and control note numbers, ranges and channel behavior; octave labels alone are insufficient.
  5. Every supported articulation's keyswitch pitch/velocity, advance and duration, latching/momentary behavior, initial state and releases/resets.
  6. Verified velocity-layer boundaries and any required velocity transformation, plus CC numbers, values, combinations and complete state requirements.
  7. Actual verification records establishing the mapping behavior in the named product/version. A pasted flag saying "Verified" is not evidence.

Record source, product/version, authorization and verification procedure for each mapping. Do not search personal/vendor directories or install products. If necessary evidence remains unavailable, leave production profiles empty, complete the actionable catalog work/tests, report the gate separately and stop.

AGP/SDP schema/fixture rights and exact extension/load semantics remain separate future native gates. Production MIDI mapping evidence does not satisfy them.

Future profile admission after evidence arrives (not this iteration)

  • Add versioned evidence-backed profiles for the requested instruments/roles. Use the actual verified values, not numbers from synthetic tests.
  • Preserve strict catalog loading, validation and explicit selection failures. Specify a default only where the owner/evidence establishes an unambiguous authorized choice; otherwise require the explicit profile ID.
  • Ensure the documented text example's generated pitches, velocity and articulation intentions are representable. If not, report the conflict and seek an explicit reviewed resolution rather than silently altering intent.
  • Keep generic synthetic regression tests separate from production evidence tests. Production registration must still reject synthetic/unverified data.
  • Do not expose the public generation tools or write MIDI/native files yet. Those remain future steps, not corrections to this gate.

Required catalog-extension tests and validation

Unit tests:

  • Exact seven IDs/names/codes/roles and source URLs; four Lead, two Bass, one Drums; immutable ordering/filtering and unrelated-cwd loading.
  • A test-only additional instrument and multiple versioned profiles bind and select through the same catalog APIs, with no product-specific engine logic.
  • Malformed resources/fields, duplicate identities, missing/null identity values, invalid URLs/roles/IDs, dangling profile instrument IDs and product/role mismatches fail explicitly.
  • Known-unmapped versus unknown instrument diagnostics; wrong-instrument, wrong-role, unknown profile, explicit selection and ambiguous mappings.
  • Seven declared production identities do not make the empty production mapping catalog playable; synthetic/unverified entries remain rejected.
  • Preserve existing profile/event-planner tests, adjusted only for the new explicit instrument-ID contract. Do not weaken validations.

Integration tests: load the actual embedded catalogs from an unrelated cwd, join identity/availability, inspect all seven requested targets, and verify explicit unavailable-mapping diagnostics without fake output. Retain real MCP process tests and synthetic articulation pipeline regressions.

Future production mapping tests and actual application verification remain required when those profiles are admitted, but are not catalog-extension tests.

Run targeted articulation tests, then:

dotnet build .\GAJ3T.MusicGen.RiffGrooveBuilder.slnx -c Release --no-restore
dotnet test .\GAJ3T.MusicGen.RiffGrooveBuilder.slnx -c Release --no-build
dotnet restore .\GAJ3T.MusicGen.RiffGrooveBuilder.slnx --locked-mode

Report and stop condition

When complete, write your end-of-step report to ./prompts/report_4.md including: what was implemented, test results (pass/fail with details), any issues encountered, and whether you're ready for the next step

Preserve the existing report's infrastructure history and add an explicitly identified "Correction iteration 2: instrument catalog extension" section. The entire resulting report must remain inside one plain triple-backtick fence. Include evidence references, actual production verification, changed files, commands/exit codes/counts, unresolved limitations and separate infrastructure/full-Step-4 readiness conclusions.

Report catalog-extension readiness separately from full Step 4 production readiness. The extension can pass while full Step 4 remains FALSE / BLOCKED. Include changed files, exact commands/exit codes, test counts, contract migration, extensibility proof and unresolved mappings. Stop for orchestrator review; never start Step 5 yourself.


Correction iteration 3: Documentation-backed profiles

Objective and baseline

The owner has requested continuation. Step 5 now writes and reads actual MIDI, with 663 passing tests. The seven-identity catalog and shared planning engine exist; production profiles remain empty. Research the published default mappings and admit only profiles supported by the evidence. Do the documentation work yourself rather than requiring the owner to reconstruct vendor tables.

Read the updated plan, existing reports, profile/catalog/planner code, and mapping/compatibility documents. Treat the earlier prompt iteration above as historical context. Execute only this iteration; do not change orchestrator prompts/plan, create later prompts, commit or delegate.

Bounded source research

  • Review official manuals for ABJ, AGLP, AGM, AGT, AME and AMR, using the verified URLs already in the embedded instrument catalog, plus the official Settings/CPC documentation where needed. The rendered vendor website exposes links that simplified HTML fetching previously missed.
  • Investigate SD3 default kick/snare/closed-hi-hat mappings using accessible official material and the shared manual page. Do not bypass login, request credentials, install products or scan personal/vendor directories.
  • Establish absolute MIDI numbers with a genuine numeric anchor or authorized mapping/sample; do not infer a C0 number solely from its octave label. Public third-party maps may corroborate facts, not silently replace vendor evidence or introduce unlicensed implementation code.
  • Record source URL, section/page, retrieval/source revision, exact supported facts, gaps, and applicability. Do not copy manuals/sample libraries into the repository. Temporary PDF extraction helpers belong only in session storage and must be cleaned up. No production dependency/package changes.
  • Focus on the supported Sustain/PalmMute pitched intentions and the three existing drum voices. Do not expand articulations, patterns or track roles.
  • Stop researching an inaccessible source after distinct reasonable retrieval methods; finish the supported subset and report exact remaining gaps rather than inventing data or looping.

Evidence model and admission

  • Introduce the distinct MappingVerification.Documented stage. It means cited published default mapping facts, NOT real installed-plugin acceptance. Preserve existing Verified, Unverified and Synthetic semantics.
  • Add the smallest immutable compatibility-notes representation needed to disclose mapping/version scope and timing/routing policies. Keep existing serialized fixture contracts compatible where practical; required documented notes must be validated, not silently defaulted.
  • Allow Documented and Verified in production catalogs; reject Synthetic and Unverified as before. Never relabel documentation-only evidence as Verified.
  • A profile scoped to documented defaults must say so. Do not invent an exact installed product version. Keep source/mapping revision separate from a claimed installed version, making any non-versioned-manual scope explicit.
  • Distinguish published switch/range/velocity facts from deterministic writer policies (channel routing, control ordering/pulse timing). Any policy must be conservative, explicit in notes and tested, not presented as a vendor-certified minimum or actual-plugin check. If an essential behavior is unsupported by evidence, do not admit that profile.
  • Preserve exact InstrumentId/role/product binding and truthful availability. Keep all six requested instruments plus SD3 declared even if some lack a map.

Initialization correctness

Inspect the existing assumption that a pitched plugin already starts in its declared resting articulation. Reusable MIDI cannot rely on arbitrary receiver state. Provide an explicit, backward-compatible unknown-initial-state route for documented mappings where needed (for example, null initial articulation forces the first requested state to be selected).

Do not send unnecessary overlapping sustain and palm-mute switches: the manuals describe combined-switch behavior. Preserve existing explicit known-state synthetic behavior and add regression tests proving that the first requested Sustain and PalmMute each initialize correctly, without stuck switches, changed musical timing or accidentally combined articulations.

Files and implementation scope

Modify only directly necessary files, including:

src\GAJ3T.MusicGen.RiffGrooveBuilder.Core\Articulations\InstrumentProfile.cs
src\GAJ3T.MusicGen.RiffGrooveBuilder.Core\Articulations\InstrumentProfileValidator.cs
src\GAJ3T.MusicGen.RiffGrooveBuilder.Core\Articulations\ArticulationPlanner.cs
src\GAJ3T.MusicGen.RiffGrooveBuilder.Generation\Profiles\InstrumentProfileCatalog.cs
src\GAJ3T.MusicGen.RiffGrooveBuilder.Generation\Profiles\instrument-profiles.json
tests\GAJ3T.MusicGen.RiffGrooveBuilder.UnitTests\Articulations\
tests\GAJ3T.MusicGen.RiffGrooveBuilder.UnitTests\Instruments\
tests\GAJ3T.MusicGen.RiffGrooveBuilder.IntegrationTests\Articulations\
tests\GAJ3T.MusicGen.RiffGrooveBuilder.IntegrationTests\Midi\
README.md
docs\articulation-mappings.md
docs\format-compatibility.md
prompts\report_4.md

Add small directly needed test/helper files if necessary. Do not expose public MCP tools, implement native writers or alter the tested MIDI serialization merely to hide missing mapping facts.

Required tests and validation

  • Documented admission with source/notes, missing/invalid documented notes, Verified preservation, Synthetic/Unverified rejection and correct binding.
  • Every admitted profile's numeric switch/pitch/range/velocity facts and source assertions. Unknown/unsupported profiles remain unavailable actionably.
  • Unknown receiver-state initialization, repeated latching, state transitions, first-note timing, note/control pairing and source-data preservation.
  • Actual composition -> admitted profile -> plan -> MIDI file write/read-back for every supported admitted role/profile. These are format/source tests, not claims that the owner's VSTs were run.
  • Retain all 663 baseline tests, updating only intentional evidence-status or initialization contract assertions with explicit regression coverage.

Run targeted tests, then Release solution build, all tests and locked restore. Use the existing SDK and pinned DryWetMIDI 8.0.3. Do not add new packages to the project. Record exact commands, counts, source evidence and unrun application checks.

Mandatory report and stop

When complete, write your end-of-step report to ./prompts/report_4.md including: what was implemented, test results (pass/fail with details), any issues encountered, and whether you're ready for the next step

Preserve previous report history and append "Correction iteration 3: documentation-backed profiles" inside the same single plain triple-backtick fence. Report supported profiles, evidence scope, precise unresolved gaps, test/command results, and source-backed versus application-verified readiness separately. If no profile can be admitted honestly, state that clearly. Stop after the report; do not start another step.


Correction iteration 4: Additional evidenced capabilities

Objective and baseline

The bounded read-only follow-up found usable vendor evidence that the first inventory missed. Current baseline is 882 passing tests, public MCP generation and a published Windows x64 executable, with AGLP/AME Documented profiles. Read current source/reports; do not use the old 663-test baseline.

Implement AGM Sustain/PalmMute and ABJ Sustain-only from the evidence below. Evaluate one specific AGT anchor lead; admit AGT only if that link is genuinely confirmed. Preserve the distinction between a supported subset and an entire instrument/application verified. Refresh the actual published executable after source/catalog updates so deployment and tests never advertise stale profiles.

Concrete official evidence already found

  • AGM: https://www.amplesound.net/dl0822/ds/AGM-Rylynn.zip AGM-Rylynn/AGM3-Rylynn.mid, 480 PPQ, zero-based track 1 "G1": note24/velocity80/channel0 on32215/off32335. HTTP Last-Modified 2019-06-11 17:57:25 GMT. https://www.amplesound.net/dl0822/ds/AGM-Dear_Ben.zip AGM-Dear Ben/AGM-Dear Ben Tempo 74.mid, 480 PPQ, track1 "AGM ARP"/channel0: note26/velocity80 on28798/off28858; note24/velocity80 on30238/off30298. HTTP Last-Modified 2019-11-24 16:38:43 GMT. Together with the already reviewed AGM manual: Sustain24/PM26, E1-C5=40-84, Sustain musical velocities1-126, PM1-127; no installed-release assertion.
  • ABJ: https://www.amplesound.net/dl0822/ds/AB-Articulations.zip The official download row explicitly advertises products ABJ ABP. AB-Articulations/4.2 Articulations & Poly Legato.mid, 480 PPQ, track1 "ABP"/channel0: note24/velocity90 on3720/off4080, musical note40/velocity90 on3840; note26/velocity100 on22980/off23220. HTTP Last-Modified 2019-06-11 17:32:45 GMT. Vendor-listed shared applicability is evidence, not an ABJ-named standalone performance. ABJ manual's C0 and B0-E4 imply Sustain switch24/range35-76. Sustain musical velocities1-125; 126-127 are accents. Admit Sustain-only. Do NOT guess the dedicated PM/Dead Note threshold.
  • AGT specific remaining lead: https://www.amplesound.net/dl0822/ds/AGT-Wish_You_Were_Here.zip Official row lists AGT AGM, "Tab Project". AGT-Wish You Were Here/AGT3-Wish You Were Here Tempo 62.mid, 480 PPQ: tracks1 "Solo" and2 "Strum" each contain only note105/velocity80, channel0 on3840/off4320. HTTP Last-Modified 2019-06-11 18:04:59 GMT. This is not a direct Sustain/PM performance. Check the actual official applicable Tab Reader play-note documentation to determine whether 105 can be unambiguously associated with a named tab-play note and yield the octave anchor. Do not infer its label solely by applying an assumed convention. If confirmed, the reviewed AGT C0/D0 and E1-C5/velocity facts may be admitted under the same documented-default limits; otherwise leave AGT unavailable.
  • No AMR/Ray5 public demo archive appeared among the nine inspected official download rows. Do not invent a URL, substitute another bass, or repeat an open-ended search. SD3 remains unavailable.

Verify and record source revisions/hashes as appropriate; inspect public MIDI using pinned DryWetMIDI, without retaining copied vendor assets. Any temporary reader/helper remains session-only and must be removed.

Implementation and all affected surfaces

  • Reuse existing Documented profiles, compatibility notes, unknown-state initialization and shared planner. No product subclass, new grammar or articulation/role enum is required.
  • New bass profile uses explicit zero-based channel1 routing policy so existing Lead channel0 and Bass channel1 can coexist. Distinguish this project routing and pulse timing policy from vendor-certified requirements.
  • ABJ advertises only Sustain. Palm-muted ABJ requests must fail with the existing explicit unsupported-articulation diagnostic; do not invent a velocity transform, silently switch to Sustain or make a fake PM claim.
  • Keep AMR and SD3 unmapped, and all native codecs unavailable.
  • Update all affected discovery/selection/availability/profile-count tests and docs deliberately, not by weakening their assertions.
  • Add real MCP Lead+Bass generation using explicit AME/AGLP/AGM and ABJ profiles, actual MIDI read-back, shared lead-in, separate channels/tracks, switches, note/velocity/timing correctness, no stuck notes and one artifact for fallback.
  • Preserve negative tests: missing Bass selection is now no_default_profile, not mapping_unavailable; unmapped Drums remains unavailable. Explicit unknown, wrong-role, unsupported-ABJ-PM and no-overwrite errors remain actionable.
  • Existing AGLP/AME example contents/IDs and warning semantics must remain valid.

Files may include directly affected profile JSON, existing catalog/planner tests, documented-profile MIDI tests, GenerationService/MCP tests only for correct capability expectations, PublishedServerTests and existing docs/README. Do not change orchestration prompts/plan. No packages/projects or unrelated production feature work. No commit, delegation or user/global MCP settings.

Publication refresh and validation

Rebuild and publish with the accepted win-x64 profile and its dedicated lock, then run:

  • Focused new-profile/catalog/actual MIDI/MCP/publication tests.
  • Release build and the full suite against the refreshed published payload.
  • Both ordinary solution and publication-specific locked restores.
  • Existing retained AME example read-back/hash preservation.

The published metadata must reflect the new admitted subset, not the old two-profile catalog. Publication refresh is necessary validation/distribution of this correction, not a new deployment feature or application acceptance.

Mandatory reports and stop

When complete, write your end-of-step report to ./prompts/report_4.md including: what was implemented, test results (pass/fail with details), any issues encountered, and whether you're ready for the next step

Append "Correction iteration 4: additional evidenced capabilities", preserving the entire earlier history and its single enclosing plain code fence. Also append a clearly labeled publication-refresh section to report_9.md with new payload/example hashes, profile/capability counts and actual published read-back evidence. Preserve its earlier history inside the single fence. Do not rewrite historical reports as if their old counts had been different.

Include exact sources/facts, AGT conclusion, supported/unsupported articulations, test commands/counts and published readiness. Runtime-free host, licensed app acceptance, AMR/SD3 and native-format limits remain explicit. Stop for orchestrator review after both reports. No further steps.