I need Java microphone waveform script

Asked By 70 points N/A Posted on -
qa-featured

Hi,

Can someone lend me a Java microphone waveform code or script? I'm trying to capture audio waveform from a microphone in a MIDI data format so I could control the input and output of sound media. Any help would be much appreciated.

Thank you.

SHARE
Answered By 0 points N/A #136963

I need Java microphone waveform script

qa-featured

Hello Johnson,

You should use The AudioFormat class:

The Constructor Detail

AudioFormat

public AudioFormat(Audio Format Encoding encoding,
                   float sampleRate,
                   int sampleSizeInBits,
                   int channels,
                   int frameSize,
                   float frameRate,
                   boolean bigEndian)
Constructs an AudioFormat with the given parameters. The encoding specifies the convention usedto represent the data. The other parameters are further explained in the class description.

Parameters:
Encoding – the audio encoding technique
SampleRate – the number of samples per second
SampleSizeInBits – the number of bits in each sample
Channels – the number of channels (1 for mono, 2 for stereo, and so on)
FrameSize – the number of bytes in each frame
FrameRate – the number of frames per second
BigEndian – indicates whether the data for a single sample is stored in big-Endian byte order (false means little-endian)

Here is attached a sample of program that can help you

Login/Register to Answer

Related Questions