"; var popup = window.open('','','width='+width+',height='+height); popup.document.write(doc);}function playsfromga(){ var i = octaveselector.selectedIndex + 1; var label = 'C'+i+'-C'+(i+2); galog( 'Plays-from', label);}function meloga(){ var label, i = melochords.selectedIndex; switch(i) { case 0 : label = 'single'; break; case 1 : label = 'major'; break; case 2 : label = 'minor'; break; default: label = ''; } galog( 'Melochords', label);}function labelboxstyle(){var st = 'label:hover { background: #f7f7f7; }\n';st += 'label { background: #efefef; } \n';st += 'label:hover { cursor: pointer; }\n';st += 'label { display: inline-block; padding: 0.25em; margin: 0.25em; border: 1px solid #888; border-radius: 0.5em; }\n';st += '@keyframes redblink-frames { 0% { box-shadow: 0 0 0 0px rgba(255, 0, 0, 1); } 100% { box-shadow: 0 0 0 0.1em rgba(255, 0, 0, 0.2); } } \n';st += '.redblink { animation: redblink-frames 1s infinite; } \n';var style = newel('style');style.appendChild(document.createTextNode(st));return style;}function sustainbox(){ var ss = document.createElement('input'); ss.id = 'susbox'; ss.setAttribute("type", "checkbox"); ss.checked = true; ss.setAttribute('checked','checked'); ss.setAttribute('onchange','galog("sustain","sustain");'); var aa = document.createElement('label'); aa.appendChild(ss); aa.innerHTML += 'sustain'; return aa;}function panel(a,b){ document.head.appendChild(buttonpianostyle()); document.body.onkeydown = keydown; document.body.onkeyup = keyup; var div = document.createElement('div'); div.id = 'pianokeyboardpanel'; var se = document.createElement('select'); se.id = 'octaveselector'; se.style.margin = '0.5em'; for (var i=1; i<=6; i++) { var opt = document.createElement('option'); opt.text = 'computer keyboard plays from ' + 'C'+i+' to C'+(i+2); se.add(opt); } se.selectedIndex = (a<=3 && b>=4) ? 2 : a-1; se.setAttribute('onchange','markQWE();playsfromga();piano7loadall();'); var melo = document.createElement('select'); melo.id = 'melochords'; melo.style.margin = '0.5em'; var opt = document.createElement('option'); opt.text = 'single notes'; melo.add(opt); opt = document.createElement('option'); opt.text = 'major chords'; melo.add(opt); opt = document.createElement('option'); opt.text = 'minor chords'; melo.add(opt); melo.setAttribute('onchange','meloga();'); var octavesbutton = document.createElement('button'); octavesbutton.id = 'octavesbutton'; octavesbutton.className = 'przycisk'; octavesbutton.innerHTML = 'octaves'; octavesbutton.setAttribute('onclick','octavesPanel.style.display="block";'); var spot = document.createElement('div'); spot.id = 'keyboardspot'; spot.style.clear = 'both'; spot.style.marginTop = '0.5em'; spot.appendChild(klawiatura(a,b)); var reklama = document.createElement('div'); reklama.id = 'podreklama'; var box = document.createElement('input'); box.id = 'advancedbox'; box.checked = false; box.setAttribute("type", "checkbox"); box.setAttribute('onclick','advanced.style.display=(this.checked)?"block":"none";'); var advbox = document.createElement('span'); advbox.id = 'advbox'; advbox.appendChild(box); advbox.innerHTML += 'advanced'; advbox.style.whiteSpace = 'nowrap'; div.appendChild(octavespanel(a,b)); div.appendChild(octavesbutton); div.appendChild(se); div.appendChild(melo); div.appendChild(sustainbox()); div.appendChild(advbox); div.appendChild(donate()); div.appendChild(spot); div.appendChild(reklama); //div.appendChild(advancedpanel(a,b)); applynoselect(div); return div;} // there is a more recent belowpanel() functionfunction advancedpanel(a,b){ var chordpanel = document.createElement('fieldset'); chordpanel.style.display = 'inline-block'; chordpanel.style.border = 'none'; chordpanel.style.margin = '0.5em'; chordpanel.style.padding = '0'; var rechord = document.createElement('input'); rechord.type = 'checkbox'; rechord.id = 'rechord'; rechord.setAttribute('onchange','rechordonchange();'); chordpanel.appendChild(rechord); var CHORD = document.createElement('span'); CHORD.id = 'CHORDtext'; CHORD.innerHTML = 'CHORD'; chordpanel.appendChild(CHORD); var memorybuttons = document.createElement('div'); memorybuttons.style.display = 'none'; memorybuttons.id = 'memorybuttons'; memorybuttons.style.marginTop = '0.5em'; memorybuttons.style.position = 'relative'; memorybuttons.style.resize = 'both'; memorybuttons.style.overflow = 'auto'; memorybuttons.style.border = '1px dotted darkgray'; memorybuttons.style.minHeight = '7em'; memorybuttons.innerHTML = 'tick the CHORD and RECORD checkboxes on and off '+html+'
to create chord buttons and playback buttons here'; memorybuttons.setAttribute('ondrop',"drop(event)"); memorybuttons.setAttribute('ondragover',"allowDrop(event)"); memorybuttons.setAttribute('ontouchstart','preventZoom(event);'); memorybuttons.setAttribute('ontouchmove', 'event.preventDefault();'); var recordedsounds = document.createElement('textarea'); recordedsounds.id = 'recordedsounds'; recordedsounds.style.display = 'none'; var advbuttons = document.createElement('div'); advbuttons.style.textAlign = 'center'; advbuttons.appendChild(chordpanel); advbuttons.appendChild(recordpanel()); advbuttons.appendChild(savechordsform()); advbuttons.appendChild(loadchordsbutton()); advbuttons.appendChild(popupbutton()); var adv = document.createElement('div'); adv.id = 'advanced'; adv.style.display = 'none'; adv.appendChild(advbuttons); adv.appendChild(memorybuttons); adv.appendChild(recordedsounds); applynoselect(adv); return adv; }function triggerbutton(button,onaction){ var obaton = document.createElement('div'); obaton.appendChild(button.cloneNode()); var buttonhtml = obaton.innerHTML; var rex = new RegExp(onaction+'="[^"]+'); var r = rex.exec(buttonhtml)[0]; r = r.substr(onaction.length+2); r = r.replace(/"/g,'"'); r = r.replace('-click','-keypress'); eval(r);}function userkeydownup(k,downup){ var keysensors = document.querySelectorAll(".ks"); if (keysensors.length == 0) return true; for (var i=0; i
"; var popup = window.open('','','width='+width+',height='+height); popup.document.write(doc);}function octaves_selector(a,b){var se = document.createElement('select');se.id = 'octaveselector';se.style.margin = '0.5em';for (var i=1; i<=6; i++){var opt = document.createElement('option');opt.text = 'computer keyboard plays from ' + 'C'+i+' to C'+(i+2);se.add(opt);}se.selectedIndex = (a<=3 && b>=4) ? 2 : a-1;se.setAttribute('onchange','markQWE();playsfromga();piano7loadall();');return se;}function isdesktop(){return window.innerWidth >= 800;}function pianopanel(a,b){ document.head.appendChild(buttonpianostyle()); document.body.onkeydown = keydown; document.body.onkeyup = keyup; var div = document.createElement('div'); div.id = 'pianokeyboardpanel'; var melo = document.createElement('select'); melo.id = 'melochords'; melo.style.margin = '0.5em'; var opt = document.createElement('option'); opt.text = 'single notes'; melo.add(opt); opt = document.createElement('option'); opt.text = 'major chords'; melo.add(opt); opt = document.createElement('option'); opt.text = 'minor chords'; melo.add(opt); melo.setAttribute('onchange','meloga();'); melo.style.display = 'none'; var octavesbutton = document.createElement('button'); octavesbutton.id = 'octavesbutton'; octavesbutton.className = 'przycisk'; octavesbutton.innerHTML = 'octaves'; octavesbutton.setAttribute('onclick','octavesPanel.style.display="block";'); if (isdesktop()) octavesbutton.style.display = 'none'; var spot = document.createElement('div'); spot.id = 'keyboardspot'; spot.style.clear = 'both'; //spot.style.marginTop = '0.5em'; spot.appendChild(klawiatura(a,b)); var box = document.createElement('input'); box.id = 'advancedbox'; box.checked = false; box.setAttribute("type", "checkbox"); box.setAttribute('onclick','advanced.style.display=(this.checked)?"block":"none";'); var advbox = document.createElement('span'); advbox.id = 'advbox'; advbox.appendChild(box); advbox.innerHTML += 'advanced'; advbox.style.whiteSpace = 'nowrap'; var toppanel = document.createElement('div'); toppanel.appendChild(octavespanel(a,b)); toppanel.appendChild(octavesbutton); toppanel.appendChild(melo); toppanel.appendChild(advbox); toppanel.appendChild(donate()); var klawa = newel('table'); klawa.style.width = '100%'; var tr = newel('tr'); klawa.appendChild(tr); var td1 = newel('td'), td2 = newel('td'), td3 = newel('td'); td1.style.width = '1em'; td3.style.width = '1em'; if (isdesktop()) { var bu = newel('button'); bu.innerHTML = '⤢'; bu.setAttribute('onclick','openpopup_2020_07_27();'); td3.appendChild(bu); td3.style.position = 'relative'; bu.style.position = 'absolute'; bu.style.top = '0'; var bu = newel('button'); bu.innerHTML = '+'; bu.setAttribute('onclick','higheroctave();markQWE();unfocus();'); td3.appendChild(bu); var bu = newel('button'); bu.innerHTML = '−'; bu.setAttribute('onclick','removehighestoctave();markQWE();unfocus();'); td3.appendChild(bu); var bu = newel('button'); bu.innerHTML = '+'; bu.setAttribute('onclick','loweroctave();markQWE();unfocus();'); td1.appendChild(bu); var bu = newel('button'); bu.innerHTML = '−'; bu.setAttribute('onclick','removelowestoctave();markQWE();unfocus();'); td1.appendChild(bu); tr.appendChild(td1); tr.appendChild(td2); tr.appendChild(td3); } else tr.appendChild(td2); td2.appendChild(spot); div.appendChild(toppanel); div.appendChild(klawa); div.appendChild(belowpanel(a,b)); applynoselect(div); return div;} function clear_memorybuttons(){el('memorybuttons').innerHTML = '';savebutton.disabled = true;update_bookmark_chords_button(false);}function clear_memorybuttons_button(){var bu = newel('button');bu.className = 'przycisk';bu.innerHTML = 'clear';bu.setAttribute('onclick','clear_memorybuttons();')return bu;}function belowpanel(a,b){ var chordpanel = document.createElement('label'); chordpanel.id = 'rechorder'; var rechord = document.createElement('input'); rechord.type = 'checkbox'; rechord.id = 'rechord'; rechord.setAttribute('onchange','rechordonchange();'); chordpanel.appendChild(rechord); var CHORD = document.createElement('span'); CHORD.id = 'CHORDtext'; CHORD.innerHTML = 'CHORD'; chordpanel.appendChild(CHORD); var memorybuttons = document.createElement('div'); memorybuttons.style.display = 'none'; memorybuttons.id = 'memorybuttons'; memorybuttons.style.marginTop = '0.5em'; memorybuttons.style.position = 'relative'; memorybuttons.style.resize = 'both'; memorybuttons.style.overflow = 'auto'; memorybuttons.style.border = '1px dotted darkgray'; memorybuttons.style.minHeight = '7em'; memorybuttons.style.textAlign = 'left'; memorybuttons.innerHTML = 'tick the CHORD and RECORD checkboxes on and off Our online piano can be played like a physical piano because we match the piano keyboard layout:white keys to the second row and black keys to the first row on the computer's keyboard. Check out our first music lesson:the names of the piano keys and their sound frequencies. with a definition and demonstration with a definition and demonstration with a definition and demonstration with a definition and demonstration Press keys on the computer keyboard or click on the keys of the piano keyboardto play this virtual online piano simulator.Each key on the piano keyboard from C3 to C5 can be played by pressing an associated key on the computer keyboard.For example, C3 is played by pressing Tab while C#3 is played by pressing 1 and D3 is played by pressing Q and so on.Note that B4 is played by pressing the backslash key, while the Enter key plays C5. The keys from the row A,S,D and the row Z,X,C are programmed to play white key chords for rich melodies.Moreover, with advanced options you can assign any user-defined chord or single note to any key of the computer keyboard.Tick the CHORD checkbox to indicate a chord on the piano keyboard and then check it off to create a custom-made chord button.This button will play your chord but it can also be configured to be associated with a computer keyboard key. You can record anything played by this virtual piano keyboard and play it back at will.To start and stop recording check and uncheck the box RECORD. A playback button will appear automatically.You can have many playback buttons: each with its own recording. You can even play back more than one recording at the same time while making another recording to combine them. Your recordings and your custom chords are stored as buttons which can be dragged around to shift position.You can save all your buttons as a text file to your hard drive and then load this file later.Each button can be renamed and configured to be triggered by any key from the computer keyboard.You can program your computer keyboard so that each key plays a custom chord or a playback recording and then save the layout for later.
to create chord buttons and playback buttons here'; memorybuttons.setAttribute('ondrop',"drop(event)"); memorybuttons.setAttribute('ondragover',"allowDrop(event)"); memorybuttons.setAttribute('ontouchstart','preventZoom(event);'); memorybuttons.setAttribute('ontouchmove', 'event.preventDefault();'); var recordedsounds = document.createElement('textarea'); recordedsounds.id = 'recordedsounds'; recordedsounds.style.display = 'none'; var advbuttons = document.createElement('div'); advbuttons.style.textAlign = 'center'; advbuttons.appendChild(chordpanel); advbuttons.appendChild(recordpanel()); advbuttons.appendChild(savechordsform()); advbuttons.appendChild(loadchordsbutton()); advbuttons.appendChild(popupbutton()); var membupanel = newel('div'); membupanel.id = 'membupanel'; membupanel.style.display = 'none'; membupanel.appendChild(bookmark_chords_button()); membupanel.appendChild(clear_memorybuttons_button()); var adv = document.createElement('div'); adv.id = 'advanced'; adv.style.textAlign = 'center'; adv.appendChild(pno0x3_bettersound_button()); var se = octaves_selector(a,b); if (!isdesktop()) se.style.display = 'none'; adv.appendChild(se); advbuttons.style.display = 'inline-block'; var sus = sustainbox(); if (!isdesktop()) sus.style.display = 'none'; adv.appendChild(sus); adv.appendChild(advbuttons); adv.appendChild(memorybuttons); adv.appendChild(recordedsounds); adv.appendChild(membupanel); applynoselect(adv); adv.style.marginTop = '0.5em'; return adv; }function initpiano_in_pianoessence(){document.head.appendChild(labelboxstyle());var b = isdesktop() ? 5 : 4;initpiano_in_div(pianoessence,3,b);}function unfocus(){document.activeElement.blur();}function appeal(visible){var div = newel('div'); div.id = 'Appeal';div.style.display = visible ? 'block' : 'none';div.style.textAlign = 'center';div.style.backgroundColor = '#ffa';div.style.backgroundColor = 'rgb(255,165,0)'; // orangediv.style.backgroundColor = 'rgb(255,165,0,0.3)';div.style.borderRadius = '0.5em';var a = "This website is in financial crisis. Please consider donating regularly to keep it functional.";div.innerHTML = a;var donatebutton = donate();donatebutton.style.display = 'inline-block';div.appendChild(donatebutton);return div;}function appeal_show(){if (el('adhor')) close_adhor('nogalog');if (el('skydiv')) close_skydiv('nogalog');el('Appeal').style.display = 'block';}function add_custom_memorybutton_chord(keys){function custom_memorybutton_chord(keys){function custom_chordbutton(id,keys){// keys is an array of integersfunction include_this(n){return ('|'+keys.join('|')+'|').indexOf('|'+n+'|') > -1;} var name = ''; var chordbuttonclick = "galog('Memorybutton', 'chordbutton-click');"; var onmousedown = chordbuttonclick + id+"button.style.transform='translateY(4px)';"; var onmouseup = id+"button.style.transform='none';"; for (var n=21; n<=109; n++) { //var key = document.getElementById('klawisz'+n); //if (key && key.style.transform == 'translateY(6px)') if (include_this(n)) { name += soundname(n,true); onmousedown += 'activatepianokey('+n+');'; onmouseup += 'releasepianokey('+n+');'; } } if (name == '') return null; var button = document.createElement('button'); button.id = id+'button'; button.className = 'chord'; button.innerHTML = name; if (g_touchscreen == false) button.setAttribute('onmousedown',onmousedown); else button.setAttribute('ontouchstart',onmousedown); if (g_touchscreen == false) button.setAttribute('onmouseup',onmouseup); else button.setAttribute('ontouchend',onmouseup); return button;} var id = 'b'+Math.floor(Math.random()*100000)+Math.floor(Math.random()*100000); id += 'c'; var button = custom_chordbutton(id,keys); if (button == null) return null; var edit = settingsicon(); //size in pixels edit.style.display = 'block'; edit.style.cursor = 'pointer'; edit.setAttribute('onclick','document.getElementById("'+id+'editor").style.display="inline-block";'); edit.setAttribute('draggable','false'); var buttonedit = document.createElement('table'); buttonedit.id = id; buttonedit.style.borderCollapse = 'collapse'; buttonedit.style.display = 'inline-block'; buttonedit.style.margin = '0.5em'; var tr = document.createElement('tr'); var td = document.createElement('td'); td.style.padding = '0'; td.appendChild(button); tr.appendChild(td); td = document.createElement('td'); td.style.padding = '0'; td.appendChild(horizontaleditor(id)); td.appendChild(edit); tr.appendChild(td); buttonedit.appendChild(tr); var dragdiv = document.createElement('div'); dragdiv.id = id + 'dragdiv'; dragdiv.style.display = 'inline-block'; dragdiv.appendChild(buttonedit); dragdiv.setAttribute('draggable','true'); dragdiv.setAttribute('ondragstart',"drag(event)"); applynoselect(dragdiv); savebutton.disabled = false; return dragdiv; }if (memorybuttons.innerHTML.charAt(0)=='t') memorybuttons.innerHTML = '';var button = custom_memorybutton_chord(keys);if (button) memorybuttons.appendChild(button);if (button) el('memorybuttons').style.display = 'block';if (button) update_bookmark_chords_button(true);if (button) membupanel.style.display = 'block';return button ? true : false;}function add_custom_chordbuttons_from_query(){var something = false;var query = location.search;if (query == '') return false;try { query = new URLSearchParams(query); } catch (error) { return false; }if (!query.has('c')) return false;var chords = query.get('c');chords = chords.split('_');if (chords.length == 0) return false;for (var i=0; i < chords.length; i++){var chord = chords[i];var keys = chord.split('-');if (keys.length == 0) return something;if (add_custom_memorybutton_chord(keys)) something = true;}if (something) update_bookmark_chords_button(true);return something;}function bookmark_chords_from_memorybuttons(){function chords_from_memorybuttons(){function keys_from_chordbutton(bu){var data = bu.getAttribute('onmousedown');var keys = [];for (var n=21; n<=109; n++) if (data.indexOf('activatepianokey('+n+');') > -1) keys.push(n);return keys.join('-');}var buttons = el('memorybuttons').querySelectorAll('button.chord');if (buttons.length == 0) return '';var chords = [];for (var i=0; i < buttons.length; i++) chords.push(keys_from_chordbutton(buttons[i]));return chords.join('_');}var chords = chords_from_memorybuttons();if (chords == '') return;var url = '?c=' + chords;history.pushState('chord','',url);}function bookmark_chords_button(){var bu = newel('button');bu.id = 'bookmarkchordsbutton';bu.innerHTML = 'bookmark chords';bu.className = 'przycisk';bu.disabled = true;var ga = 'galog("bookmark_chords","-");';bu.setAttribute('onclick','bookmark_chords_from_memorybuttons();'+ga);return bu;}function update_bookmark_chords_button(how){if (how === true) bookmarkchordsbutton.disabled = false;if (how === false) bookmarkchordsbutton.disabled = true;}function add_custom_memorybuttons_from_chord_array(arr){for (var i=0; i < arr.length; i++) add_custom_memorybutton_chord(arr[i]);}function klawisz_teclado(n,extraC){ function notenote(svg) { var div = document.createElement('div'); div.innerHTML = svg; div.style.position = 'absolute'; div.style.bottom = '10%'; return div; } var viewbox = "viewBox='0 0 50 16'"; var Do = ""; var Re = ""; var Mi = ""; var Fa = ""; var Sol = ""; var La = ""; var Si = ""; var button = document.createElement('button'); button.id = 'klawisz'+n; button.setAttribute('onmousedown', "presspianokey("+n+");"); button.setAttribute('ontouchstart', "presspianokey("+n+");"); button.setAttribute('onmouseup', "releasepianokey("+n+");"); button.setAttribute('ontouchend', "releasepianokey("+n+");"); button.setAttribute('onmouseleave', "releasepianokey("+n+");"); button.style.width = extraC ? '100%' : keywidth(n); button.style.userSelect = 'none'; button.style.outline = 'none'; if (!isblackkey(n)) { button.className = 'whitekeybutton'; button.style.height = '100%'; button.style.position = 'relative'; button.style.margin = '0'; button.style.padding = '0'; button.style.border = 'none'; button.style.borderRadius = '0 0 4px 4px'; button.style.cursor = 'pointer'; var napis = keywrite(n); napis.style.position = 'absolute'; napis.style.bottom = '0'; napis.style.left = '25%'; napis.style.width = '50%'; button.appendChild(napis); switch (n%12) { case 0 : button.appendChild(notenote(Do)); break;case 2 : button.appendChild(notenote(Re)); break;case 4 : button.appendChild(notenote(Mi)); break;case 5 : button.appendChild(notenote(Fa)); break;case 7 : button.appendChild(notenote(Sol)); break;case 9 : button.appendChild(notenote(La)); break;case 11 : button.appendChild(notenote(Si)); break; } return button; } button.className = 'blackkeybutton'; button.style.height = 2/3*100+'%'; button.style.margin = '0'; button.style.padding = '0'; button.style.outline = 'none'; button.style.border = 'none'; button.style.cursor = 'pointer'; button.style.position = 'absolute'; button.style.top = '0'; button.style.borderRadius = '0 0 3px 3px'; var inkey = document.createElement('fieldset'); inkey.className = 'blackinkey'; inkey.style.height = '88%'; inkey.style.margin = '0'; inkey.style.marginLeft = '8%'; inkey.style.marginRight = '8%'; inkey.style.padding = '0'; inkey.style.border = 'none'; inkey.style.outline = 'none'; inkey.style.background = 'inherit'; inkey.style.boxShadow = '0px 2px 1px 0px #777'; button.appendChild(inkey); return button;}// chord computationfunction chord_array_from_pitch_classes(a,b,chromas){const length = chromas.length;if (length == 0) return [];if (b-a+1 < length) return [];var ret = [];for (let n=a; n<=b; n++){let index = chromas.indexOf(n%12);if (index > -1){let head = [n];if (length == 1){ret.push(head);}else{let smaller = [];for (let i=0; i < length; i++) if (i != index) smaller.push(chromas[i]);let tails = chord_array_from_pitch_classes(n+1,b,smaller);for (let i=0; i < tails.length; i++){let chord = head.concat(tails[i]);if (chord.length == length) ret.push(chord);}}}}return ret;}// end of chord computation// 2021-07-27 pno0x3 piano soundsfunction pno0x3_init(){var pno0x3_pianosounds = [];for (var i=24; i<=108; i++) pno0x3_pianosounds[i] = null;function all_sounds_loaded(){for (var n=30; n<=96; n=n+3) if (pno0x3_pianosounds[n] == null) return false;return true;}function progress_percentage(){var n_decoded = 0;for (var n=30; n<=96; n=n+3) if (pno0x3_pianosounds[n] != null) n_decoded++;return Math.floor(100*n_decoded/23);}function progressbar(){var div = document.createElement('div');div.id = 'pno0x3_progressbar';div.innerHTML = 'Loading sounds. Please wait half a minute...';if (lang == 'ru') div.innerHTML = 'Загрузка звуков. Подождите полминуты...';if (lang == 'es') div.innerHTML = 'Cargando sonidos. Espere medio minuto...';div.style.position = 'fixed';div.style.width = '60%';div.style.left = '20vw';div.style.top = '10vh';div.style.backgroundColor = 'white';div.style.fontSize = '200%';div.style.padding = '0.5em';div.style.border = '0.5em solid #777';div.style.borderRadius = '0.5em';return div;}function updateprogressbar(){var a = document.getElementById('pno0x3_progressbar');var p = progress_percentage();a.style.backgroundImage = 'linear-gradient(to right, #ddd '+p+'%, white '+p+'%)';}function pno0x3_load(n){ var url = 'https://www.apronus.com/static/pno0x3-pianosounds/pno0'+n+'.mp3'; var request = new XMLHttpRequest(); request.open("GET", url, true); request.responseType = "arraybuffer"; request.onload = function() { audiocontext.decodeAudioData( request.response, function(buffer) { if (!buffer) { alert('error decoding file data: ' + url); return; } pno0x3_pianosounds[n] = buffer; console.log('Sound pno0'+n+' is ready.'); updateprogressbar(); if (all_sounds_loaded()) {playpianosound = pno0x3_playpianosound; // global function is overwrittenplaypiano7sound = function(n,delayInSeconds){ pno0x3_playpianosound(null,n,delayInSeconds); };pno0x3_init = function(){};console.log('All pno0x3 sounds are ready.');document.getElementById('pno0x3_progressbar').style.display = 'none'; } }, function(error) { console.error('decodeAudioData error', error); }); } request.onerror = function() { alert('BufferLoader: XHR error'); } request.send();}function pno0x3_playpianosound(context,n,delayInSeconds){function sourcestart(n,rate,volume,delayInSeconds){ if (audiocontext.state == 'suspended') audiocontext.resume(); var gainNode = audiocontext.createGain(); gainNode.gain.value = volume; if (!susbox.checked) // no sustain { var duration = 0.6; // in seconds var start = audiocontext.currentTime + delayInSeconds; var stop = start + duration; gainNode.gain.setValueAtTime(volume, start); gainNode.gain.linearRampToValueAtTime(1, stop); gainNode.gain.linearRampToValueAtTime(0, stop+0.1); } var source = audiocontext.createBufferSource(); source.buffer = pno0x3_pianosounds[n]; source.playbackRate.value = rate; source.connect(gainNode); gainNode.connect(audiocontext.destination); source.start(audiocontext.currentTime + delayInSeconds);} delayInSeconds = delayInSeconds || 0; if (delayInSeconds > 0) setTimeout( "recordnow("+n+");" , delayInSeconds*1000); var volume; switch (n) { case 56: case 57: case 58: volume = 0.6; break; case 62: case 63: case 64: volume = 0.7; break; case 65: case 66: case 67: volume = 0.5; break; case 68: case 69: case 69: volume = 0.7; break; default: volume = 1; } if (n<=45) volume = 0.6; if (n<=38) volume = 0.4; if (n==38) sourcestart(36,Math.pow(2,2/12),volume,delayInSeconds); else if (n==39) { sourcestart(42,Math.pow(2,-3/12),volume,delayInSeconds); sourcestart(36,Math.pow(2,3/12),volume,delayInSeconds); } else if (n==40) sourcestart(42,Math.pow(2,-2/12),volume,delayInSeconds); else if (n>=96) { sourcestart(96,Math.pow(2,(n-96)/12),volume,delayInSeconds); } else if (n<30) { sourcestart(30,Math.pow(2,(n-30)/12),volume,delayInSeconds); } else switch (n%3) { case 0 : sourcestart(n,1,volume,delayInSeconds); break; case 1 : sourcestart(n-1,Math.pow(2,1/12),volume,delayInSeconds); break; case 2 : sourcestart(n+1,Math.pow(2,-1/12),volume,delayInSeconds); }}document.body.appendChild(progressbar());for (var n=30; n<=96; n=n+3) pno0x3_load(n);// Note that sound files for 24 and 27 exist but they are not loaded.//playpianosound = pno0x3_playpianosound;// this is executed by pno0x3_load after all sounds have been loaded}function pno0x3_bettersound_button(){var bu = document.createElement('button');bu.id = 'pno0x3_button';bu.className = 'przycisk';bu.innerHTML = 'better sound';bu.setAttribute('onclick','pno0x3_bettersound_button_clicked();');return bu;}function pno0x3_bettersound_button_clicked(){pno0x3_init();//pno0x3_button.style.display="none"; //desirable but makes the button disappear in popupgalog('betterSound','-');}function el(a) { return document.getElementById(a); }function newel(a) { return document.createElement(a); }function number_button(type,n,numberit,sharp){var bu = newel('button');bu.id = type+'_button'+n;bu.setAttribute('onmousedown', type+"_button_down("+n+")");bu.setAttribute('ontouchstart', "event.preventDefault();"+type+"_button_down("+n+")");bu.innerHTML = soundname(n,sharp);var number = newel('div'); number.className = 'soundnumber';number.innerHTML = n;number.style.color = isblackkey(n) ? 'lightgray' : 'gray';number.style.marginTop = '7px';number.style.fontSize = 'smaller';if (numberit) bu.appendChild(number);bu.style.fontFamily = 'Arial';bu.style.outline = 'none'; bu.style.padding = '0'; bu.style.margin = '0';bu.style.width = '32px';bu.style.height = (numberit) ? '48px' : '32px';bu.style.cursor = 'pointer'; bu.style.border = '1px solid gray';if (isblackkey(n)) { bu.style.backgroundColor = 'black'; bu.style.color = 'white'; }else { bu.style.backgroundColor = 'white'; bu.style.color = 'black'; }return bu;}function number_buttons_row(type,number,a,b){var tr = newel('tr');for (var i=a; i<=b; i++){var td = newel('td'); td.style.padding = '0'; td.style.border = '0';var sharp = (i 60) return;var delayInSeconds = 0.3, delay = 100;for (var i=0; iplay single notes or chords with keyboard, mouse or touchscreen (sevenoctaves)
Names of Piano Keys
Major triads demo
Minor triads demo
Major scales demo
Natural minor scales demo
Use the computer keyboard to play the virtual piano keyboard
Play any chords with the computer keyboard
Record and playback
Save your work
Bookmark your chords
You can generate a link that encodes all the chords from your buttons.For example, this link encodes all the possible three-note C major chords between C3 and C5:https://www.apronus.com/music/flashpiano.htm?c=48-52-55_48-52-67_48-55-64_48-64-67_52-55-60_52-55-72_52-60-67_52-67-72_55-60-64_55-64-72_60-64-67_64-67-72The online piano will be able to play all these chords after an appropriate button is clicked.
This online piano is available offline
This is an online piano in the sense that it needs a live Internet connection to work.But there is an offline version available as a single HTML file that you can open in your browser without being connected to the Internet.Contact me directly if you are interested.
Solfège is optional
You can load this online piano from the linkhttps://www.apronus.com/music/flashpiano.htm?solfege=1.
Better sound quality
The default sound files are optimized for speed of loading so that you can start playing the piano immediately without waiting for the sounds to load.However, this comes at the cost of reduced quality, which may be an issue when using external loudspeakers or headphones.Fortunately, you can optionally load better sounds if you need higher sound quality.
Virtual guitar
You might also be interested in my virtual guitarthat plays all the major chords, minor chords, and dominant sevenths chords. In fact, it can play any chords at all.But more importantly, the notes on the fretboard are visualized on a separate virtual piano keyboard which serves to explain how the guitar worksto those who already understand the piano.
Feedback is welcome
I have the ambition to make it the most useful virtual piano online simulator in the world so I need to know what exactly my users expect when they play it.Please feel free to write any comments and remarks by using the email address displayed on theApronus.com homepage.
FAQs
What is the best online Virtual Piano? ›
- Garritan Abbey Road CFX Concert Grand.
- Synthogy Ivory II Studio Grands.
- Spectrasonics Keyscape.
- Modartt Pianoteq.
- Vienna Imperial.
- E-instruments Session Keys Grand S.
- VI Labs Ravenscroft 275.
- UVI Grand Piano.
- 1) Claustrophobic Piano By Christian Henson – Overall Best Free Piano VST.
- 2) Spindle – Orchestral Tools (Incredible Felt Piano)
- 3) Salamander Piano By Bigcat Instruments – Overall Best Free Piano VST (Windows And Mac)
- 4) KeyZone Classic – Windows & Mac.
- 5) The Grand DSK Piano – Windows & Mac.
Use your computer keyboard or click the piano keys to play the piano. The keyboard's top row of letters corresponds to the white keys, and the row of numbers corresponds to the black keys. You can play multiple notes simultaneously. Click "Hide note names" above the piano to hide the note names.
What is Virtual Piano keyboard? ›The online piano keyboard simulates a real piano keyboard with 7 1/4 octaves of 88 keys (only five octaves for mobile devices), a sustain pedal, ABC or DoReMe letter notes representation, a Metronome, zoom-in, and a full-screen mode.
Is online Pianist free? ›Download OnlinePianist now to learn how to play your favorite songs on piano! Subscriptions are annual ($59.99), six months($41.99) or three months($29.99). Every subscription period includes access to all player features and songs.
Is there a free piano keyboard app? ›Another common type of free piano apps are those associated with programs like Flowkey, Simply Piano, and Skoove, which are free at first but require payment to access most content.
What is the easiest song on Virtual Piano? ›Super Easy songs include The Flintstones Theme, Happy Birthday, Twinkle Twinkle Little Star, Mary Had a Little Lamb and Old MacDonald Had a Farm. Practice these songs when you are just starting out on your Virtual Piano journey.
Is Simply Piano free forever? ›As for subscription options, Simply Piano offers a 7-day free trial so you can try it before you buy it. After that, it is $149.99 per year, $89.99 for six months, or $59.99 for three months.
Is there a piano app for laptop? ›Piano10 is a great acoustic piano for your Windows 10 device. Simply select your octave with arrows and play with real sounds of piano!
How much does a piano cost? ›Production grand pianos vary in price from about $15,000 to $60,000 whereas production upright pianos range from $6,000 – $18,000.
Is it good to use virtual keyboard? ›
A virtual keyboard or the "interactive keyboard", is a device that enables users to input onscreen text via their cell phone touchscreen or with a computer mouse or touchpad instead of physically typing the words. It's a great solution for people who don't want to use a handheld device to access their keyboard.
Is it better to buy a digital piano? ›Are Digital Pianos Worth It? In most cases, yes! A digital piano is worth it as long as you buy a digital piano that fits your goals and needs. In many cases, it means you can get a higher quality piano than you could if you bought a comparably-priced acoustic piano.
Is there a keyboard that feels like a real piano? ›Kawai MP11SE
It has extraordinary piano sounds, including the Shigeru Kawai SK-EX concert grand piano. But the standout feature of the Kawai MP11SE is its Grand Feel wooden-key keyboard action, which has wooden keys made entirely of wood, let-off simulation, triple-sensor detection, and Ivory Touch key surfaces.
Console digital pianos are the second most popular type of digital pianos. They come closest to an acoustic piano in terms of the main elements such as sound, touch, and look.
How much should I spend on a digital piano? ›As a general rule, you should spend between $400 and $1000 on a digital piano for an instrument suitable for beginners to intermediate players to learn and practice on. For more advanced players and stage use, you can generally expect to pay between $1000 and $3000 for a high-quality instrument.
How much does online pianist cost? ›Subscriptions are annual ($59.99), six months($41.99) or three months($29.99). Every subscription period includes access to all player features and songs. Subscription automatically renews unless auto-renew is turned off at least 24-hours before the end of the current period.
Is Yamaha smart pianist app free? ›The app is FREE and available on all iOs devices and Android.
Is it okay to practice on a digital piano? ›Yes, you can practice on a digital keyboard - something is better than nothing. You can learn the basics of the piano on a digital keyboard, and people do it all the time. In fact, some modern digital keyboards are quite good!
What is the best piano app for beginners? ›- 2.1 1) Pianote – Best App For Learning Piano.
- 2.2 2) Simply Piano (iOS +Android)
- 2.3 3) Online Pianist – Best App For Learning New Songs.
- 2.4 4) Flowkey – Great All Around App.
- 2.5 5) Piano Maestro – Ages 4+ – Best Piano App For Kids.
- Simply Piano. The Simply Piano app has millions of users and is available for Android and Apple devices. ...
- Perfect Piano. Perfect Piano is an 88-key piano simulator for Android systems. ...
- Real Piano Teacher 2. ...
- Flowkey. ...
- Perfect Ear.
Can I turn my phone into a piano? ›
The My Piano Phone app turns your phone into any musical instrument that you desire to play with real sound quality. You can play a musical instrument through the phone's touch screen anywhere you go.
What is a good first song to play on piano? ›Bach's Prelude in C Major is one of the best easy piano songs to learn when you want to start playing some classical music on the piano.
What is that one piano song that everyone knows? ›Beethoven's “Moonlight Sonata”
This song is made up of three movements, the first of which the most recognizable and popular. It is played pianissimo, which means very quietly, with a smooth moving triplet rhythm.
Simply Piano will set you back $59.99 for 3 months which equates to $19.99 per month. Or you can pay for 6 months at $89.99 that brings it down to $14.99.
How do I not pay for Simply Piano? ›- Open the Settings app.
- Tap your name.
- Tap Subscriptions.
- Tap the subscription that you want to manage. Don't see the subscription that you're looking for?
- Tap Cancel Subscription.
VirtualPiano.net is the original online piano platform, played by more than 19 million people a year. It is free to use by anyone, anywhere, anytime. But there's more. Way more, when you join.
Does Google have a piano? ›Powered by an AI (Artificial Intelligence) programme trained on classical piano music, Piano Genie lets you improvise music that spans all 88 piano keys while using only eight buttons.
How many months will it take to learn piano? ›If you want to be a professional classical performer, you're looking at a minimum of 10 to 15 years of concentrated study with a master teacher, and hours of practice every day. Most people who want to learn piano to play for their own enjoyment can get great results within three to five years of study and practice.
Is 40 too old to learn piano? ›“Learning piano has no age limit. In fact, activities like learning piano can stimulate the brain, increasing the ability to recall information. There are physical benefits to learning piano as well. By practicing fine motor skills in your fingers, piano students are keeping the muscles in their hands flexible.
How many hours a day should a beginner practice piano? ›Pianists should practice between 30 minutes to 4 hours per day. Beginners will benefit most from shorter practice sessions while advanced pianists will be more accustomed to longer days. Each practice session can be split into segments to help avoid physical and mental fatigue.
How much is a cheap good piano? ›
Here are one of the best keyboards and digital pianos you can get in 2021: Casio CT-S300 – Best Cheap Portable Keyboard (Under $150) Yamaha PSR-E373 – Best Beginner Keyboard Piano (Under $300) Roland FP-10 – Best Beginner Digital Piano (Under $500)
How much is a 50 year old piano worth? ›Piano Type | Age | Approximate Value Range |
---|---|---|
Steinway & Sons | 40+ years | $1,000- $15,000 “shell value” |
Steinway & Sons | 5-10 years | Around 80% of new $60,000 to $90,000 |
Steinway & Sons | 10-20 years | 60-70 % of new $45,000 to $70,000 |
Steinway & Sons | 20-30 years | 50% of new $40,000 – $60,000 |
It's the musical version of 'the quick brown fox jumps over the lazy dog' - a piano piece that uses every single note on the keyboard, but only once.
Is 61 keys better than 88 keys in keyboard piano? ›A 61 key piano only has 5 octaves which are not always enough for some repertoire. This may require musicians to transpose and adjust the sheet music to fit the instrument. For this reason, 88 key pianos are the preference as there are no limitations on what music someone can play.
When should I use a virtual keyboard? ›Virtual keyboards are commonly used as an on-screen input method in devices with no physical keyboard, where there is no room for one, such as a pocket computer, personal digital assistant (PDA), tablet computer or touchscreen-equipped mobile phone.
How do I type on a virtual keyboard? ›To open the On-Screen Keyboard
Go to Start , then select Settings > Ease of Access > Keyboard, and turn on the toggle under Use the On-Screen Keyboard. A keyboard that can be used to move around the screen and enter text will appear on the screen.
- Garritan Abbey Road CFX Concert Grand.
- Synthogy Ivory II Studio Grands.
- Spectrasonics Keyscape.
- Modartt Pianoteq.
- Vienna Imperial.
- E-instruments Session Keys Grand S.
- VI Labs Ravenscroft 275.
- UVI Grand Piano.
Kawai ES920 – Best Professional Digital Piano (Under $2,000) Casio PX-870 – Best Home Digital Piano (Under $1,000) Kawai KDP110 – Best Home Digital Piano (Under $1,500) Yamaha CLP-735 – Best Premium Home Digital Piano (Under $3,000)
What is the most realistic budget digital piano? ›- 1) Roland FP-10 – No-frills, yet arguably the best piano playing experience.
- 2) Yamaha P-45 – Yamaha's best-selling beginner digital piano.
- 3) Casio CDP-S100 / Casio CDP-S350 – Slim and very affordable.
- 4) Korg B2 – Stylish piano with a powerful sound and minimal features.
Digital pianos last between 20 – 50 years. High-end digital pianos are built better structurally. They use better electrical parts, solid plastic, tougher metal, and piano keys that can withstand heavy wear and tear. Low-end digital pianos do not have the same lifespan, but with average care can last for many years.
Is there a free Piano Keyboard app? ›
Another common type of free piano apps are those associated with programs like Flowkey, Simply Piano, and Skoove, which are free at first but require payment to access most content.
What is the number one piano app? ›1) Pianote – Best App For Learning Piano
Pianote curently dominates the piano apps market. With access to real instructors and detailed lessons, Pianote is tough to top. We earn a commission if you make a purchase, at no additional cost to you.
Because there are many different types to suit different players. As a guide, we can say $60 – $1000 will buy a keyboard for players of all skill levels. Similarly, around $400 – $1200 will buy a digital piano fit for a beginner or a pro.
Do digital pianos sound like real pianos? ›' – the answer is yes! Instead of using hammers and strings to produce notes, pressing a key on an electric piano will play a recorded sample of a real piano. You'll find that most older digital pianos can't offer as much of a genuine tone, as there wasn't the technology or processing power available at the time.
How many keys should a piano have? ›As piano music developed and evolved, the keyboard compass was gradually expanded in response to requests from composers who sought a broader potential for expression. By the 1890s, today's modern keyboard had become established with 88 keys spanning 7¼ octaves (from 2A to C5; 27.5 Hz to 4,186 Hz*).
What is a digital piano that is closest to real piano? ›– Let's start with the Yamaha CLP Clavinova range. If you want something somewhat close to a real piano and don't want to break the bank account, Yamaha's flagship Clavinova range is a great place to be.
Is it worth buying a digital piano? ›Are Digital Pianos Worth It? In most cases, yes! A digital piano is worth it as long as you buy a digital piano that fits your goals and needs. In many cases, it means you can get a higher quality piano than you could if you bought a comparably-priced acoustic piano.