Simple MP3 Loader

import processing.sound.*;
SoundFile file;
void setup(){
  file = new SoundFile(this, "data/mid.mp3");
  file.play();
}
void draw(){
}

This is the simplest method I have found to load an .mp3 file which is located in a directory called “data” which can be found in the same directory as the Processing sketch.

The examples included with Processing show how these audio files can be manipulated.

Leave a Reply

Create your own website, free on WordPress.com.Create your own website.
Start free