We are about to switch to a new forum software. Until then we have removed the registration on this forum.
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
Answers
http://forum.processing.org/two/discussion/8045/how-to-format-code-and-text
Can anyone please help me? xx
If you format the code correctly, it would be easier to help... Edit your message and apply the instructions.
Note: don't hit the C button then paste the code, it doesn't work. Instead, paste the code, select it, then hit the C button.