Setting up your development environment
To start developing Scripts in Renoise, use the following two menu entries inside the Tools
menu on the top bar.
Scripting Terminal & Editor
- This will open the debugging console used to test things and see your tool's outputReload All Tools
- This will force a reload of all installed and running tools. It can be useful when adding new tools by hand or when changing them.
note
In previous versions of Renoise it was necessary to launch the Renoise executable with the --scripting-dev
argument to see the above mentioned menue entries.
Lua
Tools in Renoise are written using the Lua programming language. Lua is a dynamic language with a friendly syntax and good performance. While Renoise itself is written in C++, it has an API layer that exposes all sorts of aspects of the tracker so that tools can implement new functionality without the dangers of crashing Renoise itself or having to worry about low level programming challenges.
note
Teaching you programming is out of the scope of this guide but you can check out the book Programming in Lua to get a complete overview of the language. That said, you will probably be able to pick up a lot of things just by reading through this guide and checking out the examples. If you are the kind of person who learns best by doing stuff, getting straight into tinkering might be right up your alley.
Language Server
Luckily Lua has a language server called LuaLS which - when paired with the definitions for the Renoise API - can help you write code by providing useful hints about functions and variables, autocompletion and code diagnostics. You can even annotate your own code to keep things more explicit and well documented. While you can absolutely write Lua and create tools without any of this, we highly recommend setting it up.
If you are using VSCode you will have to do three things
- Install the Lua extension by sumneko
- Download the Renoise API definitions from Github
- Configure VSCode so that LuaLS knows where to find the definition files. For this you will have to either put this into your workspace's settings in your project folder (as
.vscode/settings.json
), or the global User Settings JSON file. Make sure to fill the paths below according to where you've extracted the previously downloaded definitions.
{
"Lua.workspace.library": [ "PATH/TO/RENOISE_DEFINITION_FOLDER" ],
"Lua.runtime.plugin": "PATH/TO/RENOISE_DEFINITION_FOLDER/plugin.lua"
}
For configuring other editors, you can check out the official docs about installation