We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Template for ESS (Read 1234 times)
Template for ESS
Nov 9th, 2006, 7:02pm
 
I am not a java programmer.  I have had success with the core functions of processing, using P3D, OpenGL is kinda spotty, but that's probably because this dell has integrated intel graphics.

Anyway.

I cannot figure out how to simple load and play either a .wav or .mp3 in processing.  I have been to the ess website, but there is no example for just loading and playing .wav or .mp3  

I have tried substituting the name of the sound file in the examples with the name of a sound file in the folder containing my sketch.  

I'm on windows XP, java 1.5.0, processing 91.  when i substitute the name of a local file for the one in the example i get regardless of wether i'm trying to open a .mp3 or .wav

Exception in thread "Thread-2" java.lang.NoSuchMethodError: processing.core.PApplet.dataPath(Ljava/lang/String;)Ljava/lang/String;

can anyone post code that uses ess to load a file located in the same folder as the sketch?  Or just give me a hint about what i'm doing wrong?
Re: Template for ESS
Reply #1 - Nov 9th, 2006, 7:38pm
 
the problem you're having there is that the version of processing you're using is far too old. please update to a newer release, such as 121.
Re: Template for ESS
Reply #2 - Nov 9th, 2006, 8:06pm
 
Ok, got the 121 beta of processing.  

The other error is gone, but now it looks like ESS is throwing


Unable to load sound blah.wav


I copy and pasted the code from the example "analysis" on the ESS site, and changed the name of the file to one on my computer.  I have tried putting the file in the folder with the sketch, and in the folder with processing.exe.  

Am stuck, please help.  How do i load and play a file, .wav or .mp3, in processing.  

Re: Template for ESS
Reply #3 - Nov 9th, 2006, 9:17pm
 
Put the file in a subfolder called "data", of your sketch's main folder.
Re: Template for ESS
Reply #4 - Nov 10th, 2006, 5:02pm
 
Ok, I created a folder named data in the sketch folder, and put the .wav in there.  It said I got a out of heap memory error from java.  This was a 32MB .wav.  I mixed it down from stereo to mono, which reduced the size by about half, and now it loads and works fine for .wav.  I googled increasing heap memory for java, but i'm not a java programmer and i guess i'm just to dumb to apply what those pages said to processing.  So if anyone knows how to increase the heap size for processing that would be appriciated.  

It still won't load .mp3s tho.  
In the processing folder->Libraries->Ess->library->
i have the jlayer1.0 folder, the mpegaudioSPI1.9.4 folder, a file called .ds_store, ess.jar, and tritonus_share-0.3.6.jar

Do i need to get the .jar files out of the jlayer and mpegaudio folders in order ot get .mp3 to load?  Do i need to get everything out of the jlayer & mpegaudio folders in with the ess.jar?  there are lots of files and subfolders in those folders.
Re: Template for ESS
Reply #5 - Nov 16th, 2006, 2:51pm
 
There seem to be some new issues with mp3 playback under Java 5 (everything still appears fine under Java 4). I am not the keeper of the mp3 support libraries, so I'll have to investigate a bit more to see what is going on.
Page Index Toggle Pages: 1