Commit Graph

12 Commits

Author SHA1 Message Date
Xiaohan-Tian 8aa36d2368 feat: added global chord region to MIDI region conversion feature 2026-05-25 16:25:43 -07:00
Xiaohan-Tian 1f330818d8 feat: enhance multi-region selection feature to support both shift and cmd/ctrl 2026-05-25 13:50:28 -07:00
Xiaohan-Tian af0b816cbf fix: minor UI updates 2026-05-24 23:17:43 -07:00
Xiaohan-Tian 1879df8033 feat: implement global chord track 2026-05-24 23:06:08 -07:00
Xiaohan-Tian 8eb3f5d84d feat: implemented global key signature track 2026-05-23 14:44:48 -07:00
Xiaohan-Tian fb3c6cde70 feat: implemented global marker track 2026-05-23 12:56:43 -07:00
Xiaohan-Tian 7ca2cb0d05 feat: added mock up global tracks 2026-05-23 12:29:03 -07:00
Xiaohan-Tian 041641c101 feat: refactor the add track behavior to use a pop-up instead 2026-05-23 11:09:02 -07:00
Xiaohan-Tian a7071f318c feat: added rules row under the main grid bar number row 2026-05-23 10:53:05 -07:00
Xiaohan-Tian da8b9496df feat: add cross-component playhead scroll synchronization 2026-05-02 00:25:41 -07:00
Xiaohan-Tian fc84edfc59 feat: add audio track support with WAV/MP3 playback and looping
Introduce KGAudioTrack and KGAudioRegion as new track/region types
alongside existing MIDI tracks. Users can import WAV, MP3, OGG, FLAC,
and AAC files into audio tracks with full playback, looping, and
solo/mute/volume support.

New core models:
- KGAudioTrack (extends KGTrack with TrackType.Wave)
- KGAudioRegion (extends KGRegion with audio file reference)
- KGAudioPlayerBus (Tone.Gain + ToneBufferSource-based playback)
- KGAudioFileStorage (OPFS media/ directory for binary audio files)

New commands:
- AddAudioTrackCommand (create audio track with player bus)
- ImportAudioCommand (import audio file, create region at playhead,
auto-expand maxBars)

Playback features:
- Audio regions scheduled via Tone.Transport alongside MIDI events
- Loop support with duration capping at loop boundaries
- Resume safety offset to prevent ToneBufferSource timing misses
- Cross-track buffer copy when moving audio regions between tracks
- Proper buffer cleanup on track deletion and project switch

UI changes:
- Separate "+ MIDI" and "+ Audio" buttons in top-left spacer
- Audio track shows upload button instead of instrument selector
- FileImportModal reused for audio file drag-and-drop upload
- Real waveform rendering on audio region canvas
- Green color scheme for audio regions (vs blue for MIDI)
- Pencil icon and resize handles hidden for audio regions
- Cross-type region moves blocked (MIDI ↔ Audio)
- Piano roll blocked for audio regions
- Audio region deletion support

Infrastructure:
- Project structure version bumped to 4 (no-op migration)
- class-transformer discriminators updated for new subtypes
- RemoveTrackCommand updated to clean up audio player buses
2026-04-09 21:54:54 -07:00
Xiaohan-Tian 17610f12f3 refactor: split monolithic App.css into feature-based co-located CSS files 2026-04-09 17:31:49 -07:00