gitmyhub

alda

Go ★ 5.9k updated 1mo ago

A music programming language for musicians. :notes:

A programming language for writing and playing back music as plain text files, using simple note letter syntax and MIDI for instrument sounds, with an interactive live-coding mode included.

GoKotlinJavaMIDIsetup: easycomplexity 2/5

Alda is a programming language for writing music. Instead of using a graphical notation program or a digital audio workstation, you write music as plain text in a file and then run a command to play it back. The syntax is designed to be readable even for people without a programming background.

A piece of music in Alda is called a score. You specify an instrument (like "piano"), then write notes using letter names, numbers for duration, and symbols for things like octave changes and ties. The tool reads the file and plays it through MIDI, which is a standard format for computer-generated instrument sounds. Alda comes with access to all instruments in the General MIDI Sound Set.

Beyond playing back static files, Alda includes an interactive mode called the REPL, where you type Alda code and hear the notes play immediately. It also supports writing music programmatically, so you can use loops, variables, and logic to generate compositions algorithmically or to experiment with live coding.

Alda is built from two components: a client written in Go (which handles the command-line interface and sends instructions) and a player written in Kotlin and Java (which handles audio playback). Installation packages are available on the official website. Building from source requires cloning the repository and running build scripts for each component separately.

The project is maintained by Dave Yarwood and distributed under the Eclipse Public License version 2.0. There is a Slack community and a Reddit community for users who want to share scores or get help.

Where it fits