Game Boy and NES: pitch macro now affects noise

This commit is contained in:
tildearrow 2023-01-12 18:36:13 -05:00
parent 84ae0b31f3
commit 4724c1ccb1
2 changed files with 2 additions and 1 deletions

View file

@ -284,7 +284,7 @@ void DivPlatformGB::tick(bool sysTick) {
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) { if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
if (i==3) { // noise if (i==3) { // noise
int ntPos=chan[i].baseFreq+((chan[i].pitch2+64)>>7); int ntPos=chan[i].baseFreq+chan[i].pitch2;
if (ntPos<0) ntPos=0; if (ntPos<0) ntPos=0;
if (ntPos>255) ntPos=255; if (ntPos>255) ntPos=255;
chan[i].freq=noiseTable[ntPos]; chan[i].freq=noiseTable[ntPos];

View file

@ -278,6 +278,7 @@ void DivPlatformNES::tick(bool sysTick) {
ntPos+=chan[i].arpOff; ntPos+=chan[i].arpOff;
} }
} }
ntPos+=chan[i].pitch2;
if (parent->song.properNoiseLayout) { if (parent->song.properNoiseLayout) {
chan[i].freq=15-(ntPos&15); chan[i].freq=15-(ntPos&15);
} else { } else {