Ok, I’m going to pose a few suspicions that I woke up with today.
I’d like to confirm/deny these first, then start hacking at them
Suspicion#1:
It IS possible to read where the cursor is in the pattern (from LUA)
it IS possible to modify cursor position in the pattern (via LUA)
it IS possible to create a keyboard shortcut which takes the cursor from pattern editor row#32(or any other than row#0) to pattern editor row#0 (via LUA)
it IS possible to then make a function in the keyboard shortcut - a “if/elseif” kind of behaviour, which states that if the cursor is already on row#0 - then this keyboard shortcut will take the cursor to row#0 of “first track”.
and it IS possible to create the same behaviour for going from the first row(=any row other than last row) to pattern’s last row, and on repeat-press, take you to the last Send’s last row.
Suspicion#2:
it ISN’T currently possible to use LUA to select a channel’s content
it then ISN’T possible to use LUA to detect that the channel has been selected - and when “true”, then select the contents of the whole pattern.
Are these more or less correct? I can think of no other way to enable IT2-like “home + home” doublepresses, “end + end” doublepresses and “alt-L+alt-L” doublepresses. (=Would select track-cursor is on, second press would select the whole pattern).
I’m not too familiar with the actual IT based keybindings but couldn’t you do something like the following psuedocode:
function select_track_or_pattern()
if pattern_editor.selection == pattern_editor.current_track then
pattern_editor.selection = pattern_editor.whole_pattern
else
pattern_editor.selection = pattern_editor.current_track
end
end
This function will set the selection to the whole pattern if the selection is already set to the current track else set the selection to the current track.
Thus, binding a key to this function would perform one of two actions depending upon the current selection.
Hope this helps, the alternative keybindings tool looks interesting. If you need any assistance/questions, feel free to get in touch.
Yes. However, not in realtime (yet?) since _observable isn’t available for that.
For sure.
Yes.
Yes.
Yes.
It isn’t possible to set a graphical block selection via LUA (yet?). However, all pattern data is accessible read/write in arrays so you can of course manipulate any pattern data you want.
It is possible to detect what track the cursor is in, but as stated before it isn’t possible to set a normal block selection. A bad solution is to make your custom selection routine which just tells the user via statusbar what the end and start of your “selection” is.
All of these variables and functions are kind of basic so if you need any help you can PM me.
Yes you can (the Epic Arpeggio and the Strum tools are using API calls to detect selections.). Simply add the .is_selected node behind the specific track data column content that you are scanning…
but doing the selections yourself:no, in that regard the user remains to have full and the only power over this.
Ok, first stab at endend: ( edit - second stab at endend, both functionalities! )
Added to v0.39
local function endend()
local song_pos = renoise.song().transport.edit_pos
local last = renoise.song().sequencer_track_count
if (song_pos.line < renoise.song().selected_pattern.number_of_lines) then
renoise.song().transport.follow_player = false
renoise.song().transport.loop_block_enabled=false
song_pos.line = renoise.song().selected_pattern.number_of_lines
renoise.song().transport.edit_pos = song_pos
return
end
if (renoise.song().selected_track_index < renoise.song().sequencer_track_count) then
renoise.song().transport.follow_player = false
renoise.song().selected_track_index= last
--renoise.song().sequencer_track_count
return
end
renoise.app():show_status("[Phew, you escape!]")
renoise.song().transport.follow_player = false
renoise.song().transport.loop_block_enabled=false
end