I’m starting with LUA language. I would like to make the following tool:
-- GROUP + TWO TRACKS, ONE COLLAPSED
function insert_gt()
local song = renoise.song()
-- insert new Group: (Note: I need put the two tracks inside this group)
song:insert_group_at(song.selected_track_index + 1)
-- insert two Tracks or more...:
song:track(song.selected_track_index).name = "TRACK 1" -- & the name of GROUP????
local track = song:track(song.selected_track_index)
track.visible_effect_columns = 0
track.visible_note_columns = 12
track.volume_column_visible = false
track:set_column_name(1, "NOTE 1")
track:set_column_name(2, "NOTE 2")
song:track(song.selected_track_index).name = "TRACK 2"
local track = song:track(song.selected_track_index)
track.visible_effect_columns = 0
track.visible_note_columns = 12
track.volume_column_visible = false
track:set_column_name(1, "NOTE 1")
track:set_column_name(2, "NOTE 2")
-- Note: Code for collapse the entire TRACK 2?????
end
renoise.tool():add_menu_entry {
name = "Pattern Editor:Expand Group & 2 Tracks",
invoke = function() insert_gt() end
}
Basically, I want to create a tool to create with a single mouse click a group and within two runways (one collapsed), in the Pattern Editor. As is the code creates two tracks and a group separately. I need the two tracks (or more) appear within the group.
Besides, I want to know what the code for a track made out collapsed (one expanded and other collapsed). This will serve to create a more complex tool.
Can you help?
The result would be this: