mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-24 03:58:53 +00:00
fix: center supersaw if only 1 voice
This commit is contained in:
parent
ea58238453
commit
5982e3ebea
@ -85,7 +85,7 @@ export function registerSynthSounds() {
|
|||||||
const holdend = begin + duration;
|
const holdend = begin + duration;
|
||||||
const end = holdend + release + 0.01;
|
const end = holdend + release + 0.01;
|
||||||
const voices = clamp(unison, 1, 100);
|
const voices = clamp(unison, 1, 100);
|
||||||
|
let panspread = voices > 1 ? clamp(spread, 0, 1) : 0;
|
||||||
let o = getWorklet(
|
let o = getWorklet(
|
||||||
ac,
|
ac,
|
||||||
'supersaw-oscillator',
|
'supersaw-oscillator',
|
||||||
@ -95,7 +95,7 @@ export function registerSynthSounds() {
|
|||||||
end,
|
end,
|
||||||
freqspread: detune * 0.1,
|
freqspread: detune * 0.1,
|
||||||
voices,
|
voices,
|
||||||
panspread: clamp(spread, 0, 1),
|
panspread,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
outputChannelCount: [2],
|
outputChannelCount: [2],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user