Skip to main content

songbird-clips

Clip model, Bird file parser/serializer, and MIDI generation. This crate handles everything related to clips on the timeline — audio file references, MIDI note data, and the Bird text format that Songbird uses for human-readable project representation.

Bird Format Overview

Bird is a text-based musical notation — a domain-specific language (DSL) for electronic music composition. It sits in a unique niche: more structured than live-coding languages (TidalCycles, Sonic Pi), more compact than MusicXML, and more human-readable than binary DAW formats (FLP, ALS, Logic). After analyzing Bird against 12 other formats/tools, the design is fundamentally sound with a few gaps worth addressing.

Key Strengths

  • Git-friendly: Text-based, line-oriented — diffs are meaningful and mergeable
  • Human-readable: A musician can read and edit .bird files directly
  • Compact: An entire arrangement fits in a few dozen lines
  • Section/arrangement model: Sections define content, arrangements define structure — enables pattern cycling and reuse
  • DAW-native concepts: Sends, returns, effects, channel strips, plugins, automation — first-class citizens in the format
  • MPE support: Per-note pitch bend (bend), pressure (press), and slide (slide) data
  • Meter support: Time signatures via meter in the sig block (e.g., meter 3/4, meter 7/8)

Module Map

Core Types

Clip

A region on the timeline referencing audio or MIDI data:

Bird Format Pipeline

The Bird format pipeline transforms .bird text through four stages:

Example Bird File

AST Types

Testing

Tests cover tokenizer round-trips, parser edge cases, serializer fidelity, and populator output.