On this page
The Lua console
Running Lua interactively inside Zene Studio.
Applies to 0.3.0-alphaUpdated
The Lua console is an interactive prompt inside Zene Studio. It is the fastest way to find out what the Lua API can actually do in the build you are running.
Opening it
The console is part of the scripting interface — look for it in the scripting menu.
Using it
Type Lua and press Enter. Expressions return their value; multi-line blocks work as you would expect in Lua.
-- What version of the API am I on?
print(API_VERSION)
-- What tracks exist right now?
for _, track in ipairs(project.tracks) do
print(track.name)
end
Why use the console
- Verify before you script. Check that a field exists before writing a script that depends on it.
- Explore interactively. Poke at a project, see what comes back, then turn it into a script.
- Debug a script device without a rebuild cycle.
Console or socket?
| Console | Socket | |
|---|---|---|
| Scope | Inside the application | Any process |
| Feedback loop | Immediate | Requires a client |
| Good for | Exploring, debugging | Automation, agents, tooling |
For anything you want to run repeatedly, promote it to a script instead of retyping it.
Script devices
Once you know what the API offers, the natural next step is a script device: an instrument or effect implemented in Lua that travels inside your project. See Lua API.
Edit this page on GitHub
(opens in a new tab)
Spotted something wrong? Open an issue