First off, forget Java. Java is a managed runtime that does garbage collection. When this happens, you will hear the shutter, because you want your sound buffer to be small in order to minimize latency,
Secondly, you will interact with the hardware, that is, the sound card, Java does not support this kind of thing, so you will either have to write some hardware abstraction in JNI, or find an existing solution, but there is a problem with that. It is unlikely that you Get real-time performance from the Java platform.
What you want to do is what you want to go with C++ for this, and you will want to know more about partial differentiation, DSP, sound synthesis and waveform analysis. This is quite a lot to take on, but it should give you a good direction if you start reading about relevant studies ...
source share