don't round frequency

apparently that wasn't too good for some songs that relied on E5xx
This commit is contained in:
tildearrow 2022-02-21 02:33:07 -05:00
parent 57c4e22d70
commit f815ee9427
1 changed files with 2 additions and 2 deletions

View File

@ -805,8 +805,8 @@ int DivEngine::calcBaseFreq(double clock, double divider, int note, bool period)
int DivEngine::calcFreq(int base, int pitch, bool period, int octave) {
if (song.linearPitch) {
return period?
round(base*pow(2,-(double)pitch/(12.0*128.0))/(98.0+globalPitch*6.0)*98.0):
(round(base*pow(2,(double)pitch/(12.0*128.0))*(98+globalPitch*6))/98);
base*pow(2,-(double)pitch/(12.0*128.0))/(98.0+globalPitch*6.0)*98.0:
(base*pow(2,(double)pitch/(12.0*128.0))*(98+globalPitch*6))/98;
}
return period?
base-pitch: