examples/sound/soundPlayerExample/README.md
This openFrameworks example demonstrates how to load audio files, play sounds interactively and how to manipulate their pan and playback speed.
Studying this example will help you understand:
ofSoundPlayer to play sounds, and how to use its helpful functions, e.g.:
load() to load a sound file.play() to play a sound file.setSpeed(), setPan(), setVolume() do what you would expect them to.setMultiPlay() to play the sound file more than once at the same time (if set to true).ofSoundUpdate() is called in update() to update the sound playing system.ofMap() to map values to a different range.mouseDragged() and mousePressed().You should see the window separated into three sections: synth, beats, and vocals. Clicking on each section should play a sound file – depending on your mouse position it will play the sounds at varying speeds and pitches.
Instructions for use:
This example uses the following classes:
ofSoundPlayer