Merge branch 'main' into oscillator_enhancements

This commit is contained in:
Jade (Rose) Rowland 2024-03-05 00:45:56 -05:00 committed by GitHub
commit 641d9f5ebd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 223 additions and 175 deletions

View file

@ -251,7 +251,7 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) {
nudge = 0, // TODO: is this in seconds?
cut,
loop,
clip = undefined, // if 1, samples will be cut off when the hap ends
clip = undefined, // if set, samples will be cut off when the hap ends
n = 0,
note,
speed = 1, // sample playback speed

View file

@ -316,7 +316,9 @@ export const superdough = async (value, deadline, hapDuration) => {
coarse,
crush,
shape,
shapevol = 1,
distort,
distortvol = 1,
pan,
vowel,
delay = 0,
@ -458,14 +460,8 @@ export const superdough = async (value, deadline, hapDuration) => {
// effects
coarse !== undefined && chain.push(getWorklet(ac, 'coarse-processor', { coarse }));
crush !== undefined && chain.push(getWorklet(ac, 'crush-processor', { crush }));
if (shape !== undefined) {
const input = Array.isArray(shape) ? { shape: shape[0], postgain: shape[1] } : { shape };
chain.push(getWorklet(ac, 'shape-processor', input));
}
if (distort !== undefined) {
const input = Array.isArray(distort) ? { distort: distort[0], postgain: distort[1] } : { distort };
chain.push(getWorklet(ac, 'distort-processor', input));
}
shape !== undefined && chain.push(getWorklet(ac, 'shape-processor', { shape, postgain: shapevol }));
distort !== undefined && chain.push(getWorklet(ac, 'distort-processor', { distort, postgain: distortvol }));
compressorThreshold !== undefined &&
chain.push(