Skip to content

Commit

Permalink
GM (provider Roland) and MT-32 now use MSB 049.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Nov 19, 2024
1 parent 48b7aae commit e1f084a
Show file tree
Hide file tree
Showing 9 changed files with 2,082 additions and 1,928 deletions.
832 changes: 416 additions & 416 deletions data/bank/gm2.tsv

Large diffs are not rendered by default.

3,107 changes: 1,618 additions & 1,489 deletions data/bank/gs.tsv

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/bank/xg.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ MSB PRG LSB NME ELC LVL
000 054 000 SynVoice 0 0
000 054 040 SynVoix2 1 0
000 054 041 Choral 1 0
000 054 064 AnalVoix 0 0
000 054 064 AnalgVox 0 0
000 054 065 Aspirate
000 054 066 DtAspirt
000 054 067 Facula
Expand Down
7 changes: 4 additions & 3 deletions data/map/gs.10.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ SftAcord SoftAccord
Harmo. 2 Harmonica2
BscBHrmo BasicBHrmo
SplBHrmo SupplBHrmo
TngoAcd2 Bandoneon2
Bndoneon Bandoneon3
Bndoneon Bandoneon
Bandonn2 Bandoneon2
Bandonn3 Bandoneon3
NylonGt3 Nylon Gt.o
VelGtHrm VeloHarmnx
NylonGt2 Nylon Gt.2
Expand Down Expand Up @@ -511,7 +512,7 @@ JP8BaLd1 JP8BassLd1
JP8BaLd2 JP8BassLd2
SH-5BaLd SH-5 Bs.Ld
Fantasy2 Fantasia 2
Fantasy1 NewAge Pad
NewAgePd NewAge Pad
BelHeavn BellHeaven
ThickPad Thick Pad
ThickMtx ThickMatrx
Expand Down
5 changes: 3 additions & 2 deletions data/map/gs.12.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ SftAcord Soft Accord.
Harmo. 2 Harmonica 2
BscBHrmo BasicB.Harmo
SplBHrmo SupplB.Harmo
TngoAcd2 Bandoneon 2
Bndoneon Bandoneon 3
Bandonn2 Bandoneon 2
Bandonn3 Bandoneon 3
VelGtHrm Velo Harmnix
LequintG Lequint Gt.
12StrGtr 12Str Guitar
Expand Down Expand Up @@ -370,6 +370,7 @@ Fat&Prky Fat & Perky
JP8BaLd1 JP8 Bs Lead1
JP8BaLd2 JP8 Bs Lead2
SH-5BaLd SH-5 Bs.Lead
NewAgePd New Age Pad
BelHeavn Bell Heaven
ThickMtx Thick Matrix
RotarStr RotaryString
Expand Down
2 changes: 1 addition & 1 deletion data/map/xg.10.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ StereoAh Stereo Aah
VoiceDoo Voice Doo
StereoOh Stereo Ooh
SynVoix2 Syn.Voice2
AnalVoix AnalgVoice
AnalgVox AnalgVoice
OrchHit2 Orch. Hit2
Brs Stab Brass Stab
DoublHit Double Hit
Expand Down
2 changes: 1 addition & 1 deletion data/map/xg.12.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ ChoirAh2 Choir Aah 2
MelChoir Mellow Choir
ChoirStr Choir Strngs
SynVoix2 SynthVoice 2
AnalVoix Analog Voice
AnalgVox Analog Voice
OrchHit2 Orch. Hit 2
BrsStb80 Brass Stab80
6th Hit+ Sixth Hit +
Expand Down
47 changes: 35 additions & 12 deletions src/state/bankReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ let VoiceBank = class {
return this.#bankInfo;
};
strictMode = false;
get(msb = 0, prg = 0, lsb = 0, mode) {
get(msb = 0, prg = 0, lsb = 0, mode, preferredHint = 0) {
let sid = [msb, prg, lsb];
let bankName;
let bankPoly = 1, bankType = 0, bankDrum, bankLevel;
Expand Down Expand Up @@ -113,12 +113,19 @@ let VoiceBank = class {
case "gs":
case "sc": {
if (msb == 0 && lsb < 5) {
args[2] = 0;
//args[2] = 0;
args[0] = 49;
} else if (msb > 125 && lsb < 5 && lsb != 2) {
// Temporary fix for C/M bank under SC-55 mode
// SC-88 do care incorrect LSB selection
args[2] = msb;
args[0] = 0;
args[0] = 49;
};
break;
};
case "mt32": {
if (msb == 0) {
args[0] = 49;
};
break;
};
Expand Down Expand Up @@ -203,21 +210,21 @@ let VoiceBank = class {
case 0: {
switch (args[2]) {
case 127: {
if (mode == "xg") {
//if (mode == "xg") {
sect = "GM-a";
} else {
/*} else {
sect = "MT-a";
bank = "C/M";
};
};*/
break;
};
case 126: {
if (mode == "xg") {
// if (mode == "xg") {
sect = "GM-n";
} else {
/*} else {
sect = "MT-b";
bank = "C/M";
};
bank = "C-M";
}; */
break;
};
case 7: {
Expand Down Expand Up @@ -285,6 +292,16 @@ let VoiceBank = class {
useLsb = 1;
break;
};
case 49: {
if (args[2] >> 1 == 63) {
sect = `MT-${"ba"[args[2] & 1]}`;
bank = `C${"-/"[args[2] & 1]}M`;
} else {
sect = "GM-a";
bank = "000";
};
break;
};
case 56: {
sect = "GM-b";
break;
Expand Down Expand Up @@ -584,8 +601,6 @@ let VoiceBank = class {
standard = "KG";
} else if (args[2] < 126) {
standard = "XG";
} else if (args[2] == 127) {
standard = "MT";
};
break;
};
Expand All @@ -604,6 +619,14 @@ let VoiceBank = class {
standard = "MU"; // MU-100 Native
break;
};
case 49: {
if (args[2] >> 1 == 63) {
standard = "MT";
} else if (args[2] < 5) {
standard = "GM";
};
break;
};
case 56: {
standard = "AG";
break;
Expand Down
6 changes: 3 additions & 3 deletions src/state/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ let OctaviaDevice = class extends CustomEventSource {
userBank += String.fromCharCode(e);
};
});
let loadTsv = `MSB\tLSB\tPRG\tNME\n0\t127\t${prg}\t${userBank}`;
let loadTsv = `MSB\tLSB\tPRG\tNME\n49\t127\t${prg}\t${userBank}`;
//console.debug(loadTsv);
upThis.userBank.load(loadTsv, true);
bank.name = userBank;
Expand Down Expand Up @@ -4843,7 +4843,7 @@ 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});
let loadTsv = `MSB\tLSB\tPRG\tNME\n000\t127\t${patch}\t${name}`;
let loadTsv = `MSB\tLSB\tPRG\tNME\n49\t127\t${patch}\t${name}`;
//console.debug(loadTsv);
upThis.userBank.load(loadTsv, true);
};
Expand All @@ -4865,7 +4865,7 @@ let OctaviaDevice = class extends CustomEventSource {
});
if (wroteName) {
upThis.userBank.clearRange({msb: 0, lsb: 127, prg: patch});
let loadTsv = `MSB\tLSB\tPRG\tNME\n000\t127\t${patch}\tMT-m:${patch}`;
let loadTsv = `MSB\tLSB\tPRG\tNME\n49\t127\t${patch}\tMT-m:${patch}`;
upThis.userBank.load(loadTsv, true);
};
upThis.forceVoiceRefresh();
Expand Down

0 comments on commit e1f084a

Please sign in to comment.