Node Reference
Who this is for: Ableton producers who want to know which node to use — without reading code.
What this is not: A list of every port ID. For exact port names and types, see the Node Catalog (generated).
How to use this page: Start with How to read a node entry, pick your trigger, then find building blocks or Live-object nodes for your idea. Use Workflow recipes when you want a full pattern, and Validation rules when Build fails.
How to read a node entry
Every node in Patchwright is a box on the canvas. Each entry in this reference uses the same shape so you can scan quickly.
Ports (connection points)
| Port kind | What it means | How you use it |
|---|---|---|
| Run | Control flow — what runs next | Connect Run → Run to chain steps in order |
| Data | A value — clip, track, number, text, note list, … | Connect only when types match |
| target (triggers only) | The Live object you right-clicked | Wire into clip, track, device, or other object inputs |
Run wires define order: trigger → dialog → undo group → setters and actions.
Data wires feed values into nodes that need them. Many nodes have no Run input — they only supply data (getters, math, transpose, note builders).
Settings vs wires
Each node can show settings in the inspector (numbers, text, toggles, dropdowns).
| Use settings when… | Use wires when… |
|---|---|
| The value is fixed (semitones, default name, color index) | The value comes from what you clicked |
| You picked an enum (warp mode, device name) | The value comes from another node (dialog, getter, logic) |
| You are prototyping quickly | You need the full list of notes or tracks from Live |
Rule: Object inputs (clip, track, song, device) must be wired. Leaving them empty causes a build error.
Node entry sections
When this reference describes a category or node, you will see:
| Section | Meaning |
|---|---|
| What | What the node does in plain language |
| When | Typical producer use cases |
| Connect | What to wire in and out |
| Mistakes | Common errors and how to avoid them |
Symbols in the A–Z index
| Symbol | Meaning |
|---|---|
| ⚡ | Has Run input — part of a step chain |
| 📖 | Data only — no Run wire needed |
| 🔄 | Async — Live may take a moment; Patchwright waits for you |
| 🎯 | Trigger — starts a command |
Triggers
Every extension needs at least one When you right-click… trigger. The trigger decides:
- Where your command appears in Live’s right-click menu
- What object you clicked — available on the trigger’s target output
When the user picks your command, the trigger’s Run output fires and your chain begins.
Important: You can place several triggers in one project. Each trigger becomes its own menu item in Live — for example
My Tools: On MIDI ClipandMy Tools: On MIDI Trackare two separate commands. They do not share a Run chain unless you deliberately wire them together (unusual).
Quick picker
| You want to change… | Start with this trigger |
|---|---|
| Notes, name, or color of a MIDI clip | On MIDI Clip |
| Warp, file path, or audio clip properties | On Audio Clip |
| Devices, volume, or clips on a MIDI track | On MIDI Track |
| Same, but on an audio track | On Audio Track |
| Scene name or scene tempo | On Scene |
| Create or clear a slot before a clip exists | On Clip Slot |
| Work on a time range you selected in Arrangement | On MIDI Arrangement Selection or On Audio Arrangement Selection |
| Drum rack pads and chains | On Drum Rack |
| Simpler sample swap | On Simpler |
| Browser sample file | On Sample |
On MIDI Clip
| Live location | Right-click a MIDI clip in Session or Arrangement |
| Target type | MidiClip |
| Example uses | Transpose or quantize notes; rename or recolor clip; stamp chord patterns; read/write the full note list |
Connect: Wire target into every node that needs “this clip.” Wire Run into your first step (dialog, Transaction, or setter).
Mistakes: Using this trigger for audio clips — use On Audio Clip instead. Using generic clip getters for notes — use MidiClip notes get/set nodes.
On Audio Clip
| Live location | Right-click an audio clip |
| Target type | AudioClip |
| Example uses | Read file path; toggle warping; change warp mode; rename or recolor (clip setters work on any clip) |
Connect: target → AudioClip or Clip inputs. Run → your chain.
Mistakes: Expecting MIDI note editing — audio clips have no piano-roll notes.
On MIDI Track
| Live location | Right-click a MIDI track header or track area |
| Target type | MidiTrack |
| Example uses | Insert device; create MIDI clip in arrangement; mute/arm/solo; loop over clip slots |
Connect: target → track actions and track getters. For song-wide create track, add Song context instead of only target.
Mistakes: Using for a single clip — right-click the clip and use On MIDI Clip.
On Audio Track
| Live location | Right-click an audio track |
| Target type | AudioTrack |
| Example uses | Import audio clip; insert effect; render pre-FX audio via Resources; device chain edits |
Connect: target → audio track nodes. Song context when you need create/duplicate at song level.
Mistakes: Creating MIDI clips on an audio track — use On MIDI Track or create a MIDI track first.
On Clip Slot
| Live location | Right-click an empty or filled clip slot in Session view |
| Target type | ClipSlot |
| Example uses | Create new MIDI or audio clip in that slot; delete slot clip; read which clip is in the slot |
Connect: target → ClipSlot getters and create/delete actions.
Mistakes: Confusing with On Clip-Slot Selection (multi-slot selection) — pick the one that matches how you right-click.
On Clip-Slot Selection
| Live location | Right-click when you have a clip-slot selection (multiple slots selected) |
| Target type | ClipSlotSelection |
| Example uses | Batch operations on a user-defined slot selection |
Connect: target → selection-specific workflows from templates or PatchAI.
Mistakes: Using when you only care about one slot — On Clip Slot is simpler.
On MIDI Arrangement Selection
| Live location | Right-click a time-range selection on a MIDI track in Arrangement |
| Target type | ArrangementSelection |
| Example uses | Process only the bars the user highlighted; clear clips in range |
Connect: target → selection-aware actions (often combined with track/clip getters).
Mistakes: Using without an actual arrangement selection — the command only appears in the right context.
On Audio Arrangement Selection
| Live location | Right-click a time-range selection on an audio track in Arrangement |
| Target type | ArrangementSelection |
| Example uses | Same as MIDI arrangement selection, for audio workflows |
Connect: Same pattern as MIDI arrangement selection.
Mistakes: Mixing MIDI note tools into audio selection workflows.
On Scene
| Live location | Right-click a scene row in Session view |
| Target type | Scene |
| Example uses | Rename scene; read scene tempo and time signature; duplicate scene via Song |
Connect: target → Scene getters/setters. Use Song context to create or delete scenes.
Mistakes: Expecting track-level device access — use a track trigger for that.
On Drum Rack
| Live location | Right-click a Drum Rack device |
| Target type | DrumRack |
| Example uses | Walk chains; map receiving notes; insert devices on drum chains |
Connect: target → DrumRack and chain nodes. Often combined with For Each over chains.
Mistakes: Treating like a normal Instrument Rack without using chain-specific nodes.
On Simpler
| Live location | Right-click a Simpler device |
| Target type | Simpler |
| Example uses | Replace sample; read current sample file path |
Connect: target → Simpler get/action nodes. File path often comes from dialog or sandbox files.
Mistakes: Using On Sample when you meant the device in a track — On Simpler targets the device instance.
On Sample
| Live location | Right-click a sample in Live’s browser or sample context |
| Target type | Sample |
| Example uses | Read sample file path; metadata workflows tied to browser samples |
Connect: target → Sample getters.
Mistakes: Confusing browser sample with Simpler’s loaded sample — use On Simpler for the device.
Patchwright building blocks
These categories are Patchwright’s toolbox — not Live objects. They control flow, math, music, UI, files, and the web.
Flow
Flow nodes answer: in what order should things run, and how does undo work?
Transaction (one undo step)
| What | Groups every mutating step inside it into one undo in Live |
| When | Rename and recolor; multiple setters; any “one gesture, one undo” tool |
| Connect | Run in from trigger (or dialog). Body out → first setter/action. Chain Body through all mutations inside the group |
| Mistakes | Putting Show Dialog or Progress Dialog inside Transaction — ask or show progress first, then start Transaction with answers already wired |
Branch (if/else)
| What | Sends Run flow down Then or Else based on true/false |
| When | “Only if clip is muted”; “If user picked Major, else Minor”; gate dangerous actions |
| Connect | Run in; wire a boolean into cond. Then and Else each start their own Run chains |
| Mistakes | Wiring Then and Else into the same next Run input — paths do not merge. Duplicate the final step on each branch |
For Each (bounded)
| What | Runs the body chain once per item in a list (tracks, devices, notes in a list, …) |
| When | Rename every track; mute all except one; process each device |
| Connect | Run in; wire a list into list. Body → per-item steps. Use Current Item inside the body for “this track/device” |
| Mistakes | Forgetting Current Item — only the first item changes. Unbounded lists — list must be concrete (e.g. from get tracks) |
Repeat (bounded)
| What | Runs the body a fixed number of times (max 1000) |
| When | Generate N bars; stamp a pattern N times; test loops with a known count |
| Connect | Set count in settings. Run in → Body → actions |
| Mistakes | Trying to repeat “until user stops” — extensions cannot run forever |
Delay (bounded)
| What | Waits up to one hour (milliseconds), then continues |
| When | Short pause between async steps; pacing inside progress UI |
| Connect | Run in → Run out on the same chain |
| Mistakes | Using as a background timer — not allowed in extensions |
Parallel (all)
| What | Runs two Run branches at the same time, waits for both, then continues |
| When | Two independent async actions that do not touch the same object |
| Connect | parallelA and parallelB each get a chain; both must finish before Run out |
| Mistakes | Parallel edits to the same clip or track — race conditions and odd undo behavior |
Switch enum
| What | Like Branch, but picks a Run path based on a string match (e.g. warp mode name) |
| When | Multiple discrete choices from a getter or dialog |
| Connect | Wire value from getter; configure match arm in settings |
| Mistakes | Using for free-form text — use String includes + Branch instead |
Try / Catch
| What | Runs try chain; if something throws, runs catch instead |
| When | Optional file read; HTTP where failure should not crash the whole command |
| Connect | try → risky steps; catch → user message or fallback |
| Mistakes | Expecting Catch to fix unwired obj inputs — build still fails before Live runs |
Context
Context nodes give you entry points into Live’s object model. They have no Run wire — only a value output.
| Node | What you get | When you need it |
|---|---|---|
| Song (current Set) | The whole Set — tracks, scenes, tempo, scale | Create track; list all tracks; set master tempo |
| Application | Top-level Live app → Song | Rare; usually use Song directly |
| Environment | Language, storage folder, temp folder | Build sandbox paths for file nodes |
| Resources | Import files; render pre-FX audio | Import audio/MIDI into project; bounce track slice |
| Commands | Live’s command registry | Advanced; see Execute Command — you usually do not need to wire this |
| UI | Show modal web UI in Live | Custom HTML panels via show modal dialog action |
Connect: Context value → obj on getters and actions that need that scope. Song → get tracks → For Each, etc.
Mistakes: Forgetting Song on create-track graphs. For Resources actions (import into project, render pre-FX audio), you must wire Resources context into the action’s obj input — the action will not guess it.
Logic
Logic nodes compute numbers, booleans, text, and lists without touching Live until you connect results to setters.
Numbers
| Node | What |
|---|---|
| Add (+) | Add two numbers |
| Subtract (−) | Subtract |
| Multiply (×) | Multiply |
| Divide (÷) | Divide |
| Modulo (%) | Remainder after division |
Use for semitone offsets, color indices, bar math, progress counters.
Compare (numbers only)
| Node | What |
|---|---|
| Equals (=) | True when two numbers are equal |
| Less (<) | a < b |
| Greater (>) | a > b |
| ≤ | a ≤ b |
| ≥ | a ≥ b |
Important: Equals is for numbers only. There is no string equals node. To compare text, use String includes, Slice string, or branch on dialog choices — not Equals.
Booleans
| Node | What |
|---|---|
| And (&&) | Both true |
| **Or ( | |
| Not (!) | Flip true/false |
Text
| Node | What |
|---|---|
| Concat strings | Join two strings |
| Replace string | Find and replace substring |
| Slice string | Cut part of a string (start/end index) — use for prefixes, suffixes, “equals”-style checks when combined with includes |
| Split string | Split into a list by separator |
| Trim string | Remove whitespace |
| To lower / upper case | Change case |
| String includes | True if a contains b |
Lists
| Node | What |
|---|---|
| Length | Count items in a list or characters in a string |
| Index ([i]) | Pick one list item by index |
| Map | Transform each list item |
| Filter | Keep items that match a condition |
| Current Item | Inside For Each, the item for this iteration |
JSON
| Node | What |
|---|---|
| Parse JSON | Text → object (e.g. dialog result) |
| Stringify JSON | Object → text |
| JSON get key | Read one field from an object |
| Pick keys | Keep only listed keys |
Other
| Node | What |
|---|---|
| Nullish coalesce | Use backup value when first is empty |
Mistakes: Equals on clip names — use String includes or compare Length after Slice. Filter without a real list — wire get tracks or note list first.
Notes
Notes nodes build one note or a list of notes for set MidiClip notes.
| Node | What | When |
|---|---|---|
| Note | One MIDI note (pitch, start, length, velocity, muted) | Build a pattern note by note |
| Note List | Gathers up to eight wired Note outputs into one list | Feed set notes after building chords |
Connect: get MidiClip notes → Transpose / Quantize / Chord → set MidiClip notes. Or Note → Note List → set notes.
Mistakes: set notes replaces the entire clip — always wire the full processed list, not a partial one. Using generic Clip getters for MIDI editing — use MidiClip notes only.
Music
Music nodes understand pitch and rhythm on note lists.
| Node | What | When |
|---|---|---|
| Transpose | Shift every note by N semitones | Quick transpose tool; dialog-driven interval |
| Quantize | Snap note starts to a grid | Clean up recorded MIDI |
| Chord (scale-aware) | Build chord or arpeggio notes from root + intervals | Harmonic tools; scale-aware stamping |
| Chord/Arp Mode | Pick chord notes or arpeggio notes based on mode string | Templates with chord + arp toggle |
| Pitch class → MIDI | Convert a Live pitch class (0–11) to a MIDI pitch number | Harmonic/scale tools that work in pitch-class space |
Connect: Always between get MidiClip notes and set MidiClip notes (or into Note List).
Mistakes: Quantize with grid 0 — pick a sensible beat fraction. Chord without wiring Song scale getters when you want Live’s current scale — optional but common in templates.
UI
| Node | What | When |
|---|---|---|
| Show Dialog | Opens a dialog you designed; returns what the user entered | Ask semitones, name, confirm before mutate |
Connect: trigger Run → Show Dialog Run → Show Dialog Then → next step. Wire dialog outputs into setters or logic.
Designer: Open Designer on the toolbar (overlay on canvas, not the dock). Save a design, then pick it on the Show Dialog node.
Mistakes: Dialog inside Transaction — move before undo group. Cancel should leave Run chain without mutations (template pattern).
PatchAI keys live in the AI Assistant panel (toolbar PatchAI), not in Settings → API Secrets.
Long task
| Node | What | When |
|---|---|---|
| Progress Dialog | Live progress bar while body chain runs | Many tracks, big note lists, file import, HTTP |
Connect: trigger Run → Progress Dialog Run; body → loop or long work. Keep outside Transaction — same rule as Show Dialog.
Mistakes: Nesting inside undo group. Never updating progress during For Each — wire step counts so the bar moves.
Web
| Node | What | When | |------|------| | HTTP Fetch | GET/POST to an HTTPS URL; returns body text and status | Lyrics API, webhook, download text |
Connect: Run chain through fetch. Wire url (must start with https://). Optional body for POST. Use Settings → API Secrets for named auth headers — not PatchAI keys.
Mistakes: http:// URLs — build fails. Storing secrets in the graph — use API Secrets. Parsing response — add Parse JSON after fetch.
Files
File nodes only touch the extension sandbox (safe storage folders).
| Node | What | When |
|---|---|---|
| Join Path | Combine folder + filename | Build paths from Environment storage/temp |
| Read Text File | Read UTF-8 text from sandbox | Config, lyrics file, CSV |
| Write File | Write text to sandbox | Log, export text sidecar |
Connect: Environment → get storageDirectory / tempDirectory → Join Path → read/write. Run through read/write nodes.
Mistakes: Absolute paths outside sandbox — build fails. .. in paths — not allowed.
Commands
| Node | What | When |
|---|---|---|
| Execute Command | Runs another registered command by ID | Meta-tools; chaining your own commands |
Connect: Run in → Run out. Wire commandId in settings. Optional arg wire passes data to the target command.
Important: Execute Command does not require the Commands context node. Do not add Commands context unless a specific template tells you to.
Mistakes: Calling a command ID that does not exist in your extension — register both triggers first.
Live objects by producer concept
These nodes talk directly to Live. Names match what you see in the Set — Song, Track, Clip, and so on.
Song (the whole Set)
What it is: Your current Live Set — all tracks, scenes, tempo, scale, cue points.
Common getters
| Node | Producer meaning |
|---|---|
| get tracks | Every track in the Set |
| get scenes | Every scene row |
| get tempo | Current project tempo |
| get returnTracks | Return tracks |
| get cuePoints | Locator list |
| get scaleName / scaleIntervals / rootNote / scaleMode | Live’s scale settings |
Common actions
| Node | Producer meaning |
|---|---|
| createMidiTrack | New MIDI track at end |
| createAudioTrack | New audio track |
| createScene | New scene at index |
| duplicateTrack | Copy a track |
| duplicateScene | Copy a scene |
| deleteTrack / deleteScene / deleteCuePoint | Remove items |
| createCuePoint | Add locator |
| set tempo | Change master tempo |
When: You need “all tracks” or “add a track” — not just the one you right-clicked.
Connect: Song context → obj on every Song node. Run through actions.
Mistakes: Using target from a clip trigger when you meant song-wide — add Song context.
Tracks
What it is: A channel in the mixer — MIDI, audio, or return.
Applies to: MidiTrack, AudioTrack, and generic Track nodes where noted.
Common getters
| Node | Producer meaning |
|---|---|
| get name | Track name |
| get devices | Device chain |
| get clipSlots | Session slots on this track |
| get arrangementClips | Arrangement clips |
| get mixer | Volume, pan, sends |
| get arm / mute / solo | Record arm, mute, solo state |
Common setters
| Node | Producer meaning |
|---|---|
| set name | Rename track |
| set arm / mute / solo | Toggle states |
Common actions
| Node | Producer meaning |
|---|---|
| insertDevice | Add device by name at index |
| deleteDevice / duplicateDevice | Remove or copy device |
| createMidiClip (MidiTrack) | New MIDI clip in arrangement |
| createAudioClip (AudioTrack) | Place audio file in arrangement |
| deleteClip | Remove a clip from track |
| clearClipsInRange | Delete clips in time range |
| createTakeLane | Add take lane (comping) |
When: Device chains, track mix state, slot/arrangement clip management.
Connect: target from On MIDI Track / On Audio Track, or Current Item from For Each over get tracks.
Mistakes: insertDevice name must match Live’s device name string exactly.
Clips
What it is: A region of MIDI or audio on a track — Session slot or Arrangement.
MidiClip vs AudioClip vs Clip
| Type | You edit… |
|---|---|
| MidiClip | Piano-roll notes via get/set MidiClip notes |
| AudioClip | File path, warping, warp mode, warp markers |
| Clip (generic) | Name, color, loop points, mute, length markers — works for both MIDI and audio |
Common getters (any clip)
| Node | Producer meaning |
|---|---|
| get name | Clip name |
| get color | Clip color — a 24-bit 0xRRGGBB value (set it with a hex code like #FF0000; not a palette index) |
| get looping / loopStart / loopEnd | Loop brace |
| get muted | Clip mute |
| get startTime / endTime / duration | Position and length |
Common setters
| Node | Producer meaning |
|---|---|
| set name | Rename clip |
| set color | Recolor — integer index, not hex |
| set looping / set muted | Toggle |
MidiClip only
| Node | Producer meaning |
|---|---|
| get notes | Full note list |
| set notes | Replace entire note list |
AudioClip only
| Node | Producer meaning |
|---|---|
| get filePath | Sample path |
| get/set warping | Warp on/off |
| get/set warpMode | Beats, tones, texture, … |
| get warpMarkers | Warp marker list |
When: Clip-focused tools — use On MIDI Clip or On Audio Clip and wire target.
Mistakes: Hex colors — use color index. Partial set notes — wipes other notes.
Scenes
What it is: A Session view row — launch column.
| Node | Producer meaning |
|---|---|
| get name / set name | Scene label |
| get tempo | Scene tempo (if overridden) |
| get signatureNumerator / Denominator | Time signature |
When: Scene launcher tools, set list organization.
Connect: target from On Scene, or item from get scenes loop.
Clip slots
What it is: One Session cell (track × scene).
| Node | Producer meaning |
|---|---|
| get clip | What’s in the slot (or empty) |
| createMidiClip / createAudioClip | New clip in slot |
| deleteClip | Clear slot |
When: “Create clip in this slot” before you have a clip to right-click.
Connect: target from On Clip Slot.
Devices
What it is: Any device on a track — instrument, audio effect, MIDI effect.
| Node | Producer meaning |
|---|---|
| get name | Device title in chain |
| get parameters | All knobs and buttons |
DeviceParameter nodes
| Node | Producer meaning |
|---|---|
| get name / min / max / defaultValue | Parameter info |
| get isQuantized / valueItems | Stepped vs continuous |
| getValue / setValue | Read or write parameter (async) |
When: Macro knobs, utility gain, device-specific tools.
Connect: get devices → Index or For Each → parameter chain. Often Track target or Current Item.
Mistakes: Guessing parameter index — use get parameters and pick by name in logic or settings.
Racks (Instrument / Drum / Effect)
What it is: Multi-chain devices — Drum Rack pads, rack macros.
| Node | Producer meaning |
|---|---|
| DrumRack: get chains | Each pad chain |
| DrumChain: get/set receivingNote | Which MIDI note fires the pad |
| RackDevice: get chains | Chains in a rack |
| RackDevice: insertChain | Add chain |
| Chain: devices / insertDevice / deleteDevice | Devices inside one chain |
| ChainMixer: volume / panning / sends | Per-chain mix |
When: Drum map tools, multi-sample racks, chain-level gain.
Connect: On Drum Rack target, or device from track’s device list.
Samples
What it is: A sample file reference — in Simpler or browser.
| Node | Producer meaning |
|---|---|
| Sample: get filePath | Path on disk |
| Simpler: get sample | Loaded sample in device |
| Simpler: replaceSample | Swap sample file |
When: Sample swap tools, path stamping.
Connect: On Simpler or On Sample target.
Resources (project media)
What it is: Live’s project resource layer — import and render.
| Node | Producer meaning |
|---|---|
| importIntoProject | Bring file into the Set |
| renderPreFxAudio | Bounce audio track slice pre-FX to file |
When: Import stems; offline bounce slice for external processing.
Connect: Resources context → obj on the action (required). Wire file path and track/time args.
Mistakes: Forgetting Resources context on obj — build error.
Cue points (locators)
get name / time, set name — locator label and position. Use with get cuePoints + For Each for set-list tools.
Take lanes, Environment & UI
Take lanes: get/set name, get clips, createMidiClip / createAudioClip — comping workflows on tracks with lanes.
Environment: get language, get storageDirectory / tempDirectory — sandbox roots for file nodes.
UI object: showModalDialog — modal web panel (URL, width, height).
Compatibility
Patchwright checks types when you wire and again at Build. Think of types as “what Live expects.”
General rules
- Run connects to Run only.
- More specific → more general works: MidiClip into Clip inputs.
- General → specific does not: Clip into MidiClip inputs fails.
- Lists need list outputs — one track is not a track list.
- Object inputs must be wired — settings cannot replace a missing clip or track.
Quick compatibility matrix
| From → To | OK? | Notes |
|---|---|---|
| MidiClip → Clip | ✅ | Common for name/color setters |
| AudioClip → Clip | ✅ | Same |
| Clip → MidiClip | ❌ | Use MidiClip from trigger or cast via getter on known MIDI clip |
| MidiTrack → Track | ✅ | |
| Track → MidiTrack | ❌ | Use correct trigger target |
| Note list → MidiClip set notes | ✅ | Full list only |
| Single Note → set notes | ❌ | Use Note List or music node output |
| Number → string setter | ❌ | Use Concat or dialog text |
| Boolean → Branch cond | ✅ | |
| String → Branch cond | ❌ | Use includes / logic that outputs boolean |
| Song → Track action obj | ❌ | Wire the track into track actions |
| Resources context → import action obj | ✅ | Required |
| Commands context → Execute Command | ⚪ | Not required for Execute Command |
Producer-friendly type cheat sheet
| Live thing | Trigger that gives it | Context alternative |
|---|---|---|
| This MIDI clip | On MIDI Clip target | — |
| This audio clip | On Audio Clip target | — |
| This track | On MIDI/Audio Track target | Current Item in loop |
| Whole Set | — | Song context |
| All tracks | — | Song get tracks |
| This scene | On Scene target | — |
| This device | Right-click device (Drum Rack, Simpler) | From get devices |
Workflow recipes
Copy these patterns as skeletons. Adjust triggers and settings for your tool.
Recipe: Read → transform → write MIDI
Goal: Change notes in the clip you right-clicked.
- On MIDI Clip trigger.
- target → get MidiClip notes.
- Notes through Transpose, Quantize, Chord, or Filter as needed.
- Run: trigger → optional Show Dialog → Transaction → set MidiClip notes.
- Wire transformed list into set notes value.
- target → set notes obj.
Undo: Wrap set notes (and any clip setters) in Transaction.
Fails if: Audio clip trigger; partial note list; generic Clip notes getter.
Recipe: Stamp name + color (one undo)
Goal: Rename and recolor in one command, one Cmd+Z.
- On MIDI Clip (or On Audio Clip for audio-only name/color).
- Run: trigger → Transaction → set name → set color.
- target → both setters’ clip obj.
- Name: setting or dialog wire. Color: integer color index in setting or wired number.
Undo: Both setters inside same Transaction body chain.
Fails if: Color as hex; one setter outside Transaction.
Recipe: Create track
Goal: Add a MIDI or audio track from the menu.
- On MIDI Track or On Audio Track (or any track trigger where you test).
- Song context → createMidiTrack or createAudioTrack obj.
- Run: trigger → create action.
- Optional: set name on result track inside Transaction.
Undo: Wrap create + rename in Transaction if you want one undo.
Fails if: Song unwired; clip trigger for track creation.
Recipe: Dialog-driven tool
Goal: Ask user, then act.
- Design UI in toolbar Designer; save.
- Run: trigger → Show Dialog → Transaction → mutations.
- Pick design on Show Dialog node.
- Wire dialog outputs to setters/logic (semitones, name, toggle).
- Do not put Show Dialog inside Transaction.
Cancel: User cancel should stop before Transaction.
PatchAI: Keys in AI Assistant panel, not API Secrets (those are for HTTP Fetch).
Recipe: For each track (or device)
Goal: Same logic on every track.
- Song → get tracks → list wire to For Each.
- Run: trigger → optional Progress Dialog → For Each.
- Body: Current Item → track setters/getters.
- Progress Dialog outside Transaction.
Branching: If Branch inside loop, duplicate downstream steps — do not merge Then and Else into one Run input.
Fails if: Current Item missing; unbounded loop.
Recipe: HTTPS fetch → use response
Goal: Call an API, then use text in the Set.
- Store API key in Settings → API Secrets if needed.
- Run: trigger → HTTP Fetch (HTTPS URL only).
- Parse JSON on result if response is JSON.
- Use text in set name, file Write, or dialog message via show modal dialog.
Fails if: http:// URL; secret pasted in node settings.
Recipe: Import file into project
Goal: Pull audio or MIDI from sandbox into Live.
- Resources context → importIntoProject obj.
- Build path: Environment storageDirectory → Join Path → path arg.
- Run: trigger → read path → import action.
- Optional Progress Dialog for large files.
Fails if: Resources not wired to obj; path outside sandbox.
Recipe: Device, sample, and scene shortcuts
| Goal | Pattern |
|---|---|
| Insert device | Track trigger → target → insertDevice; set device name + index |
| Set a knob | get devices → get parameters → setValue on Run chain |
| Replace Simpler sample | On Simpler → replaceSample; wire sandbox file path |
| Rename / duplicate scene | On Scene target or For Each over get scenes; duplicateScene needs Song |
| Chord stamp | On MIDI Clip → Chord (+ optional Song scale getters) → set notes in Transaction |
See manual tutorials for worked examples (scale chord arp, insert device, and others).
Validation rules (why Build fails)
Patchwright validates your graph before Live runs it. Fix the first error in the log; later errors are often knock-ons.
Wiring and objects
| Message / symptom | What it means | What you do |
|---|---|---|
| Unwired obj | A clip, track, song, or resources input has no wire | Wire target, Song, Resources, or Current Item |
| Type mismatch | Wrong object kind (Clip vs MidiClip, Track vs MidiTrack) | Match trigger to node; use specific getters |
| Run input has two wires | Only one Run wire per input | Split with Branch or duplicate steps — never merge branches |
Colors and notes
| Message / symptom | What it means | What you do |
|---|---|---|
| Color errors | Clip color must be Live’s integer index | Pick index from palette, not RGB/hex |
| Notes vanished in Live | set notes replaced list with incomplete wire | Wire full output from transpose/chord/list |
| MIDI getter on audio | Wrong clip type | On MIDI Clip + MidiClip notes |
Strings and logic
| Message / symptom | What it means | What you do |
|---|---|---|
| String compare failed | Equals is numbers only | Use String includes, Slice, or dialog enums |
| Branch needs boolean | Wired text into cond | Use logic that outputs true/false |
Dialogs, progress, undo
| Message / symptom | What it means | What you do |
|---|---|---|
| Dialog inside Transaction | Undo group contains UI | Move Show Dialog / Progress Dialog before Transaction |
| Progress stuck | Progress node not on Run path | Wire trigger → Progress → work chain |
Web, files, resources
| Message / symptom | What it means | What you do |
|---|---|---|
| HTTP must be HTTPS | Insecure URL | Change to https:// |
| Sandbox path | File outside allowed folders | Use Environment storage/temp + Join Path |
| Resources action | Missing context | Wire Resources → obj on import/render |
Commands
| Message / symptom | What it means | What you do |
|---|---|---|
| Commands context “required” (misconception) | Execute Command does not need Commands context | Wire Run and commandId only |
Loops and lifetime
| Message / symptom | What it means | What you do |
|---|---|---|
| Unbounded loop | No infinite Repeat / For Each without list | Use get tracks length or fixed Repeat count |
| Extension timeout | Work runs too long | Use Progress Dialog; reduce loop size |
Studio setup (not node wiring)
| Symptom | What you do |
|---|---|
| Build OK but Live ignores command | Developer Mode + Extensions enabled; Build & Run; check Extension name |
| Desktop cannot reach Live | Toolbar Host… → Extension Host path (not PatchAI) |
| AI does not connect | Toolbar PatchAI → provider keys in AI panel |
When stuck, paste the exact build error into PatchAI or see How to read build errors.
A–Z node index
One line per node. ⚡ = Run chain · 📖 = data only · 🔄 = async · 🎯 = trigger.
A
- Add (+) 📖 — Add two numbers.
- And (&&) 📖 — True if both booleans true.
- Application 📖 — Context: Live application; usually use Song instead.
- Application: song 📖 — Get Song from Application.
B
- Branch (if/else) ⚡ — Run Then or Else from boolean; paths do not merge.
C
- Chain: deleteDevice ⚡🔄 — Remove device from rack chain.
- Chain: devices 📖 — List devices in chain.
- Chain: duplicateDevice ⚡🔄 — Copy device in chain.
- Chain: insertDevice ⚡🔄 — Add device to chain by name.
- Chain: mixer 📖 — Chain volume/pan/sends.
- ChainMixer: panning / sends / volume 📖 — Per-chain mix parameters.
- Chord (scale-aware) 📖 — Build chord or arp note list from root + intervals.
- Chord/Arp Mode 📖 — Pick chord or arpeggio notes from mode.
- Clip: color / duration / endMarker / endTime / loopEnd / looping / loopStart / muted / name / startMarker / startTime 📖 — Read clip properties.
- Clip: set color / set looping / set muted / set name ⚡ — Write clip properties; color is index.
- ClipSlot: clip 📖 — Clip in slot or empty.
- ClipSlot: createAudioClip / createMidiClip / deleteClip ⚡🔄 — Slot clip lifecycle.
- Commands 📖 — Context: command registry (rarely needed).
- Concat strings 📖 — Join two strings.
- CuePoint: name / time 📖 — Locator label and position.
- CuePoint: set name ⚡ — Rename locator.
- Current Item 📖 — Item from enclosing For Each.
D
- DataModelObject: parent 📖 — Parent object in Live tree.
- Delay (bounded) ⚡🔄 — Wait milliseconds on Run chain.
- Device: name / parameters 📖 — Device title and knobs.
- DeviceParameter: defaultValue / isQuantized / max / min / name / valueItems 📖 — Parameter metadata.
- DeviceParameter: getValue / setValue ⚡🔄 — Read or write parameter.
- Divide (÷) 📖 — Divide two numbers.
- DrumChain: receivingNote / set receivingNote 📖⚡ — MIDI note for drum pad.
- DrumRack: chains 📖 — Pads/chains in drum rack.
E
- Environment 📖 — Context: language and sandbox folders.
- Environment: language / storageDirectory / tempDirectory 📖 — Locale and paths.
- Equals (=) 📖 — Numbers equal (not strings).
- Execute Command ⚡ — Run another command by id; no Commands context required.
F
- Filter 📖 — Subset list by condition.
- For Each (bounded) ⚡ — Run body per list item; use Current Item.
G
- Greater (>) 📖 — Number comparison.
H
- HTTP Fetch ⚡🔄 — HTTPS request; returns body and status.
I
- Index ([i]) 📖 — List item at index.
J
- Join Path 📖 — Combine sandbox path segments.
- JSON get key 📖 — Read object field.
- JSON Parse / Stringify JSON 📖 — Text ↔ JSON.
L
- Length 📖 — List length or string length.
- Less (<) 📖 — Number comparison.
M
- Map 📖 — Transform each list item.
- MidiClip: notes / set notes 📖⚡ — Read or replace all MIDI notes.
- MidiTrack: createMidiClip ⚡🔄 — New MIDI clip in arrangement.
- Modulo (%) 📖 — Remainder.
- Multiply (×) 📖 — Multiply numbers.
N
- Not (!) 📖 — Boolean negation.
- Note 📖 — Build one NoteDescription.
- Note List 📖 — Collect notes for set notes.
- Nullish coalesce 📖 — Default when value empty.
O
- On Audio Arrangement Selection 🎯 — Trigger: audio arrangement time selection.
- On Audio Clip 🎯 — Trigger: audio clip menu.
- On Audio Track 🎯 — Trigger: audio track menu.
- On Clip Slot 🎯 — Trigger: session slot.
- On Clip-Slot Selection 🎯 — Trigger: multi-slot selection.
- On Drum Rack 🎯 — Trigger: drum rack device.
- On MIDI Arrangement Selection 🎯 — Trigger: MIDI arrangement selection.
- On MIDI Clip 🎯 — Trigger: MIDI clip menu.
- On MIDI Track 🎯 — Trigger: MIDI track menu.
- On Sample 🎯 — Trigger: browser sample.
- On Scene 🎯 — Trigger: scene row.
- On Simpler 🎯 — Trigger: Simpler device.
P
- Parallel (all) ⚡🔄 — Two Run branches concurrently.
- Pick keys 📖 — Keep selected JSON keys.
- Pitch class → MIDI 📖 — Convert Live pitch class (0–11) to MIDI pitch number.
- Progress Dialog ⚡🔄 — Progress UI; keep outside Transaction.
Q
- Quantize 📖 — Snap note starts to grid.
R
- RackDevice: chains / insertChain 📖⚡🔄 — Rack chain list or add chain.
- Read Text File ⚡🔄 — Read sandbox text file.
- Repeat (bounded) ⚡ — Fixed-repeat loop body.
- Replace string 📖 — Text find/replace.
- Resources 📖 — Context: import and render.
- Resources: importIntoProject / renderPreFxAudio ⚡🔄 — Import file or bounce slice; wire Resources obj.
S
- Sample: filePath 📖 — Path to sample file.
- Scene: name / signatureNumerator / signatureDenominator / tempo 📖 — Scene metadata.
- Scene: set name ⚡ — Rename scene.
- Show Dialog ⚡🔄 — Designed dialog; toolbar Designer.
- Simpler: replaceSample / sample 📖⚡🔄 — Swap or read Simpler sample.
- Slice string 📖 — Substring by index range.
- Song (current Set) 📖 — Context: whole Set.
- Song: createAudioTrack / createMidiTrack / createScene / createCuePoint ⚡🔄 — Add tracks, scenes, locators.
- Song: cuePoints / gridIsTriplet / gridQuantization / mainTrack / returnTracks / rootNote / scaleIntervals / scaleMode / scaleName / scenes / tempo / tracks 📖 — Set-wide reads.
- Song: deleteCuePoint / deleteScene / deleteTrack / duplicateScene / duplicateTrack ⚡🔄 — Remove or duplicate.
- Song: set tempo ⚡ — Change tempo.
- Split string 📖 — Split to list by separator.
- String includes 📖 — True if substring found.
- Subtract (−) 📖 — Subtract numbers.
- Switch enum ⚡ — Branch on string match.
T
- TakeLane: clips / name / set name / createAudioClip / createMidiClip 📖⚡🔄 — Comping lanes.
- To lower case / To upper case 📖 — Change string case.
- Track: arm / arrangementClips / clipSlots / devices / groupTrack / mixer / mute / mutedViaSolo / name / solo / takeLanes 📖 — Track state reads.
- Track: set arm / set mute / set name / set solo ⚡ — Track toggles and rename.
- Track: clearClipsInRange / createTakeLane / deleteClip / deleteDevice / duplicateDevice / insertDevice ⚡🔄 — Track mutations.
- TrackMixer: panning / sends / volume 📖 — Track mix parameters.
- Transaction (one undo step) ⚡ — Undo group; body chain only.
- Transpose 📖 — Shift note pitches by semitones.
- Trim string 📖 — Strip whitespace.
- Try / Catch ⚡ — Run catch chain on error.
U
- UI 📖 — Context: Live UI object.
- Ui: showModalDialog ⚡🔄 — Modal web panel.
W
- Write File ⚡🔄 — Write text to sandbox.
≤ ≥
- ≤ / ≥ 📖 — Less-or-equal / greater-or-equal numbers.
See also
- Node Catalog (generated) — every port ID and SDK type
- Core Concepts — Run vs data, undo, branching
- How-To Guides — step-by-step tasks
- Glossary — Patchwright terms
- Troubleshooting — when Live and Patchwright disagree
Node Reference v1.0 · Patchwright 0.1.0 · June 2026