Sound is a great application that allows you to mathematically create sounds in Java.
You define your sounds in terms of 16-bit linear code for the waveform, -- an array of samplings. The U_Law.class will then convert that to (or from) *.AU mu-law 8-bit encoding format which you can then play with AudioPlayer.player.start(bis) in an application or with Applet.getAudioClip in an Applet.
Sound is just a sample program. You would insert your own mathematical functions or cannibalise parts of the code.