26 Commits

Author SHA1 Message Date
691f75209d docs: mark Phase 15.2 Responsive Design as complete
Updated PLAN.md to reflect completion of mobile responsiveness enhancements:
- Touch gesture support via collapse/expand chevron buttons
- Collapsible track and master controls with detailed state descriptions
- Track collapse buttons on mobile (dual chevron system)
- Mobile vertical stacking with automation and effects bars
- Height synchronization between track controls and waveform containers

Phase 15.2 now fully complete with comprehensive mobile support.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 20:51:15 +01:00
e09bc1449c docs: mark Phase 14 (Settings & Preferences) as complete
Updated PLAN.md to reflect completion of Phase 14:
- Global settings system with localStorage persistence
- 5 settings tabs: Recording, Audio, Editor, Interface, Performance
- Real-time application to editor behavior
- All major settings implemented and functional

Applied settings:
- defaultTrackHeight → new track creation
- defaultZoom → initial zoom state
- enableSpectrogram → analyzer visibility
- sampleRate → recording configuration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 18:32:19 +01:00
ac8aa9e6c6 feat: complete Phase 13 - Keyboard Shortcuts
Added all remaining keyboard shortcuts for a complete keyboard-driven workflow:

Playback Shortcuts:
- Home: Jump to start
- End: Jump to end
- Left/Right Arrow: Seek ±1 second
- Ctrl+Left/Right: Seek ±5 seconds

Editing Shortcuts:
- Ctrl+A: Select All (entire track content)

View Shortcuts:
- Ctrl+Plus/Equals: Zoom in
- Ctrl+Minus: Zoom out
- Ctrl+0: Fit to view

All shortcuts work seamlessly with existing shortcuts:
- Spacebar: Play/Pause
- Ctrl+Z/Y: Undo/Redo
- Ctrl+X/C/V: Cut/Copy/Paste
- Ctrl+S: Save
- Ctrl+D: Duplicate
- Delete/Backspace: Delete
- Escape: Clear selection

The editor is now fully controllable via keyboard for a professional
audio editing workflow similar to Audacity/Reaper.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 10:36:58 +01:00
543eb069d7 docs: mark Phase 12.3 (Export/Import) as complete 2025-11-19 10:25:30 +01:00
9ad504478d docs: mark Phase 12 (Project Management) as complete
Completed features:
- IndexedDB project storage with full serialization
- Projects dialog UI for managing projects
- Auto-save (3-second debounce, silent)
- Manual save with Ctrl+S keyboard shortcut
- Auto-load last project on startup
- Editable project name in header
- Delete and duplicate project functionality
- Project metadata tracking (created/updated timestamps)

Phase 12.3 (Export/Import JSON) remains for future implementation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 10:14:12 +01:00
37f910acb7 feat: complete Phase 11.4 - comprehensive audio file import
Implemented advanced audio import capabilities:

**Import Features:**
- Support for WAV, MP3, OGG, FLAC, M4A, AIFF formats
- Sample rate conversion using OfflineAudioContext
- Stereo to mono conversion (equal channel mixing)
- Normalize on import option (99% peak with 1% headroom)
- Comprehensive codec detection from MIME types and extensions

**API Enhancements:**
- ImportOptions interface (convertToMono, targetSampleRate, normalizeOnImport)
- importAudioFile() function returning buffer + metadata
- AudioFileInfo with AudioMetadata (codec, duration, channels, sample rate, file size)
- Enhanced decodeAudioFile() with optional import transformations

**UI Components:**
- ImportDialog component with import settings controls
- Sample rate selector (44.1kHz - 192kHz)
- Checkbox options for mono conversion and normalization
- File info display (original sample rate and channels)
- Updated FileUpload to show AIFF support

**Technical Implementation:**
- Offline resampling for quality preservation
- Equal-power channel mixing for stereo-to-mono
- Peak detection across all channels
- Metadata extraction with codec identification

Phase 11 (Export & Import) now complete!

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 08:25:36 +01:00
df1314a37c docs: update PLAN.md for Phase 11.3 completion
Updated documentation to reflect export regions implementation:
- Marked Phase 11.3 (Export Regions) as complete
- Updated progress overview to show Phase 11.1-11.3 complete
- Added export scope details to Working Features
- Listed all three export modes: project, selection, tracks
- Updated phase status summary

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 07:49:10 +01:00
c6ff313050 docs: update PLAN.md for Phase 11.1 & 11.2 completion
Updated documentation to reflect completed export features:
- Marked Phase 11.1 (Export Formats) as complete
- Marked Phase 11.2 (Export Settings) as complete
- Added technical implementation details for MP3 and FLAC
- Updated progress overview status
- Added Export Features section to Working Features list
- Updated Analysis Tools section to reflect Phase 10 completion

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 07:41:24 +01:00
1c56e596b5 docs: mark Phase 10 complete in PLAN.md
All Phase 10 items now complete:
-  Frequency Analyzer & Spectrogram
-  Phase Correlation Meter
-  LUFS Loudness Meter
-  Audio Statistics with full metrics

