pitch envelope for sampler and soundfonts
+ added getPitchEnvelope helper
This commit is contained in:
parent
bdc2af9733
commit
32456d6966
4 changed files with 37 additions and 17 deletions
|
|
@ -144,3 +144,16 @@ export function drywet(dry, wet, wetAmount = 0) {
|
|||
wet_gain.connect(mix);
|
||||
return mix;
|
||||
}
|
||||
|
||||
export function getPitchEnvelope(param, value, t, holdEnd) {
|
||||
if (value.penv) {
|
||||
let [pattack, pdecay, psustain, prelease] = getADSRValues([
|
||||
value.pattack,
|
||||
value.pdecay,
|
||||
value.psustain,
|
||||
value.prelease,
|
||||
]);
|
||||
const cents = value.penv * 100;
|
||||
getParamADSR(param, pattack, pdecay, psustain, prelease, 0, cents, t, holdEnd, 'linear');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue