diff --git a/examples/OpticalWithPlayback/OpticalWithPlayback.pde b/examples/OpticalWithPlayback/OpticalWithPlayback.pde new file mode 100644 index 0000000..9ad525c --- /dev/null +++ b/examples/OpticalWithPlayback/OpticalWithPlayback.pde @@ -0,0 +1,25 @@ +import processing.sound.*; +import soundtrack.optical.*; + +SoundtrackOptical soundtrack; +SoundFile playback; //to be used to play audio + +String soundtrackFile = "../../data/barking.wav"; +int dpi = 2400; +float volume = 1.0; +String type = "dual variable area"; +String pitch = "long"; +boolean positive = true; + +void setup() { + size(213, 620); + frameRate(24); + soundtrack = new SoundtrackOptical(this, soundtrackFile, dpi, volume, type, pitch, positive); + playback = new SoundFile(this, soundtrackFile); + + playback.play(); +} + +void draw () { + soundtrack.frame(0, 0); +} \ No newline at end of file