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
Ess Data folder (Read 362 times)
Ess Data folder
Sep 22nd, 2008, 2:12pm
 
Is it possible to play musics using the Ess that are outside the data folder of the sketch?

I need the same songs in different sketches and I don't want it repeat many times.

I've tried this:

import java.io.File;
import krister.Ess.*;

void setup() {
 File dir = new File("Processing/musicas/01 Serenata Di Toseli.aif");
 println(dir.getAbsolutePath());
 Ess.start(this);
 AudioChannel mySound = new AudioChannel(dir.getAbsolutePath());

}

The file's path is right, at list the program prints the correct one, but it didn't work. It seens that the Audiochannel is trying to open some other file. Something like: sketchbook\sketch\data\dir.getAbsolutePath(), a path problem. When I run that code, I get:

C:\Documents and Settings\computador\Desktop\processing-0135\musicas\01 Serenata Di Toseli.aif

Unable to load sound: C:\Documents and Settings\computador\Desktop\processing-0135\musicas\01 Serenata Di Toseli.aif

Does anybody has an idea?
Re: Ess Data folder
Reply #1 - Sep 22nd, 2008, 3:17pm
 
Another question, is it possible to play a great amount of songs in a program (70) without having a OutOfMemory error(not all at the same time, I want to play the other song, just after the first finished)?
The music's names are in a txt file
(The program will keep running for a long period)
Page Index Toggle Pages: 1