I designed a simple music visualizer using Arduino and Processing. The Processing sketch uses the 'minim' library to play sound files and send values from the file being played to the Arduino which then changes the brightness of a led accordingly. The whole thing works great, and I have it posted it on my blog at : https://abhikpal.github.io/blog/2014/01/16/simple-music-visualizer (https://abhikpal.github.io/blog/2014/01/16/simple-music-visualizer)
The problem is, whenever I want to "visualize" a sound file I have to put it the folder which contains the Processing sketch, change some code and then run it again. Is there any way I can use the Processing sketch to automatically read out values from the computer's audio buffer and send them to the Arduino? This way I can have the sketch running in the background, sending values to the Arduino; while I play sound files using a regular music player (like Windows Media Player, VLC etc).
This is not an Arduino problem but a Windows/Processing challenge. You posted it to the wrong forum...
This is not an Arduino problem but a Windows/Processing challenge.
Maybe, and that's the reason I've posted it under "project Guidance". And I don't mind using some other software to do the same work for me. Any feasible solution will work just fine.
And thanks, I will try posting it on the Processing forum.
I've done this before. Here's my blog article from 2011 with code examples: http://www.macetech.com/blog/node/111
On Windows and Linux, you can try to set Stereo Mix as your recording device in the audio settings. On Mac, I have used Soundflower to do the same thing...you can set it as an output device, and then it lets you also select it as a recording device while monitoring the audio stream to the system audio device (same thing Stereo Mix does on Windows).
Thanks macegr, I finally created something that has the basic functions that I wanted. Check it out at : https://abhikpal.github.io/blog/2014/02/01/music-visualizer-upgraded (https://abhikpal.github.io/blog/2014/02/01/music-visualizer-upgraded). Will add other features soon. Thanks :)
Nice writeup about your progress...if you keep up this habit, you'll definitely go far! :)