Im not 100% confident in my understanding of how these things work and I can't find a very comprehensive tutorial.
KodeJava's Java Sound API Guide Reintech's Guide on Java Audio Processing