CLI Reference

rnz

A CLI bridge that lets AI coding agents like Claude Code read, understand, and modify Renoise songs over UDP. Analyze patterns, write notes, load samples, add effects, automate parameters, and build full arrangements — programmatically.

# Clone and build
git clone https://github.com/juliarvalenti/rnz.git
cd rnz && pnpm install && pnpm run build

# Install the Renoise tool (symlink)
ln -s "$(pwd)/renoise/com.rnz.Bridge.xrnx" \
  ~/Library/Preferences/Renoise/V3.5.0/Scripts/Tools/com.rnz.Bridge.xrnx

# Reload tools in Renoise, then:
rnz ping

Commands

play

Start playback

rnz play

stop

Stop playback

rnz stop

bpm

Get or set BPM

rnz bpm [value]
ArgumentDescription
value optionalBPM to set (omit to read)

lpb

Get or set lines per beat

rnz lpb [value]
ArgumentDescription
value optionalLPB to set (omit to read)

new

Create a new empty song

rnz new

load

Load a song file

rnz load <path>
ArgumentDescription
path requiredPath to .xrns file

automate

Create a linear automation sweep on a device parameter

rnz automate <pattern> <track> <device> <param> <from> <to>
ArgumentDescription
pattern requiredPattern index
track requiredTrack index
device requiredDevice index
param requiredParameter name
from requiredStart value (0-1)
to requiredEnd value (0-1)

sequence-add

Add a pattern to the sequence

rnz sequence-add
OptionDescription
--position <pos>Insert position (default: end)
--pattern <pat>Existing pattern number to reference
--lines <lines>Pattern length for new patterns

sequence-remove

Remove a position from the sequence

rnz sequence-remove <position>
ArgumentDescription
position requiredSequence position to remove

song

Show song info

rnz song

tracks

List all tracks

rnz tracks

instruments

List all instruments

rnz instruments

sequence

Show the pattern sequence order

rnz sequence

ping

Check if Renoise bridge is running

rnz ping

eval

Execute Lua code in Renoise and return the result

rnz eval <code>
ArgumentDescription
code requiredLua code to evaluate (must return a value)

pattern

Read/write pattern data

pattern length

Get or set pattern length in lines

rnz pattern length <pattern> [lines]
ArgumentDescription
pattern requiredPattern index (1-based)
lines optionalNumber of lines to set (omit to read)

pattern read

Read pattern track data as JSON

rnz pattern read <pattern> <track>
ArgumentDescription
pattern requiredPattern index (1-based)
track requiredTrack index (1-based)
OptionDescription
--compactOnly show non-empty lines
--from <line>Start line (1-based)
--to <line>End line (1-based)

pattern write

Write pattern track data from stdin JSON

rnz pattern write <pattern> <track>
ArgumentDescription
pattern requiredPattern index (1-based)
track requiredTrack index (1-based)

pattern clear

Clear a pattern track

rnz pattern clear <pattern> <track>
ArgumentDescription
pattern requiredPattern index (1-based)
track requiredTrack index (1-based)

pattern clone

Clone a pattern in the sequence

rnz pattern clone [position]
ArgumentDescription
position optionalSequence position to clone (default: last)

pattern copy-track

Copy a track from one pattern to another

rnz pattern copy-track <src-pattern> <src-track> <dest-pattern> <dest-track>
ArgumentDescription
src-pattern requiredSource pattern index
src-track requiredSource track index
dest-pattern requiredDestination pattern index
dest-track requiredDestination track index

track

Track operations

track mute

Mute a track

rnz track mute <track>
ArgumentDescription
track requiredTrack index (1-based)

track unmute

Unmute a track

rnz track unmute <track>
ArgumentDescription
track requiredTrack index (1-based)

track solo

Solo a track

rnz track solo <track>
ArgumentDescription
track requiredTrack index (1-based)

track name

Get or set track name

rnz track name <track> [name]
ArgumentDescription
track requiredTrack index (1-based)
name optionalName to set (omit to read)

track add

Add a new sequencer track

rnz track add <name>
ArgumentDescription
name requiredTrack name

track devices

List DSP devices on a track

rnz track devices <track>
ArgumentDescription
track requiredTrack index (1-based)

track fx-list

List available native effects

rnz track fx-list <track>
ArgumentDescription
track requiredTrack index (1-based)

track add-fx

Add a DSP effect to a track

rnz track add-fx <track> <device>
ArgumentDescription
track requiredTrack index (1-based)
device requiredDevice path (from fx-list)
OptionDescription
--position <pos>Insert position

track rm-fx

Remove a DSP effect from a track

rnz track rm-fx <track> <device>
ArgumentDescription
track requiredTrack index (1-based)
device requiredDevice index (1-based)

