prepare to add function for mapping vol to percent
This commit is contained in:
parent
7a6e41f482
commit
482f5de0fe
2 changed files with 13 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue