Processing has a library for dealing with audio called Minim
, it is included with the more recent versions of Processing IDE. Unfortunately, this library is set up for real time audio applications and does not appear give you an easy way of extracting all the data from an audio file at once (it makes you load it in small buffers piece by piece). Since I could not find an easy way to load my wav files into Processing directly (although I'm sure this must be possible), I've been importing stereo audio in the wav format into Python using the wav library, adding the left and right channels together, centering the data around zero, and exporting the resulting array of int's (separated by commas) to a txt file. Here is my wav to txt Python script (I'm running this in Python 2.5.4):
Once I create a text file, I can import the data into Processing and convert it into an STL. I would like to streamline my code so that audio files (wav/mp3) can be loaded directly into Processing, but I have not found a solution yet, any suggestions would be appreciated!