When I use the Sound library I consistently get this error when playing a sound file “ERROR:/synth/map/input : Audio input index 0 out of range for synth 2.” I will hear some sound, but certainly parts of the sound are dropping. Is there any work around? Should I switch to Minim when playing sound files in a program?
This is some example code:
import processing.video.*;
Movie movie;
//sound library comes after movie library
import processing.sound.*;
SoundFile song;
Amplitude amp;
void setup(){
fullScreen();
background(0);
movie = new Movie(this, "84.mov");
movie.loop();
song = new SoundFile(this,"STE-017.wav");
song.loop();
amp = new Amplitude(this);
amp.input(song);
}
void movieEvent(Movie m) {
m.read();
}
void draw(){
fill(0);
imageMode(CENTER);
rect(0,0,width,height);
float msize = map(amp.analyze(),0,.6,.7,1.7);
image(movie, width/2, height/2, width * msize, height * msize);
}