We are about to switch to a new forum software. Until then we have removed the registration on this forum.
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:
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);
}
Answers
https://forum.Processing.org/two/discussion/8045/how-to-format-code-and-text
What's the name of your sketch? Did you call it "Minim"?
If that is the case, rename it to something different.