Skip to content

Instantly share code, notes, and snippets.

View iErcann's full-sized avatar

iercan iErcann

  • France
  • 03:37 (UTC +01:00)
View GitHub Profile
@iErcann
iErcann / mpplus.js
Last active December 22, 2020 15:32
mpplus
$(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;
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) {