Skip to content

Instantly share code, notes, and snippets.

@EliTheCoder
Last active September 4, 2016 20:04
Show Gist options
  • Select an option

  • Save EliTheCoder/2a5748cc00c25731abb044e2b25cbdde to your computer and use it in GitHub Desktop.

Select an option

Save EliTheCoder/2a5748cc00c25731abb044e2b25cbdde to your computer and use it in GitHub Desktop.
// MultiPlayerPiano.com
// Paste into JS Console:
var currentchord = 0;
var c = ["c3","e3","g3"];
var em = ["b3","e3","g3"];
var am = ["a3","c3","e3"];
var f = ["a3","c3","f3"];
var song = [c,em,am,f];
window.addEventListener("keyup", function (e) {if (e.keyCode==32) {MPP.press(song[currentchord][0],1);MPP.press(song[currentchord][1],1);MPP.press(song[currentchord][2],1);}});
setInterval(function(){currentchord++;if(currentchord==4){currentchord=0}},2000)
@EliTheCoder
Copy link
Author

bitmoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment