Using Synth V scripts
Synth V supports developers to build their custom scripts. This section covers the basics of creating and using scripts.
I would spare you the details on how the scripting works. Its all in the official docs.
The aim of this documentation is to show how one can quickly get started in building a script.
Finding your script files
Check out the script dir
In script directory, create a .js
or .lua
file containing the script logic.
Dreamtonics team has shared a pretty good example to start, so just copy the file or paste the code in a .js
file, then save it in the directory referenced by Synth V.
From Scripts
>> Examples
>> custom file
, you will launch the script and modify the project. If you can't find the file, use the Rescan
button to refresh the directory.
More custom scripts
Example lua script.
Show backspace.lua
function getClientInfo()
return {
name = "Backspace Note",
author = "impbox",
versionNumber = 1,
minEditorVersion = 0
}
end
function getTranslations(langCode)
-- please help add translations <3
return {}
end
function main()
local sel = SV:getMainEditor():getSelection()
if sel ~= nil then
local notes = sel:getSelectedNotes()
if #notes > 0 then
local lastSelectedNote = notes[#notes]
local group = lastSelectedNote:getParent()
local i = lastSelectedNote:getIndexInParent()
if i > 1 then
local newNote = group:getNote(i - 1)
group:removeNote(i)
sel:clearAll()
sel:selectNote(newNote)
end
end
end
SV:finish()
end
Community scripts
Why build one when someone probably already has some of the the scripts you are looking for?
This is the best resource I found so far. Not going to reinvent the wheel.