From f32c2fa06bb63ed796fc9c5880d1b284abaf2824 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 27 Dec 2021 15:22:01 -0500 Subject: [PATCH] early implementation of global pitch apparently this requires a rewrite of the pitch logic... --- src/engine/playback.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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