Error when adding sound in processing

Hello all,

I'm doing a personal project at the moment and for my last part of my work I'd like to add a sound file into my work but I keep getting this error

==== JavaSound Minim Error ==== ==== Error invoking createInput on the file loader object: null

I'm fairly new to processing and I've spent hours online trying to find out how I can fix it. I've added a folder named data inside this project and put the soundwave called future.wav inside. It's still not working.. :(

This is the code that I have at the moment,

`import ddf.minim.*;

Minim minim;

AudioSample future;

int X; int Y;

void setup() { size(500, 500); //size of the window background(50,50,50); //background to grey frameRate(50); //frequency of when the circles appear

minim = new Minim(this); future = minim.loadSample( "future.wav" ); }

void draw() {

if (mousePressed) { //if mouse is clicked, the following action will be performed

 ellipse(mouseX, mouseY, 100, 100); //When mouse pressed the circle enlarges
            fill(random(255),random(255),random(255)); //Random color generation

            future.trigger();

} else {
 stroke(50); //Outline of the circle
//colorMode(HSB, width, height, 10);

X = mouseX+150; //Storing the coordinates of the mouse to activate the circles
Y = mouseY+150;


for (int a = 0; a < height; a+=Y) { //defining the expression for the inner circle as well as adding random color generation
  for (int b = 0; b < width; b+=X) {
    fill(random(255),random(255),random(255)); //Random color generation
    //fill(j, width-a, 255);
  }
}

} ellipse(mouseX, mouseY, 40, 40); //size of the inner circle

}

void mousePressed() { background(random(255),random(255),random(255)); //generating random color }

` Again I apologize if I didn't submit the code properly on this forum, any help would be immensely appreciated!

x

Tagged:

Answers

Sign In or Register to comment.