I know how to play a .wav file using java, so my logical question is how do I make a .wav file? I've looked at the specification and understood not two words of it. The same thing happened with .png but I managed to find the BufferedImage class which solved my problems by automatically giving me an array to manipulate the image with. So my understanding of sound tells me that a wav file would be a 3-D array of integers (time x frequency x amplitude) Does anyone know of any java classes that can convert a 3D array into a wav and/or vice versa? (My understanding of a wav tells me that the file IS pretty much just a 3D array, so I am assuming this shouldn't be difficult.)
Alternatively, if the wav file format is not so simple as I make it out to be, is there a way to just play a note of a specified frequency and amplitude? I feel like there should be some System function that does so, but I haven't found any. And then is there any free software to record speaker output into a sound file?
My overall goal here is computational sound (While I could just use the MidiSynth piano, I'd rather use a lower level (for java this means minimal dependence on the javax package) approach to making sound) in java. Or C/C++ (but I prefer java). So if there is ANY other simpler way to do this than the two above methods, I would gladly take it.
Thanks in advance!
P.S. I would have put this in the creative sound subforum, but this is more about "making" sound rather than composing it.