=
event.currentTarget.querySelectorAll('select')
for (const input of inputs) {
values.push(parseFloat(input.value))
}
if (fade) {
drawOptions.current.fade = parseInt(fade.value)
}
for (const gainInput of gains) {
gainValues.push(parseInt(gainInput.value))
}
for (const select of selects) {
types.push(select.value as OscillatorType)
}
for (let i: number = 0; i < oscillators.current.length; i++) {
oscillators.current[i].frequency.value = values[i] || 0
oscillators.current[i].type = types[i] || 'sine'
oscillatorGains.current[i].gain.setValueAtTime(
values[i] ? (gainValues[i] ?? 300) / 1000 : 0,
0,
)
}
}}
>
{new Array(12).fill(null).map(
(_: null, index: number): React.ReactNode => (
),
)}