fix bugged notes in .dmf

This commit is contained in:
tildearrow 2022-02-19 23:11:20 -05:00
parent 73b0edad7c
commit 68eecb723f
2 changed files with 7 additions and 0 deletions

View file

@ -550,6 +550,11 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
pat->data[k][1]-=2;
}
}
if (pat->data[k][0]==0 && pat->data[k][1]!=0) {
logD("what? %d:%d:%d note %d octave %d\n",i,j,k,pat->data[k][0],pat->data[k][1]);
pat->data[k][0]=12;
pat->data[k][1]--;
}
// volume
pat->data[k][3]=reader.readS();
if (ds.version<0x0a) {

View file

@ -98,6 +98,8 @@ const char* FurnaceGUI::noteName(short note, short octave) {
return "REL";
} else if (octave==0 && note==0) {
return "...";
} else if (note==0 && octave!=0) {
return "BUG";
}
int seek=(note+(signed char)octave*12)+60;
if (seek<0 || seek>=180) {