diff --git a/src/engine/playback.cpp b/src/engine/playback.cpp index f68eefb17..252abe749 100644 --- a/src/engine/playback.cpp +++ b/src/engine/playback.cpp @@ -502,6 +502,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; 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 @@ -520,6 +521,13 @@ void DivEngine::processRow(int i, bool afterDelay) { extValue=effectVal; extValuePresent=true; break; + case 0xef: // global pitch + globalPitch+=(signed char)(effectVal-0x80)*120; + printf("setting global pitch to %d\n",globalPitch); + for (int i=0; i