Commit Graph

287 Commits

Author SHA1 Message Date
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 de2979178e Merge pull request #29 from KGAudioLab/feat/2026-04-08-refactor-data-storage
Feat/2026 04 08 refactor data storage
2026-04-09 19:25:35 -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 17610f12f3 refactor: split monolithic App.css into feature-based co-located CSS files 2026-04-09 17:31:49 -07:00
Xiaohan-Tian 58cb4cebef refactor: moved "Add track" button from bottom TrackControl to top-left-spacer for better discoverability 2026-04-08 19:15:01 -07:00
GitHub Actions Bot b1f11a2d34 chore(release): 0.9.0-build.20260406
Generated release with automated versioning system.

Release type: minor

Build date: 2026-04-06 06:09:41 UTC

🤖 Generated with automated release workflow
2026-04-06 06:09:41 +00:00
Xiaohan-Tian 5a863fee35 Merge pull request #28 from KGAudioLab/feat/2026-04-05-refactor-tool-calling
Feat/2026 04 05 refactor tool calling
2026-04-05 23:03:52 -07:00
Xiaohan-Tian 63ced27702 feat: added Claude 4.6 model series options. 2026-04-05 23:01:58 -07:00
Xiaohan-Tian 586f0f996c feat: added OpenAI SDK with OpenRouter based Claude model support; updated recommended models in README.md 2026-04-05 22:57:12 -07:00
Xiaohan-Tian 6c49fbfabe feat: added model options for GPT-5.4 families; updated default model to gpt-5.4-mini 2026-04-05 22:23:07 -07:00
Xiaohan-Tian 26b7510178 fix: rename start_beat to start and end_beat to end in 3 tools. 2026-04-05 21:28:19 -07:00
Xiaohan-Tian ee31ca087e fix: minor UI enhancements. 2026-04-05 19:59:49 -07:00
Xiaohan-Tian 2cd976ff96 refactor: migrate agent system from XML tool calling to OpenAI SDK with native function calling
- Replace custom XML-based tool parsing (XMLToolExecutor) with OpenAI SDK's
  native tool_calls via `openai` npm package (dangerouslyAllowBrowser)
- Consolidate 4 LLM providers (OpenAI, Claude, Gemini, ClaudeOpenRouter)
  into a single OpenAI SDK-based LLMProvider compatible with any
  OpenAI-style API (OpenAI, OpenRouter, Ollama, vLLM)
- Move agentic tool execution loop from ChatBox into AgentCore
- Update Message type to support tool roles, tool_calls, and tool_call_id
- Update system prompt to remove XML formatting instructions (~45% smaller)
- Remove AttemptCompletionTool (replaced by stop_reason detection),
  ThinkTool, and ThinkingTool
- Polish tool descriptions for OpenAI function calling schema compliance
- Normalize base URLs by stripping /chat/completions suffix
2026-04-05 18:59:25 -07:00
GitHub Actions Bot 597fb9a292 chore(release): 0.8.0-build.20260123
Generated release with automated versioning system.

Release type: minor

Build date: 2026-01-23 23:38:29 UTC

🤖 Generated with automated release workflow
2026-01-23 23:38:29 +00:00
Xiaohan-Tian 5042477a2a Merge pull request #27 from KGAudioLab/feat/2026-01-22-looping
Feat/2026 01 22 looping
2026-01-23 15:37:27 -08:00
Xiaohan-Tian 8e8c55774f docs: updated README.md 2026-01-23 15:36:51 -08: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 b767d2176f feat: enhanced the note scheduling logic to support loop mode
pending cases: user disabled the loop mode or updated the loop range during playback.
2026-01-23 13:22:51 -08:00
Xiaohan-Tian b46442bd9d feat: added upgradeToV3 upgrader 2026-01-22 19:10:01 -08:00
Xiaohan-Tian 78b798e138 feat: added a hotkey for loop button 2026-01-22 19:05:22 -08:00
Xiaohan-Tian b80e7e84b8 feat: implemented change loop setting command 2026-01-22 18:50:09 -08:00
Xiaohan-Tian f367c84ee8 feat: implemented UI of looping feature 2026-01-22 18:36:25 -08:00
Xiaohan-Tian 20310ccea0 docs: updated welcome_again.md 2026-01-22 17:32:25 -08:00
GitHub Actions Bot 293541401d chore(release): 0.7.1-build.20260117
Generated release with automated versioning system.

Release type: patch

Build date: 2026-01-17 22:06:21 UTC

🤖 Generated with automated release workflow
2026-01-17 22:06:21 +00:00
Xiaohan-Tian 59faeff4a1 Merge pull request #26 from KGAudioLab/feat/2026-01-17-add-option-allow-persist-api-key-on-non-localhost
Feat/2026 01 17 add option allow persist api key on non localhost
2026-01-17 14:05:35 -08:00
Xiaohan-Tian 609efab64a fix: added a warning comment 2026-01-17 14:05:10 -08:00
Xiaohan-Tian 8c1ab53f25 docs: updated README.md 2026-01-17 14:02:49 -08:00
Xiaohan-Tian e8b79efde7 feat: add option to persist API keys on non-localhost (opt-in security feature) 2026-01-17 13:54:15 -08:00
GitHub Actions Bot 2a0d128d0f chore(release): 0.7.0-build.20260117
Generated release with automated versioning system.

Release type: minor

Build date: 2026-01-17 20:34:24 UTC

🤖 Generated with automated release workflow
2026-01-17 20:34:24 +00:00
Xiaohan-Tian 6717cea57c Merge pull request #25 from KGAudioLab/feat/2025-12-25-more-models
feat: added latest (as of 2025-12-25) GPT and Claude model support
2026-01-17 12:33:35 -08:00
Xiaohan-Tian 4f4e60f84a feat: added latest (as of 2025-12-25) GPT and Claude model support 2025-12-25 14:29:50 -08:00
GitHub Actions Bot 0966621f0e chore(release): 0.6.3-build.20251222
Generated release with automated versioning system.

Release type: patch

Build date: 2025-12-22 06:59:05 UTC

🤖 Generated with automated release workflow
2025-12-22 06:59:05 +00:00
Xiaohan-Tian ab8c268a12 Merge pull request #24 from KGAudioLab/feat/2025-12-19-midi-keyboard-support
chore: updated README
2025-12-21 22:46:07 -08:00
Xiaohan-Tian 3b2b359d43 chore: updated README 2025-12-21 22:45:27 -08:00
Xiaohan-Tian ef08ec91e2 Merge pull request #23 from KGAudioLab/feat/2025-12-19-midi-keyboard-support
Feat/2025 12 19 midi keyboard support
2025-12-21 22:42:32 -08:00
Xiaohan-Tian b44e6fb1ee feat: added an option to control playhead animation fps 2025-12-21 22:42:01 -08:00
Xiaohan-Tian eaee036fc2 feat: added playback delay configuration 2025-12-21 20:11:27 -08:00
Xiaohan-Tian aadf9e06df feat: added lookAhead option 2025-12-21 18:51:20 -08:00
Xiaohan-Tian 4b075e8979 fix: reduce Tone.js context.lookAhead to reduce MIDI input latency 2025-12-19 12:55:56 -08:00
Xiaohan-Tian d3a2fe1f8d feat: added MIDI keyboard support 2025-12-19 11:44:58 -08:00
GitHub Actions Bot a6ff25d2db chore(release): 0.6.2-build.20251218
Generated release with automated versioning system.

Release type: patch

Build date: 2025-12-18 07:08:41 UTC

🤖 Generated with automated release workflow
2025-12-18 07:08:41 +00:00
Xiaohan-Tian 22c11fd31e Merge pull request #22 from KGAudioLab/feat/2025-12-08-chord-assistant
Feat/2025 12 08 chord assistant
2025-12-17 23:08:01 -08:00
Xiaohan-Tian 5cceec0c01 feat: implemented chord guide customization feature 2025-12-17 23:07:21 -08:00
Xiaohan-Tian 610b81e4cc feat: merge mode_list.json into functional_chords.json 2025-12-17 22:10:37 -08:00
GitHub Actions Bot 1650bd05b7 chore(release): 0.6.1-build.20251216
Generated release with automated versioning system.

Release type: patch

Build date: 2025-12-16 06:58:11 UTC

🤖 Generated with automated release workflow
2025-12-16 06:58:11 +00:00
Xiaohan-Tian 2fc6e56f40 Merge pull request #21 from KGAudioLab/feat/2025-12-08-chord-assistant
test: fixed test errors; skip failing integration tests temporarily
2025-12-15 22:57:31 -08:00
Xiaohan-Tian 46d3a21178 test: fixed test errors; skip failing integration tests temporarily
Skip command-execution and project-store-sync tests due to getMaxBars initialization issue
2025-12-15 22:56:32 -08:00
GitHub Actions Bot 1bdbdc7759 chore(release): 0.6.0-build.20251216
Generated release with automated versioning system.

Release type: minor

Build date: 2025-12-16 06:28:13 UTC

🤖 Generated with automated release workflow
2025-12-16 06:28:13 +00:00
Xiaohan-Tian 03b579682e Merge pull request #20 from KGAudioLab/feat/2025-12-08-chord-assistant
Feat/2025 12 08 chord assistant
2025-12-15 22:19:07 -08:00
Xiaohan-Tian 56be4440fa docs: add Intelligent Chord Assistant feature to README 2025-12-15 22:18:28 -08:00