Commit Graph

80 Commits

Author SHA1 Message Date
3dtours 034455598d fix: brush draw per-note duration with noteStartBeats tracking 2026-07-26 10:50:45 +07:00
3dtours 8450bd6de4 fix: brush draw only pitch change + CC velocity skip unchanged 2026-07-26 10:48:16 +07:00
3dtours d2993eee69 fix: brush drawing smooth - track pitch + beat delta 2026-07-26 10:44:37 +07:00
3dtours fe379c45e2 fix: brush shape draw + remove transport + loop repeat sound 2026-07-26 10:41:31 +07:00
3dtours d20fafb75e fix: velocity flicker - grid canvas useLayoutEffect sync 2026-07-26 10:29:23 +07:00
3dtours 0b7dd82407 fix: scroll speed matches mouse + CC flicker useLayoutEffect 2026-07-26 10:26:00 +07:00
3dtours 7107a0cc14 fix: brush scroll speed + CC snap + non-selected flicker 2026-07-26 10:21:31 +07:00
3dtours 8ec4b05e21 fix: brush pitch-based scroll + CC velocity per-note paint 2026-07-26 10:14:40 +07:00
3dtours 9237d01f35 fix: auto-scroll continuous + batch CC velocity for selected notes 2026-07-26 10:09:55 +07:00
3dtours a765998455 feat: piano roll 4 features - SNAP, velocity selected, auto-scroll, synth button 2026-07-26 09:43:19 +07:00
3dtours 5bd92ee186 fix: đã sửa lỗi chọn range trong MIDI marquee và chọn note 2026-07-25 22:34:34 +07:00
3dtours 790a5823f6 fix: đã sửa lỗi chọn range trong MIDI marquee 2026-07-25 22:18:44 +07:00
3dtours 1b711ef014 feat: piano roll transport, ARM/INPUT, AI bar range, MIDI recording
- Transport: play/stop/back/next/record buttons in piano roll toolbar
- ARM toggle + MIDI input device selector next to Snap to Scale
- AI bar range selector (bar X to bar Y) for Copilot MIDI generation
- handleAISend detects active piano roll tab and routes MIDI prompt
- Added selectedMidiInputId state + handleMidiInputSelect for MIDI input
2026-07-25 17:22:24 +07:00
3dtours e0531be65b fix: redraw canvas when section/MIDI item duration changes on resize
Add setCanvasRedrawCount after updateActiveTracks in resize handler
so WaveformLane re-renders with updated notes/waveform.
2026-07-25 11:33:35 +07:00
3dtours c397545383 fix: read scrollLeft from DOM wrapper for canvas sync
Canvas effects now find nearest scrollable ancestor and read
scrollLeft directly, bypassing React prop latency during auto-scroll.
Applies to TempoTrackLane, WaveformLane, TimelineRuler.
2026-07-25 11:09:20 +07:00
3dtours 5bd61516aa fix: PADDING_LEFT=0, tEnd uses CLIP_BUFFER for right buffer
- PADDING_LEFT=0 in all 3 components (grid aligns with clip origin)
- TempoTrackLane/WaveformLane tEnd uses CLIP_BUFFER/zoom so bars render past right edge
- TimelineRuler tEnd uses CLIP_BUFFER/zoom instead of PADDING_LEFT
2026-07-25 11:06:12 +07:00
3dtours 01cd3d1867 fix: allow item drag/resize to snap at column 0
- Removed Math.max(beatSec, ...) clamp from clip drag, section drag, section resize handlers
- Replaced with Math.max(0, ...) so items can snap to time 0
2026-07-25 10:59:17 +07:00
3dtours 8be4ce99e1 fix: tempo track height 40px fixed + clamp selection >= 0
- TempoTrackLane canvas height fixed to 40px, wrapper h-10 shrink-0 overflow-hidden
- selLeft/selRight clamped to Math.max(0, ...)
- rulerAnchorRef/setSelectionStart/setSelectionEnd clamped >= 0
2026-07-25 10:55:46 +07:00
3dtours b410de8855 refactor: zero lead-in, split time ruler + tempo track
- leadInMargin=0, time 0 at left edge, only 8px PADDING_LEFT
- TimelineRuler simplified: time-only labels, 40px height
- TempoTrackLane re-added to layout below time ruler (40px)
- WaveformLane PADDING_LEFT=8/zoom, leadIn=0
2026-07-25 10:48:45 +07:00
3dtours f299b93372 fix: sync TempoTrackLane leadIn with ruler, time labels to top
- Added leadInMargin prop to TempoTrackLane so time-0 aligns with ruler
- Added CLIP_BUFFER to TempoTrackLane grid rendering
- Moved TimelineRuler time labels from bottom (y=40) to top (y=11)
2026-07-25 10:41:13 +07:00
3dtours 70d1abaa7a fix: restore time duration labels on TimelineRuler + TempoTrackLane
Time labels (e.g. '0.00s', '1.00s') were lost in ff44fd4 merge.
Re-added as amber/orange text at ruler bottom, dynamic interval.
2026-07-25 10:37:12 +07:00
3dtours 8372ee1b98 feat: lead-in margin, 0-indexed bars, fix bar number clipping
- Add 1-bar lead-in margin at timeline start (bar 0, time 0s at margin edge)
- Playhead position includes lead-in offset
- Bar numbers now 0-indexed (0, 1, 2...) in ruler and track grid
- Fix bar number clipping: CLIP_BUFFER increased from 200px to
  max(400px, barWidth+200px) so bars past viewport edge render
- All mouse/time handlers account for lead-in margin (ruler, clip
  drag, section drag/resize, context menu, double-click)
- formatBeat returns 0-indexed bar
- Sub-tab ruler has leadInMargin=0 (no lead-in in clip editor)
2026-07-25 10:25:30 +07:00
3dtours ff44fd4b8d feat: merge tempo bar + timebar into beat-based TimelineRuler
Replace old seconds-based ruler (0.00s, 1.00s...) and TempoTrackLane
with unified 48px canvas ruler showing bar:beat grid lines, snap
sub-ticks, and BPM label. WaveformLane grid aligns with ruler
positions — items snap to same beat grid visually.
2026-07-25 10:12:59 +07:00
3dtours fbbe2c933c docs: update wiki.md with latest changes 2026-07-25 09:58:23 +07:00
3dtours e5a563d343 fix: TempoTrackLane reads scrollLeft from DOM instead of React prop 2026-07-25 09:30:42 +07:00
3dtours 6aed5e2ec8 fix: sync bar ruler redraw during drag via canvasRedrawCount 2026-07-25 09:24:31 +07:00
3dtours f1057ab7f2 feat: auto-follow dragged item in viewport for clip/section/MIDI drag and resize 2026-07-25 09:21:19 +07:00
3dtours aa63a310fc fix: brush velocity isolation from CC lane + AGENTs.md compliance 2026-07-25 09:18:41 +07:00
3dtours c5c3ec19cc chore: update wiki.md for velocity/redraw fix 2026-07-25 08:08:51 +07:00
3dtours b04a76ebfb fix: piano roll zoom/scroll + AI copilot + SF cache + auto-scroll drag 2026-07-25 07:37:27 +07:00