mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 21:15:11 +00:00
early implementation of global pitch
apparently this requires a rewrite of the pitch logic...
This commit is contained in:
parent
a0a27e91f3
commit
f32c2fa06b
1 changed files with 8 additions and 0 deletions
|
@ -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<chans; i++) {
|
||||
chan[i].pitch+=globalPitch;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue