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 AudioStream loop? (Read 855 times)
Ess AudioStream loop?
May 10th, 2007, 2:31pm
 
Hello everybody,

I'm trying to loop an Ess AudioStream, into which I have plugged an AudioFile (I need to do this, because I want to do real-time sound-processing)...

is there any way to loop the audio file?

regards,
Julian
Re: Ess AudioStream loop?
Reply #1 - May 10th, 2007, 4:11pm
 
You should be using an AudioChannel if you want to loop playback of a file.

http://www.tree-axis.com/Ess/AudioChannel/AudioChannel_loadSound.html
Re: Ess AudioStream loop?
Reply #2 - May 10th, 2007, 4:34pm
 
Yes, I know that, of course. Sorry, I haven't pointed out enough that I need to use an AudioStream, otherwise applying filters on the file in real time won't work.

I was wondering if there is, by any chance, a method (by knowing how long the AudioFile is) to tell the stream to stop and start over again?

regards,
Julian
Re: Ess AudioStream loop?
Reply #3 - May 10th, 2007, 6:00pm
 
I'm pretty sure there's no way (within ESS) to get it to save a stream whilst playing it, then when the stream ends, to go back to the start and keep on playing it.
Re: Ess AudioStream loop?
Reply #4 - May 11th, 2007, 2:46pm
 
I suspect you are going to have to just reload the AudioFile to achieve what you are going for. The notion of looping an AudioStream doesn't really make sense because the whole point of an AudioStream is that you don't know how long it is. It's certainly not remembering everything that passes through it, so there'd be no way to 'rewind' it, so to speak. You've got to rewind the source.

Alternatively, may I humbly suggest you give my audio library, Minim, a try: http://code.compartmental.net/tools/minim/

It allows for attaching effects to an AudioFileIn, which you can then loop to your heart's content.
Page Index Toggle Pages: 1