I'm trying to make a desktop audio recorder application with JAVA.
And I found JSyn good but I don't know how to make good use of it.
I don't know how to... process the audio data.(like.. if I want to analyze the frequency domain or sample attitudes, filter out microphone noises, make the voice sound like male or female, things like that... )
I want to make those things "customizable".
The user guide says I can write a custom unit generator which extends UnitFilter.
But I don't know what those values mean( double[] input, double[] output, start, limit... )
Is it possible to use "AudioSpectrumListener" with this thing?
It's already tough enough for me this JAVA noob to figure out how to record sound from microphone.
Synthesizer synth = JSyn.createSynthesizer();
LineIn micIn = new LineIn();
synth.add(micIn);
synth.start(44100, AudioDeviceManager.USE_DEFAULT_DEVICE, 2, AudioDeviceManager.USE_DEFAULT_DEVICE, 2);
File file = new File("record.wav");
try {
WaveRecorder recorder = new WaveRecorder(synth, file);
micIn.output.connect(0,recorder.getInput(),0);
micIn.output.connect(1,recorder.getInput(),1);
recorder.start();
System.out.println("start recording");
Thread.sleep(5000);
System.out.println("stop recording");
recorder.stop();
recorder.close();
synth.stopUnit(micIn);
synth.stop();
...
After this, I don't know how to get the data or how to make sound louder or quieter and the program doesn't exit itself after I close the recorder and stop the synthesizer.
What did I miss to stop or close?
//--- nah I'm just going to use TargetDataLine and process the data like the answer to this another audio data question do.