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 › Live Input and Output with Minim
Page Index Toggle Pages: 1
Live Input and Output with Minim (Read 1370 times)
Live Input and Output with Minim
May 23rd, 2010, 9:44pm
 
Hey,

I'm very new to processing and I'm having trouble trying to get the Minim library to get the Line In from the microphone in my mac to play from my speakers via a Line Out.

I get this error message;


=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

Here is the code I used;

import ddf.minim.*;
import ddf.minim.signals.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;

import ddf.minim.*;
import ddf.minim.signals.*;

Minim minim;
AudioOutput out;
AudioInput in;

void setup()
{
 size(812, 800);

 minim = new Minim(this);

 
   in = minim.getLineIn(Minim.STEREO, 512);
 
   out = minim.getLineOut(Minim.STEREO, 2048);

}

void draw()
{
 background(0);
 stroke(255);

 for(int i = 0; i < out.bufferSize() - 1; i++)
 {
   line(i, 50 + out.left.get(i)*50, i+1, 50 + out.left.get(i+1)*50);
   line(i, 150 + out.right.get(i)*50, i+1, 150 + out.right.get(i+1)*50);
 }
}


void stop()
{

 out.close();
 minim.stop();

 super.stop();
}

This is for a art project and would love to get some feed back on this. thanks!

Smiley
Page Index Toggle Pages: 1