Alda: A Text-Based Music Programming Language for Composers and Coders
A music programming language for musicians. :notes:
At a glance
- What is it?
- Alda is a text-based music programming language that lets you write and play back MIDI scores entirely from the command line, without a digital audio workstation. It targets both musicians unfamiliar with code and programmers unfamiliar with music theory, and it supports live coding through an interactive REPL.
- Who is it for?
- Alda is right for musicians and programmers who want to write music as plain text files, version-control scores in git, and play them back via MIDI without a DAW. It is the wrong choice for anyone who needs professional audio output beyond MIDI, typeset sheet music, or waveform synthesis.
- Can I use it commercially?
- Yes, with conditions. EPL-2.0 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
- Is it still maintained?
- Yes. The repository last received commits 32 days ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Music Composition as a Text File
Alda solves a specific problem: writing music without opening a graphical application. The README describes its design as favoring aesthetics, flexibility, and ease of use equally, targeting musicians who do not know how to program and programmers who do not know music theory. Both audiences use the same text-based syntax and the same command-line tool.
The practical value is reproducibility. A music composition written in Alda is a plain text file you can track in version control, diff between versions, share in a git repository, and regenerate identically every time. A DAW project file is a binary format tied to specific software versions. An Alda score is readable and portable.
The README references a blog post by the project author explaining why composing in a text file is preferable to a graphical notation program for certain use cases. The project has been maintained since 2012 according to the copyright header in the README.
Architecture: Go Client, Kotlin Player, and General MIDI
Alda consists of two separate executables that work together. The client is written in Go and handles parsing the Alda language, interpreting scores, and sending instructions to the player. The player is written in Kotlin and Java; it receives those instructions and drives MIDI playback.
All sound production goes through MIDI using the General MIDI Sound Set. This means every instrument available in Alda corresponds to one of the 128 standard General MIDI patches. The breadth of the instrument set covers piano, strings, brass, woodwinds, percussion, and many more, but it does not include custom synthesized timbres or sample-based instruments outside the General MIDI specification.
The README shows the Alda syntax for a passage from a Bach cello suite.
piano:
o3
g8 a b > c d e f+ g | a b > c d e f+ g4
g8 f+ e d c < b a g | f+ e d c < b a g4
<< g1/>g/>g/b/>d/gIn this notation, `piano:` declares the instrument. `o3` sets the octave to 3. Note names (a through g) are followed by duration numbers: 8 for an eighth note, 4 for a quarter note. `>` raises the octave by one; `<` lowers it. `|` separates measures. The `/` character produces a chord. The syntax reads more like a markup language than a programming language, which makes it approachable for musicians even without coding experience.
Installing Alda and Playing Your First Score
The README directs users to the official website for installation instructions.
alda --help
Run this command after installing to verify the install and see all available options. To play a score file included in the repository:
alda play --file examples/bach_cello_suite_no_1.alda
To play code directly from the command line without a file:
alda play --code "piano: c6 d12 e6 g12~4"
For developers who prefer building from source rather than using the installer, the README gives a two-step build path.
git clone https://github.com/alda-lang/alda.git
cd alda
client/bin/build
player/bin/buildThe build produces executables for multiple OS and architecture combinations. The build output shows the path to each compiled binary. More details on the client and player build steps are in the client/README.md and player/README.md files respectively.
The examples/ directory in the repository contains more than 20 score files covering classical compositions, percussion patterns, dynamics demonstrations, key signatures, alternate endings, and phase-based pieces. These serve as both documentation and test material.
Algorithmic Composition and the Interactive REPL
Alda is not limited to writing static scores. The README explicitly lists support for writing music programmatically as a feature, covering algorithmic composition and live coding use cases.
The interactive REPL starts with:
alda repl
In a REPL session you enter Alda code and hear the results in real time. This makes it possible to compose by experimentation: play a phrase, adjust it, extend it, all without leaving the terminal. The REPL documentation is linked from the README as doc/alda-repl.md.
For algorithmic composition, the programmatic writing capability documented at doc/writing-music-programmatically.md in the repository allows generating note sequences through code rather than writing them by hand. The README does not detail the specific API in the available text, but the file's existence confirms the capability is documented separately from the main README.
The examples/ directory includes scores that demonstrate polyphony (poly.alda), dynamics (dynamics.alda), phase patterns (phase.alda), and modes (modes.alda), which shows the language covers intermediate composition techniques beyond simple melodies.
What Alda Cannot Do
Alda produces MIDI output through the General MIDI Sound Set. It does not currently support waveform synthesis or sample-based instruments outside that set. The README lists waveform synthesis instruments as a planned feature, which means this is a known gap that the project intends to address, but it is not implemented.
MusicXML export is also listed as planned. Without it, there is no direct path from an Alda score to sheet music in standard notation software like MuseScore or Sibelius. The README links to a GitHub discussion about the MusicXML export feature where interested contributors can follow the work.
Browser-based playback is also listed as planned rather than implemented. Running Alda currently requires a local installation. Teams who want to share interactive scores on the web without requiring the recipient to install Alda cannot do so with the current release.
Raspberry Pi support is listed as needing improvement. The Java-based player component has hardware dependencies that create friction on ARM devices, which the project acknowledges in its planned work list.
Alda vs. LilyPond: Playback vs. Notation
LilyPond is a music engraving program that takes text-based input and produces typeset sheet music as PDF output. It is the most direct alternative to Alda in terms of using a text-based syntax for music.
The fundamental difference is the output target. LilyPond is designed for producing publication-quality printed scores. Alda is designed for MIDI playback. If your goal is to print sheet music for a performer, LilyPond is the appropriate tool. If your goal is to hear the music through your speakers without opening Finale or a DAW, Alda is the appropriate tool.
A second difference is the learning model. LilyPond's syntax is oriented around music engraving concepts: staff systems, clefs, voices, articulations. Alda's syntax is oriented around the sequence of notes in time. Programmers often find Alda's sequence model more natural because it resembles sequential code. Musicians familiar with engraving tools may prefer LilyPond's notation-centric model.
The two tools are not mutually exclusive: a composer could use Alda for sketching and playback during composition, then transcribe the final result into LilyPond for publication.
Licence, Maintenance, and Community
Alda is distributed under the Eclipse Public License 2.0 (EPL-2.0). EPL-2.0 is a weak copy-left licence: if you modify and distribute Alda itself, you must release those modifications under EPL-2.0. However, using Alda as a tool to compose music does not trigger the copy-left requirement. The licence is more restrictive than MIT for contributors to the Alda codebase, but transparent for end users.
The last push to the repository was on 2026-08-29, indicating the project is receiving ongoing changes. The repository has no GitHub releases in the releases page; version tracking appears in the VERSION file at the top level of the repository and in the CHANGELOG.md files.
The project copyright spans 2012 to 2026, and the README credits Dave Yarwood as the primary maintainer with a GitHub Sponsors link for continued funding. The community uses a Slack group (slack.alda.io) and a Reddit subreddit (/r/alda). Contributions are described as welcome in the CONTRIBUTING.md file.
Editorial conclusion
Alda is right for musicians and programmers who want to write music as plain text files, version-control scores in git, and play them back via MIDI without a DAW. It is the wrong choice for anyone who needs professional audio output beyond MIDI, typeset sheet music, or waveform synthesis. The planned features list in the README includes both MusicXML export and waveform synthesis, but neither is implemented yet. Before adopting, verify that your system has working MIDI output configured, since Alda depends on it for all playback through the player component.
Frequently asked questions
Does Alda support synthesized audio or only MIDI instruments?
The current release produces sound through the General MIDI Sound Set only. Waveform synthesis instruments are listed in the README as a planned feature, but the README does not indicate they are implemented in the current release.
Can Alda export scores to MusicXML for use in notation software?
MusicXML export is listed in the README as a planned feature with interoperability with other music software as the stated goal, but it is not implemented in the current release. The README links to a GitHub discussion where the work is tracked.
What does a basic Alda melody look like in the syntax?
The README shows a piano passage where `piano:` declares the instrument, `o3` sets the octave, and notes like `g8 a b` represent a G eighth note followed by A and B. The number after the note letter is the duration: 8 is an eighth note, 4 is a quarter note. `>` raises the octave by one and `<` lowers it.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/alda-lang-alda)