diff --git a/components/tracks/TrackList.tsx b/components/tracks/TrackList.tsx index 629a0ed..da1bfd6 100644 --- a/components/tracks/TrackList.tsx +++ b/components/tracks/TrackList.tsx @@ -10,6 +10,7 @@ import type { Track as TrackType } from '@/types/track'; import { DEFAULT_TRACK_HEIGHT, COLLAPSED_TRACK_HEIGHT, MIN_TRACK_HEIGHT } from '@/types/track'; import { createEffect, type EffectType, EFFECT_NAMES } from '@/lib/audio/effects/chain'; import { AutomationLane } from '@/components/automation/AutomationLane'; +import { AutomationHeader } from '@/components/automation/AutomationHeader'; import type { AutomationPoint as AutomationPointType } from '@/types/automation'; import { createAutomationPoint } from '@/lib/audio/automation/utils'; import { EffectDevice } from '@/components/effects/EffectDevice'; @@ -303,16 +304,44 @@ export function TrackList({ {/* Automation Bar - Collapsible - Fixed height when expanded */} - {!track.collapsed && ( + {!track.collapsed && (() => { + const selectedParam = track.automation.selectedParameterId || 'volume'; + const currentLane = track.automation.lanes.find( + l => l.parameterId === selectedParam + ); + + // Build available parameters list + const availableParameters: Array<{ id: string; name: string }> = [ + { id: 'volume', name: 'Volume' }, + { id: 'pan', name: 'Pan' }, + ]; + + // Add effect parameters + track.effectChain.effects.forEach((effect) => { + if (effect.parameters) { + Object.keys(effect.parameters).forEach((paramKey) => { + const parameterId = `effect.${effect.id}.${paramKey}`; + const paramName = `${effect.name} - ${paramKey.charAt(0).toUpperCase() + paramKey.slice(1)}`; + availableParameters.push({ id: parameterId, name: paramName }); + }); + } + }); + + return (