From 5982e3ebeaa5e468e5a717907c7be48bf30e6bbc Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Tue, 19 Mar 2024 09:00:25 +0100 Subject: [PATCH] fix: center supersaw if only 1 voice --- packages/superdough/synth.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/superdough/synth.mjs b/packages/superdough/synth.mjs index 2f689c2f..3f15521d 100644 --- a/packages/superdough/synth.mjs +++ b/packages/superdough/synth.mjs @@ -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],