when the fix breaks something
This commit is contained in:
parent
db46dd79d2
commit
4eec990ec1
|
@ -820,13 +820,19 @@ bool DivEngine::init(String outName) {
|
||||||
|
|
||||||
if (dispatch->isStereo()) {
|
if (dispatch->isStereo()) {
|
||||||
for (int i=0; i<got.bufsize; i++) {
|
for (int i=0; i<got.bufsize; i++) {
|
||||||
ilBuffer[i<<1]=bbOut[0][i];
|
if (bbOut[0][i]<-16384) bbOut[0][i]=-16384;
|
||||||
ilBuffer[1+(i<<1)]=bbOut[1][i];
|
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 {
|
} else {
|
||||||
for (int i=0; i<got.bufsize; i++) {
|
for (int i=0; i<got.bufsize; i++) {
|
||||||
ilBuffer[i<<1]=bbOut[0][i];
|
if (bbOut[0][i]<-16384) bbOut[0][i]=-16384;
|
||||||
ilBuffer[1+(i<<1)]=bbOut[0][i];
|
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) {
|
if (ins->std.volMacroLen>0) {
|
||||||
hadVol=true;
|
hadVol=true;
|
||||||
hasVol=true;
|
hasVol=true;
|
||||||
|
willVol=true;
|
||||||
}
|
}
|
||||||
if (ins->std.arpMacroLen>0) {
|
if (ins->std.arpMacroLen>0) {
|
||||||
hadArp=true;
|
hadArp=true;
|
||||||
hasArp=true;
|
hasArp=true;
|
||||||
|
willArp=true;
|
||||||
}
|
}
|
||||||
if (ins->std.dutyMacroLen>0) {
|
if (ins->std.dutyMacroLen>0) {
|
||||||
hadDuty=true;
|
hadDuty=true;
|
||||||
hasDuty=true;
|
hasDuty=true;
|
||||||
|
willDuty=true;
|
||||||
}
|
}
|
||||||
if (ins->std.waveMacroLen>0) {
|
if (ins->std.waveMacroLen>0) {
|
||||||
hadWave=true;
|
hadWave=true;
|
||||||
hasWave=true;
|
hasWave=true;
|
||||||
|
willWave=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ins->std.arpMacroMode) {
|
if (ins->std.arpMacroMode) {
|
||||||
|
|
|
@ -11,6 +11,7 @@ class DivMacroInt {
|
||||||
bool hasVol, hasArp, hasDuty, hasWave;
|
bool hasVol, hasArp, hasDuty, hasWave;
|
||||||
bool hadVol, hadArp, hadDuty, hadWave;
|
bool hadVol, hadArp, hadDuty, hadWave;
|
||||||
bool finishedVol, finishedArp, finishedDuty, finishedWave;
|
bool finishedVol, finishedArp, finishedDuty, finishedWave;
|
||||||
|
bool willVol, willArp, willDuty, willWave;
|
||||||
bool arpMode;
|
bool arpMode;
|
||||||
void next();
|
void next();
|
||||||
void init(DivInstrument* which);
|
void init(DivInstrument* which);
|
||||||
|
@ -36,6 +37,10 @@ class DivMacroInt {
|
||||||
finishedArp(false),
|
finishedArp(false),
|
||||||
finishedDuty(false),
|
finishedDuty(false),
|
||||||
finishedWave(false),
|
finishedWave(false),
|
||||||
|
willVol(false),
|
||||||
|
willArp(false),
|
||||||
|
willDuty(false),
|
||||||
|
willWave(false),
|
||||||
arpMode(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);
|
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;
|
break;
|
||||||
case DIV_CMD_LEGATO:
|
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].freqChanged=true;
|
||||||
chan[c.chan].note=c.value;
|
chan[c.chan].note=c.value;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -238,7 +238,7 @@ int DivPlatformGB::dispatch(DivCommand c) {
|
||||||
}
|
}
|
||||||
case DIV_CMD_LEGATO:
|
case DIV_CMD_LEGATO:
|
||||||
if (c.chan==3) break;
|
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].freqChanged=true;
|
||||||
chan[c.chan].note=c.value;
|
chan[c.chan].note=c.value;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -250,7 +250,7 @@ int DivPlatformNES::dispatch(DivCommand c) {
|
||||||
}
|
}
|
||||||
case DIV_CMD_LEGATO:
|
case DIV_CMD_LEGATO:
|
||||||
if (c.chan==3) break;
|
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].freqChanged=true;
|
||||||
chan[c.chan].note=c.value;
|
chan[c.chan].note=c.value;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -235,7 +235,7 @@ int DivPlatformPCE::dispatch(DivCommand c) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DIV_CMD_LEGATO:
|
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].freqChanged=true;
|
||||||
chan[c.chan].note=c.value;
|
chan[c.chan].note=c.value;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -140,7 +140,7 @@ int DivPlatformSMS::dispatch(DivCommand c) {
|
||||||
updateSNMode=true;
|
updateSNMode=true;
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_LEGATO:
|
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].freqChanged=true;
|
||||||
chan[c.chan].note=c.value;
|
chan[c.chan].note=c.value;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue