Commit Graph

22 Commits

Author SHA1 Message Date
Xiaohan-Tian 7a6e7558ce fix: pause button while recording should stop recoding 2026-05-02 23:02:37 -07:00
Xiaohan-Tian da8b9496df feat: add cross-component playhead scroll synchronization 2026-05-02 00:25:41 -07:00
Xiaohan-Tian d5795c5281 fix: random not able to exit piano roll hybrid mode issue when switching between different MIDI regions (introduced a region dragging start threshold) 2026-05-01 20:34:21 -07:00
Xiaohan-Tian 83034455cc feat: implemented piano roll hybrid mode to allow user edit MIDI notes while observing spectrogram as reference 2026-05-01 18:28:45 -07:00
Xiaohan-Tian eafb3a4937 feat: added audio track spectrogram visualization feature 2026-05-01 17:44:29 -07:00
Xiaohan-Tian 9be96cd957 feat: add R as shortcut of recording button; fixed linter errors. 2026-05-01 14:29:27 -07:00
Xiaohan-Tian 043e90b1d7 fix: missing count-in when recording with loop mode on 2026-05-01 14:17:29 -07:00
Xiaohan-Tian 77885c8e2e feat: added recording MIDI device feature. 2026-05-01 10:59:36 -07:00
Xiaohan-Tian 0ac39068b2 feat: added metronome feature 2026-04-19 17:00:10 -07:00
Xiaohan-Tian cb027b6c20 feat: added auto-center playhead to piano roll window 2026-04-16 20:53:01 -07:00
Xiaohan-Tian cadd51c3a4 feat: integrate K.G.One music generation panel
- ConfigManager: add `general.kgone` config block (enabled toggle +
base URL); add `setKGOneManagedByServer()` / `isKGOneServerManaged()`
for managed deployments that supply a `kgone-server.txt` override
- App.tsx: probe for `kgone-server.txt` on startup (Content-Type guard
to avoid Vite SPA fallback false-positive)
- GeneralSettings: new K.G.One section with enable toggle + base URL
input; fields disabled when server-managed
- Toolbar: magic wand button (FaWandMagicSparkles) that toggles the
panel; disabled with reduced opacity when K.G.One is turned off;
mutually exclusive with the Chat panel
- projectStore: add `showKGOnePanel` state + `toggleKGOnePanel` action
- KGOnePanel (new): three-tab panel (Clip / Full Song / Separator)
- Clip: prompt + advanced params → POST /v1/clip/generate → poll
    /v1/clip/result → download WAV → AudioPlayer preview
- Full Song: caption + lyrics + advanced params → POST
    /v1/fullsong/generate → poll /v1/fullsong/result (live progress %
    from nested JSON string) → download MP3 → AudioPlayer preview
- Separator: reads selected audio region from OPFS via
    KGAudioFileStorage → POST /v1/separator/separate (multipart) →
    poll /v1/separator/result → parallel-download all stem files →
    multiple labeled AudioPlayer instances rendered vertically
- Shared: custom AudioPlayer (play/pause, clickable seek bar),
    spinner + hint text, error card, AbortController cleanup,
    DEBUG_MODE.KGONE-gated REQ/RES console logging
2026-04-15 19:51:16 -07:00
Xiaohan-Tian 139684b413 feat: add bar width multiplier (1x–8x horizontal zoom) for track grid 2026-04-10 18:17:36 -07:00
Xiaohan-Tian 83f4bfe47f fix: missing media files when renaming + saving the project 2026-04-10 12:14:20 -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 1c8361d45b feat: implemented playback looping; fixed an linter error in Toolbar.tsx 2026-01-23 15:34:26 -08:00
Xiaohan-Tian 78b798e138 feat: added a hotkey for loop button 2026-01-22 19:05:22 -08:00
Xiaohan-Tian f367c84ee8 feat: implemented UI of looping feature 2026-01-22 18:36:25 -08:00
Xiaohan-Tian dcd2d89d0f feat: persistence selected mode 2025-12-10 21:54:16 -08:00
Xiaohan-Tian 7ada648d14 removed instrumentSelectionTrackId from projectStore, align the instrumentSelectionTrackId with selectedTrackId. 2025-08-12 18:14:25 -07:00
Xiaohan-Tian ee34115423 auto-select new created track; delete selected track will change selection to an remaining track. 2025-08-12 18:04:14 -07:00
Xiaohan-Tian af9eca8fee disable unused param check for building; updated version number; avoid relying on constructor.name to determine class type due to class name mangling. 2025-08-11 19:54:51 -07:00
Xiaohan-Tian de51967b49 initial public release. 2025-08-11 18:37:21 -07:00