feat: implement per-track and master effect chains (Option 3)
Architecture: - Each track now has its own effect chain stored in track.effectChain - Separate master effect chain for the final mix output - SidePanel has 3 tabs: Tracks, Track FX, Master FX Changes: - types/track.ts: Add effectChain field to Track interface - lib/audio/track-utils.ts: Initialize effect chain when creating tracks - lib/hooks/useMultiTrack.ts: Exclude effectChain from localStorage, recreate on load - components/editor/AudioEditor.tsx: - Add master effect chain state using useEffectChain hook - Add handlers for per-track effect chain manipulation - Pass both track and master effect chains to SidePanel - components/layout/SidePanel.tsx: - Update to 3-tab interface (Tracks | Track FX | Master FX) - Track FX tab shows effects for currently selected track - Master FX tab shows master bus effects with preset management - Different icons for track vs master effects tabs Note: Effect processing in Web Audio API not yet implemented. This commit sets up the data structures and UI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
* Multi-track types and interfaces
|
||||
*/
|
||||
|
||||
import type { EffectChain } from '@/lib/audio/effects/chain';
|
||||
|
||||
export interface Track {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -16,6 +18,9 @@ export interface Track {
|
||||
solo: boolean;
|
||||
recordEnabled: boolean;
|
||||
|
||||
// Effects
|
||||
effectChain: EffectChain;
|
||||
|
||||
// UI state
|
||||
collapsed: boolean;
|
||||
selected: boolean;
|
||||
|
||||
Reference in New Issue
Block a user