MusaDSL
A Ruby framework for algorithmic sound and musical thinking and composition
About MusaDSL
Musa-DSL is a domain-specific language based on Ruby designed for sonic and musical composition. It emphasizes the creation of complex temporal structures independently of the audio rendering engine, providing composers and developers with powerful tools for algorithmic composition, generative music, and musical notation.
The framework separates timing and compositional logic from sound production. Rather than coupling musical ideas to particular synthesizers or DAWs, Musa-DSL focuses on the deeper structures—sequences, rhythms, harmonic progressions, and formal compositional systems.
Who is it for?
- Composers exploring algorithmic composition
- Musicians interested in generative music systems
- Developers building music applications
- Researchers in computational musicology
- Live coders and interactive music performers
Ecosystem Components
Core Framework
Musa-DSL
The core Ruby framework for algorithmic sound and musical composition. Features include: advanced sequencer with microsecond precision for polyrhythmic and polytemporal structures, multiple clock sources (internal, MIDI, external), generative tools (Markov chains, Variatio, Rules, GenerativeGrammar, Darwin genetic algorithms), Neumalang text-based notation system, transcription to MIDI and MusicXML with ornament expansion, and comprehensive scale/tuning support.
Live Coding Environment (MusaLCE)
MusaLCEServer
The processing server that interprets code and commands in real-time. It connects to your code editor and DAW, enabling live coding sessions where your code generates music instantly.
MusaLCE Client for VSCode
Visual Studio Code extension for live coding with MusaDSL. Provides a modern REPL interface connected to the MusaLCE server, allowing you to execute code and see results in real-time.
DAW Connectors
MusaLCE for Bitwig
MIDI Controller script for Bitwig Studio 4+. Enables seamless integration between MusaLCE live coding sessions and Bitwig Studio, sending MIDI messages directly to your tracks and instruments.
MIDI Libraries Suite
A comprehensive set of Ruby libraries for MIDI communication. This suite is based on Ari Russo's libraries with modifications and optimizations for use with Musa-DSL.
| Library | Function | Repository | Documentation | API Docs |
|---|---|---|---|---|
| midi-events | MIDI event representation and object-oriented message handling | |||
| midi-parser | MIDI data parsing, converts raw bytes to event objects | |||
| midi-communications | Cross-platform MIDI communication with instruments and control surfaces | |||
| midi-communications-macos | Low-level MIDI interface for macOS (CoreMIDI) |
Getting Started
Requirements
- Ruby 3.4 or later
- For live coding: Ableton Live 11+ or Bitwig Studio 4+
Installation
Install the core Musa-DSL gem:
gem install musa-dsl
For a complete live coding setup, you'll also need:
- Install the MusaLCE Server:
gem install musalce-server - Install the connector for your DAW (Bitwig or Ableton Live)
- Install the VSCode extension
Documentation
For detailed documentation, see the README and API docs of each project:
| Project | README | API Docs |
|---|---|---|
| Musa-DSL | ||
| midi-events | ||
| midi-parser | ||
| midi-communications | ||
| midi-communications-macos | ||
| MusaLCE Server | ||
| MusaLCE Client for VSCode | — | |
| Musa-DSL Atom REPL | — | |
| MusaLCE for Bitwig | — | |
| MusaLCE for Live | — |