MusaLCE

Live coding environment for MusaDSL — write Ruby in your editor, hear changes in real time as the sequencer keeps playing

Open Source
LGPL 3.0 License
Ableton Live + Bitwig Studio

About MusaLCE

MusaLCE (Musa Live Coding Environment) is the suite of components that turns MusaDSL into a live coding environment. You write Ruby in Visual Studio Code and send fragments to a running server; the music keeps playing while the code morphs around it. MIDI flows out to your DAW in real time.

Two ways to use it:

  • Standalone — bring your own REPL. Build your own main.rb with sequencer, voices, clock and transport, then start Musa::REPL::REPL.new(binding) inside the sequencer DSL context. Best for SuperCollider, Max/MSP, OSC apps, custom hardware, or any situation where you want full control. See the REPL subsystem doc and the worked example in musadsl-demo/_demo-13-live-coding.
  • Suite workflowmusalce-server packages the REPL, sequencer and DAW handler for Ableton Live 11+ or Bitwig Studio 5+. The server exposes a daw.* API for transport, tracks, voices and Surface controls. Optional Stream Deck integration via Pulso, yeste.studio's upcoming Stream Deck plugin for the MusaLCE Surface protocol (Bitwig only initially; public release pending). See the architecture reference.

Internally, the suite is a specialization of the standalone case: musalce-server opens the same Musa::REPL::REPL after pre-building all the boilerplate.

Components

Server

musalce-server

The processing server that interprets code and commands in real-time. Hosts a Musa-DSL sequencer, opens a REPL on TCP/1327, talks OSC to the per-DAW extension, and exposes a daw.* API in the REPL context (transport, tracks, voices, Surface).

Editor Clients

MusaLCE Client for VSCode

Visual Studio Code extension that is a REPL client over TCP/1327. Send the current selection or line with Ctrl+Alt+Enter, toggle the status panel with Ctrl+Alt+M. Works with both the standalone and suite workflows (the extension is REPL-agnostic). Available on the VSCode Marketplace.

Musa-DSL Atom REPL

Atom editor plugin for live coding (discontinued since Atom's sunset in December 2022). Kept for archival reference. New users should install the VSCode client.

DAW Connectors

MusaLCEforBitwig

Controller extension for Bitwig Studio 5+ (Java, Bitwig Extension API 18). Bridges Bitwig with musalce-server over OSC, exposes preferences for OSC ports, includes the MusaLCESurfaceRelay for Stream Deck integration (Pulso side).

MusaLCEforLive

Ableton Live MIDI Remote Script (Python) for Live 11+. Bridges Live with musalce-server over OSC. Requires a virtual MIDI bus (IAC Driver on macOS) for clock sync because Live's MIDI Remote Script API does not expose transport directly.

Getting Started — Suite workflow

Requirements: Ruby 3.4+, Ableton Live 11+ or Bitwig Studio 5+, Visual Studio Code.

Quick Start (5 steps)

  1. Install the MusaLCE Server gem:
    gem install musalce-server
  2. Install the connector for your DAW: MusaLCEforBitwig (Bitwig 5+) or MusaLCEforLive (Live 11+).
  3. Install the VSCode extension from the Marketplace:
    code --install-extension javier-sy.musa-lce-client-for-vscode
  4. Start the server from a terminal:
    musalce-server bitwig    # or: musalce-server live
  5. Open a .rb file in VSCode and send code with Ctrl+Alt+Enter.

Ableton Live setup

Live's MIDI Remote Script API does not expose transport directly to the server, so MusaLCE drives Live's tempo through a virtual MIDI bus:

  • On macOS: enable an IAC Driver bus in Audio MIDI Setup.
  • On Windows: install loopMIDI.
  • On Linux: load the snd-virmidi kernel module.

Then in your score: daw.midi_sync('IAC Driver Bus 1'). Live syncs to the clock through that bus. See the MusaLCEforLive README for the full walkthrough.

Standalone workflow

For SuperCollider, Max/MSP, OSC apps or custom hardware, build your own main.rb with sequencer, clock, transport and voices, and start Musa::REPL::REPL.new(binding) inside the sequencer DSL context. The VSCode extension connects on localhost:1327 regardless of which REPL is on the other end.

Worked example with a Tidal-Cycles-style d(n) / hush / solo API: musadsl-demo/_demo-13-live-coding.

Documentation

Project README API Docs
musalce-server README API
Architecture reference architecture.md
REPL subsystem (standalone) repl.md
MusaLCE Client for VSCode README
MusaLCEforBitwig README
MusaLCEforLive README

Author

MusaLCE is created and maintained by yeste.studio, exploring the intersection of sound, music, technology, and algorithmic composition. It is part of the MusaDSL family of projects.

LGPL 3.0 License

All source code is available on GitHub.