track fx-params

Show parameters of a DSP device

rnz track fx-params <track> <device>
ArgumentDescription
track requiredTrack index (1-based)
device requiredDevice index (1-based)

track set-fx

Set a DSP device parameter

rnz track set-fx <track> <device> <param> <value>
ArgumentDescription
track requiredTrack index (1-based)
device requiredDevice index (1-based)
param requiredParameter name
value requiredValue to set

instrument

Instrument operations

instrument copy

Copy an instrument to another slot

rnz instrument copy <src> <dst>
ArgumentDescription
src requiredSource instrument index
dst requiredDestination instrument index

instrument clear

Clear an instrument

rnz instrument clear <instrument>
ArgumentDescription
instrument requiredInstrument index

instrument add

Add a new instrument

rnz instrument add [name]
ArgumentDescription
name optionalInstrument name
OptionDescription
--position <pos>Insert position

instrument macro

Get or set instrument macros

rnz instrument macro <instrument> [macro] [value]
ArgumentDescription
instrument requiredInstrument index
macro optionalMacro index 1-8 (omit to list all)
value optionalValue to set (0-1)

instrument set

Set an instrument property (volume, trigger_options.monophonic, phrase_playback_mode, etc.)

rnz instrument set <instrument> <prop> <value>
ArgumentDescription
instrument requiredInstrument index
prop requiredProperty path (dot notation for nested)
value requiredValue to set

instrument rm-mod

Remove a modulation device from an instrument

rnz instrument rm-mod <instrument> <device>
ArgumentDescription
instrument requiredInstrument index
device requiredDevice index (1-based)
OptionDescription
--set <set>Modulation set index (default: 1) (default: 1)

instrument name

Get or set instrument name

rnz instrument name <instrument> [name]
ArgumentDescription
instrument requiredInstrument index (1-based)
name optionalName to set (omit to read)

instrument show

Show instrument details including ADSR and modulation

rnz instrument show <instrument>
ArgumentDescription
instrument requiredInstrument index (1-based)

instrument modulations

List available modulation devices for an instrument

rnz instrument modulations <instrument>
ArgumentDescription
instrument requiredInstrument index (1-based)
OptionDescription
--set <set>Modulation set index (default: 1) (default: 1)

instrument add-mod

Add a modulation device to an instrument

rnz instrument add-mod <instrument> <device>
ArgumentDescription
instrument requiredInstrument index (1-based)
device requiredDevice name (from 'instrument modulations')
OptionDescription
--set <set>Modulation set index (default: 1) (default: 1)
--target <target>Target: volume|pan|pitch|cutoff|resonance|drive (default: volume) (default: volume)
--position <pos>Insert position

instrument filter

Get or set the modulation filter type

rnz instrument filter <instrument> [type]
ArgumentDescription
instrument requiredInstrument index (1-based)
type optionalFilter type to set (omit to list available)
OptionDescription
--set <set>Modulation set index (default: 1) (default: 1)

instrument mod-info

Show a modulation device's parameters and properties

rnz instrument mod-info <instrument> <device>
ArgumentDescription
instrument requiredInstrument index (1-based)
device requiredDevice index (1-based)
OptionDescription
--set <set>Modulation set index (default: 1) (default: 1)

instrument set-param

Set a modulation device parameter

rnz instrument set-param <instrument> <device> <param> <value>
ArgumentDescription
instrument requiredInstrument index (1-based)
device requiredDevice index (1-based)
param requiredParameter name
value requiredValue to set
OptionDescription
--set <set>Modulation set index (default: 1) (default: 1)

instrument set-prop

Set a modulation device property (e.g. tempo_synced)

rnz instrument set-prop <instrument> <device> <prop> <value>
ArgumentDescription
instrument requiredInstrument index (1-based)
device requiredDevice index (1-based)
prop requiredProperty name
value requiredValue to set (true/false/number)
OptionDescription
--set <set>Modulation set index (default: 1) (default: 1)

sample

Sample operations

sample index

Recursively index a sample directory and write samples.md

rnz sample index <path>
ArgumentDescription
path requiredRoot directory to crawl
OptionDescription
-o, --output <file>Output file path (default: samples.md)

sample browse

Browse filesystem for samples

rnz sample browse <path>
ArgumentDescription
path requiredDirectory path to browse

sample load

Load a sample file into an instrument

rnz sample load <instrument> <path>
ArgumentDescription
instrument requiredInstrument index (1-based)
path requiredPath to sample file
OptionDescription
--slot <slot>Sample slot (default: append)
--name <name>Name for the sample

sample map

Map a sample slot to a single note (for drumkits)