Updated status to Phase 11 (Export & Import) in progress.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 02:06:51 +01:00
461a800bb6 docs: update PLAN.md with Phase 10 progress
Marked completed items in Phase 10:
-  Frequency Analyzer (10.1) with real-time FFT display
-  Spectrogram (10.2) with time-frequency visualization
-  Peak/RMS metering (10.3) already complete
-  Clip indicator (10.3) for master channel

Added Analysis Tools section to Working Features.
Updated Current Status and Next Steps.

Remaining Phase 10 items:
- Phase correlation meter
- LUFS loudness meter
- Audio statistics display

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 01:54:39 +01:00
c54d5089c5 feat: complete Phase 9.3 - automation recording with write/touch/latch modes
Implemented comprehensive automation recording system for volume, pan, and effect parameters:

- Added automation recording modes:
  - Write: Records continuously during playback when values change
  - Touch: Records only while control is being touched/moved
  - Latch: Records from first touch until playback stops

- Implemented value change detection (0.001 threshold) to prevent infinite loops
- Fixed React setState-in-render errors by:
  - Using queueMicrotask() to defer state updates
  - Moving lane creation logic to useEffect
  - Properly memoizing touch handlers with useMemo

- Added proper value ranges for effect parameters:
  - Frequency: 20-20000 Hz
  - Q: 0.1-20
  - Gain: -40-40 dB

- Enhanced automation lane auto-creation with parameter-specific ranges
- Added touch callbacks to all parameter controls (volume, pan, effects)
- Implemented throttling (100ms) to avoid excessive automation points

Technical improvements:
- Used tracksRef and onRecordAutomationRef to ensure latest values in animation loops
- Added proper cleanup on playback stop
- Optimized recording to only trigger when values actually change

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 23:29:18 +01:00
a1f230a6e6 docs: update Phase 9 automation completion status
Phase 9 automation is now mostly complete!

 Completed:
- 9.1: Automation lanes UI (volume, pan, effects with dropdown selector)
- 9.2: Automation points (add/remove/drag/select/delete)
- 9.3: Real-time automation playback (volume, pan, effects)
  - Continuous evaluation via requestAnimationFrame
  - Proper parameter range conversion
  - Works with all effect types

 Remaining:
- Automation recording (write mode)
- Mode-specific recording behavior (touch/latch)
- Copy/paste automation
- Bezier curve support

The automation system is now fully functional for playback!
2025-11-18 19:08:43 +01:00
1666407ac2 docs: update Phase 9 automation progress in PLAN.md
Completed automation features:
-  9.1: Automation lanes UI (volume, pan, effects with dropdown)
-  9.2: Automation points (add/remove/drag/select/delete)
-  UI: Automation modes selector (R/W/T/L)

Remaining automation work:
-  9.3: Real-time automation playback
-  9.3: Automation recording
-  9.3: Automation modes implementation
-  9.2: Copy/paste automation, bezier curves
2025-11-18 19:02:57 +01:00
49dd0c2d38 feat: complete Phase 8.3 - recording settings (input gain, mono/stereo, sample rate)
Recording Settings (Phase 8.3):
- Added input gain control (0.0-2.0 with dB display)
- Real-time gain adjustment via GainNode during recording
- Mono/Stereo recording mode selection
- Sample rate matching (44.1kHz, 48kHz, 96kHz)
- Mono conversion averages all channels when enabled
- Recording settings panel shown when track is armed

Components Created:
- RecordingSettings.tsx: Settings panel with gain slider, mono/stereo toggle, sample rate buttons

Components Modified:
- useRecording hook: Added settings state and GainNode integration
- AudioEditor: Pass recording settings to TrackList
- TrackList: Forward settings to Track components
- Track: Show RecordingSettings when armed for recording

Technical Details:
- GainNode inserted between source and analyser in recording chain
- Real-time gain updates via gainNode.gain.value
- AudioContext created with target sample rate
- Mono conversion done post-recording by averaging channels
- Settings persist during recording session

Phase 8 Complete:
-  Phase 8.1: Audio Input
-  Phase 8.2: Recording Controls (punch/overdub)
-  Phase 8.3: Recording Settings
- 📋 Phase 9: Automation (NEXT)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 15:51:38 +01:00
5f0017facb feat: complete Phase 8.2 - punch-in/punch-out and overdub recording
Recording Controls (Phase 8.2):
- Added punch-in/punch-out UI controls with time inputs
- Punch mode toggle button with visual feedback
- Set punch times from current playback position
- Collapsible punch time editor shown when enabled
- Overdub mode toggle for layering recordings
- Overdub implementation mixes recorded audio with existing track audio

