Zene Studio

Advanced guide

Driving Zene Studio from another program

A first script against the control socket — start the session, discover commands, make one change safely.

About 20 min Verified against 0.3.0-alpha Updated

This guide takes you from a socket that exists to a script you can undo. It assumes you are comfortable in a terminal.

1. Start a session with a socket

zene --control-socket /tmp/zene.sock

Opt-in and off by default — without this flag there is no socket at all.

2. Find out what you can call

Never guess. Ask:

echo '{"command":"control.commands_list"}' | nc -U ~/.zene/session.sock

You get every command with its schema and its reversibility class.

3. Understand the reversibility class before you call

ClassMeaning
not_mutatingRead-only. Safe to poll.
snapshotCapture state first if you need to restore it.
true_inverseUndoable by running the inverse.
irreversibleCannot be undone. Confirm with a human first.

There are 13 irreversible commands out of 340. Know which ones they are before you automate anything.

4. Make one safe change

Start with a not_mutating command — a read. Once you trust the round trip, make a small write and immediately undo it:

# Undo reaches the same history as Ctrl+Z in the GUI.
echo '{"command":"control.undo"}' | nc -U ~/.zene/session.sock

That property is the safety net. A scripted edit and a manual edit are the same kind of thing.

5. Handle honest refusals

mixer.set_pan refuses every call. A mixer channel in this tree has no pan property.

Treat refusals as a normal outcome:

  • log them,
  • branch on them,
  • never retry in a loop.

6. Automate something real

At this point you can build the automation other DAWs make you do by hand. Batch fades, routing changes, and renders across a set of projects are all within reach.

Two rules:

  1. Snapshot before bulk operations. A hundred true_inverse commands are individually safe and collectively hard to reason about.
  2. Do it on a scratch project first.

That is the guide

If a step did not work, that is worth reporting — a guide that no longer matches the software is one of the most useful bugs anybody can file.

Help keep Zene Studio free

Developing Zene Studio costs money.

There is no paid tier and no advertising, so donations are what keep it going. If it is useful to you, please give what you can.