prepare for new arp strategy
This commit is contained in:
parent
905329e1e4
commit
3eb3d8a6f1
|
@ -28,23 +28,44 @@
|
||||||
|
|
||||||
// common shared channel struct
|
// common shared channel struct
|
||||||
template<typename T> struct SharedChannel {
|
template<typename T> struct SharedChannel {
|
||||||
int freq, baseFreq, baseFreqOverride, pitch, pitch2, arpOff;
|
int freq, baseFreq, baseNoteOverride, pitch, pitch2, arpOff;
|
||||||
int ins, note;
|
int ins, note;
|
||||||
bool active, insChanged, freqChanged, keyOn, keyOff, portaPause, inPorta;
|
bool active, insChanged, freqChanged, fixedArp, keyOn, keyOff, portaPause, inPorta;
|
||||||
T vol, outVol;
|
T vol, outVol;
|
||||||
DivMacroInt std;
|
DivMacroInt std;
|
||||||
void handleArp() {
|
void handleArp(int offset=0) {
|
||||||
|
if (std.arp.had) {
|
||||||
|
if (std.arp.val<0) {
|
||||||
|
if (!(std.arp.val&0x40000000)) {
|
||||||
|
baseNoteOverride=(std.arp.val|0x40000000)+offset;
|
||||||
|
fixedArp=true;
|
||||||
|
} else {
|
||||||
|
arpOff=std.arp.val;
|
||||||
|
fixedArp=false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (std.arp.val&0x40000000) {
|
||||||
|
baseNoteOverride=(std.arp.val&(~0x40000000))+offset;
|
||||||
|
fixedArp=true;
|
||||||
|
} else {
|
||||||
|
arpOff=std.arp.val;
|
||||||
|
fixedArp=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
freqChanged=true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void macroInit(DivInstrument* which) {
|
void macroInit(DivInstrument* which) {
|
||||||
std.init(which);
|
std.init(which);
|
||||||
pitch2=0;
|
pitch2=0;
|
||||||
arpOff=0;
|
arpOff=0;
|
||||||
baseFreqOverride=-1;
|
baseNoteOverride=0;
|
||||||
|
fixedArp=false;
|
||||||
}
|
}
|
||||||
SharedChannel(T initVol):
|
SharedChannel(T initVol):
|
||||||
freq(0),
|
freq(0),
|
||||||
baseFreq(0),
|
baseFreq(0),
|
||||||
baseFreqOverride(-1),
|
baseNoteOverride(0),
|
||||||
pitch(0),
|
pitch(0),
|
||||||
pitch2(0),
|
pitch2(0),
|
||||||
arpOff(0),
|
arpOff(0),
|
||||||
|
@ -53,6 +74,7 @@ template<typename T> struct SharedChannel {
|
||||||
active(false),
|
active(false),
|
||||||
insChanged(true),
|
insChanged(true),
|
||||||
freqChanged(false),
|
freqChanged(false),
|
||||||
|
fixedArp(false),
|
||||||
keyOn(false),
|
keyOn(false),
|
||||||
keyOff(false),
|
keyOff(false),
|
||||||
portaPause(false),
|
portaPause(false),
|
||||||
|
|
|
@ -635,6 +635,6 @@ class DivDispatch {
|
||||||
if (x<xMin) x=xMin; \
|
if (x<xMin) x=xMin; \
|
||||||
if (x>xMax) x=xMax;
|
if (x>xMax) x=xMax;
|
||||||
|
|
||||||
#define NEW_ARP_STRAT (parent->song.linearPitch==2 && !parent->song.newArpStrategy)
|
#define NEW_ARP_STRAT (parent->song.linearPitch==2 && !parent->song.oldArpStrategy)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -47,8 +47,8 @@
|
||||||
#define BUSY_BEGIN_SOFT softLocked=true; isBusy.lock();
|
#define BUSY_BEGIN_SOFT softLocked=true; isBusy.lock();
|
||||||
#define BUSY_END isBusy.unlock(); softLocked=false;
|
#define BUSY_END isBusy.unlock(); softLocked=false;
|
||||||
|
|
||||||
#define DIV_VERSION "dev129"
|
#define DIV_VERSION "dev130"
|
||||||
#define DIV_ENGINE_VERSION 129
|
#define DIV_ENGINE_VERSION 130
|
||||||
// for imports
|
// for imports
|
||||||
#define DIV_VERSION_MOD 0xff01
|
#define DIV_VERSION_MOD 0xff01
|
||||||
#define DIV_VERSION_FC 0xff02
|
#define DIV_VERSION_FC 0xff02
|
||||||
|
|
|
@ -1713,6 +1713,9 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
||||||
if (ds.version<121) {
|
if (ds.version<121) {
|
||||||
ds.brokenOutVol2=false;
|
ds.brokenOutVol2=false;
|
||||||
}
|
}
|
||||||
|
if (ds.version<130) {
|
||||||
|
ds.oldArpStrategy=true;
|
||||||
|
}
|
||||||
ds.isDMF=false;
|
ds.isDMF=false;
|
||||||
|
|
||||||
reader.readS(); // reserved
|
reader.readS(); // reserved
|
||||||
|
@ -2155,7 +2158,9 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
||||||
} else {
|
} else {
|
||||||
reader.readC();
|
reader.readC();
|
||||||
}
|
}
|
||||||
for (int i=0; i<1; i++) {
|
if (ds.version>=130) {
|
||||||
|
ds.oldArpStrategy=reader.readC();
|
||||||
|
} else {
|
||||||
reader.readC();
|
reader.readC();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4406,9 +4411,7 @@ SafeWriter* DivEngine::saveFur(bool notPrimary) {
|
||||||
w->writeC(song.autoSystem);
|
w->writeC(song.autoSystem);
|
||||||
w->writeC(song.disableSampleMacro);
|
w->writeC(song.disableSampleMacro);
|
||||||
w->writeC(song.brokenOutVol2);
|
w->writeC(song.brokenOutVol2);
|
||||||
for (int i=0; i<1; i++) {
|
w->writeC(song.oldArpStrategy);
|
||||||
w->writeC(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// first subsong virtual tempo
|
// first subsong virtual tempo
|
||||||
w->writeS(subSong->virtualTempoN);
|
w->writeS(subSong->virtualTempoN);
|
||||||
|
|
|
@ -162,7 +162,9 @@ void DivPlatformAmiga::tick(bool sysTick) {
|
||||||
off=8363.0/(double)s->centerRate;
|
off=8363.0/(double)s->centerRate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
// TODO: why the off mult? this may be a bug!
|
// TODO: why the off mult? this may be a bug!
|
||||||
chan[i].baseFreq=round(off*NOTE_PERIODIC_NOROUND(parent->calcArp(chan[i].note,chan[i].std.arp.val)));
|
chan[i].baseFreq=round(off*NOTE_PERIODIC_NOROUND(parent->calcArp(chan[i].note,chan[i].std.arp.val)));
|
||||||
chan[i].freqChanged=true;
|
chan[i].freqChanged=true;
|
||||||
|
|
|
@ -159,7 +159,9 @@ void DivPlatformArcade::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_LINEAR(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_LINEAR(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,7 +253,9 @@ void DivPlatformAY8910::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,7 +243,9 @@ void DivPlatformAY8930::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,9 @@ void DivPlatformBubSysWSG::tick(bool sysTick) {
|
||||||
chan[i].outVol=((chan[i].vol&15)*MIN(15,chan[i].std.vol.val))/15;
|
chan[i].outVol=((chan[i].vol&15)*MIN(15,chan[i].std.vol.val))/15;
|
||||||
rWrite(2+i,(chan[i].wave<<5)|chan[i].outVol);
|
rWrite(2+i,(chan[i].wave<<5)|chan[i].outVol);
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,9 @@ void DivPlatformC64::tick(bool sysTick) {
|
||||||
updateFilter();
|
updateFilter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,9 @@ void DivPlatformFDS::tick(bool sysTick) {
|
||||||
if (chan[i].outVol<0) chan[i].outVol=0;
|
if (chan[i].outVol<0) chan[i].outVol=0;
|
||||||
rWrite(0x4080,0x80|chan[i].outVol);
|
rWrite(0x4080,0x80|chan[i].outVol);
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,9 @@ void DivPlatformGA20::tick(bool sysTick) {
|
||||||
chan[i].volumeChanged=true;
|
chan[i].volumeChanged=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,7 +163,9 @@ void DivPlatformGB::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (i==3) { // noise
|
if (i==3) { // noise
|
||||||
chan[i].baseFreq=parent->calcArp(chan[i].note,chan[i].std.arp.val,24);
|
chan[i].baseFreq=parent->calcArp(chan[i].note,chan[i].std.arp.val,24);
|
||||||
if (chan[i].baseFreq>255) chan[i].baseFreq=255;
|
if (chan[i].baseFreq>255) chan[i].baseFreq=255;
|
||||||
|
|
|
@ -296,14 +296,18 @@ void DivPlatformGenesis::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i>=5 && chan[i].furnaceDac) {
|
if (i>=5 && chan[i].furnaceDac) {
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=parent->calcBaseFreq(1,1,parent->calcArp(chan[i].note,chan[i].std.arp.val),false);
|
chan[i].baseFreq=parent->calcBaseFreq(1,1,parent->calcArp(chan[i].note,chan[i].std.arp.val),false);
|
||||||
}
|
}
|
||||||
chan[i].freqChanged=true;
|
chan[i].freqChanged=true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,9 @@ void DivPlatformK007232::tick(bool sysTick) {
|
||||||
chan[i].volumeChanged=true;
|
chan[i].volumeChanged=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,7 +171,9 @@ void DivPlatformLynx::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
WRITE_VOLUME(i,(isMuted[i]?0:(chan[i].outVol&127)));
|
WRITE_VOLUME(i,(isMuted[i]?0:(chan[i].outVol&127)));
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].actualNote=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
chan[i].actualNote=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(chan[i].actualNote);
|
chan[i].baseFreq=NOTE_PERIODIC(chan[i].actualNote);
|
||||||
|
|
|
@ -102,7 +102,9 @@ void DivPlatformMMC5::tick(bool sysTick) {
|
||||||
rWrite(0x5000+i*4,0x30|chan[i].outVol|((chan[i].duty&3)<<6));
|
rWrite(0x5000+i*4,0x30|chan[i].outVol|((chan[i].duty&3)<<6));
|
||||||
}
|
}
|
||||||
// TODO: arp macros on NES PCM?
|
// TODO: arp macros on NES PCM?
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,9 @@ void DivPlatformMSM5232::tick(bool sysTick) {
|
||||||
if (chan[i].std.vol.had) {
|
if (chan[i].std.vol.had) {
|
||||||
chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol&127,MIN(127,chan[i].std.vol.val),127);
|
chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol&127,MIN(127,chan[i].std.vol.val),127);
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_LINEAR(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_LINEAR(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,9 @@ void DivPlatformN163::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,7 +204,9 @@ void DivPlatformNamcoWSG::tick(bool sysTick) {
|
||||||
chan[i].noise=chan[i].std.duty.val;
|
chan[i].noise=chan[i].std.duty.val;
|
||||||
chan[i].freqChanged=true;
|
chan[i].freqChanged=true;
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,7 +217,9 @@ void DivPlatformNES::tick(bool sysTick) {
|
||||||
rWrite(0x4000+i*4,(chan[i].envMode<<4)|chan[i].outVol|((chan[i].duty&3)<<6));
|
rWrite(0x4000+i*4,(chan[i].envMode<<4)|chan[i].outVol|((chan[i].duty&3)<<6));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (i==3) { // noise
|
if (i==3) { // noise
|
||||||
chan[i].baseFreq=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
chan[i].baseFreq=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
||||||
if (chan[i].baseFreq>255) chan[i].baseFreq=255;
|
if (chan[i].baseFreq>255) chan[i].baseFreq=255;
|
||||||
|
|
|
@ -304,7 +304,9 @@ void DivPlatformOPL::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
@ -489,7 +491,9 @@ void DivPlatformOPL::tick(bool sysTick) {
|
||||||
immWrite(18,chan[adpcmChan].outVol);
|
immWrite(18,chan[adpcmChan].outVol);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[adpcmChan].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[adpcmChan].handleArp();
|
||||||
|
} else if (chan[adpcmChan].std.arp.had) {
|
||||||
if (!chan[adpcmChan].inPorta) {
|
if (!chan[adpcmChan].inPorta) {
|
||||||
chan[adpcmChan].baseFreq=NOTE_ADPCMB(parent->calcArp(chan[adpcmChan].note,chan[adpcmChan].std.arp.val));
|
chan[adpcmChan].baseFreq=NOTE_ADPCMB(parent->calcArp(chan[adpcmChan].note,chan[adpcmChan].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,9 @@ void DivPlatformOPLL::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,9 @@ void DivPlatformPCE::tick(bool sysTick) {
|
||||||
if (noiseSeek<0) noiseSeek=0;
|
if (noiseSeek<0) noiseSeek=0;
|
||||||
chWrite(i,0x07,chan[i].noise?(0x80|(parent->song.properNoiseLayout?(noiseSeek&31):noiseFreq[noiseSeek%12])):0);
|
chWrite(i,0x07,chan[i].noise?(0x80|(parent->song.properNoiseLayout?(noiseSeek&31):noiseFreq[noiseSeek%12])):0);
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
int noiseSeek=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
int noiseSeek=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(noiseSeek);
|
chan[i].baseFreq=NOTE_PERIODIC(noiseSeek);
|
||||||
|
|
|
@ -128,7 +128,9 @@ void DivPlatformPCMDAC::tick(bool sysTick) {
|
||||||
if (chan[0].std.vol.had) {
|
if (chan[0].std.vol.had) {
|
||||||
chan[0].envVol=chan[0].std.vol.val;
|
chan[0].envVol=chan[0].std.vol.val;
|
||||||
}
|
}
|
||||||
if (chan[0].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[0].handleArp();
|
||||||
|
} else if (chan[0].std.arp.had) {
|
||||||
if (!chan[0].inPorta) {
|
if (!chan[0].inPorta) {
|
||||||
chan[0].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[0].note,chan[0].std.arp.val));
|
chan[0].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[0].note,chan[0].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -345,7 +345,9 @@ void DivPlatformPCSpeaker::tick(bool sysTick) {
|
||||||
chan[i].outVol=(chan[i].vol && chan[i].std.vol.val);
|
chan[i].outVol=(chan[i].vol && chan[i].std.vol.val);
|
||||||
on=chan[i].outVol;
|
on=chan[i].outVol;
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,9 @@ void DivPlatformPET::tick(bool sysTick) {
|
||||||
chan[0].outVol=chan[0].std.vol.val&chan[0].vol;
|
chan[0].outVol=chan[0].std.vol.val&chan[0].vol;
|
||||||
writeOutVol();
|
writeOutVol();
|
||||||
}
|
}
|
||||||
if (chan[0].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[0].handleArp();
|
||||||
|
} else if (chan[0].std.arp.had) {
|
||||||
if (!chan[0].inPorta) {
|
if (!chan[0].inPorta) {
|
||||||
chan[0].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[0].note,chan[0].std.arp.val));
|
chan[0].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[0].note,chan[0].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,9 @@ void DivPlatformPokeMini::tick(bool sysTick) {
|
||||||
chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol,chan[i].std.vol.val,3);
|
chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol,chan[i].std.vol.val,3);
|
||||||
vol=(chan[i].outVol==2)?3:chan[i].outVol;
|
vol=(chan[i].outVol==2)?3:chan[i].outVol;
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,9 @@ void DivPlatformPong::tick(bool sysTick) {
|
||||||
chan[i].outVol=(chan[i].vol && chan[i].std.vol.val);
|
chan[i].outVol=(chan[i].vol && chan[i].std.vol.val);
|
||||||
on=chan[i].outVol;
|
on=chan[i].outVol;
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -335,7 +335,9 @@ void DivPlatformQSound::tick(bool sysTick) {
|
||||||
qsound_loop = length - loopStart;
|
qsound_loop = length - loopStart;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=QS_NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=QS_NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,9 @@ void DivPlatformRF5C68::tick(bool sysTick) {
|
||||||
chan[i].outVol=((chan[i].vol&0xff)*MIN(chan[i].macroVolMul,chan[i].std.vol.val))/chan[i].macroVolMul;
|
chan[i].outVol=((chan[i].vol&0xff)*MIN(chan[i].macroVolMul,chan[i].std.vol.val))/chan[i].macroVolMul;
|
||||||
chWrite(i,0,chan[i].outVol);
|
chWrite(i,0,chan[i].outVol);
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,9 @@ void DivPlatformSAA1099::tick(bool sysTick) {
|
||||||
rWrite(i,applyPan(chan[i].outVol&15,chan[i].pan));
|
rWrite(i,applyPan(chan[i].outVol&15,chan[i].pan));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,9 @@ void DivPlatformSCC::tick(bool sysTick) {
|
||||||
chan[i].outVol=((chan[i].vol&15)*MIN(15,chan[i].std.vol.val))/15;
|
chan[i].outVol=((chan[i].vol&15)*MIN(15,chan[i].std.vol.val))/15;
|
||||||
rWrite(regBase+10+i,chan[i].outVol);
|
rWrite(regBase+10+i,chan[i].outVol);
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,9 @@ void DivPlatformSegaPCM::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=(parent->calcArp(chan[i].note,chan[i].std.arp.val)<<6);
|
chan[i].baseFreq=(parent->calcArp(chan[i].note,chan[i].std.arp.val)<<6);
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,7 +156,9 @@ void DivPlatformSMS::tick(bool sysTick) {
|
||||||
// ((chan[i].vol&15)*MIN(15,chan[i].std.vol.val))>>4;
|
// ((chan[i].vol&15)*MIN(15,chan[i].std.vol.val))>>4;
|
||||||
chan[i].writeVol=true;
|
chan[i].writeVol=true;
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
// TODO: add compatibility flag. this is horrible.
|
// TODO: add compatibility flag. this is horrible.
|
||||||
int areYouSerious=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
int areYouSerious=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
||||||
|
@ -244,7 +246,9 @@ void DivPlatformSMS::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
} else { // 3 fixed values
|
} else { // 3 fixed values
|
||||||
unsigned char value;
|
unsigned char value;
|
||||||
if (chan[3].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[3].handleArp();
|
||||||
|
} else if (chan[3].std.arp.had) {
|
||||||
value=parent->calcArp(chan[3].note,chan[3].std.arp.val)%12;
|
value=parent->calcArp(chan[3].note,chan[3].std.arp.val)%12;
|
||||||
} else { // pardon?
|
} else { // pardon?
|
||||||
value=chan[3].note%12;
|
value=chan[3].note%12;
|
||||||
|
|
|
@ -106,7 +106,9 @@ void DivPlatformSNES::tick(bool sysTick) {
|
||||||
if (chan[i].std.vol.had) {
|
if (chan[i].std.vol.had) {
|
||||||
chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol&127,MIN(127,chan[i].std.vol.val),127);
|
chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol&127,MIN(127,chan[i].std.vol.val),127);
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,9 @@ void DivPlatformSoundUnit::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
chWrite(i,0x02,chan[i].outVol);
|
chWrite(i,0x02,chan[i].outVol);
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_SU(i,parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_SU(i,parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,9 @@ void DivPlatformSwan::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
calcAndWriteOutVol(i,env);
|
calcAndWriteOutVol(i,env);
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,9 @@ void DivPlatformT6W28::tick(bool sysTick) {
|
||||||
if (chan[i].std.vol.had) {
|
if (chan[i].std.vol.had) {
|
||||||
chan[i].outVol=VOL_SCALE_LOG_BROKEN(chan[i].vol&15,MIN(15,chan[i].std.vol.val),15);
|
chan[i].outVol=VOL_SCALE_LOG_BROKEN(chan[i].vol&15,MIN(15,chan[i].std.vol.val),15);
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
int noiseSeek=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
int noiseSeek=parent->calcArp(chan[i].note,chan[i].std.arp.val);
|
||||||
chan[i].baseFreq=NOTE_SN(i,noiseSeek);
|
chan[i].baseFreq=NOTE_SN(i,noiseSeek);
|
||||||
|
|
|
@ -103,7 +103,9 @@ void DivPlatformTIA::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: the way arps work on TIA is really weird
|
// TODO: the way arps work on TIA is really weird
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
if (chan[i].std.arp.val<0 && (!(chan[i].std.arp.val&0x40000000))) {
|
if (chan[i].std.arp.val<0 && (!(chan[i].std.arp.val&0x40000000))) {
|
||||||
chan[i].baseFreq=0x80000000|(chan[i].std.arp.val|0x40000000);
|
chan[i].baseFreq=0x80000000|(chan[i].std.arp.val|0x40000000);
|
||||||
|
|
|
@ -121,7 +121,9 @@ void DivPlatformTX81Z::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_LINEAR(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_LINEAR(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,7 +144,9 @@ void DivPlatformVB::tick(bool sysTick) {
|
||||||
chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol&15,MIN(15,chan[i].std.vol.val),15);
|
chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol&15,MIN(15,chan[i].std.vol.val),15);
|
||||||
writeEnv(i);
|
writeEnv(i);
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,7 +159,9 @@ void DivPlatformVERA::tick(bool sysTick) {
|
||||||
chan[i].outVol=MAX(chan[i].vol+chan[i].std.vol.val-63,0);
|
chan[i].outVol=MAX(chan[i].vol+chan[i].std.vol.val-63,0);
|
||||||
rWriteLo(i,2,chan[i].outVol);
|
rWriteLo(i,2,chan[i].outVol);
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=calcNoteFreq(0,parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=calcNoteFreq(0,parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
@ -201,7 +203,9 @@ void DivPlatformVERA::tick(bool sysTick) {
|
||||||
chan[16].outVol=MAX(chan[16].vol+MIN(chan[16].std.vol.val/4,15)-15,0);
|
chan[16].outVol=MAX(chan[16].vol+MIN(chan[16].std.vol.val/4,15)-15,0);
|
||||||
rWritePCMVol(chan[16].outVol&15);
|
rWritePCMVol(chan[16].outVol&15);
|
||||||
}
|
}
|
||||||
if (chan[16].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[16].handleArp();
|
||||||
|
} else if (chan[16].std.arp.had) {
|
||||||
if (!chan[16].inPorta) {
|
if (!chan[16].inPorta) {
|
||||||
chan[16].baseFreq=calcNoteFreq(16,parent->calcArp(chan[16].note,chan[16].std.arp.val));
|
chan[16].baseFreq=calcNoteFreq(16,parent->calcArp(chan[16].note,chan[16].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,9 @@ void DivPlatformVIC20::tick(bool sysTick) {
|
||||||
int env=chan[i].std.vol.val;
|
int env=chan[i].std.vol.val;
|
||||||
calcAndWriteOutVol(i,env);
|
calcAndWriteOutVol(i,env);
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,7 +152,9 @@ void DivPlatformVRC6::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_PERIODIC(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -331,7 +331,9 @@ void DivPlatformX1_010::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((!chan[i].pcm) || chan[i].furnacePCM) {
|
if ((!chan[i].pcm) || chan[i].furnacePCM) {
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NoteX1_010(i,parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NoteX1_010(i,parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,7 +230,9 @@ void DivPlatformYM2203::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
||||||
}
|
}
|
||||||
|
|
|
@ -376,7 +376,9 @@ void DivPlatformYM2608::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
||||||
}
|
}
|
||||||
|
@ -595,7 +597,9 @@ void DivPlatformYM2608::tick(bool sysTick) {
|
||||||
immWrite(0x10b,chan[15].outVol);
|
immWrite(0x10b,chan[15].outVol);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[15].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[15].handleArp();
|
||||||
|
} else if (chan[15].std.arp.had) {
|
||||||
if (!chan[15].inPorta) {
|
if (!chan[15].inPorta) {
|
||||||
chan[15].baseFreq=NOTE_ADPCMB(parent->calcArp(chan[15].note,chan[15].std.arp.val));
|
chan[15].baseFreq=NOTE_ADPCMB(parent->calcArp(chan[15].note,chan[15].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -313,7 +313,9 @@ void DivPlatformYM2610::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
||||||
}
|
}
|
||||||
|
@ -534,7 +536,9 @@ void DivPlatformYM2610::tick(bool sysTick) {
|
||||||
immWrite(0x1b,chan[adpcmBChanOffs].outVol);
|
immWrite(0x1b,chan[adpcmBChanOffs].outVol);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[adpcmBChanOffs].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[adpcmBChanOffs].handleArp();
|
||||||
|
} else if (chan[adpcmBChanOffs].std.arp.had) {
|
||||||
if (!chan[adpcmBChanOffs].inPorta) {
|
if (!chan[adpcmBChanOffs].inPorta) {
|
||||||
chan[adpcmBChanOffs].baseFreq=NOTE_ADPCMB(parent->calcArp(chan[adpcmBChanOffs].note,chan[adpcmBChanOffs].std.arp.val));
|
chan[adpcmBChanOffs].baseFreq=NOTE_ADPCMB(parent->calcArp(chan[adpcmBChanOffs].note,chan[adpcmBChanOffs].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -376,7 +376,9 @@ void DivPlatformYM2610B::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
chan[i].baseFreq=NOTE_FNUM_BLOCK(parent->calcArp(chan[i].note,chan[i].std.arp.val),11);
|
||||||
}
|
}
|
||||||
|
@ -597,7 +599,9 @@ void DivPlatformYM2610B::tick(bool sysTick) {
|
||||||
immWrite(0x1b,chan[adpcmBChanOffs].outVol);
|
immWrite(0x1b,chan[adpcmBChanOffs].outVol);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[adpcmBChanOffs].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[adpcmBChanOffs].handleArp();
|
||||||
|
} else if (chan[adpcmBChanOffs].std.arp.had) {
|
||||||
if (!chan[adpcmBChanOffs].inPorta) {
|
if (!chan[adpcmBChanOffs].inPorta) {
|
||||||
chan[adpcmBChanOffs].baseFreq=NOTE_ADPCMB(parent->calcArp(chan[adpcmBChanOffs].note,chan[adpcmBChanOffs].std.arp.val));
|
chan[adpcmBChanOffs].baseFreq=NOTE_ADPCMB(parent->calcArp(chan[adpcmBChanOffs].note,chan[adpcmBChanOffs].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,9 @@ void DivPlatformYMZ280B::tick(bool sysTick) {
|
||||||
chan[i].outVol=((chan[i].vol&0xff)*MIN(chan[i].macroVolMul,chan[i].std.vol.val))/chan[i].macroVolMul;
|
chan[i].outVol=((chan[i].vol&0xff)*MIN(chan[i].macroVolMul,chan[i].std.vol.val))/chan[i].macroVolMul;
|
||||||
writeOutVol(i);
|
writeOutVol(i);
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,9 @@ void DivPlatformZXBeeper::tick(bool sysTick) {
|
||||||
chan[i].duty=chan[i].std.duty.val;
|
chan[i].duty=chan[i].std.duty.val;
|
||||||
chan[i].freqChanged=true;
|
chan[i].freqChanged=true;
|
||||||
}
|
}
|
||||||
if (chan[i].std.arp.had) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
if (!chan[i].inPorta) {
|
if (!chan[i].inPorta) {
|
||||||
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
}
|
}
|
||||||
|
|
|
@ -322,6 +322,7 @@ struct DivSong {
|
||||||
bool snNoLowPeriods;
|
bool snNoLowPeriods;
|
||||||
bool disableSampleMacro;
|
bool disableSampleMacro;
|
||||||
bool autoSystem;
|
bool autoSystem;
|
||||||
|
bool oldArpStrategy;
|
||||||
|
|
||||||
std::vector<DivInstrument*> ins;
|
std::vector<DivInstrument*> ins;
|
||||||
std::vector<DivWavetable*> wave;
|
std::vector<DivWavetable*> wave;
|
||||||
|
@ -428,7 +429,8 @@ struct DivSong {
|
||||||
brokenPortaArp(false),
|
brokenPortaArp(false),
|
||||||
snNoLowPeriods(false),
|
snNoLowPeriods(false),
|
||||||
disableSampleMacro(false),
|
disableSampleMacro(false),
|
||||||
autoSystem(true) {
|
autoSystem(true),
|
||||||
|
oldArpStrategy(false) {
|
||||||
for (int i=0; i<DIV_MAX_CHIPS; i++) {
|
for (int i=0; i<DIV_MAX_CHIPS; i++) {
|
||||||
system[i]=DIV_SYSTEM_NULL;
|
system[i]=DIV_SYSTEM_NULL;
|
||||||
systemVol[i]=64;
|
systemVol[i]=64;
|
||||||
|
|
|
@ -289,6 +289,10 @@ void FurnaceGUI::drawCompatFlags() {
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip("behavior changed in 0.6pre2");
|
ImGui::SetTooltip("behavior changed in 0.6pre2");
|
||||||
}
|
}
|
||||||
|
ImGui::Checkbox("Old arpeggio macro + pitch slide strategy",&e->song.oldArpStrategy);
|
||||||
|
if (ImGui::IsItemHovered()) {
|
||||||
|
ImGui::SetTooltip("behavior changed in 0.6pre2");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_COMPAT_FLAGS;
|
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_COMPAT_FLAGS;
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
Loading…
Reference in New Issue