xxxxxxxxxx
30
var disto = new Tone.Distortion(0.1).toMaster();
var synth = new Tone.MembraneSynth().connect(disto);
function setup() {
createCanvas(400, 400);
background(random(255));
}
function draw() {
}
function playNote(){
synth.triggerAttackRelease("C2", "8n");
// console.log();
}
function mousePressed() {
// midiNote = midiNote + 1;
playNote();
background(random(255));
}
function keyPressed() {
// midiNote = midiNote - 1;
playNote();
background(random(255));
}