XOXO Studio

Plug-ins

XOXO Studio is open. A plug-in is a folder with a manifest and a Python file: it can add sound sources, MIDI devices, its own screen on the Studio and its own part of the web app. Ours are below, and anyone can write one. Build something, and we'll list it here.

From XOXO Audio Labs

GPL-3.0 · API 1

From the community

Anyone's

Yours goes here.

No one else's yet: the Studio is brand new. Build one, put it on GitHub, and send us the link. We'll list it here with your name on it.

Build one

Python · API 1

A plug-in is a folder: plugin.json says what it is, and its Python file has a setup(studio) the Studio calls when the plug-in is switched on. studio is its only door into the Studio, so a plug-in keeps working as the Studio changes underneath.

API 1 stays stable. New calls get added to it (a plug-in checks for them with hasattr, so it still runs on an older Studio); anything that would break a plug-in becomes API 2, and API 1 stays supported for a while beside it.

The best way in is to read ours: Tester Tools is the smallest. The plug-in host's design is in docs/PLUGINS.md. A full guide and an example plug-in are coming after the launch.

my-synth/plugin.json

{
  "id": "my-synth",
  "name": "My Synth",
  "version": "0.1.0",
  "api": 1,
  "author": "You",
  "license": "GPL-3.0",
  "entry": "plugin.py"
}

my-synth/plugin.py a sketch

API = 1

def setup(studio):
    # a USB synth, named in the mixer and the MIDI routes
    studio.add_audio_source(r"minilogue", "MINILOGUE")
    studio.add_midi_device(r"^minilogue", "MINILOGUE")
    studio.on("devices", lambda names: studio.say("Found " + ", ".join(names)))

What a plug-in can do

add_audio_source(match, label)
A sound source in the mixer, found by its PipeWire name
add_sound_source(node, label)
Your own sound process as a mixer channel, like XO-4's
add_midi_device(pattern, name)
A MIDI device, named in the routes
midi_devices(), send_midi(device, msgs)
The MIDI devices, and MIDI sent to one as a route would
add_screen(label, screen)
A 480×320 screen of its own under MORE › PLUG-INS, drawn with the Studio's widgets
add_web(status, commands)
Fields in the web app and commands it can send
on("tick" | "devices", fn)
Called about once a second, and when the sound sources change
settings, save(), say(text)
Its own saved settings, and a message on the screen
confirm(title, lines, fn)
The Studio's hold-to-confirm, before anything risky
"library" in plugin.json
Folders of its own files the web app can upload and download

Install one

On the Studio

Plug-ins live in ~/xoxo-plugins/ on the Studio. Clone ours all at once:

mkdir -p ~/xoxo-plugins && git clone https://github.com/xoxoaudiolabs/XOXO-Studio-Plugins ~/xoxo-plugins/XOXO-Studio-Plugins

or copy one plug-in's folder across from a computer:

scp -r synths YOUR_USER@xoxostudio.local:~/xoxo-plugins/

Then on the Studio's screen, MORE › PLUG-INS, and tap the plug-in's OFF to switch it on.

Before you switch one on

A plug-in is code that runs as the Studio does, with its access to your files and the network. The Studio only runs plug-ins someone has switched on, and asks first. Only switch on ones you trust.

If a plug-in raises an error, the Studio switches it off, says so on the screen, and carries on.