Hi. Here is a bit of code to set middle_frame to Sample Keyzones and diskbrowser to More-mode and back to regular-size.
renoise.app().window.active_middle_frame=3
renoise.app().window.disk_browser_is_expanded = not renoise.app().window.disk_browser_is_expanded
i am unable to run this code twice in a row so that the diskbrowser would disappear and come back (first press creates diskbrowser in more-state, second press makes it disappear, third comes back again, etc).
this on/off behaviour for disk_browser_is_expanded will only run if the active_middle_frame is not being set.
since i would really like to set active_middle_frame with 1 keyboard shortcut and still have togglable diskbrowser more/off-mode with this 1 keyboard shortcut, all i can do is request that this be made to work. thanks!
Phew, was able to get this to work with these tweaks:
function F3()
local w=renoise.app().window
local s=renoise.song()
if w.active_upper_frame == 1 and w.active_middle_frame == 4 and w.active_lower_frame == 3 and w.disk_browser_is_expanded==false
then w.disk_browser_is_expanded=true return
end
w.active_lower_frame =3
s.selected_instrument.active_tab=1
w.lock_keyboard_focus=true
w.lower_frame_is_visible=true
w.upper_frame_is_visible=true
w.pattern_matrix_is_visible=false
w.pattern_advanced_edit_is_visible=false
w.active_upper_frame =1
w.active_middle_frame=4
end
So first time you press F3, it initializes into Lower=Instrument Settings, Middle=Sample Editor, Upper=Disk Browser. then when you press F3, it switches to disk browser expanded=mode, then when you press f3 again, it minimizes the expanded mode.
real handy.
Thanks! Something I’ve been made aware of is to use the constants as described in the API docs. It’s good for readability, and (in worst case) future compatibility.