dev176 - OPM/OPZ: fix pitch

This commit is contained in:
tildearrow 2023-09-12 01:12:59 -05:00
parent 8fe3811233
commit 658f69bc4e
6 changed files with 73 additions and 26 deletions

View file

@ -22,7 +22,7 @@
#include "fmsharedbase.h"
#define NOTE_LINEAR(x) (((x)<<6)+baseFreqOff+log2(parent->song.tuning/440.0)*12.0*64.0)
#define NOTE_LINEAR(x) (((x)<<7)+baseFreqOff+log2(parent->song.tuning/440.0)*12.0*128.0)
class DivPlatformOPM: public DivPlatformFMBase {
protected:
@ -42,13 +42,15 @@ class DivPlatformOPM: public DivPlatformFMBase {
};
unsigned char lfoValue, lfoValue2, lfoShape, lfoShape2;
bool brokenPitch;
DivPlatformOPM():
DivPlatformFMBase(),
lfoValue(0),
lfoValue2(0),
lfoShape(0),
lfoShape2(0) {}
lfoShape2(0),
brokenPitch(false) {}
};
#endif