This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function () { | |
var noteToNum = {}; | |
var numToNote = {}; | |
let transpose = -1; | |
function getNoteKeyCode(note){ | |
for (let keyCode in key_binding) { | |
const keyNote =key_binding[keyCode].note.note+key_binding[keyCode].note.octave; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getRandomColor() { | |
var letters = '0123456789ABCDEF'; | |
var color = '#'; | |
for (var i = 0; i < 6; i++) { | |
color += letters[Math.floor(Math.random() * 16)]; | |
} | |
return color; | |
} | |
function drawPixel(x, y, color) { |