Hi , I start Processing and I made a code to play a piano note, i run the code , but when i press the key to play the song , i have an error : NullPointer Exeption and === Minim Error === === Couldn't load the file G.mp3
This is my code : import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.effects.*; import ddf.minim.signals.*; import ddf.minim.spi.*; import ddf.minim.ugens.*;
import ddf.minim.*;
Minim minim; // création d'un objet de la classe Minim
AudioPlayer G;
void setup() {
minim = new Minim(this); // 'this' fait référence à l'application en cours
G = minim.loadFile("G.mp3");
}
void draw() {
background(128);
if (key == 'u') G.play(); // key est la dernière touche activée du clavier
if (key == 'p') G.pause();
}
void stop() {
G.close();
minim.stop();
super.stop();
}
I'm french , I hope you to help me asap! :)