4c4 < Music Note or Scale Player and Composer - RJM Programming - May, 2015 --- > Music Note Player and Scale Player - RJM Programming - May, 2015 14c14 < --- > 60,64d59 < var songmode=0; < var askmode=0; < var nonred=-1; < var composingform=''; < var lastsong=''; 67d61 < var stuff=""; 83d76 < if (sheetmusic != "") { 304d296 < } 314c306 < //alert(99); --- > alert(99); 322c314 < } else if (isel.value.toLowerCase() == "top") { --- > } else if (isel.value == "top") { 324,325c316,317 < document.getElementById('myselpos').value=isel.value; < while (jj < 109) { --- > document.getElementById('myselpos').value='top'; > while (jj < 109) { 328,332c320 < } < if (isel.value == 'Top') { < rejig(isel.value,''); < document.getElementById('mode').innerHTML=''; < } --- > } 334c322 < location.href='./MyScale.html?instrument=' + document.getElementById('instrument').value + "&myselpos=" + isel.value + "&mode=" + document.getElementById('mode').value + "&speed=" + document.getElementById('speed').value; --- > location.href='./MyScale.html?instrument=' + document.getElementById('instrument').value + "&myselpos=left&mode=" + document.getElementById('mode').value + "&speed=" + document.getElementById('speed').value; 392,449d379 < < function ask() { < askmode=0; < var maxis=0, def='', delim='', thisblurb='', thiscontent='', thismidi, thisansi, jg, cells, incells, rds=document.body.innerHTML.split('r' + 'ed;'); < if (rds.length == 1) { < var restlength=prompt("Enter (negative) length of rest ... (loosely, -1.0 = crotchet)?", "-1.0"); < delim=','; < if (document.getElementById('sheetmusic').value == "") delim = ''; < document.getElementById('sheetmusic').value+=(delim + "0," + restlength); < delim=','; < } else { < for (jg=1; jg"); < incells=cells[1].split("<"); < thismidi=incells[0]; < incells=cells[3].split("<"); < thisansi=incells[0]; < thisblurb=thisblurb + delim + thisansi; < thiscontent=thiscontent + delim + thismidi; < def=def + delim + "-1.0"; < delim=','; < } < var notelength=prompt("Enter (negative) length(s) of note(s) ... " + thisblurb + " ... (loosely, -1.0 = crotchet ... please comma separate)?", def); < var midibits=thiscontent.split(','); < if (notelength != null) { < var notebits=notelength.split(','); < delim=','; < if (document.getElementById('sheetmusic').value == "") delim = ''; < if (notebits.length == 1) { < document.getElementById('sheetmusic').value+=(delim + thiscontent + "," + notelength); < delim=','; < } else { < maxis=0; < for (jg=1; jg= "0" && whatyouaskedfor.substring(0,1) <= "9") { < whatis.style.backgroundColor='r' + 'ed'; < if (askmode == 0) { < askmode=1; < setTimeout(ask, 5000); < } < } else if (whatyouaskedfor.indexOf(".") != -1) { < if (allhis == "") allhis = document.body.innerHTML; < var xallhh=allhis.split(">" + whatyouaskedfor + "<"); < var xbitshbefore=xallhh[0].split(">"); < startnote=xbitshbefore[xbitshbefore.length - 4].replace("" + whatyouaskedfor + "<"); < var xxbitshbefore=xxallhh[0].split(">"); < startnote=xxbitshbefore[xxbitshbefore.length - 2].replace(": '; < //document.getElementById('eqd').innerHTML = composingform; < document.getElementById('scales').style.display='none'; < document.getElementById('composition').style.display='block'; < document.getElementById('th1').title='Click to add this note to composition ... will wait for 5 seconds before asking about length of note(s)'; < document.getElementById('th2').title='Click to add this note to composition ... will wait for 5 seconds before asking about length of note(s)'; < document.getElementById('th3').title='Click to add this note to composition as a crotchet (which you can change manually as you require)'; < setInterval(lookoutforit, 1000); < } < < function badnews() { < alert(stuff); < } < < function lookoutforit() { < if (document.title.indexOf("Illegal MIDI") != -1) { < stuff=document.title; < document.title="Music Note/Scale Player and Composer - RJM Programming - May, 2015"; < setTimeout(badnews, 700); < } < if (nonred >= 0) document.getElementById('tr' + nonred).style.backgroundColor='white'; < nonred=-1; < var thissong=document.getElementById('hsheetmusic').value.replace(/~/g, '+'); < if (thissong != '') { < //alert(thissong); < lastsong=thissong; < document.getElementById('hsheetmusic').value=''; < //alert(98); < insong(thissong); < //alert(99); < } < } < < function preask(tval) { < if (tval != "") { < var things=document.getElementById('sheetmusic').value.split(","); < if (tval == 'rest') { < ask(); < } else if (tval == 'clear') { < document.getElementById('sheetmusic').value=''; < } else if (tval == '0') { < var vhowmuch=prompt("What volume level?", "127"); < if (vhowmuch != null) { < if (vhowmuch != "") { < if (document.getElementById('sheetmusic').value != "") document.getElementById('sheetmusic').value+=','; < document.getElementById('sheetmusic').value+=(tval + vhowmuch); < } < } < } else if (tval != '') { < if (" largo larghetto adagio andante moderato allegro presto ".indexOf(" " + tval + " ") != -1 && things.length > 1) { < if (document.getElementById('sheetmusic').value != "") { < if (things[1].substring(0,1) >= 'A') { < document.getElementById('sheetmusic').value=document.getElementById('sheetmusic').value.replace("," + things[1], "," + tval); < } else if (things[0].substring(0,1) >= 'A') { < document.getElementById('sheetmusic').value=document.getElementById('sheetmusic').value.replace(things[0] + ",", tval + ","); < } else { < document.getElementById('sheetmusic').value=tval + ',' + document.getElementById('sheetmusic').value; < } < } else { < document.getElementById('sheetmusic').value=tval; < } < } else if (" largo larghetto adagio andante moderato allegro presto ".indexOf(" " + tval + " ") != -1) { < if (document.getElementById('sheetmusic').value != "") { < if (things[0].substring(0,1) >= 'A') { < document.getElementById('sheetmusic').value=document.getElementById('sheetmusic').value.replace(things[0] + ",", tval + ","); < } else { < document.getElementById('sheetmusic').value=tval + ',' + document.getElementById('sheetmusic').value; < } < } else { < document.getElementById('sheetmusic').value=tval; < } < } else if (things.length > 1) { < var zhowmuch=prompt("By how much to " + tval + "?", "1"); < if (zhowmuch != null) { < if (zhowmuch != "") { < if (document.getElementById('sheetmusic').value != "") { < if (things[1].substring(0,1) >= 'A') { < document.getElementById('sheetmusic').value=document.getElementById('sheetmusic').value.replace("," + things[1], "," + tval + zhowmuch); < } else if (things[0].substring(0,1) >= 'A') { < document.getElementById('sheetmusic').value=document.getElementById('sheetmusic').value.replace(things[0] + ",", tval + zhowmuch + ","); < } else { < document.getElementById('sheetmusic').value=tval + zhowmuch + ',' + document.getElementById('sheetmusic').value; < } < } else { < document.getElementById('sheetmusic').value+=(tval + zhowmuch); < } < } < } < } else { < var howmuch=prompt("By how much to " + tval + "?", "1"); < if (howmuch != null) { < if (howmuch != "") { < if (document.getElementById('sheetmusic').value != "") { < if (things[0].substring(0,1) >= 'A') { < document.getElementById('sheetmusic').value=document.getElementById('sheetmusic').value.replace(things[0] + ",", tval + howmuch + ","); < } else { < document.getElementById('sheetmusic').value=tval + howmuch + ',' + document.getElementById('sheetmusic').value; < } < } else { < document.getElementById('sheetmusic').value+=(tval + howmuch); < } < } < } < } < } < if (document.getElementById('sheetmusic').value != "") { < document.getElementById('myform').style.display='inline'; < document.getElementById('savemusic').value=document.getElementById('sheetmusic').value; < document.getElementById('hsheetmusic').value=document.getElementById('sheetmusic').value; < } else { < document.getElementById('myform').style.display='none'; < document.getElementById('savemusic').value=document.getElementById('sheetmusic').value; < document.getElementById('hsheetmusic').value=document.getElementById('sheetmusic').value; < document.getElementById('playlist').value = ''; < } < document.getElementById('oselt').value = ''; < } 883c639 < < < <

<
--- >

1227,1231c970 < if (document.URL.indexOf("#") != -1) document.getElementById('mode').innerHTML=''; < if (document.URL.indexOf("#top") != -1) { < document.getElementById('ac').style.textDecoration='none'; < } < if (sm == "" && document.URL.indexOf("#") == -1) { --- > if (sm == "") {