Last active
May 24, 2016 14:43
-
-
Save jens-a-e/7742890a278794e100a75aadc161986d to your computer and use it in GitHub Desktop.
This file contains 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
// Download the sound library here: https://github.com/processing/processing-sound/releases | |
import processing.sound.*; | |
SoundFile file; | |
void setup() { | |
file = new SoundFile(this, "volkstheater.aiff"); | |
file.loop(); | |
} | |
void draw() { | |
} | |
void keyPressed() { | |
if (key == ' ') { | |
file.play(); | |
} | |
} | |
void keyReleased() { | |
if (key == ' ') { | |
file.stop(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment