pattern data refactor, part 11
fix FC/FTM/TFE import. all of them were off by a couple octaves
This commit is contained in:
parent
01ce91ca2d
commit
37cc8accc3
3 changed files with 4 additions and 4 deletions
|
|
@ -428,7 +428,7 @@ bool DivEngine::loadFC(unsigned char* file, size_t len) {
|
|||
FCPattern& fp=pat[seq[i].pat[j]];
|
||||
if (fp.note[k]>0 && fp.note[k]<0x49) {
|
||||
lastNote[j]=fp.note[k];
|
||||
p->newData[k][DIV_PAT_NOTE]=fp.note[k]+seq[i].transpose[j]+60;
|
||||
p->newData[k][DIV_PAT_NOTE]=fp.note[k]+seq[i].transpose[j]+84;
|
||||
// wrap-around if the note is too high
|
||||
if (fp.note[k]>=0x3d) p->newData[k][DIV_PAT_NOTE]-=6*12;
|
||||
if (isSliding[j]) {
|
||||
|
|
@ -447,7 +447,7 @@ bool DivEngine::loadFC(unsigned char* file, size_t len) {
|
|||
p->newData[0][DIV_PAT_FXVAL(0)]=0xff;
|
||||
lastTranspose[j]=seq[i].transpose[j];
|
||||
|
||||
p->newData[k][DIV_PAT_NOTE]=lastNote[j]+seq[i].transpose[j]+60;
|
||||
p->newData[k][DIV_PAT_NOTE]=lastNote[j]+seq[i].transpose[j]+84;
|
||||
// wrap-around if the note is too high
|
||||
if (lastNote[j]>=0x3d) p->newData[k][DIV_PAT_NOTE]-=6*12;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1758,7 +1758,7 @@ bool DivEngine::loadFTM(unsigned char* file, size_t len, bool dnft, bool dnft_si
|
|||
} else if (nextNote == 0) {
|
||||
pat->newData[row][DIV_PAT_NOTE] = -1;
|
||||
} else if (nextNote < 0x0d) {
|
||||
pat->newData[row][DIV_PAT_NOTE] = nextOctave*12 + (nextNote - 1);
|
||||
pat->newData[row][DIV_PAT_NOTE] = nextOctave*12 + (nextNote - 1) + 60;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ void TFMParsePattern(struct TFMParsePatternInfo info) {
|
|||
pat->newData[k][DIV_PAT_NOTE]=DIV_NOTE_OFF;
|
||||
} else {
|
||||
unsigned char invertedNote=~patDataBuf[k];
|
||||
pat->newData[k][DIV_PAT_NOTE]=invertedNote;
|
||||
pat->newData[k][DIV_PAT_NOTE]=invertedNote+60;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue