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 › Turn AudioInput into AudioOutput in Minim
Page Index Toggle Pages: 1
Turn AudioInput into AudioOutput in Minim (Read 1196 times)
Turn AudioInput into AudioOutput in Minim
Jul 3rd, 2009, 10:18am
 
Hey yall!

I'm pretty new in Processing (as in programming at all).
I'm doin a coursework in generative design, and I decided to try something audio-visual.
By now I have a pretty little thing called "Malte" that's getting the AudioInput signal and turns it into the frequency band.
This band is displayed then in different styles and colours.

But actually my aim was to display the output of a platform (pc or mac).

Naively I thought it would be as simple as turning "AudioInput" into "AudioOutput" and the ".getLineIn" into a ".getLineOut".
As soon as I do that there is no response at all from the visuals.
:-?

Right now the code is like that (excerpt):
_______________________________________________________

import processing.core.*;
import ddf.minim.analysis.*;
import ddf.minim.*;

.
.
.

Minim minim;
AudioInput input;
FFT fft;
.
.
.

void setup()
{
   .
   .
   .

   minim = new Minim(this);
   input = minim.getLineIn(Minim.STEREO, 512);
   fft = new FFT(input.bufferSize(), input.sampleRate());
   fft.logAverages(22, 3);
   fft.window(FFT.NONE);

.
.
.

void stop()
{
 input.close();
 minim.stop();
 super.stop();
}

_______________________________________________________

Help?
Anyone??  :(
Re: Turn AudioInput into AudioOutput in Minim
Reply #1 - Jul 6th, 2009, 5:07am
 
hmm, this is abit confusing, but i think i understand your problem.

AudioOutput is minim's sound output. As in you can do sound with minim in processing, and select an audiooutput source where to send it, check the manual for examples.

I guess your issue is that you're just getting audiosync fft responses to linein inputs and not your entire desktop sounds (like winamp playing something for example). no?

this can usually be limited by your soundcard or your settings. so to fix it, first you can try to change your audio settings to output the entire desktop and not just linein (on windows just right click the sound icon and check the volume control, properties / advanced controls). it should work, since we use it here all the time (wether on pc or mac) but if by some reason your soundcard or drivers are crapping up, you can also try to find some audiosoftware that creates virtual audiochannels and reroute things accordingly (dont know names on pc out of the top of my head; but for linux there is jack and for mac its osx port of jackpilot and that other one.. soundflower i think its called)

good luck.
Re: Turn AudioInput into AudioOutput in Minim
Reply #2 - Jul 6th, 2009, 11:48am
 
Thanks very much for the response!

Actually... Yes. I wanted to get audiosync fft response to any sound thats coming from the computer (systemsounds as well as music, played with itunes, winamp etc.)
But it seems after - again - reading the javadocs and the manual to the AudioOutput class, that this not the one I need.

Right now, as shown in the code, I use the AudioInput class to at least work on the visuals themselves by plugging in my mp3-player/microphone.
I work with an usb-audio hardware interface (m-audio fast track pro) so, i guess, the routing should not be the problem.
I also checked the box in the preferences, that the output can be controlled exclusively by applications without any positive result.

Is it possible at all to get an fft response from the audio signal played back by another device than processing?

Thank you for your patience and your good will;)
Page Index Toggle Pages: 1