make sure the sustained pitch is the selected note
This commit is contained in:
parent
3506de8d1a
commit
fd73571744
1 changed files with 5 additions and 2 deletions
|
|
@ -153,8 +153,11 @@ export function getPitchEnvelope(param, value, t, holdEnd) {
|
||||||
value.psustain,
|
value.psustain,
|
||||||
value.prelease,
|
value.prelease,
|
||||||
]);
|
]);
|
||||||
const cents = value.penv * 100;
|
let panchor = value.panchor ?? psustain;
|
||||||
getParamADSR(param, pattack, pdecay, psustain, prelease, 0, cents, t, holdEnd, 'linear');
|
const cents = value.penv * 100; // penv is in semitones
|
||||||
|
const min = 0 - cents * panchor;
|
||||||
|
const max = cents - cents * panchor;
|
||||||
|
getParamADSR(param, pattack, pdecay, psustain, prelease, min, max, t, holdEnd, 'linear');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue