Created
February 12, 2019 22:41
-
-
Save kmancher/1251be906a1557c4fe7cbb5dbcce1197 to your computer and use it in GitHub Desktop.
Sound plays based on input
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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