How to get microphone sounds into my program?

Hi, I was just wondering how difficult would it be to get the sounds from microphone into my program?



I want to make a program that would take the sounds played into the microphone and would show which note is currently played.



At the moment I have no clue, how to accomplish something like that. I could use some simple example to get started. At first I would just like to get the the sound from micorphone and play it in my Java program.



Does anybody know some open source Java code with such features?

Or does anybody have some other reccommedations?

Perhaps some C++ open source code?



Thank you for reading :slight_smile:


well, i had once contact with 2 libraries for voice communication, which are called "jVoicebridge" and "jsResources Chat".



The jVoicebridge is used for sun's project Wonderland (which is using jME nowadays as well, afaik), and it seemed to be pretty professional.



The jsResources Chat is kind of more lightweight… but less complex. It enables you pretty soon to get the sound from your mic and get it into a stream.



For your problem to "show which note is currently played" i have no idea how to accomplish this.



Just take a look…



what are you trying to do? kinda singstar game? :slight_smile:

i used http://code.compartmental.net/tools/minim/ to make a guitar tuner once…

it’s designed for processing, but can just as easily be used with jME.

.:emp...imm0|82:. said:

well, i had once contact with 2 libraries for voice communication, which are called "jVoicebridge" and "jsResources Chat".

The jVoicebridge is used for sun's project Wonderland (which is using jME nowadays as well, afaik), and it seemed to be pretty professional.

The jsResources Chat is kind of more lightweight.. but less complex. It enables you pretty soon to get the sound from your mic and get it into a stream.

For your problem to "show which note is currently played" i have no idea how to accomplish this.

Just take a look..

*what are you trying to do? kinda singstar game? :)*



Thanx for the reccommedations, I will check out these libraries. No, I'm not making a singstar game :). I dont quite understand what singstar game is.


i used http://code.compartmental.net/tools/minim/ to make a guitar tuner once..
it's designed for processing, but can just as easily be used with jME.


I'm actually planning to make a quitar tuner also xD.

Is your tuner open source, blue_week?
And is it possible to make a program that would "understand" when a chord is played, like E-minor for example?

Is your tuner open source, blue_week?
And is it possible to make a program that would "understand" when a chord is played, like E-minor for example?


i don't plan on releasing it anytime soon, it was just for my personal fun (and use)
yes, it's very possible, just check the frequency being played, there are certain values for each note.

EDIT: i think it would be cool to implement sound input in jME.. pretty sure it's going to be useful (i'm especially thinking about multiplayer voice chat, for example)

Tx for saying it's possible to separate chords, I'll get into creating my own tuner this fall. And yeah multiplayer chat would also kick ass. I think it would not be very difficult thing to do. Once the microphone input is received I could just use JGN to transfer the sound to other players, but since JGN is server based and not P2P I think it would not be very practical to use JGN. There probably are some open-source Java VOIP stuff around.

jep, there are…

check the first 2 recommendations, which u will find



here

and

here