I have made my first (and very simple but useful) tool, and thought some experienced coder could just see that it’s OK before i release it. It works but maybe it’s too ugly?
-- My first simple script, making a keyboard shortcut working like Milkytrackers spacebar. It stops if playing, and toggles editmode if stopped.
function stop_or_edit()
if renoise.song().transport.playing == true then
renoise.song().transport:stop()
elseif not renoise.song().transport.edit_mode then
renoise.song().transport.edit_mode = true
else
renoise.song().transport.edit_mode = false
end
end
renoise.tool():add_keybinding {
name = "Pattern Editor:Play:Stop or Edit",
invoke = function() stop_or_edit() end
}