prepare to add function for mapping vol to percent

This commit is contained in:
tildearrow 2024-07-14 19:58:33 -05:00
parent 7a6e41f482
commit 482f5de0fe
2 changed files with 13 additions and 0 deletions

View file

@ -107,6 +107,11 @@ int DivDispatch::mapVelocity(int ch, float vel) {
return round(vel*volMax);
}
float DivDispatch::getGain(int ch, int vol) {
const float volMax=MAX(1,dispatch(DivCommand(DIV_CMD_GET_VOLMAX,MAX(ch,0))));
return (float)vol/volMax;
}
int DivDispatch::getPortaFloor(int ch) {
return 0x00;
}