xxxxxxxxxx
let currentNote = "";
function setup() {
createCanvas(windowWidth, windowHeight);
colorMode(HSB);
background(0);
// Enable Input Device 1 (see console)
enableMidi(0);
}
function noteOn(e) {
print("noteOn", e.note);
currentNote = e.note.name + e.note.octave;
//fill(100,100,noteOn);
}
function noteOff(e) {
print("noteOff", e.note);
currentNote = "";
//fill(100,100,noteOff);
}
function draw() {
//colorMode(HSL);
//background(note,0,0,0.5);
//push();
background(peng,100,40,0.5);
//fill(255);
textAlign(CENTER, CENTER);
textSize(150);
fill(100);
text(currentNote, width/2, height/2);
//rectMode(CENTER);
//rect(width/2, height/2,10, 10);
//pop();
}