ok
This commit is contained in:
@ -1,5 +1,50 @@
|
||||
import type { EffectConfig } from '../types/effects'
|
||||
|
||||
export const ENGINE_CONTROLS: EffectConfig[] = [
|
||||
{
|
||||
id: 'engine',
|
||||
name: 'Engine',
|
||||
parameters: [
|
||||
{
|
||||
id: 'sampleRate',
|
||||
label: 'Sample Rate',
|
||||
min: 0,
|
||||
max: 3,
|
||||
default: 1,
|
||||
step: 1,
|
||||
unit: ''
|
||||
},
|
||||
{
|
||||
id: 'loopDuration',
|
||||
label: 'Loop',
|
||||
min: 2,
|
||||
max: 8,
|
||||
default: 4,
|
||||
step: 2,
|
||||
unit: 's'
|
||||
},
|
||||
{
|
||||
id: 'complexity',
|
||||
label: 'Complexity',
|
||||
min: 0,
|
||||
max: 2,
|
||||
default: 1,
|
||||
step: 1,
|
||||
unit: ''
|
||||
},
|
||||
{
|
||||
id: 'masterVolume',
|
||||
label: 'Volume',
|
||||
min: 0,
|
||||
max: 100,
|
||||
default: 75,
|
||||
step: 1,
|
||||
unit: '%'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
export const EFFECTS: EffectConfig[] = [
|
||||
{
|
||||
id: 'reverb',
|
||||
@ -64,4 +109,25 @@ export function getDefaultEffectValues(): Record<string, number> {
|
||||
})
|
||||
})
|
||||
return defaults
|
||||
}
|
||||
|
||||
export function getDefaultEngineValues(): Record<string, number> {
|
||||
const defaults: Record<string, number> = {}
|
||||
ENGINE_CONTROLS.forEach(control => {
|
||||
control.parameters.forEach(param => {
|
||||
defaults[param.id] = param.default
|
||||
})
|
||||
})
|
||||
return defaults
|
||||
}
|
||||
|
||||
export const SAMPLE_RATES = [4000, 8000, 16000, 22050]
|
||||
|
||||
export function getSampleRateFromIndex(index: number): number {
|
||||
return SAMPLE_RATES[index] || 8000
|
||||
}
|
||||
|
||||
export function getComplexityLabel(index: number): string {
|
||||
const labels = ['Simple', 'Medium', 'Complex']
|
||||
return labels[index] || 'Medium'
|
||||
}
|
||||
Reference in New Issue
Block a user