Zene Studio
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?

ConsoleSocket
ScopeInside the applicationAny process
Feedback loopImmediateRequires a client
Good forExploring, debuggingAutomation, 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.

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.