diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index 1000395b4..ed21aed07 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -836,8 +836,8 @@ int DivEngine::calcFreq(int base, int pitch, bool period, int octave) { if (pitch<0) pitch=0; if (pitch>4095) pitch=4095; return period? - (base*reversePitchTable[pitch])>>10: - (base*pitchTable[pitch])>>10; + ((base*(reversePitchTable[pitch]))>>10): + (((base*(pitchTable[pitch]))>>10)*(16+globalPitch))/16; /* return period? base*pow(2,-(double)pitch/(12.0*128.0))/(98.0+globalPitch*6.0)*98.0: diff --git a/src/engine/playback.cpp b/src/engine/playback.cpp index cada57fe0..3a64af7a9 100644 --- a/src/engine/playback.cpp +++ b/src/engine/playback.cpp @@ -983,7 +983,7 @@ void DivEngine::processRow(int i, bool afterDelay) { if (chan[i].pitch<-128) chan[i].pitch=-128; if (chan[i].pitch>127) chan[i].pitch=127; } - chan[i].pitch+=globalPitch; + //chan[i].pitch+=globalPitch; dispatchCmd(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(((chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15))); break; case 0xea: // legato mode