fix: don't add frequency
This commit is contained in:
parent
df211c994d
commit
40de717cc9
1 changed files with 4 additions and 3 deletions
|
|
@ -94,10 +94,11 @@ export function createFilter(context, type, frequency, Q, attack, decay, sustain
|
||||||
min *= frequency;
|
min *= frequency;
|
||||||
max *= frequency;
|
max *= frequency;
|
||||||
|
|
||||||
//console.log('min', min, 'max', max);
|
min = clamp(min, 0, 20000);
|
||||||
|
max = clamp(max, 0, 20000);
|
||||||
|
|
||||||
|
console.log('min', min, 'max', max);
|
||||||
|
|
||||||
min = clamp(min + frequency, 0, 20000);
|
|
||||||
max = clamp(max + frequency, 0, 20000);
|
|
||||||
getParamADSR(filter.frequency, attack, decay, sustain, release, min, max, start, end);
|
getParamADSR(filter.frequency, attack, decay, sustain, release, min, max, start, end);
|
||||||
return filter;
|
return filter;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue