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 › MP3 for dummies (and beginers)
Page Index Toggle Pages: 1
MP3 for dummies (and beginers) (Read 1135 times)
MP3 for dummies (and beginers)
Apr 21st, 2010, 7:47am
 
Hi There

I promise you I've look here and there… without finding one single simple answer…

I JUST want to play a sound file (any kind of extension since I can convert them before coding).

How can I do ?

No interface, no control… nothing, JUST play when I launch the processing…

Thank you Smiley

Ch.
Re: MP3 for dummies (and beginers)
Reply #1 - Apr 21st, 2010, 8:31am
 
Quote:
import ddf.minim.*;
Minim minim;
AudioPlayer player;
void setup()
{
  minim = new Minim(this);
  player = minim.loadFile("YOURFILENAME.mp3", 2048);
  player.play();
}



That should do it for you Smiley
Just make sure that the music file is in the same folder as the source code
Page Index Toggle Pages: 1