Hello, This is the first time that I have to work with the Minim Library so I just started with a simple sketch to play a wav file. However, even this simple sketch gives me errors?! This is my skecth:
import ddf.minim.*;
//import ddf.minim.analysis.*;
//import ddf.minim.effects.*;
//import ddf.minim.signals.*;
//import ddf.minim.spi.*;
//import ddf.minim.ugens.*;
Minim minim;
//AudioPlayer player;
//AudioInput input;
AudioPlayer song;
void setup(){
size(100, 100);
minim = new Minim(this);
//player = minim.loadFile("song.mp3");
//input = minim.getLineIn();
song=minim.loadFile("californication.wav");
song.play();
}
void draw(){
background(0);
}
I get 2 errors:
- The constructor "Minim(Minim)" does not exist
- The funtion "loadFile(String)" does not exist
Can someone please help me? :D :D
This is the example code I used:
import ddf.minim.*;
Minim minim;
AudioPlayer song;
void setup(){
size(100, 100);
minim = new Minim(this);
// this loads mysong.wav from the data folder
song = minim.loadFile("mysong.wav");
song.play();
}
void draw(){
background(0);
}