Components Modified:
- PlaybackControls: Added punch and overdub controls with icons
- AudioEditor: Implemented overdub mixing logic and state management
- PLAN.md: Marked Phase 8.1 and 8.2 as complete

Technical Details:
- Overdub mixes audio buffers by averaging samples to avoid clipping
- Handles multi-channel audio correctly
- Punch controls use AlignVerticalJustifyStart/End icons
- Overdub uses Layers icon for visual clarity

Phase 8 Progress:
-  Phase 8.1: Audio Input (complete)
-  Phase 8.2: Recording Controls (complete)
- 🔲 Phase 8.3: Recording Settings (next)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 15:44:13 +01:00
beb7085c89 feat: complete Phase 7.4 - real-time track effects system
Implemented comprehensive real-time effect processing for multi-track audio:

Core Features:
- Per-track effect chains with drag-and-drop reordering
- Effect bypass/enable toggle per effect
- Real-time parameter updates (filters, dynamics, time-based, distortion, bitcrusher, pitch, timestretch)
- Add/remove effects during playback without interruption
- Effect chain persistence via localStorage
- Automatic playback stop when tracks are deleted

Technical Implementation:
- Effect processor with dry/wet routing for bypass functionality
- Real-time effect parameter updates using AudioParam setValueAtTime
- Structure change detection for add/remove/reorder operations
- Stale closure fix using refs for latest track state
- ScriptProcessorNode for bitcrusher, pitch shifter, and time stretch
- Dual-tap delay line for pitch shifting
- Overlap-add synthesis for time stretching

UI Components:
- EffectBrowser dialog with categorized effects
- EffectDevice component with parameter controls
- EffectParameters for all 19 real-time effect types
- Device rack with horizontal scrolling (Ableton-style)

Removed offline-only effects (normalize, fadeIn, fadeOut, reverse) as they don't fit the real-time processing model.

Completed all items in Phase 7.4:
- [x] Per-track effect chain
- [x] Effect rack UI
- [x] Effect bypass per track
- [x] Real-time effect processing during playback
- [x] Add/remove effects during playback
- [x] Real-time parameter updates
- [x] Effect chain persistence

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 12:08:33 +01:00
cbcd38b1ed refactor: remove master effects section, add TODO note
Removed the master effects section from AudioEditor footer:
- Simplified footer to only show transport controls
- Removed master channel strip area
- Removed border separator between sections

Added note to PLAN.md:
- 🔲 Master channel effects (TODO)
- Will implement master effect chain UI later
- Similar to per-track effects but for final mix
- Documented in Phase 7 multi-track features section

This cleans up the UI for now - we'll add master effects
with a proper device rack UI later, similar to how per-track
effects work (collapsible section with horizontal device cards).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 08:43:38 +01:00
35514cc685 docs: update PLAN.md for Phase 7 progress
Marked Phase 7.1, 7.2, and 7.3 as complete:

**Phase 7.1 - Track Management:** ✓
- Track creation/removal
- Track naming (inline editing)
- Track colors (9 presets)
- Track reordering support

**Phase 7.2 - Track Controls:** ✓
- Solo/Mute per track
- Volume fader (0-100%)
- Pan control (L-C-R)
- Record enable (UI ready)
- Track height adjustment
- Collapse/expand

**Phase 7.3 - Multi-Track Playback:** ✓
- Real-time multi-track mixing
- Synchronized playback
- Per-track gain and pan
- Solo/Mute handling

**Working Features Added:**
- 12 new multi-track features fully functional
- Complete track management system
- Professional mixing capabilities

**Current Status:** Phase 7 In Progress
**Next:** Integration with AudioEditor UI (Phase 7.4)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 21:04:53 +01:00
0986896756 feat: add Phase 6.6 Effect Chain Management system
Effect Chain System:
- Create comprehensive effect chain types and state management
- Implement EffectRack component with drag-and-drop reordering
- Add enable/disable toggle for individual effects
- Build PresetManager for save/load/import/export functionality
- Create useEffectChain hook with localStorage persistence

UI Integration:
- Add Chain tab to SidePanel with effect rack
- Integrate preset manager dialog
- Add chain management controls (clear, presets)
- Update SidePanel with chain props and handlers

Features:
- Drag-and-drop effect reordering with visual feedback
- Effect bypass/enable toggle with power icons
- Save effect chains as presets with descriptions
- Import/export presets as JSON files
- localStorage persistence for chains and presets
- Visual status indicators for enabled/disabled effects
- Preset timestamp and effect count display

