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.
IndexProgramming Questions & HelpSound,  Music Libraries › Minim - 3D Spectrum Demo (and issue)
Page Index Toggle Pages: 1
Minim - 3D Spectrum Demo (and issue) (Read 559 times)
Minim - 3D Spectrum Demo (and issue)
Dec 30th, 2008, 6:04pm
 
Minim seems really easy to use:
The following is a demo 3d spectrum based on a popular rap tune.

http://www.ivanlazarte.com/processing/mos/spectrum_3d/applet/index.html

The issue I'm having that the mp3 file is simply too large!  

Given that the bulk of the data is not a Java class, is there some way I can make a preloader in Processing while the mp3 is being downloaded?  
My instinct says create a new Thread, and charge it with downloading the mp3 track, and the main draw() function simply checks to see if a isFinished download flag is set to true.

Thoughts?  I'm not familar with awts threading model so it's a little unclear how to proceed.  If this is solved in a clear manner, all sorts of goodies could be preloaded this way...
Re: Minim - 3D Spectrum Demo (and issue)
Reply #1 - Dec 31st, 2008, 6:18pm
 
Are you loading the mp3 file entirely into memory, or streaming it? i.e. AudioPlayer or AudioSnippet?
Re: Minim - 3D Spectrum Demo (and issue)
Reply #2 - Dec 31st, 2008, 6:20pm
 
Actually, just looked at the code, I see you are using an AudioPlayer, which is good. I'm not sure why it's taking so long to start playing. I shouldn't think the applet would actually download the entire mp3 file to a user's computer before streaming it, but it might.
Re: Minim - 3D Spectrum Demo (and issue)
Reply #3 - Jan 2nd, 2009, 5:55pm
 
hmm, it just occurred to me to try to reference an http location http://myhost/mp3/song.mp3.   but then that would trigger security exceptions right?  i'll give that a go later...
Page Index Toggle Pages: 1