finally do EFxx right

took a while to figure out...
This commit is contained in:
tildearrow 2021-12-28 00:51:38 -05:00
parent b246000f0e
commit d766c4aaf0
13 changed files with 23 additions and 37 deletions

View file

@ -1534,6 +1534,12 @@ void DivEngine::playSub(bool preserveDrift) {
}
}
int DivEngine::calcFreq(int base, int pitch, bool period) {
return period?
int(base*pow(2,-(double)pitch/(12.0*128.0))/(98.0+globalPitch*6.0)*98.0):
(int(base*pow(2,(double)pitch/(12.0*128.0))*(98+globalPitch*6))/98);
}
void DivEngine::play() {
isBusy.lock();
playSub(false);