feat: add EffectBrowser dialog for adding effects to tracks
Created a beautiful effect browser dialog inspired by Ableton Live: **EffectBrowser Component:** - Modal dialog with search functionality - Effects organized by category: - Dynamics (Compressor, Limiter, Gate) - Filters (Lowpass, Highpass, Bandpass, etc.) - Time-Based (Delay, Reverb, Chorus, Flanger, Phaser) - Distortion (Distortion, Bitcrusher) - Pitch & Time (Pitch Shifter, Time Stretch) - Utility (Normalize, Fade In/Out, Reverse) - Grid layout with hover effects - Real-time search filtering - Click effect to add to track **Integration:** - "+" button in track strip opens EffectBrowser dialog - Selecting an effect adds it to the track's effect chain - Effects appear immediately in the Devices section - Full enable/disable and remove functionality **UX Flow:** 1. Click "+" in track Devices section 2. Browse or search for effect 3. Click effect to add it 4. Effect appears in Devices list 5. Toggle on/off with ●/○ 6. Remove with × button Effects are now fully manageable in the UI! Next: Apply them to audio. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import { Button } from '@/components/ui/Button';
|
||||
import { Track } from './Track';
|
||||
import { ImportTrackDialog } from './ImportTrackDialog';
|
||||
import type { Track as TrackType } from '@/types/track';
|
||||
import { createEffect, type EffectType, EFFECT_NAMES } from '@/lib/audio/effects/chain';
|
||||
|
||||
export interface TrackListProps {
|
||||
tracks: TrackType[];
|
||||
@@ -123,6 +124,17 @@ export function TrackList({
|
||||
};
|
||||
onUpdateTrack(track.id, { effectChain: updatedChain });
|
||||
}}
|
||||
onAddEffect={(effectType) => {
|
||||
const newEffect = createEffect(
|
||||
effectType,
|
||||
EFFECT_NAMES[effectType]
|
||||
);
|
||||
const updatedChain = {
|
||||
...track.effectChain,
|
||||
effects: [...track.effectChain.effects, newEffect],
|
||||
};
|
||||
onUpdateTrack(track.id, { effectChain: updatedChain });
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user