From 030fbe34e2d8acd11c65746c81afb22282a6b29d Mon Sep 17 00:00:00 2001 From: krippix Date: Mon, 5 Jun 2023 02:35:57 +0200 Subject: [PATCH] removed unneeded code --- html/assets/scripts/midi.js | 10 ++-------- html/assets/scripts/render.js | 2 -- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/html/assets/scripts/midi.js b/html/assets/scripts/midi.js index fd8b7ad..abb3628 100644 --- a/html/assets/scripts/midi.js +++ b/html/assets/scripts/midi.js @@ -2,11 +2,9 @@ var keyboard = document.getElementById("piano"); var svgDoc; // loaded keyboard svg const keysB = [2,5,7,10,12,14,17,19,22,24,26,29,31,34,36,38,41,43,46,48,50,53,55,58,60,62,65,67,70,72,74,77,79,82,84,86] -const keyTo = {} window.addEventListener("load", function() { svgDoc = keyboard.contentDocument; - console.log("image loaded"); }, false) // press or unpress keyboard button @@ -22,15 +20,11 @@ function setKeyState(note, state) { } } - // Check if browser supports MIDI -if (navigator.requestMIDIAccess) { - console.log('This browser supports WebMIDI!'); -} else { - console.log('WebMIDI is not supported in this browser.'); +if (!navigator.requestMIDIAccess) { + console.log('WebMIDI is not supported in this browser. Or Site was not opened via HTTPS'); } - // Attempt to establish a connection to the MIDI device navigator.requestMIDIAccess() .then(onMIDISuccess, onMIDIFailure); diff --git a/html/assets/scripts/render.js b/html/assets/scripts/render.js index d11aaa4..48e793e 100644 --- a/html/assets/scripts/render.js +++ b/html/assets/scripts/render.js @@ -46,10 +46,8 @@ class Notation { to_set.forEach( note => { if (note.clef == "treble") { - console.log("amogus"); this.notesTop.push(new Vex.Flow.StaveNote(note)); } else { - console.log("amogus"); this.notesBottom.push(new Vex.Flow.StaveNote(note)); } });