rnz sample map <instrument> <slot> <note>
ArgumentDescription
instrument requiredInstrument index (1-based)
slot requiredSample slot (1-based)
note requiredNote to map to (e.g. C-4, D-4, F#4)

sample info

Show sample properties and audio info

rnz sample info <instrument>
ArgumentDescription
instrument requiredInstrument index
OptionDescription
--slot <slot>Sample slot (default: 1) (default: 1)

sample add

Add an empty sample slot to an instrument

rnz sample add <instrument> [name]
ArgumentDescription
instrument requiredInstrument index
name optionalSample name

sample set

Set a sample property (loop_mode, transpose, fine_tune, beat_sync_enabled, beat_sync_lines)

rnz sample set <instrument> <prop> <value>
ArgumentDescription
instrument requiredInstrument index
prop requiredProperty name
value requiredValue to set
OptionDescription
--slot <slot>Sample slot (default: 1) (default: 1)

sample save

Save a sample to a WAV file

rnz sample save <instrument> <path>
ArgumentDescription
instrument requiredInstrument index
path requiredOutput file path
OptionDescription
--slot <slot>Sample slot (default: 1) (default: 1)

sample analyze

Analyze a sample — transient detection, energy profile (JSON output)

rnz sample analyze <instrument>
ArgumentDescription
instrument requiredInstrument index (1-based)
OptionDescription
--slot <slot>Sample slot (default: 1) (default: 1)
--window <ms>Analysis window in ms (default: 10)
--threshold <t>Transient detection threshold (RMS jump ratio) (default: 2.0)

Notation Guide

The gen commands use a notation inspired by pattrns and Tidal Cycles.

Notes

Notes are written as name + octave: c4, eb5, f#3. Use off for note-off and ~ for rest.

rnz gen notes 1 1 "c4  e4  g4  c5" --unit 1/4

Chords

Append a chord type with '. These expand to multi-column note data automatically.

SyntaxChordIntervals
c4'MC major0, 4, 7
c4'mC minor0, 3, 7
c4'7C dominant 70, 4, 7, 10
c4'M7C major 70, 4, 7, 11
c4'm7C minor 70, 3, 7, 10
c4'dimC diminished0, 3, 6
c4'augC augmented0, 4, 8
c4'sus2C sus20, 2, 7
c4'sus4C sus40, 5, 7
# Write a chord progression across the whole pattern
rnz gen progression 1 1 "f3'm  db3'M  ab3'M  eb3'M"

Note Properties

Add properties after the note, separated by spaces. Use double-space or | to separate events.

PropertyExampleDescription
vc4 v0.8Volume (0–1 → 00–80 hex)
dc4 d0.5Delay (0–1 → 00–FF hex)
#c4 #02Instrument number
rnz gen notes 1 1 "c4 v0.8  e4 v0.5  g4 v0.9" --unit 1/8

Pulse Strings

Define rhythms with x (hit) and . (rest), or use euclidean shorthand.

# x = hit, . = rest
rnz gen drums 1 2 --kick "x..x..x." --snare "....x..." --hat "xxxxxxxx"

# Euclidean rhythms: e(hits, steps)
rnz gen drums 1 2 --kick "e(3,8)" --snare "e(2,8)" --hat "e(5,8)"

# Preview a euclidean pattern
rnz gen euclidean 5 16
# → x..x..x..x..x...

Scales

Preview scale notes for composing melodies.

rnz gen scale f minor
# → F-4 G-4 G#4 A#4 C-5 C#5 D#5

rnz gen scale c pentatonic
# → C-4 D-4 E-4 G-4 A-4

Available scales: major, minor, dorian, phrygian, lydian, mixolydian, aeolian, locrian, pentatonic, minor-pentatonic, blues, chromatic, whole-tone.

Timing

The --unit flag controls how many lines each step occupies, relative to LPB.

UnitAt 8 LPBDescription
1/132 linesWhole note
1/216 linesHalf note
1/48 linesQuarter note (1 beat)
1/84 linesEighth note
1/162 linesSixteenth note
1/321 line32nd note

Architecture

rnz has two parts: a TypeScript CLI that AI agents or humans invoke, and a Renoise Lua tool that runs a UDP server inside the DAW. The CLI sends JSON commands, the Lua tool executes them against the Renoise API, and returns results. Handlers are hot-reloaded on every request.

┌──────────┐    JSON/UDP:9876    ┌──────────────────┐
  rnz CLI  │ ──────────────── │ Renoise Lua Tool 
 TypeScript │ ◀──────────────── │   UDP server     
└──────────┘                    └──────────────────┘

Commands are colocated — each has a command.ts (CLI) and handler.lua (Renoise) in the same folder. Handlers are hot-reloaded on every request, so changes take effect immediately without restarting Renoise.