mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-11 21:58:37 +00:00
Connecting all parameters to convolution generator
This commit is contained in:
parent
e600b91a85
commit
2d07eeb518
@ -26,8 +26,11 @@ if (typeof AudioContext !== 'undefined') {
|
||||
}
|
||||
);
|
||||
convolver.duration = d;
|
||||
convolver.fade = fade;
|
||||
convolver.revlp = revlp;
|
||||
convolver.revdim = revdim;
|
||||
};
|
||||
convolver.setDuration(duration);
|
||||
convolver.setDuration(duration, fade, revlp, revdim);
|
||||
return convolver;
|
||||
};
|
||||
}
|
||||
|
||||
@ -118,17 +118,29 @@ function getReverb(orbit, duration = 2, fade, revlp, revdim) {
|
||||
duration,
|
||||
fade,
|
||||
revlp,
|
||||
revdim,
|
||||
);
|
||||
reverb.connect(getDestination());
|
||||
console.log(reverb)
|
||||
reverbs[orbit] = reverb;
|
||||
console.log(reverbs[orbit]);
|
||||
}
|
||||
// Update the reverb duration if needed after instanciation
|
||||
if (reverbs[orbit].duration !== duration) {
|
||||
|
||||
if (
|
||||
reverbs[orbit].duration !== duration ||
|
||||
reverbs[orbit].fade !== fade ||
|
||||
reverbs[orbit].revlp !== revlp ||
|
||||
reverbs[orbit].revdim !== revdim
|
||||
) {
|
||||
reverbs[orbit] = reverbs[orbit].setDuration(
|
||||
duration, fade, revlp, revdim);
|
||||
duration, fade, revlp, revdim
|
||||
);
|
||||
reverbs[orbit].duration = duration;
|
||||
reverbs[orbit].fade = fade;
|
||||
reverbs[orbit].revlp = revlp;
|
||||
reverbs[orbit].revdim = revdim;
|
||||
|
||||
}
|
||||
|
||||
return reverbs[orbit];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user