Commit Graph

19 Commits

Author SHA1 Message Date
Xiaohan-Tian 27948771de fix: default project main grid's zoom level to 2x 2026-05-24 23:20:49 -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 6db66be471 feat: allow user to config Gemma 4 E4B and MDX-NET model download URL 2026-05-18 22:55:00 -07:00
Xiaohan-Tian a0fe283ab5 feat: persist piano roll zoom level into project; fixed an issue in the horizontal auto-scrolling logic in piano roll window 2026-05-18 22:21:00 -07:00
Xiaohan-Tian 9c197ecd08 feat: persist track mute/solo status 2026-05-17 13:06:47 -07:00
Xiaohan-Tian 98c2b97413 feat: implemented the v1 browser embedded LLM support (Gemma 4 E4B based) 2026-05-14 18:55:23 -07:00
Xiaohan-Tian d32dc35b6d feat: added local separator implementation 2026-05-11 22:27:22 -07:00
Xiaohan-Tian 8fa2c16395 feat: added save as option when renaming the project 2026-05-10 13:25:12 -07:00
Xiaohan-Tian cd90dc1c99 fix: linter errors 2026-05-01 14:36:56 -07:00
Xiaohan-Tian 7e67ca9d10 fix: add https support for local vite dev server 2026-04-18 14:27:07 -07:00
Xiaohan-Tian 24ffaa76f6 fix: reserve Untitled Project name; rename project will trigger save immidiatly. 2026-04-16 20:24:43 -07:00
Xiaohan-Tian 1ff9bfcac4 feat: add Open Project modal with project browser, soft delete, and duplicate
Replace the prompt-based project loading with a full modal UI:
- Draggable/resizable panel with overlay and backdrop blur
- Filterable project list with incremental fuzzy matching
- Sortable columns (name, created, updated) with asc/desc toggle
- Duplicate project with auto-rename on name conflict
- Soft delete with trash view, restore, and permanent delete
- Auto-purge trash after 30 days
- Orphan media file cleanup on project open
- Skip folders without valid meta.json in project listing
2026-04-10 13:28:01 -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 2d3ea33ce6 refactor: migrate project storage from IndexedDB to OPFS with folder-based structure
- Replace monolithic KGStorage with KGProjectStorage (OPFS) and KGConfigStorage (IndexedDB)
- Each project stored as folder: project.json + meta.json + media/
- Add KGConfigUpgrader with V1 upgrader to auto-migrate existing IndexedDB projects to OPFS
- Request persistent storage via navigator.storage.persist() to prevent browser eviction
- Show loading spinner during one-time migration
- Enforce safe project name characters (letters, numbers, space, hyphen, underscore, period, parens)
- Export projects as .kgstudio zip bundles instead of raw JSON
- Import supports .kgstudio bundles (with meta.json validation) and legacy JSON files
- Auto-deduplicate project names on import with (1), (2), etc. suffix
- Add OPFS shell debugger (pwd, ls, cd, cat, dl) accessible via KGDebugger.opfs()
- Add ESLint semi rule for consistent semicolons
- Delete KGStorage.ts — all logic absorbed by new storage classes
- Add jszip dependency for zip export/import
2026-04-09 19:25:08 -07:00
Xiaohan-Tian 2bf5328af7 feat: added unit tests for KGMidiRegion and abcNotationUtil; update all deprecated method plainToClass to plainToInstance. 2025-09-03 23:05:13 -07:00
Xiaohan-Tian de51967b49 initial public release. 2025-08-11 18:37:21 -07:00