/g;
newPatchScreen[ip] = newPatchScreen[ip].replace(regex2, '>');
}
for (ip=192; ip<255; ip++)
{
// Less Than "<" and Greater Than ">" symbols alter the Tone and Patch name display // Added to v1.1
// So... replace them using equivalent ASCII character inserts "< and ">"
regex1 = //g;
newPatchScreen[ip] = newPatchScreen[ip].replace(regex2, '>');
}
for (ip=128; ip<191; ip++)
{
// Less Than "<" and Greater Than ">" symbols alter the Tone and Patch name display // Added to v1.1
// So... replace them using equivalent ASCII character inserts "< and ">"
regex1 = //g;
newPatchScreen[ip] = newPatchScreen[ip].replace(regex2, '>');
}
if (document.querySelector('input[name = kllama1]:checked').value == "YES")
{
a01 = " a01 Acou Piano 1 b01 Fantasy r01 Closed High Hat-1";
a02 = " a02 Acou Piano 2 b02 Harmo Pan r02 Closed High Hat-2";
a03 = " a03 Acou Piano 3 b03 Chorale r03 Open High Hat-1";
a04 = " a04 Honky-Tonk b04 Glasses r04 Open High Hat-2";
a05 = " a05 Elec Piano 1 b05 Soundtrack r05 Crash Cymbal";
a06 = " a06 Elec Piano 2 b06 Atmosphere r06 Crash Cymbal (Short)";
a07 = " a07 Elec Piano 3 b07 Warm Bell r07 Crash Cymbal (Mute)";
a08 = " a08 Elec Piano 4 b08 Space Horn r08 Ride Cymbal";
a09 = " a09 Elec Organ 1 b09 Echo Bell r09 Ride Cymbal (Short)";
a10 = " a10 Elec Organ 2 b10 Icе Rains r10 Ride Cymbal (Mute)";
a11 = " a11 Elec Organ 3 b11 Oboe 2002 r11 Cup";
a12 = " a12 Elec Organ 4 b12 Echo Pan r12 Cup (Mute)";
a13 = " a13 Pipe Organ 1 b13 Bell Swing r13 China Cymbal";
a14 = " a14 Pipe Organ 2 b14 Reso Synth r14 Splash Cymbal";
a15 = " a15 Pipe Organ 3 b15 Steam Pad r15 Bass Drum-1";
a16 = " a16 Accordion b16 Vibe String r16 Bass Drum-2";
a17 = " a17 Harpsi 1 b17 Syn Lead 1 r17 Bass Drum-3";
a18 = " a18 Harpsi 2 b18 Syn Lead 2 r18 Bass Drum-4";
a19 = " a19 Harpsi 3 b19 Syn Lead 3 r19 Snare Drum-1";
a20 = " a20 Clav 1 b20 Syn Lead 4 r20 Snare Drum-2";
a21 = " a21 Clav 2 b21 Syn Bass 1 r21 Snare Drum-3";
a22 = " a22 Clav 3 b22 Syn Bass 2 r22 Snare Drum-4";
a23 = " a23 Celesta 1 b23 Syn Bass 3 r23 Snare Drum-5";
a24 = " a24 Celesta 2 b24 Syn Bass 4 r24 Snare Drum-6";
a25 = " a25 Violin 1 b25 Acou Bass 1 r25 Rim Shot";
a26 = " a26 Violin 2 b26 Acou Bass 2 r26 Brush-1";
a27 = " a27 Celo 1 b27 Elec Bass 1 r27 Brush-2";
a28 = " a28 Celo 2 b28 Elec Bass 2 r28 High Tom Tom-1";
a29 = " a29 Contrabass b29 Slap Bass 1 r29 Middle Tom Tom-1";
a30 = " a30 Pizzicato b30 Slap Bass 2 r30 Low Tom Tom-1";
a31 = " a31 Harp 1 b31 Fretless 1 r31 High Tom Tom-2";
a32 = " a32 Harp 2 b32 Fretless 2 r32 Middle Tom Tom-2";
a33 = " a33 Strings 1 b33 Vibe r33 Low Tom Tom-2";
a34 = " a34 Strings 2 b34 Glock r34 High Tom Tom-3";
a35 = " a35 Strings 3 b35 Marimba r35 Middle Tom Tom-3";
a36 = " a36 Strings 4 b36 Xylophone r36 Low Tom Tom-3";
a37 = " a37 Brass 1 b37 Guitar 1 r37 High Tom Tom-1";
a38 = " a38 Brass 2 b38 Guitar 2 r38 High Tom Tom-2";
a39 = " a39 Brass 3 b39 Elec Gtr 1 r39 Hand Clap";
a40 = " a40 Brass 4 b40 Elec Gtr 2 r40 Tambourine";
a41 = " a41 Trumpet 1 b41 Koto r41 Cowbell";
a42 = " a42 Trumpet 2 b42 Shamisen r42 High Bongo";
a43 = " a43 Trombone 1 b43 Jamisen r43 Low Bongo";
a44 = " a44 Trombone 2 b44 Sho r44 High Conga (Mute)";
a45 = " a45 Horn b45 Shakuhachi r45 High Conga";
a46 = " a46 Fr Horn b46 Wadako Set r46 Low Conga";
a47 = " a47 Engl Horn b47 Sitar r47 High Timbale";
a48 = " a48 Tuba b48 Steel Drum r48 Low Timbale";
a49 = " a49 Flute 1 b49 Tech Snare r49 High Agogo";
a50 = " a50 Flute 2 b50 Elec Tom r50 Low Agogo";
a51 = " a51 Piccolo b51 Reverse Cym r51 Cabasa";
a52 = " a52 Recorder b52 Ethno Hi r52 Maracas";
a53 = " a53 Pan Pipes b53 Timpani r53 Short Whistle";
a54 = " a54 Bottlebiow b54 Triangle r54 Long Whistle";
a55 = " a55 Breathpipe b55 Wind Bell r55 Quijada";
a56 = " a56 Whistle b56 Tube Bell r56 Claves";
a57 = " a57 Sax 1 b57 Orche Hit r57 Castanets";
a58 = " a58 Sax 2 b58 Bird Tweet r58 Triangle";
a59 = " a59 Sax 3 b59 One Note Jam r59 Wood Block";
a60 = " a60 Clarinet 1 b60 Telephone r60 Bell";
a61 = " a61 Clarinet 2 b61 Typewrier r61 Native Drum-1";
a62 = " a62 Oboe b62 Insect r62 Native Drum-2";
a63 = " a63 Bassoon b63 Water Bells r63 Native Drum-3";
a64 = " a64 Harmonica b64 Jungle Tune r64 OFF";
screenLine = "Filename: " + newFilename + " " + ftype; screenLine += "
------------------------ ------------------------ ---------------------- ---------------------- ---------------------- ---------------------------
"; screenLine += "BANK/A PATCH NAME (RAM) BANK/B PATCH NAME (RAM) BANK/i TONE NAME (RAM) BANK/a TONE NAME (ROM) BANK/b TONE NAME (ROM) BANK/r RHYTHM NAME (ROM)
"; screenLine += "------------------------ ------------------------ ---------------------- ---------------------- ---------------------- ---------------------------
";
document.querySelector("#display").insertAdjacentHTML('beforeend',screenLine);
}
if (document.querySelector('input[name = kllama1]:checked').value == "NO")
{
a01 = "";
a02 = "";
a03 = "";
a04 = "";
a05 = "";
a06 = "";
a07 = "";
a08 = "";
a09 = "";
a10 = "";
a11 = "";
a12 = "";
a13 = "";
a14 = "";
a15 = "";
a16 = "";
a17 = "";
a18 = "";
a19 = "";
a20 = "";
a21 = "";
a22 = "";
a23 = "";
a24 = "";
a25 = "";
a26 = "";
a27 = "";
a28 = "";
a29 = "";
a30 = "";
a31 = "";
a32 = "";
a33 = "";
a34 = "";
a35 = "";
a36 = "";
a37 = "";
a38 = "";
a39 = "";
a40 = "";
a41 = "";
a42 = "";
a43 = "";
a44 = "";
a45 = "";
a46 = "";
a47 = "";
a48 = "";
a49 = "";
a50 = "";
a51 = "";
a52 = "";
a53 = "";
a54 = "";
a55 = "";
a56 = "";
a57 = "";
a58 = "";
a59 = "";
a60 = "";
a61 = "";
a62 = "";
a63 = "";
a64 = "";
screenLine = "Filename: " + newFilename + " " + ftype; screenLine += "
------------------------ ------------------------ ----------------------
"; screenLine += "BANK/A PATCH NAME (RAM) BANK/B PATCH NAME (RAM) BANK/i TONE NAME (RAM)
"; screenLine += "------------------------ ------------------------ ----------------------
";
document.querySelector("#display").insertAdjacentHTML('beforeend',screenLine);
}
// Setup the Patch and Tone arrays to be displayed on the screen //
screenLine =
"I-A11 " + newPatchScreen[0] + " " + " I-B11 " + newPatchScreen[192] + " " + " i01 " + newPatchScreen[128] + a01 + "
" +
"I-A12 " + newPatchScreen[1] + " " + " I-B12 " + newPatchScreen[193] + " " + " i02 " + newPatchScreen[129] + a02 + "
" +
"I-A13 " + newPatchScreen[2] + " " + " I-B13 " + newPatchScreen[194] + " " + " i03 " + newPatchScreen[130] + a03 + "
" +
"I-A14 " + newPatchScreen[3] + " " + " I-B14 " + newPatchScreen[195] + " " + " i04 " + newPatchScreen[131] + a04 + "
" +
"I-A15 " + newPatchScreen[4] + " " + " I-B15 " + newPatchScreen[196] + " " + " i05 " + newPatchScreen[132] + a05 + "
" +
"I-A16 " + newPatchScreen[5] + " " + " I-B16 " + newPatchScreen[197] + " " + " i06 " + newPatchScreen[133] + a06 + "
" +
"I-A17 " + newPatchScreen[6] + " " + " I-B17 " + newPatchScreen[198] + " " + " i07 " + newPatchScreen[134] + a07 + "
" +
"I-A18 " + newPatchScreen[7] + " " + " I-B18 " + newPatchScreen[199] + " " + " i08 " + newPatchScreen[135] + a08 + "
" +
" i09 " + newPatchScreen[136] + a09 + "
" +
"I-A21 " + newPatchScreen[8] + " " + " I-B21 " + newPatchScreen[200] + " " + " i10 " + newPatchScreen[137] + a10 + "
" +
"I-A22 " + newPatchScreen[9] + " " + " I-B22 " + newPatchScreen[201] + " " + " i11 " + newPatchScreen[138] + a11 + "
" +
"I-A23 " + newPatchScreen[10] + " " + " I-B23 " + newPatchScreen[202] + " " + " i12 " + newPatchScreen[139] + a12 + "
" +
"I-A24 " + newPatchScreen[11] + " " + " I-B24 " + newPatchScreen[203] + " " + " i13 " + newPatchScreen[140] + a13 + "
" +
"I-A25 " + newPatchScreen[12] + " " + " I-B25 " + newPatchScreen[204] + " " + " i14 " + newPatchScreen[141] + a14 + "
" +
"I-A26 " + newPatchScreen[13] + " " + " I-B26 " + newPatchScreen[205] + " " + " i15 " + newPatchScreen[142] + a15 + "
" +
"I-A27 " + newPatchScreen[14] + " " + " I-B27 " + newPatchScreen[206] + " " + " i16 " + newPatchScreen[143] + a16 + "
" +
"I-A28 " + newPatchScreen[15] + " " + " I-B28 " + newPatchScreen[207] + " " + " i17 " + newPatchScreen[144] + a17 + "
" +
" i18 " + newPatchScreen[145] + a18 + "
" +
"I-A31 " + newPatchScreen[16] + " " + " I-B31 " + newPatchScreen[208] + " " + " i19 " + newPatchScreen[146] + a19 + "
" +
"I-A32 " + newPatchScreen[17] + " " + " I-B32 " + newPatchScreen[209] + " " + " i20 " + newPatchScreen[147] + a20 + "
" +
"I-A33 " + newPatchScreen[18] + " " + " I-B33 " + newPatchScreen[210] + " " + " i21 " + newPatchScreen[148] + a21 + "
" +
"I-A34 " + newPatchScreen[19] + " " + " I-B34 " + newPatchScreen[211] + " " + " i22 " + newPatchScreen[149] + a22 + "
" +
"I-A35 " + newPatchScreen[20] + " " + " I-B35 " + newPatchScreen[212] + " " + " i23 " + newPatchScreen[150] + a23 + "
" +
"I-A36 " + newPatchScreen[21] + " " + " I-B36 " + newPatchScreen[213] + " " + " i24 " + newPatchScreen[151] + a24 + "
" +
"I-A37 " + newPatchScreen[22] + " " + " I-B37 " + newPatchScreen[214] + " " + " i25 " + newPatchScreen[152] + a25 + "
" +
"I-A38 " + newPatchScreen[23] + " " + " I-B38 " + newPatchScreen[215] + " " + " i26 " + newPatchScreen[153] + a26 + "
" +
" i27 " + newPatchScreen[154] + a27 + "
" +
"I-A41 " + newPatchScreen[24] + " " + " I-B41 " + newPatchScreen[216] + " " + " i28 " + newPatchScreen[155] + a28 + "
" +
"I-A42 " + newPatchScreen[25] + " " + " I-B42 " + newPatchScreen[217] + " " + " i29 " + newPatchScreen[156] + a29 + "
" +
"I-A43 " + newPatchScreen[26] + " " + " I-B43 " + newPatchScreen[218] + " " + " i30 " + newPatchScreen[157] + a30 + "
" +
"I-A44 " + newPatchScreen[27] + " " + " I-B44 " + newPatchScreen[219] + " " + " i31 " + newPatchScreen[158] + a31 + "
" +
"I-A45 " + newPatchScreen[28] + " " + " I-B45 " + newPatchScreen[220] + " " + " i32 " + newPatchScreen[159] + a32 + "
" +
"I-A46 " + newPatchScreen[29] + " " + " I-B46 " + newPatchScreen[221] + " " + " i33 " + newPatchScreen[160] + a33 + "
" +
"I-A47 " + newPatchScreen[30] + " " + " I-B47 " + newPatchScreen[222] + " " + " i34 " + newPatchScreen[161] + a34 + "
" +
"I-A48 " + newPatchScreen[31] + " " + " I-B48 " + newPatchScreen[223] + " " + " i35 " + newPatchScreen[162] + a35 + "
" +
" i36 " + newPatchScreen[163] + a36 + "
" +
"I-A51 " + newPatchScreen[32] + " " + " I-B51 " + newPatchScreen[224] + " " + " i37 " + newPatchScreen[164] + a37 + "
" +
"I-A52 " + newPatchScreen[33] + " " + " I-B52 " + newPatchScreen[225] + " " + " i38 " + newPatchScreen[165] + a38 + "
" +
"I-A53 " + newPatchScreen[34] + " " + " I-B53 " + newPatchScreen[226] + " " + " i39 " + newPatchScreen[166] + a39 + "
" +
"I-A54 " + newPatchScreen[35] + " " + " I-B54 " + newPatchScreen[227] + " " + " i40 " + newPatchScreen[167] + a40 + "
" +
"I-A55 " + newPatchScreen[36] + " " + " I-B55 " + newPatchScreen[228] + " " + " i41 " + newPatchScreen[168] + a41 + "
" +
"I-A56 " + newPatchScreen[37] + " " + " I-B56 " + newPatchScreen[229] + " " + " i42 " + newPatchScreen[169] + a42 + "
" +
"I-A57 " + newPatchScreen[38] + " " + " I-B57 " + newPatchScreen[230] + " " + " i43 " + newPatchScreen[170] + a43 + "
" +
"I-A58 " + newPatchScreen[39] + " " + " I-B58 " + newPatchScreen[231] + " " + " i44 " + newPatchScreen[171] + a44 + "
" +
" i45 " + newPatchScreen[172] + a45 + "
" +
"I-A61 " + newPatchScreen[40] + " " + " I-B61 " + newPatchScreen[232] + " " + " i46 " + newPatchScreen[173] + a46 + "
" +
"I-A62 " + newPatchScreen[41] + " " + " I-B62 " + newPatchScreen[233] + " " + " i47 " + newPatchScreen[174] + a47 + "
" +
"I-A63 " + newPatchScreen[42] + " " + " I-B63 " + newPatchScreen[234] + " " + " i48 " + newPatchScreen[175] + a48 + "
" +
"I-A64 " + newPatchScreen[43] + " " + " I-B64 " + newPatchScreen[235] + " " + " i49 " + newPatchScreen[176] + a49 + "
" +
"I-A65 " + newPatchScreen[44] + " " + " I-B65 " + newPatchScreen[236] + " " + " i50 " + newPatchScreen[177] + a50 + "
" +
"I-A66 " + newPatchScreen[45] + " " + " I-B66 " + newPatchScreen[237] + " " + " i51 " + newPatchScreen[178] + a51 + "
" +
"I-A67 " + newPatchScreen[46] + " " + " I-B67 " + newPatchScreen[238] + " " + " i52 " + newPatchScreen[179] + a52 + "
" +
"I-A68 " + newPatchScreen[47] + " " + " I-B68 " + newPatchScreen[239] + " " + " i53 " + newPatchScreen[180] + a53 + "
" +
" i54 " + newPatchScreen[181] + a54 + "
" +
"I-A71 " + newPatchScreen[48] + " " + " I-B71 " + newPatchScreen[240] + " " + " i55 " + newPatchScreen[182] + a55 + "
" +
"I-A72 " + newPatchScreen[49] + " " + " I-B72 " + newPatchScreen[241] + " " + " i56 " + newPatchScreen[183] + a56 + "
" +
"I-A73 " + newPatchScreen[50] + " " + " I-B73 " + newPatchScreen[242] + " " + " i57 " + newPatchScreen[184] + a57 + "
" +
"I-A74 " + newPatchScreen[51] + " " + " I-B74 " + newPatchScreen[243] + " " + " i58 " + newPatchScreen[185] + a58 + "
" +
"I-A75 " + newPatchScreen[52] + " " + " I-B75 " + newPatchScreen[244] + " " + " i59 " + newPatchScreen[186] + a59 + "
" +
"I-A76 " + newPatchScreen[53] + " " + " I-B76 " + newPatchScreen[245] + " " + " i60 " + newPatchScreen[187] + a60 + "
" +
"I-A77 " + newPatchScreen[54] + " " + " I-B77 " + newPatchScreen[246] + " " + " i61 " + newPatchScreen[188] + a61 + "
" +
"I-A78 " + newPatchScreen[55] + " " + " I-B78 " + newPatchScreen[247] + " " + " i62 " + newPatchScreen[189] + a62 + "
" +
" i63 " + newPatchScreen[190] + a63 + "
" +
"I-A81 " + newPatchScreen[56] + " " + " I-B81 " + newPatchScreen[248] + " " + " i64 " + newPatchScreen[191] + a64 + "
" +
"I-A82 " + newPatchScreen[57] + " " + " I-B82 " + newPatchScreen[249] + "
" +
"I-A83 " + newPatchScreen[58] + " " + " I-B83 " + newPatchScreen[250] + "
" +
"I-A84 " + newPatchScreen[59] + " " + " I-B84 " + newPatchScreen[251] + "
" +
"I-A85 " + newPatchScreen[60] + " " + " I-B85 " + newPatchScreen[252] + "
" +
"I-A86 " + newPatchScreen[61] + " " + " I-B86 " + newPatchScreen[253] + "
" +
"I-A87 " + newPatchScreen[62] + " " + " I-B87 " + newPatchScreen[254] + "
" +
"I-A88 " + newPatchScreen[63] + " " + " I-B88 " + newPatchScreen[255] + "
"
document.querySelector("#display").insertAdjacentHTML('beforeend',screenLine); newk = newk + 32;
if (newk > 125)
{
newk = 0; ip = ip + 1;
}
}
reader.readAsBinaryString(oneFile);
}
else
{
alert("Failed to load file");
}
}
// Send all Patch and Tone arrays to the screen //
document.getElementById('myFile').addEventListener('change',readSingleFile, false);