Skip to content

Instantly share code, notes, and snippets.

@kmancher
Created February 12, 2019 22:41
Show Gist options
  • Select an option

  • Save kmancher/1251be906a1557c4fe7cbb5dbcce1197 to your computer and use it in GitHub Desktop.

Select an option

Save kmancher/1251be906a1557c4fe7cbb5dbcce1197 to your computer and use it in GitHub Desktop.
Sound plays based on input
import processing.sound.*;
SoundFile drop;
void setup() {
size(200, 200);
drop = new SoundFile(this, "trash_impact.mp3");
drop.amp(0.5);
}
void draw() {
}
void mousePressed(){
drop.play();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment