Add control over phase randomization and fix a bug with supersaw
This commit is contained in:
parent
ef87f65bef
commit
e3741ae8fa
4 changed files with 22 additions and 10 deletions
|
|
@ -186,7 +186,7 @@ async function onTriggerSynth(t, value, onended, bank, frameLen) {
|
|||
const ac = getAudioContext();
|
||||
let [attack, decay, sustain, release] = getADSRValues([value.attack, value.decay, value.sustain, value.release]);
|
||||
let sourceDesc, holdEnd, envEnd;
|
||||
let { unison, spread, detune, wtPos, wtWarp, wtWarpMode } = value;
|
||||
let { wtWarpMode } = value;
|
||||
if (typeof wtWarpMode === 'string') {
|
||||
wtWarpMode = WarpMode[wtWarpMode.toUpperCase()] ?? WarpMode.NONE;
|
||||
}
|
||||
|
|
@ -202,12 +202,13 @@ async function onTriggerSynth(t, value, onended, bank, frameLen) {
|
|||
begin: t,
|
||||
end: envEnd,
|
||||
frequency,
|
||||
detune,
|
||||
position: wtPos,
|
||||
warp: wtWarp,
|
||||
detune: value.detune,
|
||||
position: value.wtPos,
|
||||
warp: value.wtWarp,
|
||||
warpMode: wtWarpMode,
|
||||
voices: unison,
|
||||
spread,
|
||||
voices: value.unison,
|
||||
spread: value.spread,
|
||||
phaserand: value.wtPhaseRand,
|
||||
},
|
||||
{ outputChannelCount: [2] },
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue