fix volume

This commit is contained in:
Jade (Rose) Rowland
2025-06-04 01:08:36 +01:00
parent 5129fa6677
commit ff4b7ca171
+3 -3
View File
@@ -146,7 +146,6 @@ export class ADSR {
startVal = 0;
update(curTime, gate, attack, decay, susVal, release) {
console.info('here')
switch (this.state) {
case 'off': {
if (gate > 0) {
@@ -191,6 +190,7 @@ export class ADSR {
}
case 'release': {
let time = curTime - this.startTime;
if (time > release) {
this.state = 'off';
return 0;
@@ -353,7 +353,7 @@ let getDefaultValue = (key) => defaultDefaultValues[key];
export class Dough {
init(value, sampleRate) {
// params without defaults:
/*
bank,
@@ -455,7 +455,7 @@ export class Dough {
const env = this._adsr.update(t, gate, this.attack, this.decay, this.sustain, this.release);
s = s * env;
s = s * this.postgain * .3
s = s * this.postgain * .2
return s;
}
}