added distortion effect
This commit is contained in:
parent
c77b0098a7
commit
1221c6144c
3 changed files with 53 additions and 8 deletions
|
|
@ -311,6 +311,7 @@ export const superdough = async (value, deadline, hapDuration) => {
|
|||
coarse,
|
||||
crush,
|
||||
shape,
|
||||
distort,
|
||||
pan,
|
||||
vowel,
|
||||
delay = 0,
|
||||
|
|
@ -452,8 +453,14 @@ 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 }));
|
||||
const shapeInput = Array.isArray(shape) ? { shape: shape[0], postgain: shape[1] } : { shape };
|
||||
shape !== undefined && chain.push(getWorklet(ac, 'shape-processor', shapeInput));
|
||||
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));
|
||||
}
|
||||
|
||||
compressorThreshold !== undefined &&
|
||||
chain.push(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue