ABCompose is a lightweight toolkit designed to integrate AI agents and automated workflows into music composition, arrangement, and engraving. By providing automated environment setup and straightforward shell scripts, the project converts generated ABC music notation files (.abc) into the standard MusicXML format (.xml). This allows the output to be natively imported, edited, and formatted in popular scoring software such as MuseScore, Dorico, and Sibelius.
Before converting any files, set up the local environment. This script creates a local Python virtual environment, installs the required packages, and downloads the abc2xml conversion tool.
Run these commands in the terminal from the project folder:
chmod +x setup.sh
./setup.sh
- Place all source
.abcsheet music files into thesrc/directory. - Compiled
.xmlfiles are automatically generated and saved in theout/directory.
To compile a .abc file, provide its path as an argument to the ./build.sh script. The output will be saved in the out/ directory. Example:
./build.sh src/twinkle_bass.abcThis project includes pre-configured VS Code tasks (.vscode/tasks.json). Use the Build keyboard shortcut (default Cmd+Shift+B) to compile the .abc file currently active in the editor.
To convert a .abc file to .png, provide its path as an argument to the ./converters/abc2png.py script. The output will be saved in the out/ directory. Example:
./.venv/bin/python3 ./converters/abc2png.py src/twinkle_bass.abcor use VS Code Build task to convert the active file. The conversion requires MuseScore installed and setup correctly, and produces .musicxml file as a byproduct of the process.
If using Visual Studio Code, install the ABC Music Notation extension. It provides syntax highlighting and sheet music previews for .abc files.