MusaDSL

A Ruby framework for algorithmic sound and musical thinking and composition

Open Source
LGPL 3.0 License
Free to use, modify & share
Musa-DSL code example

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.

Musa-DSL Atom REPL

Atom editor plugin for live coding (maintenance mode since Atom's sunset in December 2022). Consider using the VSCode extension for new projects.

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.

MusaLCE for Live

Ableton Live controller for MusaLCE. Built with Max/MSP, it establishes communication between Ableton Live 11+ and the MusaLCE server, routing MIDI messages to your Live session.

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 GitHub README API
midi-parser MIDI data parsing, converts raw bytes to event objects GitHub README API
midi-communications Cross-platform MIDI communication with instruments and control surfaces GitHub README API
midi-communications-macos Low-level MIDI interface for macOS (CoreMIDI) GitHub README API

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:

  1. Install the MusaLCE Server: gem install musalce-server
  2. Install the connector for your DAW (Bitwig or Ableton Live)
  3. Install the VSCode extension

Documentation

For detailed documentation, see the README and API docs of each project:

Project README API Docs
Musa-DSL README API
midi-events README API
midi-parser README API
midi-communications README API
midi-communications-macos README API
MusaLCE Server README API
MusaLCE Client for VSCode README
Musa-DSL Atom REPL README
MusaLCE for Bitwig README
MusaLCE for Live README

Author

MusaDSL is created and maintained by yeste.studio, exploring the intersection of sound, music, technology, and algorithmic composition.

LGPL 3.0 License

You are welcome to use, try, modify, and contribute to any of the MusaDSL projects. All source code is available on GitHub.