Skip to content

Commit

Permalink
Fix a bug in MT-32 timbre write introduced by...
Browse files Browse the repository at this point in the history
the bank fetch revamp.
  • Loading branch information
PoneyClairDeLune committed Nov 14, 2023
1 parent 6dd1528 commit 3d9acbd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/state/bankReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,11 @@ let VoiceBank = class {
assign.forEach(function (e0, i0) {
sig[sgCrit.indexOf(e0)] = i0;
});
console.debug(`Bank map significance: ${sig}`);
//console.debug(`Bank map significance: ${sig}`);
if (sig.length < 4) {
console.debug(`Debugger launched.`);
debugger;
};
} else {
let msb = 0, prg = 0, lsb = 0, name, poly = 1, type = 0, drum;
assign.forEach(async function (e1, i1) {
Expand Down
8 changes: 6 additions & 2 deletions src/state/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,9 @@ let OctaviaDevice = class extends CustomEventSource {
userBank += String.fromCharCode(e);
};
});
this.userBank.load(`MSB\tLSB\tPRG\n0\t127\t${prg}\t${userBank}`, true);
let loadTsv = `MSB\tLSB\tPRG\tNME\n0\t127\t${prg}\t${userBank}`;
//console.debug(loadTsv);
this.userBank.load(loadTsv, true);
bank.name = userBank;
bank.ending = " ";
};
Expand Down Expand Up @@ -3711,7 +3713,9 @@ let OctaviaDevice = class extends CustomEventSource {
name = upThis.baseBank.get(0, e + (timbreGroup << 6), 127, "mt32").name;
};
upThis.userBank.clearRange({msb: 0, lsb: 127, prg: patch});
upThis.userBank.load(`MSB\tLSB\tPRG\tNME\n000\t127\t${patch}\t${name}`, true);
let loadTsv = `MSB\tLSB\tPRG\tNME\n000\t127\t${patch}\t${name}`;
//console.debug(loadTsv);
upThis.userBank.load(loadTsv, true);
};
}][slot] || (() => {}))();
});
Expand Down

0 comments on commit 3d9acbd

Please sign in to comment.