This preview reads a small part of Alda (parts, notes, rests, chords, octaves, durations and tempo) and plays it with a simple browser synth. valda itself reads the whole language and plays it with a General MIDI SoundFont.
Ask Claude to write it
Three Claude Code skills come with valda: one for backing tracks and practice material, one for drums, one for film and game music. Describe the piece in plain words. You get a real .alda score you can read, change and play.
Describe itStyle, key, tempo, length, which instruments to leave out. If something important is missing, Claude asks first.
Check the planClaude shows the form before writing: sections, bars, chords, timings.
Claude writes and checks itThe score is checked with valda: it parses, every part has the same length, markers land on time.
Play or exportvalda play, or MIDI with one track per part for your DAW, or WAV.
valda-music
Backing tracks and practice material
Jam tracks in blues, rock, pop, funk, jazz, bossa, reggae, country, metal or ballad style, chord progressions, scales, modes, arpeggios, interval and rhythm drills, and tempo ramps with a click.
“A 12-bar blues in A at 96 BPM with bass, piano and drums. Leave the guitar out, I'll play that.”
# the plan, shown first
intro 4 | verse 8: Am F C G ×2
chorus 8: F C G Am ×2 | outro 4
@ 100 BPM ≈ 1:07
From punk and pop-punk to thrash and metalcore: grooves, fills, crashes, builds, stops and endings, arranged across intro, verse, chorus, bridge and outro. It also adds drums to a score you already have.
“A pop-punk drum track at 170 BPM: verse, chorus, verse, chorus, bridge, double chorus. Put a fill into every chorus.”
# 1 & 2 & 3 & 4 &
# HH x x x x x x x x
# SN . . x . . . x .
# BD x . . . x x . .
verseA = [
V1: (vol 70) o2 f+8 f+ f+ f+ f+ f+ f+ f+
V2: r8 r (vol 90) o2 d r r r d r
V3: (vol 92) o2 c8 r r r c c r r
V0:
]
Cues in epic, heroic, fantasy, drama, horror, thriller, sci-fi, romance, noir, whimsical or elegy moods, for the General MIDI orchestra: strings, brass, woodwinds, timpani, choir, harp, synths and taiko. Builds, swells, climaxes, stingers, hit points and seamless game loops. It checks that each section's loudness follows the arc.
“A slow-burn horror cue, about a minute, that goes quiet and ends on a stinger.”
# the cue sheet, shown first
intro 0:00 Dm pedal, low drone pp
build 0:15 string ostinato, taiko mp
theme 0:30 horns + low strings f
climax 0:52 theme 8va, full choir ff
128 BPM, 40 bars = 1:15
Link all three skills into Claude Code, then start a new session:
skills/install.sh
Using Docker? Start Claude Code with VALDA pointing at the wrapper, so the skills run valda through the image. Keep your scores under the folder you start it from.
VALDA=$PWD/scripts/valda-docker.sh claude
Get valda
Build it from source, or run it in Docker without installing anything else. Either way, run valda doctor first to check your setup.
Build from source
Needs the V compiler (tested with 0.5.1) and a C compiler. The synthesizer and audio code are built in. For playback, add a General MIDI SoundFont, for example Debian's timgm6mb-soundfont package.
git clone https://github.com/rodabt/valda
cd valda && v -prod -cc gcc -o valda .
Then put the valda binary on your PATH.
Run it in Docker
The image includes valda and a small SoundFont, so MIDI and WAV export work straight away. The wrapper script runs it like an installed binary, on files in the current directory.
On Linux and WSL the wrapper plays through your computer's sound server. Elsewhere, export WAV and play the file. The README covers the REPL server and other options.
From the terminal
Every command takes a file (-f), a string of code (-c) or a score piped in on stdin.
valda play -f song.alda
Plays the score and returns when it ends. Use --from and --to with times like 0:30 or with marker names to hear one section.
valda export -f song.alda -o song.mid
Writes a Standard MIDI File. Add -M 1 to give each part its own named track, so your DAW shows the piano, bass and drums separately.
valda export -f song.alda -O wav -o song.wav
Renders audio offline, faster than real time, with your SoundFont.
valda repl
Write music a line at a time and hear each line as you enter it. The server speaks Alda's nREPL protocol, so Alda's editor integrations can connect to it. It only accepts connections from your own machine unless you add --host 0.0.0.0, for example to reach it inside a container.
valda import -i musicxml -f score.musicxml
Turns MusicXML from a notation program into Alda code you can edit.
valda doctor
Checks your setup: parsing, MIDI export, the SoundFont, the audio device and the REPL. If there's no sound device, it says so, and play stops with the same message instead of playing silence.
Examples
29 scores come with valda, from a single line to a nine-part concerto. Open one to read the code, then play it.
To play one: valda play -f examples/bach_cello_suite_no_1.alda. The full list is in the examples folder. The Claude skills add their own templates: backing tracks, drum arrangements and film cues (see them).
Learn the language
valda runs the same language as Alda 2, so Alda's tutorials apply word for word. Wherever they say alda, type valda.