Skip to content

Instantly share code, notes, and snippets.

@lmccart
Created September 22, 2015 17:07
Show Gist options
  • Save lmccart/4f0a80d4f5fd08d471d6 to your computer and use it in GitHub Desktop.
Save lmccart/4f0a80d4f5fd08d471d6 to your computer and use it in GitHub Desktop.
var bobAudio;
var annAudio;
function preload() {
bobAudio = loadSound('beatbox.mp3');
annAudio = loadSound('beatbox.mp3');
}
function setup() {
}
function draw() {
if (bobAudio.isPlaying() == false && annAudio.isPlaying() == false) {
fill(0);
} else {
fill(255);
}
ellipse(width/2, height/2, 50, 50);
}
function mousePressed() {
bobAudio.play();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment