webui: a grouped keyboard shortcut panel for the sheet #33

Merged
branderson merged 5 commits from sheet-shortcuts into sheet-editing 2026-10-14 23:27:55 -07:00
5 Commits
Author SHA1 Message Date
branderson 264354df09 Merge pull request 'webui: set a song's BPM and GAP from the sheet' (#34) from grid-edit into sheet-shortcuts
tests / test (pull_request_target) Successful in 4m11s
Reviewed-on: #34
Reviewed-by: branderson <brad@branderson.io>
2026-10-14 23:17:45 -07:00
branderson 556ea641bb Merge pull request 'webui: move line breaks on the sheet' (#35) from break-edit into grid-edit
tests / test (pull_request_target) Successful in 3m47s
Reviewed-on: #35
Reviewed-by: branderson <brad@branderson.io>
2026-10-14 18:54:21 -07:00
branderson ce44fb3d79 webui: move line breaks on the sheet
tests / test (pull_request_target) Successful in 4m18s
Line breaks were always placed by songtrace, midway between lines and
recomputed around edited ones, so a break could not be put where a singer
breathes. The sheet now draws the breaks either side of a line as markers
that drag along the beat grid, kept between the lines they separate, and
double-click back to automatic. Break moves share the line's undo history
and SAVE LINE, which saves the notes only if they changed, so moving a
break never locks either line's notes.

Moved breaks are stored in edits.json keyed by the line each comes before,
follow their lines when the lyrics change, and win over the computed break
on every rebuild, clamped so a break never lands inside a line's notes.
The review lists each break with that line and whether it was moved, and
PUT /api/jobs/{id}/breaks takes {line: seconds | null}. merge now passes
untouched notes through as they are rather than rebuilding them, which
added float noise to their durations.
2026-10-13 16:24:17 -07:00
branderson ae5ca3465b webui: set a song's BPM and GAP from the sheet
tests / test (pull_request_target) Successful in 3m52s
The beat grid came from the detected tempo (or the BPM override) and a GAP
pinned to the first note, so it did not always line up with the music,
and snapping did not land on its beats. A GRID bar on the sheet now sets
both, redrawing the grid live as values are tried, with x2 and /2 for a
tempo detected at double or half speed and ALIGN TO NOTE to move GAP the
least that puts the selected note on a beat. Note editing pauses while a
trial grid is unapplied, so notes never snap to a grid that is then
cancelled.

The grid is stored with the song's edits, so every rebuild keeps it, and
grid charts with it in place of its own choice; it records that choice in
tempo.json for RESET to return to. A GAP after the first note moves back
by whole beats, as notes on negative beats are rejected by players. PUT
and DELETE /api/jobs/{id}/grid set and reset it, rewriting the charts in
place.
2026-10-13 16:08:57 -07:00
branderson e65f62b459 webui: a grouped keyboard shortcut panel for the sheet
tests / test (pull_request_target) Successful in 3m54s
The sheet's controls were listed in one run-on line under it, which was
hard to scan and grew with every feature. Replace it with a panel grouped
the way an editor's reference card is (select, move, length, notes, kind,
syllable, line) with keys drawn as key caps, opened by a KEYS button or ?,
closed by Esc, and remembered open or closed across visits.

The list is data (SHORTCUTS), and a test checks every letter key it names
is one the sheet's key handler handles, so the two cannot drift apart.
2026-10-12 23:13:45 -07:00