Components Created:
- /lib/audio/effects/chain.ts - Effect chain types and utilities
- /components/effects/EffectRack.tsx - Visual effect chain component
- /components/effects/PresetManager.tsx - Preset management dialog
- /lib/hooks/useEffectChain.ts - Effect chain state hook

Updated PLAN.md:
- Mark Phase 6.6 as complete
- Update current status to Phase 6.6 Complete
- Add effect chain features to working features list
- Update Next Steps to show Phase 6 complete

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 20:27:08 +01:00
ee48f9475f feat: add advanced audio effects and improve UI
Phase 6.5 Advanced Effects:
- Add Pitch Shifter with semitones and cents adjustment
- Add Time Stretch with pitch preservation using overlap-add
- Add Distortion with soft/hard/tube types and tone control
- Add Bitcrusher with bit depth and sample rate reduction
- Add AdvancedParameterDialog with real-time waveform visualization
- Add 4 professional presets per effect type

Improvements:
- Fix undefined parameter errors by adding nullish coalescing operators
- Add global custom scrollbar styling with color-mix transparency
- Add custom-scrollbar utility class for side panel
- Improve theme-aware scrollbar appearance in light/dark modes
- Fix parameter initialization when switching effect types

Integration:
- All advanced effects support undo/redo via EffectCommand
- Effects accessible via command palette and side panel
- Selection-based processing support
- Toast notifications for all effects

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 20:03:40 +01:00
d6a52ee477 docs: update PLAN.md to reflect Phase 5 completion
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 17:08:58 +01:00
55009593f7 docs: clarify Phase 4 accomplished vs future features
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 17:05:50 +01:00
bf8d25aa1d docs: update PLAN.md to reflect Phase 4 completion
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 15:51:38 +01:00
5cf9a69056 feat: complete Phase 3 - Advanced waveform visualization and zoom controls
Phase 3 Complete Features:
 Drag-to-scrub audio functionality
 Horizontal zoom (1x-20x) with smooth scaling
 Vertical amplitude zoom (0.5x-5x)
 Horizontal scrolling for zoomed waveform
 Grid lines every second for time reference
 Viewport culling for better performance
 Zoom controls UI component

Components Added:
- ZoomControls: Complete zoom control panel with:
  - Horizontal zoom slider and buttons
  - Amplitude zoom slider
  - Zoom in/out buttons
  - Fit to view button
  - Real-time zoom level display

Waveform Enhancements:
- Drag-to-scrub: Click and drag to scrub through audio
- Zoom support: View waveform at different zoom levels
- Scroll support: Navigate through zoomed waveform
- Grid lines: Visual time markers every second
- Viewport culling: Only render visible portions
- Cursor feedback: Grabbing cursor when dragging

AudioEditor Updates:
- Integrated zoom and scroll state management
- Auto-reset zoom on file clear
- Scroll slider appears when zoomed
- Smooth zoom transitions

Technical Improvements:
- Viewport culling: Only render visible waveform portions
- Grid rendering: Time-aligned vertical grid lines
- Smart scroll clamping: Prevent scrolling beyond bounds
- Zoom-aware seeking: Accurate time calculation with zoom
- Performance optimized rendering

Features Working:
 Drag waveform to scrub audio
 Zoom in up to 20x for detailed editing
 Adjust amplitude for better visualization
 Scroll through zoomed waveform
 Grid lines show time markers
 Smooth cursor interactions

Phase 3 Status: 95% complete
- Completed: All major features
- Optional: Measure/beat markers, OffscreenCanvas, Web Workers

Build verified and working ✓

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 15:44:29 +01:00
23300f0c47 chore: add PostCSS config and update implementation plan progress
- Added postcss.config.js for Tailwind CSS 4
- Updated PLAN.md with progress overview section
- Marked all completed features in implementation phases:
  - Phase 1: 95% complete (core infrastructure)
  - Phase 2: 90% complete (audio engine)
  - Phase 3: 60% complete (waveform visualization)
- Added deployment files to project structure documentation

Features marked as complete:
 Project setup with Next.js 16 + Tailwind CSS 4
 Core UI components (Button, Card, Slider, Progress, Toast)
 Theme system with dark/light mode
 Web Audio API integration
 Audio file upload and decoding
 Playback controls and volume management
 Waveform rendering with Canvas API
 Timeline scrubbing and seeking
 Real-time progress visualization
2025-11-17 15:35:36 +01:00
88749dafae docs: add initial project plan and README
Added comprehensive implementation plan (PLAN.md) with 15 phases covering:
- Project setup with Next.js 16 and Tailwind CSS 4
- Web Audio API integration
- Waveform visualization
- Multi-track editing
- Audio effects and automation
- Recording capabilities
- Export/import functionality

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 15:05:39 +01:00