41 Blackbird

DeepUsefulscriptingcrowcvutilitymidimidi-devicemidi-hostusb-host

Blackbird runs crow-compatible Lua scripts over USB serial and can also store scripts on card flash. Panel control behavior is script-defined: Lua code reads bb.knob.*, bb.switch.position, and inputs, then decides how outputs respond. Scripts can send and receive USB MIDI and I2C messages for added connectivity. Version 1.2 has dramatically improved performance as well as addressing a bunch of requests and bugs that were reported in version 1.1.

WatchDemo video

Panel

Basics panel

Blackbird basics

Blackbird speaks the same language as monome crow: it runs crow's Lua scripts, and anything that talks to crow over USB (druid, web-druid, norns, Max for Live) talks to blackbird the same way, without knowing the difference. Crow's documentation and script reference apply as they are, with the jacks mapped as shown here.

Getting started

  1. Connect the Computer's USB to a computer and open web-druid (or druid). Wait until blackbird has started: its welcome message appears and the bottom-left LED flashes.
  2. Type Lua at the prompt, for example output[1].volts = 3.
  3. Upload a script with druid's u (saved to the program card and run at power-up) or r (run without saving). It starts straight away. Make the first line start with --- to name it: the name is printed at startup.

With no script uploaded, blackbird runs First.lua, crow's "unique melody box".

Jacks

Lua Jack
input[1], input[2] CV In 1, 2 crow's inputs: .volts, stream, change, window, freq, ...
output[1], output[2] CV Out 1, 2 crow's outputs, calibrated
output[3], output[4] Audio Out 1, 2 crow's outputs, not calibrated: best for audio-rate ASL and envelopes
bb.audioin[1], bb.audioin[2] Audio In 1, 2 .volts, read only
bb.pulsein[1], bb.pulsein[2] Pulse In 1, 2 .state and change callbacks (pulse inputs)
bb.pulseout[1], bb.pulseout[2] Pulse Out 1, 2 :high(), :low(), pulse() actions and :clock(division) (pulse outputs)
bb.knob.main, .x, .y Main, X, Y knobs 0 to 1 (knobs and switch, knobs in ASL)
bb.switch.position Z switch 'up', 'middle' or 'down', with a bb.switch.change callback

The knobs and switch do nothing until a script uses them. The LEDs always show the outputs: the four CV and audio outputs light with their positive voltage, and the pulse output LEDs while the pulse is high.

Blackbird extras

  • bb.noise(level): an ASL action that generates noise in the audio loop, for example output[4](bb.noise(0.5)).
  • bb.asap: a function run as often as possible on the control thread, for following knobs smoothly. Keep it light. bb.asap = nil stops it.
  • bb.connected: whether a cable is plugged into each input (cv1, cv2, pulse1, pulse2, audio1, audio2), from the Computer's normalisation probe.
  • MIDI over USB, as a device or a host: see the MIDI tab.
  • ii (I2C) on the Computer's UART pads: see the ii tab.

More

README

Blackbird v1.2

A program card for the Music Thing Modular Workshop Computer that speaks the same language as monome crow. It runs crow's Lua scripts, and anything that talks to crow over USB talks to blackbird the same way:

  • Live code from druid or web-druid on a computer.
  • Connect a monome norns over USB and run norns scripts that use crow (try awake, buoys, loom ... many also let you use a monome grid).
  • Use Max/MSP or Max for Live with monome's crow devices, or your own Max patches.
  • Write your own scripts in Lua 5.4 and upload them with druid's u command. They start straight away and are saved to flash on the physical card itself, so you can keep several blackbird cards with different scripts and swap them.

Crow's documentation and examples apply as they are. Blackbird adds the Computer's knobs, switch and pulse jacks in the bb namespace: see Basics for the jack mapping and how to get started.

What's new in 1.2

  • MIDI over USB: send and receive MIDI from Lua (the same functions as monome iii). Connected to a computer, blackbird is a USB MIDI device; plug a class-compliant controller into the Computer and it's a USB MIDI host. MIDI clock sync and MPE too. See the MIDI API.
  • ii (I2C): wire the Computer's UART pads to an ii bus and blackbird talks to Just Friends, crow, Teletype expanders and more, with crow's ii syntax, and answers as crow 4. See ii.
  • Outputs: audio-rate ASL (lfo, oscillate, nb_drumcrow's voices) stays in tune, clocks and metros keep time while a script is busy, slopes can be very long, and the over, under and rebound shapes are in.
  • Scripts: uploads start straight away with no reset, ^^k always recovers (even from a script that used up all the memory), each new script starts with all the memory, metro[8] works, and metros honor count.
  • Single-file UF2s with a built-in script, for sharing patches (see UF2 script injection).

If you use monome's crow devices in Max for Live: blackbird now shows up as a MIDI device as well as a serial port, so you may need to pick it in the device's menu again once.

Documentation

Talking to blackbird from your own software

Blackbird uses crow's USB serial protocol, so any serial host works (tested with druid, norns, Max/MSP and pyserial):

  • A line starting with ^^ is a command (^^k stops the script, ^^v prints the version, ...); anything else is run as Lua.
  • A newline ends a line; send multi-line code between triple backticks (```).
  • print() output and replies come back over the same port.

Wait for blackbird's welcome message before sending anything after power-up.

Credits & Thank yous

Written by Dune Desormeaux / @dessertplanet, 2025

Special thanks to:

  • Tom Whitwell for the Workshop System
  • Chris Johnson for the ComputerCard framework
  • Brian Crabtree and Trent Gill (monome & Whimsical Raps) for the original crow and the open source crow firmware
  • Zack Scholl (infinitedigits) for encouragement and proving Lua can work on RP2040 with his midi-to-cv project
  • Ben Regnier (Q*Ben) for extensive testing, feedback, and hard work on porting bowery scripts over to bbbowery

License

GPLv3 or later - see LICENSE file for details.

About this card

Creator
Dune Desormeaux
Language
C++ (Pico SDK + ComputerCard) + Lua
Version
1.2
Status
Released
License
GPLv3 or later
Created
2025-11-10
Updated
2026-10-22

Notes

crow hosts (druid, web-druid, norns, Max for Live): Live code, upload scripts, or run norns and Max patches that use crow

USB MIDI device: Connected to a computer, blackbird is also a MIDI device

USB MIDI host: A class-compliant MIDI controller plugged into the Computer

USB device or host mode is chosen at power-up: power the whole system off and on to switch.

Data sources

releases/41_blackbird/info.yaml, releases/41_blackbird/README.md

Verify your download

Confirm the file you downloaded really is that new firmware.

macOS / Linux (Terminal)

shasum -a 256 firmware.uf2

Linux also has sha256sum firmware.uf2.

Windows (PowerShell)

Get-FileHash firmware.uf2 -Algorithm SHA256

Compare the result to the SHA256 on the website — it should match exactly.