Merge branch 'master' of github.com:tildearrow/furnace
This commit is contained in:
commit
315e5a96bd
|
|
@ -1138,6 +1138,9 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) {
|
||||||
portaStatus[chan]=portaVal;
|
portaStatus[chan]=portaVal;
|
||||||
portaStatusChanged[chan]=true;
|
portaStatusChanged[chan]=true;
|
||||||
}
|
}
|
||||||
|
if (portaType[chan]!=3) {
|
||||||
|
portaStatusChanged[chan]=true;
|
||||||
|
}
|
||||||
portaType[chan]=3;
|
portaType[chan]=3;
|
||||||
porting[chan]=true;
|
porting[chan]=true;
|
||||||
} else if (vol[chan]>=203 && vol[chan]<=212) { // vibrato
|
} else if (vol[chan]>=203 && vol[chan]<=212) { // vibrato
|
||||||
|
|
@ -1179,6 +1182,9 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) {
|
||||||
portaStatus[chan]=effectVal[chan];
|
portaStatus[chan]=effectVal[chan];
|
||||||
portaStatusChanged[chan]=true;
|
portaStatusChanged[chan]=true;
|
||||||
}
|
}
|
||||||
|
if (portaType[chan]!=2) {
|
||||||
|
portaStatusChanged[chan]=true;
|
||||||
|
}
|
||||||
portaType[chan]=2;
|
portaType[chan]=2;
|
||||||
porting[chan]=true;
|
porting[chan]=true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -1187,6 +1193,9 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) {
|
||||||
portaStatus[chan]=effectVal[chan];
|
portaStatus[chan]=effectVal[chan];
|
||||||
portaStatusChanged[chan]=true;
|
portaStatusChanged[chan]=true;
|
||||||
}
|
}
|
||||||
|
if (portaType[chan]!=1) {
|
||||||
|
portaStatusChanged[chan]=true;
|
||||||
|
}
|
||||||
portaType[chan]=1;
|
portaType[chan]=1;
|
||||||
porting[chan]=true;
|
porting[chan]=true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -1195,6 +1204,9 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) {
|
||||||
portaStatus[chan]=effectVal[chan];
|
portaStatus[chan]=effectVal[chan];
|
||||||
portaStatusChanged[chan]=true;
|
portaStatusChanged[chan]=true;
|
||||||
}
|
}
|
||||||
|
if (portaType[chan]!=3) {
|
||||||
|
portaStatusChanged[chan]=true;
|
||||||
|
}
|
||||||
portaType[chan]=3;
|
portaType[chan]=3;
|
||||||
porting[chan]=true;
|
porting[chan]=true;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -161,16 +161,16 @@ bool DivEngine::loadS3M(unsigned char* file, size_t len) {
|
||||||
bool signedSamples=(reader.readS()==1);
|
bool signedSamples=(reader.readS()==1);
|
||||||
|
|
||||||
logV("flags: %x",flags);
|
logV("flags: %x",flags);
|
||||||
logV("version: %x",flags);
|
logV("version: %x",version);
|
||||||
if (signedSamples) {
|
if (signedSamples) {
|
||||||
logV("signed samples: yes");
|
logV("signed samples: yes");
|
||||||
} else {
|
} else {
|
||||||
logV("signed samples: no");
|
logV("signed samples: no");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((flags&64) || version==0x1300) {
|
/*if ((flags&64) || version==0x1300) {
|
||||||
ds.noSlidesOnFirstTick=false;
|
ds.noSlidesOnFirstTick=false;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
reader.readI(); // "SCRM"
|
reader.readI(); // "SCRM"
|
||||||
|
|
||||||
|
|
@ -913,6 +913,9 @@ bool DivEngine::loadS3M(unsigned char* file, size_t len) {
|
||||||
if (hasNoteIns) {
|
if (hasNoteIns) {
|
||||||
portaStatusChanged[chan]=true;
|
portaStatusChanged[chan]=true;
|
||||||
}
|
}
|
||||||
|
if (portaType[chan]!=2) {
|
||||||
|
portaStatusChanged[chan]=true;
|
||||||
|
}
|
||||||
portaType[chan]=2;
|
portaType[chan]=2;
|
||||||
porting[chan]=true;
|
porting[chan]=true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -924,6 +927,9 @@ bool DivEngine::loadS3M(unsigned char* file, size_t len) {
|
||||||
if (hasNoteIns) {
|
if (hasNoteIns) {
|
||||||
portaStatusChanged[chan]=true;
|
portaStatusChanged[chan]=true;
|
||||||
}
|
}
|
||||||
|
if (portaType[chan]!=1) {
|
||||||
|
portaStatusChanged[chan]=true;
|
||||||
|
}
|
||||||
portaType[chan]=1;
|
portaType[chan]=1;
|
||||||
porting[chan]=true;
|
porting[chan]=true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -935,6 +941,9 @@ bool DivEngine::loadS3M(unsigned char* file, size_t len) {
|
||||||
if (hasNoteIns) {
|
if (hasNoteIns) {
|
||||||
portaStatusChanged[chan]=true;
|
portaStatusChanged[chan]=true;
|
||||||
}
|
}
|
||||||
|
if (portaType[chan]!=3) {
|
||||||
|
portaStatusChanged[chan]=true;
|
||||||
|
}
|
||||||
portaType[chan]=3;
|
portaType[chan]=3;
|
||||||
porting[chan]=true;
|
porting[chan]=true;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -660,6 +660,7 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
||||||
bool arpStatusChanged[128];
|
bool arpStatusChanged[128];
|
||||||
bool arping[128];
|
bool arping[128];
|
||||||
bool arpingOld[128];
|
bool arpingOld[128];
|
||||||
|
unsigned char lastNote[128];
|
||||||
|
|
||||||
bool mustCommitInitial=true;
|
bool mustCommitInitial=true;
|
||||||
|
|
||||||
|
|
@ -681,6 +682,7 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
||||||
memset(arpStatusChanged,0,128*sizeof(bool));
|
memset(arpStatusChanged,0,128*sizeof(bool));
|
||||||
memset(arping,0,128*sizeof(bool));
|
memset(arping,0,128*sizeof(bool));
|
||||||
memset(arpingOld,0,128*sizeof(bool));
|
memset(arpingOld,0,128*sizeof(bool));
|
||||||
|
memset(lastNote,0,128);
|
||||||
|
|
||||||
logV("pattern %d",i);
|
logV("pattern %d",i);
|
||||||
headerSeek=reader.tell();
|
headerSeek=reader.tell();
|
||||||
|
|
@ -753,6 +755,7 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
||||||
|
|
||||||
if (hasNote) {
|
if (hasNote) {
|
||||||
if (note!=0) {
|
if (note!=0) {
|
||||||
|
lastNote[k]=note;
|
||||||
if (note>96) {
|
if (note>96) {
|
||||||
p->data[j][0]=101;
|
p->data[j][0]=101;
|
||||||
p->data[j][1]=0;
|
p->data[j][1]=0;
|
||||||
|
|
@ -771,8 +774,8 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
||||||
ins=reader.readC();
|
ins=reader.readC();
|
||||||
p->data[j][2]=((int)ins)-1;
|
p->data[j][2]=((int)ins)-1;
|
||||||
// default volume
|
// default volume
|
||||||
if (hasNote && note<96 && ins>0) {
|
if (lastNote[k]<96 && ins>0) {
|
||||||
p->data[j][3]=sampleVol[(ins-1)&255][noteMap[(ins-1)&255][note&127]];
|
p->data[j][3]=sampleVol[(ins-1)&255][noteMap[(ins-1)&255][lastNote[k]&127]];
|
||||||
}
|
}
|
||||||
writePanning=true;
|
writePanning=true;
|
||||||
}
|
}
|
||||||
|
|
@ -813,6 +816,9 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
||||||
portaStatus[k]=effectVal;
|
portaStatus[k]=effectVal;
|
||||||
portaStatusChanged[k]=true;
|
portaStatusChanged[k]=true;
|
||||||
}
|
}
|
||||||
|
if (portaType[k]!=1) {
|
||||||
|
portaStatusChanged[k]=true;
|
||||||
|
}
|
||||||
portaType[k]=1;
|
portaType[k]=1;
|
||||||
porting[k]=true;
|
porting[k]=true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -821,6 +827,9 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
||||||
portaStatus[k]=effectVal;
|
portaStatus[k]=effectVal;
|
||||||
portaStatusChanged[k]=true;
|
portaStatusChanged[k]=true;
|
||||||
}
|
}
|
||||||
|
if (portaType[k]!=2) {
|
||||||
|
portaStatusChanged[k]=true;
|
||||||
|
}
|
||||||
portaType[k]=2;
|
portaType[k]=2;
|
||||||
porting[k]=true;
|
porting[k]=true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -829,6 +838,9 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
||||||
portaStatus[k]=effectVal;
|
portaStatus[k]=effectVal;
|
||||||
portaStatusChanged[k]=true;
|
portaStatusChanged[k]=true;
|
||||||
}
|
}
|
||||||
|
if (portaType[k]!=3) {
|
||||||
|
portaStatusChanged[k]=true;
|
||||||
|
}
|
||||||
portaType[k]=3;
|
portaType[k]=3;
|
||||||
porting[k]=true;
|
porting[k]=true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -880,7 +892,7 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
||||||
volSlideStatus[k]=effectVal;
|
volSlideStatus[k]=effectVal;
|
||||||
volSlideStatusChanged[k]=true;
|
volSlideStatusChanged[k]=true;
|
||||||
}
|
}
|
||||||
if (hasIns) {
|
if (hasNote || hasIns) {
|
||||||
volSlideStatusChanged[k]=true;
|
volSlideStatusChanged[k]=true;
|
||||||
}
|
}
|
||||||
volSliding[k]=true;
|
volSliding[k]=true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue