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 › Minim LineIn: Bluetooth
Page Index Toggle Pages: 1
Minim LineIn: Bluetooth (Read 1028 times)
Minim LineIn: Bluetooth
Feb 4th, 2008, 10:31pm
 
Hi,

I`ve got a problem getting a microphone-signal from a bluetooth-headset.The strange thing is that a MacBook Pro could get the LineIn, but the MacBook doesn`t. The Audio-Midi-Configuration got the Bluetooth-Headset as a StandardInput.

I am using the Minim-Library.

Here is the code:
in = Minim.getLineIn(Minim.MONO, 512, 8000,16);
fft = new FFT(in.mix.size(), 44100);
maxima = new float[fft.specSize()];

Error Message:
=== Minim Error ===
=== Unable to return a TargetDataLine: unsupported format.

=== Minim Error ===
=== Minim.getLineIn: attempt failed, could not secure an AudioInput.

Can anyone help?
Would be great!
Re: Minim LineIn: Bluetooth
Reply #1 - Feb 5th, 2008, 4:43am
 
You are asking for a really weird sample rate (8000Hz is your arg). Try using this:

in Minim.getLineIn(Minim.MONO, 512);
Re: Minim LineIn: Bluetooth
Reply #2 - Feb 5th, 2008, 9:27am
 
Thank you for your hint.

Well, now it takes the signal from the internal microphone although I did not choose it in the system setup.

The 8000Hz and 16bit are the data from the bluetooth-headset. This is the default configuration in the Audio-Midi-Configuration.

Any other idea?
Re: Minim LineIn: Bluetooth
Reply #3 - Feb 6th, 2008, 2:29am
 
In that case, it may be a Mac issue. I've had no luck getting Java to give me anything other than the primary Mic input when asking for a line-in.
Re: Minim LineIn: Bluetooth
Reply #4 - Feb 7th, 2008, 8:49pm
 
Certainly there must be some way.  

I don't seem to be able to use line-in or a USB microphone adaptor - only my internal mic.  

Is there an argument that can be fed to the JVM, or a setting that can be tweaked in Minim's source code?  Is there an option to see a list of audio in options, sort of like there is for serial communication?  Or perhaps a way to change the primary ordering in mac os itself?

Re: Minim LineIn: Bluetooth
Reply #5 - Feb 9th, 2008, 5:33am
 
I think the only way people have been able to get around this is to use other programs to reroute audio or something. I seem to recall there being a thread about it on this forum. Search around.
Re: Minim LineIn: Bluetooth
Reply #6 - Feb 9th, 2008, 9:57am
 
Good news from my side:
The bluetooth-headset is finally recognized by Minim with the code posted above.

Bluetooth 2.0 is needed and MacOS Leopard as well. The application is running with processing 0125.

You need to choose the right in- and output in the Audio-Midi configuration (application). Also put the frequency and the channel specification of your line-in in the code. If you don`t specify the internal microphone is used.

Good luck!
Re: Minim LineIn: Bluetooth
Reply #7 - Feb 9th, 2008, 6:36pm
 
Awesome - nice work ivy.  

I have now gotten it to work.  It seems the most important thing to to fully specify the arguments when you try to set up your input source. To get the Line-in to work on my macbook, I had to use Minim.MONO.  Didn't have to supply sample rate or bit depth.

Chris
Page Index Toggle Pages: 1