Skip to content

Instantly share code, notes, and snippets.

@houkanshan
Created October 27, 2014 15:42
Show Gist options
  • Select an option

  • Save houkanshan/6e5e5c35024f4e0745e7 to your computer and use it in GitHub Desktop.

Select an option

Save houkanshan/6e5e5c35024f4e0745e7 to your computer and use it in GitHub Desktop.
function key(c) {
$('#drums [data-pitch='+(c - 1)+']').click()
}
setInterval(play, 200)
var list1 = [[3,4], [], [4], [], [2], [] , [4], [2], [4], [2], [1], [], [2, [4]],[], [4], []]
var list2 = [[1, 3], [4], [2, 4], [4], [1, 4], [1, 4], [2, 4], [4]]
var i = 0;
list = list1
function play(){
i = i % list.length
list[i++].forEach(key)
}
@loddit
Copy link

loddit commented Oct 27, 2014

来点个赞

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