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.
I need Java microphone waveform script
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