/g;
newPatchScreen[ip] = newPatchScreen[ip].replace(regex2, '>');
}
if ( pwordFourTwenty != "" && pwordTwoZeroNine == "f7" && pwordSixThirty == "f0")
{
// This is a properly formatted Behringer Pro-800 Single Preset SysEx file
ftype = "(This is a valid Behringer Pro-800 Preset SysEx file with 100 Presets)";
}
if ( pwordFourTwenty == "" && pwordTwoZeroNine == "f7" && pwordSixThirty == "")
{
// This is a properly formatted Behringer Pro-800 Single Preset SysEx file
ftype = "(This is a valid Behringer Pro-800 Single Preset SysEx file)";
}
if ( pwordFourTwenty != "" && pwordTwoZeroNine == "f7" && pwordSixThirty != "f0")
{
// This is not a properly formatted Behringer Pro-800 Preset SysEx file
ftype = "(This is not a properly formatted Behringer PRO-800 SysEx file)";
return document.getElementById("display").innerHTML = "-= FILE READ ERROR =-
The file you chose [" + newFilename + "]
is not a properly formatted PRO-800 SysEx file. Read the Release Notes for instructions
on how to convert this file so it can be read by this utility and PRO-800 editors.
";
}
// Setup the Preset array to be displayed on the screen
screenLine = "Filename: " + newFilename + "
" + ftype; screenLine += "
------------------------
"; screenLine += "PROG# PRESET NAME
"; screenLine += "------------------------
";
document.querySelector("#display").insertAdjacentHTML('beforeend',screenLine);
// Check to see if this is a properly formatted Behringer Pro-800 Single Preset SysEx file
if ( pwordSixThirty == "")
{
newPatchScreen[1] == "";
screenLine = " -- " + newPatchScreen[0] + "
Note: This *.SYX file contains only one Preset"
// ????
// ftype = "(This is a valid Behringer Pro-800 Single Preset SysEx file)";
}
// Check for an ASCII character of the second Preset name character to see if it's a valid PRO-800 100 Preset file
else if ( pwordThreeNineThree < "20" || pwordThreeNineThree > "7E" )
{
// SysEx file is not a properly formatted Behringer PRO-800 SysEx file
ftype = "(This is not a properly formatted Behringer PRO-800 SysEx file)";
return document.getElementById("display").innerHTML = "-= FILE READ ERROR =-
The file you chose [" + newFilename + "]
is not a properly formatted PRO-800 SysEx file. Read the Release Notes for instructions
on how to convert this file so it can be read by this utility and PRO-800 editors.
";
}
if ( newPatchScreen[1] != "" )
{
screenLine =
" 00 " + newPatchScreen[0] + "
" +
" 01 " + newPatchScreen[1] + "
" +
" 02 " + newPatchScreen[2] + "
" +
" 03 " + newPatchScreen[3] + "
" +
" 04 " + newPatchScreen[4] + "
" +
" 05 " + newPatchScreen[5] + "
" +
" 06 " + newPatchScreen[6] + "
" +
" 07 " + newPatchScreen[7] + "
" +
" 08 " + newPatchScreen[8] + "
" +
" 09 " + newPatchScreen[9] + "
" +
" 10 " + newPatchScreen[10] + "
" +
" 11 " + newPatchScreen[11] + "
" +
" 12 " + newPatchScreen[12] + "
" +
" 13 " + newPatchScreen[13] + "
" +
" 14 " + newPatchScreen[14] + "
" +
" 15 " + newPatchScreen[15] + "
" +
" 16 " + newPatchScreen[16] + "
" +
" 17 " + newPatchScreen[17] + "
" +
" 18 " + newPatchScreen[18] + "
" +
" 19 " + newPatchScreen[19] + "
" +
" 20 " + newPatchScreen[20] + "
" +
" 21 " + newPatchScreen[21] + "
" +
" 22 " + newPatchScreen[22] + "
" +
" 23 " + newPatchScreen[23] + "
" +
" 24 " + newPatchScreen[24] + "
" +
" 25 " + newPatchScreen[25] + "
" +
" 26 " + newPatchScreen[26] + "
" +
" 27 " + newPatchScreen[27] + "
" +
" 28 " + newPatchScreen[28] + "
" +
" 29 " + newPatchScreen[29] + "
" +
" 30 " + newPatchScreen[30] + "
" +
" 31 " + newPatchScreen[31] + "
" +
" 32 " + newPatchScreen[32] + "
" +
" 33 " + newPatchScreen[33] + "
" +
" 34 " + newPatchScreen[34] + "
" +
" 35 " + newPatchScreen[35] + "
" +
" 36 " + newPatchScreen[36] + "
" +
" 37 " + newPatchScreen[37] + "
" +
" 38 " + newPatchScreen[38] + "
" +
" 39 " + newPatchScreen[39] + "
" +
" 40 " + newPatchScreen[40] + "
" +
" 41 " + newPatchScreen[41] + "
" +
" 42 " + newPatchScreen[42] + "
" +
" 43 " + newPatchScreen[43] + "
" +
" 44 " + newPatchScreen[44] + "
" +
" 45 " + newPatchScreen[45] + "
" +
" 46 " + newPatchScreen[46] + "
" +
" 47 " + newPatchScreen[47] + "
" +
" 48 " + newPatchScreen[48] + "
" +
" 49 " + newPatchScreen[49] + "
" +
" 50 " + newPatchScreen[50] + "
" +
" 51 " + newPatchScreen[51] + "
" +
" 52 " + newPatchScreen[52] + "
" +
" 53 " + newPatchScreen[53] + "
" +
" 54 " + newPatchScreen[54] + "
" +
" 55 " + newPatchScreen[55] + "
" +
" 56 " + newPatchScreen[56] + "
" +
" 57 " + newPatchScreen[57] + "
" +
" 58 " + newPatchScreen[58] + "
" +
" 59 " + newPatchScreen[59] + "
" +
" 60 " + newPatchScreen[60] + "
" +
" 61 " + newPatchScreen[61] + "
" +
" 62 " + newPatchScreen[62] + "
" +
" 63 " + newPatchScreen[63] + "
" +
" 64 " + newPatchScreen[64] + "
" +
" 65 " + newPatchScreen[65] + "
" +
" 66 " + newPatchScreen[66] + "
" +
" 67 " + newPatchScreen[67] + "
" +
" 68 " + newPatchScreen[68] + "
" +
" 69 " + newPatchScreen[69] + "
" +
" 70 " + newPatchScreen[70] + "
" +
" 71 " + newPatchScreen[71] + "
" +
" 72 " + newPatchScreen[72] + "
" +
" 73 " + newPatchScreen[73] + "
" +
" 74 " + newPatchScreen[74] + "
" +
" 75 " + newPatchScreen[75] + "
" +
" 76 " + newPatchScreen[76] + "
" +
" 77 " + newPatchScreen[77] + "
" +
" 78 " + newPatchScreen[78] + "
" +
" 79 " + newPatchScreen[79] + "
" +
" 80 " + newPatchScreen[80] + "
" +
" 81 " + newPatchScreen[81] + "
" +
" 82 " + newPatchScreen[82] + "
" +
" 83 " + newPatchScreen[83] + "
" +
" 84 " + newPatchScreen[84] + "
" +
" 85 " + newPatchScreen[85] + "
" +
" 86 " + newPatchScreen[86] + "
" +
" 87 " + newPatchScreen[87] + "
" +
" 88 " + newPatchScreen[88] + "
" +
" 89 " + newPatchScreen[89] + "
" +
" 90 " + newPatchScreen[90] + "
" +
" 91 " + newPatchScreen[91] + "
" +
" 92 " + newPatchScreen[92] + "
" +
" 93 " + newPatchScreen[93] + "
" +
" 94 " + newPatchScreen[94] + "
" +
" 95 " + newPatchScreen[95] + "
" +
" 96 " + newPatchScreen[96] + "
" +
" 97 " + newPatchScreen[97] + "
" +
" 98 " + newPatchScreen[98] + "
" +
" 99 " + newPatchScreen[99] + "
"
}
document.querySelector("#display").insertAdjacentHTML('beforeend',screenLine); newk = newk + 32;
}
reader.readAsBinaryString(oneFile);
}
else
{
alert("Failed to load file");
}
}
// Send all Preset arrays to the screen //
document.getElementById('myFile').addEventListener('change',readSingleFile, false);