Security Model
A script is text, and text travels: you will download automations, copy them from other DJs, and let Claude Studio write them. ORIX Script is designed so that running a script you did not write is safe for your computer and bounded in what it can do to your set. This chapter states what that protection consists of and where it ends.
The short version
- A script can touch the decks, the mixer, the effects and the automation log of ORIX DJ. Nothing else.
- A script is checked completely before any of it runs.
- A script cannot run without bound, and the amount of work it does is limited while it runs.
- A script cannot interrupt the audio.
- A script can ruin a mix: it can pause the playing deck, pull the master volume down or switch on every effect. The protection against that is trying scripts in the simulator, reading them, and the emergency stop.
What the language cannot express
Safety here does not come from permission prompts. It comes from the fact that the language has no words for dangerous things.
| Capability | Status in ORIX Script |
|---|---|
| Read or write files | Does not exist |
| Network access | Does not exist |
| Run programs or shell commands | Does not exist |
| Access the system, the clipboard, the screen, other applications | Does not exist |
| Load code or import other scripts | Does not exist |
| Read MIDI or keyboard input | Does not exist (only the 16 numbered triggers) |
| Process or record audio | Does not exist |
| Change application settings, audio routing or MIDI mappings | Does not exist |
| Delete or modify the music library | Does not exist |
Every name a script uses is resolved by the compiler against one fixed table: the parameters, actions and events of the reference chapters, plus the builtin functions. A path that is not in the table is a compile error. There is no way to construct a path from text at run time, and no "escape hatch" function.
The one contact with the library
Two deck actions reach outside the mixer: deck.X.load("title") asks ORIX DJ to load the library track that best matches a title, and deck.X.loadNext() loads the next track of the Auto DJ queue. With deck.X.eject(), these are the only actions that concern tracks.
- They can only load tracks that are already in your library. A script cannot name a file path.
- They are refused on a playing deck.
- A script can read the title and the key of loaded tracks (
deck.X.title,deck.X.key) and print them to the log. It cannot send them anywhere.
Validation before execution
Nothing runs until the whole script has passed the compiler:
| Check | Effect |
|---|---|
| Syntax | The text must follow the grammar. |
| Names | Every variable, function, deck, effect, parameter, action and event must exist. |
| Types and units | A value must have the type of the place where it is used. |
| Ranges | A constant must be within the range of its parameter. |
| Access | Read-only properties cannot be written; only rampable controls can be ramped. |
| Capabilities | The decks and effects used must be available in the setup. |
| Bounded loops | Every loop has a maximum number of turns. |
| No recursion | A function cannot call itself, directly or indirectly. |
| Size | Limits on script size, statements, nesting, arrays, handlers and variables. |
One error is enough to refuse the script. This applies equally to scripts you type, presets, console lines, Auto DJ transitions and scripts proposed by Claude Studio: there is a single compiler and no way around it.
Values that are only known while the script runs are limited to the range of their parameter when they are written, so a computed value cannot push a control beyond its limits either.
Bounded execution
Because loops are bounded and recursion is forbidden, an automation without event handlers always ends. On top of that, the runtime enforces budgets:
| Budget | Value |
|---|---|
| Operations without a wait | 20000 |
| Operations over the life of an automation | 5000000 |
| Parameter changes and actions per beat | 512 |
| Pending tasks | 256 |
| Active ramps | 128 |
| Event handlers | 32 |
| Handler runs in progress | 64 (further events are dropped) |
An automation that exceeds a budget is cancelled with E-BUDGET, E-RATE or E-LIMIT. See Performance Guidelines for the full list.
An automation with event handlers can stay alive indefinitely; that is its purpose. It still cannot exceed the budgets, and you can see it and stop it at any time (status, stop).
Isolation from the audio
The runtime never executes on the audio thread. It produces time-stamped commands; the audio thread applies them. A script that is slow, stuck at its budget or failing does not cause a dropout.
Failing safely
When an automation fails at run time:
- everything it had scheduled is cancelled;
- the effects it had switched on (with
enable(),toggle()orenabled = true) and had not switched off are switched off, so a broken script cannot leave the mix drowned in an effect; - decks keep playing and other automations are unaffected.
What is not undone: faders, EQ, filters, the crossfader and effect parameters stay where the script left them. Stopping an automation by hand undoes nothing at all.
The emergency stop
panic in the console, or a control mapped to the target automation.panic, stops every automation and bypasses every effect in every rack at once. Decks keep playing, and faders and EQ are not touched. It is the last line of defence when you do not know which script is responsible. Map it to hardware.
What a script can still do to your set
Within its sandbox a script has the same power over the mix as your hands. A careless or hostile script could:
- pause or stop the deck that is playing;
- pull
mixer.master.volumeor a channel fader to silence; - push levels up: channel trim to +12 dB, EQ bands to +6 dB, master volume to +6 dB;
- switch on effects with extreme settings;
- seek, loop or eject (a paused deck);
- load another track on a paused deck;
- keep running and react to events for the rest of the session.
It cannot exceed the range of any control: the ranges of the reference are enforced. Protect yourself the way you would with any unfamiliar tool:
- Read the script. They are short and written in the vocabulary of a mixer. Look for
pause(),stop(),brake(),eject(),load(,mixer.master.volume, and for handlers (on …), which keep an automation alive. - Run it in the simulator with the decks in a realistic state. Look at the trace and the parameter curves.
- Try it in headphones or at home before using it in front of an audience.
- Know your way out:
stop,panic.
Scripts written by Claude Studio
Claude Studio lets you ask Claude to write, explain, fix or improve an automation, design an effect, plan a performance or create a MIDI mapping. Two questions matter: what leaves your Mac, and what a generated script can do.
What is sent
A request contains the instructions for the task, your prompt, a fixed description of the language, and a context block. The context is opt-in, part by part, and its exact text is shown to you before sending:
| Part | Content | Default |
|---|---|---|
| Language version and deck letters | ORIX Script version: 1.0, Decks available: A, B, C, D |
always |
| Decks | Master tempo; per deck: empty, loaded or playing; tempo; key | on |
| Track titles | The title of each loaded track | off |
| Effects | Which effects are switched on | on |
| Current script | The text of the script in the editor | on for Explain, Fix and Improve; off for the other tasks |
| Diagnostics | Compiler messages and the simulator summary for the current script | on |
| Controller description | Only for the MIDI mapping task, with the list of mappable targets | when provided |
Audio, files, your library and your mappings are not part of the context.
What happens to the answer
A script written by Claude is treated as untrusted text:
- The script is extracted from the answer.
- It is compiled with the same compiler as any other script, with the same limits.
- It is run in the simulator on your Mac.
- You are shown the script, the explanation, the compiler result, the simulation result and a list of points to check. The list is computed locally from the script and the simulation, not taken from the model's own description. It mentions, when applicable: that the automation waits for events and keeps running; that it is very long; that it uses seconds; which decks it stops; that it loads or ejects tracks; which effects it leaves switched on; that the simulation timed out; clamped values; warnings; a failed simulated run; and that it changes the master volume.
- A proposal is marked valid only if it compiled and its simulated run did not fail.
Nothing a model writes reaches the engine without passing this validation, and nothing runs until you choose to use it. A generated script has exactly the powers of a script you typed: no more.
A MIDI mapping proposed by Claude is likewise checked locally: entries with unknown targets are removed and reported, and the profile is validated before it is offered.
Summary of guarantees and non-guarantees
| Guaranteed by design | Not guaranteed |
|---|---|
| No access to files, network, system or other applications | That a script sounds good |
| Compile-time validation of every name, type, constant range and loop bound | That a script suits the tracks that are loaded |
| Run-time budgets; cancellation when they are exceeded | That controls are restored when a script stops or fails |
| No execution on the audio thread | That a long-running script will not act later, on an event |
| Effects switched on by an automation are switched off if it fails | That two automations do not fight over one control |
| Every control stays within its documented range |