apply volExp on velocity input - PLEASE READ

DivDispatch::mapVelocity() now takes a float instead of an unsigned char
This commit is contained in:
tildearrow 2023-12-16 19:52:37 -05:00
parent 99dd85bcb4
commit 51b385a1ef
18 changed files with 39 additions and 24 deletions

View file

@ -102,9 +102,9 @@ bool DivDispatch::isVolGlobal() {
return false;
}
int DivDispatch::mapVelocity(int ch, unsigned char vel) {
int DivDispatch::mapVelocity(int ch, float vel) {
const int volMax=MAX(1,dispatch(DivCommand(DIV_CMD_GET_VOLMAX,MAX(ch,0))));
return (vel*volMax)/127;
return round(vel*volMax);
}
int DivDispatch::getPortaFloor(int ch) {