Commit Graph

15 Commits

Author SHA1 Message Date
Xiaohan-Tian 738628fc76 feat: added pitch bend automation (linear interpolation) 2026-05-06 18:25:14 -07:00
Xiaohan-Tian 98cccf5c7a feat: added pitch bend support 2026-05-05 21:28:32 -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 adb2345693 fix: wwitched the preroll metronome scheduling off window.setTimeout and onto Tone’s audio-context clock 2026-05-01 12:16:57 -07:00
Xiaohan-Tian a474065450 fix: pre-roll metronome ticks are missing 2026-05-01 12:11:02 -07:00
Xiaohan-Tian 0ac39068b2 feat: added metronome feature 2026-04-19 17:00:10 -07:00
Xiaohan-Tian 1670679c61 feat: add audio region trimming with non-destructive clip offset 2026-04-10 20:17:31 -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 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 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 c1112f41d5 added an option to fix the "Zoom can't capture the sound" problem (it is IMPORTANT to choose "share sound" when share screen in Zoom). 2025-08-20 15:48:26 -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