Updating sysDef; implementing mapVelocity
This commit is contained in:
parent
f42332f2c0
commit
403799d1a3
3 changed files with 9 additions and 1 deletions
|
|
@ -1019,6 +1019,13 @@ void DivPlatformESFM::notifyInsDeletion(void* ins) {
|
|||
}
|
||||
}
|
||||
|
||||
int DivPlatformESFM::mapVelocity(int ch, unsigned char vel) {
|
||||
const int volMax=MAX(1,dispatch(DivCommand(DIV_CMD_GET_VOLMAX,MAX(ch,0))));
|
||||
double attenDb=40*log10(vel/127);
|
||||
double attenUnits=attenDb*(8.0/6.0); // negative
|
||||
return MAX(0,volMax+attenUnits);
|
||||
}
|
||||
|
||||
void DivPlatformESFM::poke(unsigned int addr, unsigned short val) {
|
||||
immWrite(addr,val);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ class DivPlatformESFM: public DivDispatch {
|
|||
void toggleRegisterDump(bool enable);
|
||||
void notifyInsChange(int ins);
|
||||
void notifyInsDeletion(void* ins);
|
||||
int mapVelocity(int ch, unsigned char vel);
|
||||
void poke(unsigned int addr, unsigned short val);
|
||||
void poke(std::vector<DivRegWrite>& wlist);
|
||||
void setFlags(const DivConfig& flags);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue