Hi.During my free time I’m building a tool, piecewise… I am very proud to build.I lack little to end, but there is always some specific function that I can not build.
Please, help!
- Question 01 “function to desploy popup”
A function 01 to desploy a popup.I do not know if it is possible.I want to use it with a button and a key.I only need the function to desploy poput.The rest is already solved.
The popup (3 items or more):
vb:popup { id = 'popup_one', width = '100%' , height = 24, value = 1, items = {'line 1','line 2','line 3'} }
The key (return):
if (key.name == 'return')
then choice_via_shortcut = 'Desploy_Poput_One' vb.views['popup_one'].value = 1
end
With “.value = 1” select the first value in the list (line 1). But I need desploy the list, not select. Graphically, the popup has a triangleon the right, todeploy using the mouse. I need a function to do the same.
- Question 02 “function to select or jump to first track in pattern editor (and last)”
Yes, I’m going crazy with this nonsense: A function to select the first track in Pattern Editor (same than Shift + Control + Home), regardless of the number of tracks or groups. With “renoise.song():track(index)”, what would be the exact code?
With “renoise.song():select_previous_track()” “renoise.song():select_next_track()”,I can navigate, but I can not make a jump.Is there a way to also jump to the last track? (immediate left of the master track)
- Question 03 “condition not erase the first and individual track”
With this function:
local function del(index)
local song = renoise.song()
if (song.selected_track.type == renoise.Track.TRACK_TYPE_SEQUENCER) or (song.selected_track.type == renoise.Track.TRACK_TYPE_GROUP) then
song:delete_track_at(song.selected_track_index)
end
end
…erase individuallyall tracks or groups in pattern editor, except Master Track and Sxx Tracks. The problem is the first track. If only has a “Track 01”, the function return the error:
*** std::logic_error: 'the given track can not be deleted.'
*** stack traceback:
*** [C]: in function 'delete_track_at'
*** main.lua:5351: in function 'del'
*** main.lua:5739: in function <main.lua:5739>
Lack a elseif conditionto avoid error. Prevent apply “delete_track_at”, if only has a track (or group).
I have trouble trying “the index” in pattern editor. Functions for jump first track, jump last last track (ignoring Master and Sxx Tracks), select a specified track, etc, etc…
They are three pieces of code will help to finish my tool. If I have any more questions I will add here not to open more topics…
Thanks in advance! Please, help!