I use Audacity (free) for some stuff (assumes you have your own instruments to record), and Sonar’s HomeStudio (not free, has lots of instruments, drums, samples, capabilities), and Finale (not free–for music scoring, more geared to Classical and written out arrangements, but it also has a sample library one can use to generate .wav files based on the part-writing). All of these assume making .wav files and importing them into Java via one method or another (e.g., via compressed Ogg/Vorbis, perhaps).
Very interesting is the possibility of generating scores based on game state. FMOD has some capabilities along this line, by allowing “branches” to scores. But it is pretty expensive. There is a JGO member who has posted software for his music generating project: Krasse.
http://www.java-gaming.org/topics/some-reasonable-output-from-my-generative-music-system/27309/view.html
There may be a more current link? I’m noticing this thread has been frozen.
I’ve been messing around with creating sound “field” and sound “slicing” structures, on the idea of having background textures that are stochastic and parameter-driven, and on FreqModulation as a sound generation tool. Still have a long way to go, but I do think there is a lot of possibility there.