writeMidiFile: emit PART GUITAR / GHL instrument tracks - #75
Open
elicwhite wants to merge 1 commit into
Open
Conversation
This was referenced Apr 20, 2026
Owner
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Apr 20, 2026
elicwhite
force-pushed
the
midi-writer-drum
branch
from
April 20, 2026 05:09
45e2e09 to
f368e1b
Compare
elicwhite
force-pushed
the
midi-writer-guitar
branch
from
April 20, 2026 05:09
3d5ebf4 to
6bfcf43
Compare
elicwhite
commented
Apr 20, 2026
elicwhite
force-pushed
the
midi-writer-guitar
branch
from
April 20, 2026 05:10
6bfcf43 to
fa58c6e
Compare
elicwhite
force-pushed
the
midi-writer-drum
branch
2 times, most recently
from
April 20, 2026 05:19
3c33a1e to
6794214
Compare
elicwhite
force-pushed
the
midi-writer-guitar
branch
from
April 20, 2026 05:19
fa58c6e to
409ccf5
Compare
This was referenced Apr 20, 2026
elicwhite
marked this pull request as ready for review
April 20, 2026 16:09
elicwhite
force-pushed
the
midi-writer-drum
branch
from
April 21, 2026 04:29
6794214 to
9e48e4d
Compare
elicwhite
force-pushed
the
midi-writer-guitar
branch
2 times, most recently
from
April 21, 2026 04:47
4069bbd to
e846368
Compare
elicwhite
force-pushed
the
midi-writer-drum
branch
2 times, most recently
from
April 21, 2026 05:06
46f89fd to
f5ea6a9
Compare
elicwhite
force-pushed
the
midi-writer-guitar
branch
2 times, most recently
from
April 21, 2026 16:35
178497d to
7627809
Compare
elicwhite
force-pushed
the
midi-writer-drum
branch
from
April 21, 2026 16:38
2270012 to
a90551e
Compare
elicwhite
force-pushed
the
midi-writer-guitar
branch
2 times, most recently
from
April 21, 2026 16:51
0dc86ae to
21b132d
Compare
elicwhite
force-pushed
the
midi-writer-drum
branch
from
April 21, 2026 16:51
a90551e to
01e7b0e
Compare
elicwhite
force-pushed
the
midi-writer-drum
branch
from
April 21, 2026 23:18
01e7b0e to
fac4d59
Compare
elicwhite
force-pushed
the
midi-writer-guitar
branch
from
April 21, 2026 23:18
21b132d to
f4cca25
Compare
Adds fret-instrument emission to writeMidiFile. - buildFretTrack: one MIDI track per instrument group (guitar / bass / guitarghl / bassghl / keys / guitarcoop / rhythm / GHL variants); multiple difficulties merge into the same track. - emitFretNotes: 5-fret (95/83/71/59 diffStarts) and 6-fret/GHL (94/82/70/58) note-number mapping; open notes routed two ways: ENHANCED_OPENS mode (diffStart+0, preserves chord-with-open) when any group contains both open and non-open, else forceOpen-SysEx fallback (diffStart+1 + SysEx, collapses chords with open but safer next to animations at easy diffStart). Coalesces fret-note length with overlapping animations at the same tick:noteNumber via pre-computed seq slots so animation ordering survives re-parse. - Force modifier ranges (forceHopo / forceStrum / forceTap) via emitFretModifierRanges — inverts resolveFretModifiers: natural HOPO state is re-derived with the MIDI threshold (1 + res/3), and a modifier emits only when the resolved flag disagrees. forceHopo = diffStart+6 (5-fret) / +7 (GHL); forceStrum = +7 / +8; forceTap as SysEx. - reconstructModifierRanges: collapses per-tick hit sets into minimal contiguous ranges over noteTicksInOrder. - Instrument-wide emission: star power (MIDI 116), solo (MIDI 103), flex lanes (126/127 with per-difficulty LDS velocity), per-track text events, versus phrases (105/106), animations (with skip when the fret note above already emitted at the same tick:noteNumber), per-track unrecognizedMidiEvents. - [ENHANCED_OPENS] text event when that mode is active. - Helpers added: addSysExOnOff, reconstructModifierRanges, midiIsFretChord / midiIsSameFretNote / midiIsInFretNote. Vocal tracks (PART VOCALS / HARM1-3) land in the follow-up PR. Tests: 15 new test cases covering track naming, 5-fret + GHL note-number mapping, open-note encoding (both modes), force modifier emission (hopo/strum/tap + non-emission when natural matches), instrument-wide sections, and round-trip through parseChartAndIni for both 5-fret modifiers and GHL chord-with-open. 53 midi-writer tests, 397 total scan-chart tests passing at the tip.
elicwhite
force-pushed
the
midi-writer-guitar
branch
from
April 22, 2026 16:34
f4cca25 to
940eeea
Compare
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.

Adds fret-instrument emission to writeMidiFile.
guitarghl / bassghl / keys / guitarcoop / rhythm / GHL variants);
multiple difficulties merge into the same track.
(94/82/70/58) note-number mapping; open notes routed two ways:
ENHANCED_OPENS mode (diffStart+0, preserves chord-with-open) when any
group contains both open and non-open, else forceOpen-SysEx fallback
(diffStart+1 + SysEx, collapses chords with open but safer next to
animations at easy diffStart). Coalesces fret-note length with
overlapping animations at the same tick:noteNumber via pre-computed
seq slots so animation ordering survives re-parse.
emitFretModifierRanges — inverts resolveFretModifiers: natural HOPO
state is re-derived with the MIDI threshold (1 + res/3), and a modifier
emits only when the resolved flag disagrees. forceHopo = diffStart+6
(5-fret) / +7 (GHL); forceStrum = +7 / +8; forceTap as SysEx.
contiguous ranges over noteTicksInOrder.
flex lanes (126/127 with per-difficulty LDS velocity), per-track text
events, versus phrases (105/106), animations (with skip when the fret
note above already emitted at the same tick:noteNumber), per-track
unrecognizedMidiEvents.
midiIsFretChord / midiIsSameFretNote / midiIsInFretNote.
Vocal tracks (PART VOCALS / HARM1-3) land in the follow-up PR.
Tests: 15 new test cases covering track naming, 5-fret + GHL
note-number mapping, open-note encoding (both modes), force modifier
emission (hopo/strum/tap + non-emission when natural matches),
instrument-wide sections, and round-trip through parseChartAndIni for
both 5-fret modifiers and GHL chord-with-open. 53 midi-writer tests,
397 total scan-chart tests passing at the tip.