allow negative octaves

This commit is contained in:
tildearrow 2022-01-18 16:55:32 -05:00
parent 4bfc85bebc
commit 64745648a0
3 changed files with 14 additions and 7 deletions

View file

@ -8,11 +8,11 @@
class DivPlatformPCE: public DivDispatch {
struct Channel {
int freq, baseFreq, pitch;
int freq, baseFreq, pitch, note;
int dacPeriod, dacRate;
unsigned int dacPos;
int dacSample;
unsigned char ins, note, pan;
unsigned char ins, pan;
bool active, insChanged, freqChanged, keyOn, keyOff, inPorta, noise, pcm;
signed char vol, outVol, wave;
DivMacroInt std;
@ -20,12 +20,12 @@ class DivPlatformPCE: public DivDispatch {
freq(0),
baseFreq(0),
pitch(0),
note(0),
dacPeriod(0),
dacRate(0),
dacPos(0),
dacSample(0),
ins(-1),
note(0),
pan(255),
active(false),
insChanged(true),

View file

@ -440,7 +440,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,i));
} else if (!(pat->data[whatRow][0]==0 && pat->data[whatRow][1]==0)) {
chan[i].oldNote=chan[i].note;
chan[i].note=pat->data[whatRow][0]+pat->data[whatRow][1]*12;
chan[i].note=pat->data[whatRow][0]+((signed char)pat->data[whatRow][1])*12;
if (!chan[i].keyOn) {
if (disCont[dispatchOfChan[i]].dispatch->keyOffAffectsArp(dispatchChanOfChan[i])) {
chan[i].arp=0;