fix: center supersaw if only 1 voice

This commit is contained in:
Felix Roos 2024-03-19 09:00:25 +01:00
parent ea58238453
commit 5982e3ebea

View File

@ -85,7 +85,7 @@ export function registerSynthSounds() {
const holdend = begin + duration;
const end = holdend + release + 0.01;
const voices = clamp(unison, 1, 100);
let panspread = voices > 1 ? clamp(spread, 0, 1) : 0;
let o = getWorklet(
ac,
'supersaw-oscillator',
@ -95,7 +95,7 @@ export function registerSynthSounds() {
end,
freqspread: detune * 0.1,
voices,
panspread: clamp(spread, 0, 1),
panspread,
},
{
outputChannelCount: [2],