Daniel Dihardja has just released a new Processing library called jm-Etude. It is a wrapper for the Jmusic Java library, which provides a framework for musical composition. In the Processing tradition, jm-Etude simplifies this further, setting up a structure where “scores”, “parts” and “phrases” together make up compositions in the form of “Etudes”. The library uses notes as the molecular unit, and MIDI is used for sound playback.

jm-Etude should be useful for a classically structured approach to music, but also to create realtime generative compositions. It nicely fills gaps left by Ess and Sonia, which focus on playing audio files or simpler waveform synthesis. Hopefully Dihardja will add examples showing how to use other sounds than the built-in MIDI instruments, as they sound notoriously cheesy.

See the Jmusic javadoc for an impression of what the underlying library can do.

Update: Daniel has explained a little about future plans for custom instruments:

[...] jm-Etude is not heavy MIDI based, it is just that for now the only playback function which is implemented is the jMusic midi playback. In jMusic the music data can be played and exported as MIDI or AUDIO and there are also libraries to build and use custom instruments, but I haven’t implemented them in the wrapper yet, because I’m still working on the MIDI export which will be a feature in the next update (is still a bit buggy now).