mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 13:05:11 +00:00
when the fix breaks something
This commit is contained in:
parent
db46dd79d2
commit
4eec990ec1
8 changed files with 24 additions and 9 deletions
|
@ -820,13 +820,19 @@ bool DivEngine::init(String outName) {
|
|||
|
||||
if (dispatch->isStereo()) {
|
||||
for (int i=0; i<got.bufsize; i++) {
|
||||
ilBuffer[i<<1]=bbOut[0][i];
|
||||
ilBuffer[1+(i<<1)]=bbOut[1][i];
|
||||
if (bbOut[0][i]<-16384) bbOut[0][i]=-16384;
|
||||
if (bbOut[0][i]>16383) bbOut[0][i]=16383;
|
||||
ilBuffer[i<<1]=bbOut[0][i]*2;
|
||||
if (bbOut[1][i]<-16384) bbOut[1][i]=-16384;
|
||||
if (bbOut[1][i]>16383) bbOut[1][i]=16383;
|
||||
ilBuffer[1+(i<<1)]=bbOut[1][i]*2;
|
||||
}
|
||||
} else {
|
||||
for (int i=0; i<got.bufsize; i++) {
|
||||
ilBuffer[i<<1]=bbOut[0][i];
|
||||
ilBuffer[1+(i<<1)]=bbOut[0][i];
|
||||
if (bbOut[0][i]<-16384) bbOut[0][i]=-16384;
|
||||
if (bbOut[0][i]>16383) bbOut[0][i]=16383;
|
||||
ilBuffer[i<<1]=bbOut[0][i]*2;
|
||||
ilBuffer[1+(i<<1)]=bbOut[0][i]*2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,18 +89,22 @@ void DivMacroInt::init(DivInstrument* which) {
|
|||
if (ins->std.volMacroLen>0) {
|
||||
hadVol=true;
|
||||
hasVol=true;
|
||||
willVol=true;
|
||||
}
|
||||
if (ins->std.arpMacroLen>0) {
|
||||
hadArp=true;
|
||||
hasArp=true;
|
||||
willArp=true;
|
||||
}
|
||||
if (ins->std.dutyMacroLen>0) {
|
||||
hadDuty=true;
|
||||
hasDuty=true;
|
||||
willDuty=true;
|
||||
}
|
||||
if (ins->std.waveMacroLen>0) {
|
||||
hadWave=true;
|
||||
hasWave=true;
|
||||
willWave=true;
|
||||
}
|
||||
|
||||
if (ins->std.arpMacroMode) {
|
||||
|
|
|
@ -11,6 +11,7 @@ class DivMacroInt {
|
|||
bool hasVol, hasArp, hasDuty, hasWave;
|
||||
bool hadVol, hadArp, hadDuty, hadWave;
|
||||
bool finishedVol, finishedArp, finishedDuty, finishedWave;
|
||||
bool willVol, willArp, willDuty, willWave;
|
||||
bool arpMode;
|
||||
void next();
|
||||
void init(DivInstrument* which);
|
||||
|
@ -36,6 +37,10 @@ class DivMacroInt {
|
|||
finishedArp(false),
|
||||
finishedDuty(false),
|
||||
finishedWave(false),
|
||||
willVol(false),
|
||||
willArp(false),
|
||||
willDuty(false),
|
||||
willWave(false),
|
||||
arpMode(false) {}
|
||||
};
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ int DivPlatformC64::dispatch(DivCommand c) {
|
|||
sid.write(c.chan*7+4,(chan[c.chan].wave<<4)|(chan[c.chan].ring<<2)|(chan[c.chan].sync<<1)|chan[c.chan].active);
|
||||
break;
|
||||
case DIV_CMD_LEGATO:
|
||||
chan[c.chan].baseFreq=round(FREQ_BASE*pow(2.0f,((float)(c.value+((!chan[c.chan].std.arpMode)?(chan[c.chan].std.arp-12):(0)))/12.0f)));
|
||||
chan[c.chan].baseFreq=round(FREQ_BASE*pow(2.0f,((float)(c.value+((chan[c.chan].std.willArp && !chan[c.chan].std.arpMode)?(chan[c.chan].std.arp-12):(0)))/12.0f)));
|
||||
chan[c.chan].freqChanged=true;
|
||||
chan[c.chan].note=c.value;
|
||||
break;
|
||||
|
|
|
@ -238,7 +238,7 @@ int DivPlatformGB::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_LEGATO:
|
||||
if (c.chan==3) break;
|
||||
chan[c.chan].baseFreq=round(FREQ_BASE/pow(2.0f,((float)(c.value+((!chan[c.chan].std.arpMode)?(chan[c.chan].std.arp-12):(0)))/12.0f)));
|
||||
chan[c.chan].baseFreq=round(FREQ_BASE/pow(2.0f,((float)(c.value+((chan[c.chan].std.willArp && !chan[c.chan].std.arpMode)?(chan[c.chan].std.arp-12):(0)))/12.0f)));
|
||||
chan[c.chan].freqChanged=true;
|
||||
chan[c.chan].note=c.value;
|
||||
break;
|
||||
|
|
|
@ -250,7 +250,7 @@ int DivPlatformNES::dispatch(DivCommand c) {
|
|||
}
|
||||
case DIV_CMD_LEGATO:
|
||||
if (c.chan==3) break;
|
||||
chan[c.chan].baseFreq=round(FREQ_BASE/pow(2.0f,((float)(c.value+((!chan[c.chan].std.arpMode)?(chan[c.chan].std.arp-12):(0)))/12.0f)));
|
||||
chan[c.chan].baseFreq=round(FREQ_BASE/pow(2.0f,((float)(c.value+((chan[c.chan].std.willArp && !chan[c.chan].std.arpMode)?(chan[c.chan].std.arp-12):(0)))/12.0f)));
|
||||
chan[c.chan].freqChanged=true;
|
||||
chan[c.chan].note=c.value;
|
||||
break;
|
||||
|
|
|
@ -235,7 +235,7 @@ int DivPlatformPCE::dispatch(DivCommand c) {
|
|||
break;
|
||||
}
|
||||
case DIV_CMD_LEGATO:
|
||||
chan[c.chan].baseFreq=round(FREQ_BASE/pow(2.0f,((float)(c.value+((!chan[c.chan].std.arpMode)?(chan[c.chan].std.arp-12):(0)))/12.0f)));
|
||||
chan[c.chan].baseFreq=round(FREQ_BASE/pow(2.0f,((float)(c.value+((chan[c.chan].std.willArp && !chan[c.chan].std.arpMode)?(chan[c.chan].std.arp-12):(0)))/12.0f)));
|
||||
chan[c.chan].freqChanged=true;
|
||||
chan[c.chan].note=c.value;
|
||||
break;
|
||||
|
|
|
@ -140,7 +140,7 @@ int DivPlatformSMS::dispatch(DivCommand c) {
|
|||
updateSNMode=true;
|
||||
break;
|
||||
case DIV_CMD_LEGATO:
|
||||
chan[c.chan].baseFreq=round(1712.0f/pow(2.0f,((float)(c.value+((!chan[c.chan].std.arpMode)?(chan[c.chan].std.arp-12):(0)))/12.0f)));
|
||||
chan[c.chan].baseFreq=round(1712.0f/pow(2.0f,((float)(c.value+((chan[c.chan].std.willArp && !chan[c.chan].std.arpMode)?(chan[c.chan].std.arp-12):(0)))/12.0f)));
|
||||
chan[c.chan].freqChanged=true;
|
||||
chan[c.chan].note=c.value;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue