Skip to content

Add writeChartFile() with Song/SyncTrack/Events/unrecognized-section emission - #70

Open
elicwhite wants to merge 1 commit into
write-ini-filefrom
chart-writer-core
Open

Add writeChartFile() with Song/SyncTrack/Events/unrecognized-section emission#70
elicwhite wants to merge 1 commit into
write-ini-filefrom
chart-writer-core

Conversation

@elicwhite

Copy link
Copy Markdown
Owner

Port of the non-instrument-track half of the chart writer into scan-chart:

  • [Song] emits the subset of metadata the chart body supports (Name,
    Artist, Charter, Album, Genre, Year, Resolution, Offset, PreviewStart,
    Difficulty). Other fields live exclusively in song.ini.
  • [SyncTrack] emits tempos as B millibeats and time signatures as
    TS numerator [denominator-exponent], sorted by tick with TS before B
    at the same tick.
  • [Events] emits section markers (wrapped as [section name] to survive
    the parser's greedy trailing-] regex), end events, unrecognized global
    events (with bracket-stripping when source is .mid so round-trip to
    .chart emits naked text), and vocal phrase_start/phrase_end/lyric
    events from the normalized vocalTracks.parts.vocals.
  • Unrecognized chart sections are re-emitted verbatim.

Instrument tracks ([ExpertSingle] etc.) land in a follow-up PR.

@elicwhite
elicwhite marked this pull request as ready for review April 20, 2026 04:16
@elicwhite
elicwhite force-pushed the chart-writer-core branch 2 times, most recently from 82825de to 7215450 Compare April 20, 2026 04:45
@elicwhite
elicwhite force-pushed the write-ini-file branch 2 times, most recently from c983ac5 to 9a075ab Compare April 20, 2026 05:10
Comment thread src/index.ts Outdated
@elicwhite
elicwhite force-pushed the chart-writer-core branch 2 times, most recently from 7e366ee to b8df59e Compare April 21, 2026 16:38
@elicwhite
elicwhite force-pushed the write-ini-file branch 2 times, most recently from 55a24bd to a269bd0 Compare April 21, 2026 16:51
…emission

Port of the non-instrument-track half of the chart writer into scan-chart:
- [Song] emits the subset of metadata the chart body supports (Name,
  Artist, Charter, Album, Genre, Year, Resolution, Offset, PreviewStart,
  Difficulty). Other fields live exclusively in song.ini.
- [SyncTrack] emits tempos as `B millibeats` and time signatures as
  `TS numerator [denominator-exponent]`, sorted by tick with TS before B
  at the same tick.
- [Events] emits section markers (wrapped as [section name] to survive
  the parser's greedy trailing-\] regex), end events, unrecognized global
  events (with bracket-stripping when source is .mid so round-trip to
  .chart emits naked text), and vocal phrase_start/phrase_end/lyric
  events from the normalized vocalTracks.parts.vocals.
- Unrecognized chart sections are re-emitted verbatim.

Instrument tracks ([ExpertSingle] etc.) land in a follow-up PR.
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.

1 participant