I am currently involved in a project that involves a digital USB keyboard and obtaining user input from that keyboard. Our requirements were that we needed to be able to capture the keyboard’s input and package it into MusicXML type format for display. I can’t go into too many details about the project, but suffice it to say, I am extremely pleased with a solution called JFugue.
JFugue is an open-source Java-based solution for programming music without dealing with the complexities of the javax.sound.midi package that can be difficult to use and learn quickly. JFugue is based around a proprietary music format called a MusicString. It allows you to play MIDI music out of your speakers in just two lines.
Player player = new Player(); player.play("C D E F G A B");
This is a very cool feature, but probably the best thing about JFugue is its ability to transform a MusicString into a variety of different formats such as MusicXML, MIDI, WAV, or any type of format you wish by modifying a Parser/Renderer pair. David Koelle, has creating a very intuitive way to parse and render music in different formats by extending his base Parser/Renderer classes. His methodology is based on Event-driven programming so that I, as a developer, can listen to events such as: note down, note up, voice change, measure change, etc. and then renderer them in any type of format I choose.
Another benefit of JFugue is that David Koelle is very active on JFugue’s User Discussion Group hosted on Yahoo groups. If I ever had a question about any element of JFugue, I could post it to the forum and David would respond very quickly.
With all of this being said, I would definately recommend JFugue to any Java developer working with MIDI. You can download it here.