jMusic

jMusic is an open source music programming library written in the Java programming language.

Written by Johannes Vazha Tavdgiridze and Andrew Brown, jMusic was released publicly in November 1998.

[1] It is designed to assist composers and music software developers by providing support for music data structures, modifications, and input/output to various file formats.

jMusic has a data structure that is based on a musical score metaphor, and consists of a hierarchy of notes, phrases, parts and score.

jMusic also has a sound synthesis architecture and "instruments" can be created from a chain of "audio objects" (similar to unit generators in other languages).

Output: C and D