slightly better

This commit is contained in:
2025-10-06 02:16:23 +02:00
parent ba37b94908
commit ac772054c9
35 changed files with 1874 additions and 390 deletions

View File

@ -6,11 +6,13 @@ import { Knob } from './Knob'
interface EngineControlsProps {
values: EffectValues
onChange: (parameterId: string, value: number) => void
onMapClick?: (paramId: string, lfoIndex: number) => void
getMappedLFOs?: (paramId: string) => number[]
}
const KNOB_PARAMS = ['masterVolume', 'a', 'b', 'c', 'd']
const KNOB_PARAMS = ['masterVolume', 'pitch', 'a', 'b', 'c', 'd']
export function EngineControls({ values, onChange }: EngineControlsProps) {
export function EngineControls({ values, onChange, onMapClick, getMappedLFOs }: EngineControlsProps) {
const formatValue = (id: string, value: number): string => {
switch (id) {
case 'sampleRate':
@ -43,6 +45,9 @@ export function EngineControls({ values, onChange }: EngineControlsProps) {
onChange={(value) => onChange(param.id, value)}
formatValue={formatValue}
valueId={param.id}
paramId={param.id}
onMapClick={onMapClick}
mappedLFOs={getMappedLFOs ? getMappedLFOs(param.id) : []}
/>
)
}