Skip to content

Verify pickup measure support, document MIDI import gap - #34

Merged
denmase merged 1 commit into
mainfrom
claude/noteeditor-translate-english-fworkt
Sep 20, 2026
Merged

denmase merged 1 commit into
mainfrom
claude/noteeditor-translate-english-fworkt

Conversation

@denmase

@denmase denmase commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Summary

Continuing the Indonesian notasi angka gap list (ROADMAP.md), the last of the "cheap to check"
items (phase 10, pickup measure/birama gantung).

  • Verified pickup measure support end-to-end — no code change needed. Traced every path a
    manually-entered short first measure touches: adding a measure
    (MeasureNavigationViewModel.ApplyAddMeasure) never checks that the previous one is "full", and
    both playback scheduling (ScoreMidiSchedule.GetMeasureDurationUnits) and MIDI export derive a
    measure's length purely from its own notes' actual durations -- no fixed-beat-count assumption
    anywhere in either path. So a deliberately short first measure already plays, exports, and
    renders correctly today. Added a regression test
    (Build_PickupMeasure_SecondMeasureStartsRightAfterShortFirstMeasure) proving the second
    measure starts right after the short one instead of being padded out, so this stays true going
    forward.
  • Found a real, separate gap while verifying this: MIDI import does not preserve a pickup
    measure.
    MidiImportService feeds its raw note stream through
    MeasureNormalizationService.NormalizeMeasures, which flattens the entire imported file into
    one continuous stream and rechunks it into fixed-size measures from scratch -- silently
    absorbing any real anacrusis in the source MIDI file. Documented in ROADMAP.md as its own
    scoped follow-up rather than fixed here, since reliably detecting an intended pickup from raw
    MIDI (versus a recording that just started off-beat) is real design work, not a quick fix.

Test plan

Verified via the same sandbox pipeline as every prior change this session:

  • dotnet build succeeds against the real project/package graph (0 errors/warnings).
  • dotnet format --verify-no-changes passes.
  • New xUnit regression test added and cross-compiled successfully.

Not verified in this sandbox: dotnet test itself cannot execute here (no WindowsDesktop
runtime pack); real confirmation of the new test comes from GitHub Actions CI.


🤖 Generated with Claude Code

https://claude.ai/code/session_01Pguj4XSScE141p1ScWoqEr


Generated by Claude Code

Traced every path a manually-entered short first measure touches:
adding a measure (MeasureNavigationViewModel.ApplyAddMeasure) never
checks the previous one is "full", and both playback scheduling
(ScoreMidiSchedule.GetMeasureDurationUnits) and MIDI export derive a
measure's length purely from its own notes' actual durations, with
no fixed-beat-count assumption anywhere. So a deliberately short
first measure already plays/exports/renders correctly today -- no
code change needed for the editor itself. Added a regression test
proving the second measure starts right after the short one instead
of being padded out, so this stays true going forward.

While verifying this, found a real, separate gap: MidiImportService
feeds imported notes through MeasureNormalizationService.NormalizeMeasures,
which flattens the whole file into one stream and rechunks it into
fixed-size measures from scratch, silently absorbing any real
anacrusis in the source file. Documented in ROADMAP.md as its own
scoped follow-up rather than fixed here, since reliably detecting an
intended pickup from raw MIDI (versus a recording that just started
off-beat) is real design work.

Verified via the same sandbox pipeline as every prior change this
session: dotnet build succeeds against the real project/package
graph, dotnet format --verify-no-changes passes. dotnet test itself
cannot execute in this sandbox; real confirmation of the new test
comes from GitHub Actions CI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pguj4XSScE141p1ScWoqEr
@denmase
denmase merged commit b930b72 into main Sep 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants