Why not have the ability to use advanced operations in the Pattern Matrix? Select a pattern, flip it. Select Multiple patterns, flip all of them, moving the last line in the last pattern to the first line in the first pattern. Transpose, humanize, quantize, interpolate, etc on the pattern level. Perhaps even flipping and randomizing order!
I think it would be pretty cool to do cyclic phase shifting. Lots of simpler sequencers have this (e.g. the nanoloop sequencer and the 303 in audiomulch) and it can be very inspiring. Even better would be phase shifting at the block level.
Reading the OP again, this is a really cool idea.
From the API you can not really just “get the selection”, because you can freeform select any combination of slots. So, you can question for every slot whether it is selected. The following routine should make a list of (pattern,track) tuplets which are selected.
rs=renoise.song()
selected = table.create()
helper_table = {}
for i, s in ipairs(rs.sequencer.pattern_sequence) do
local p = rs.sequencer:pattern(s)
helper_table[p] = {}
for j, t in ipairs() do
if rs.sequencer:track_sequence_slot_is_muted(t, s) and not helper_table[p][t] then
helper_table[p][t] = true
selected:insert({p,t})
end
end
end
Especially, notice the line ```
p = rs.sequencer:pattern(s)
It’s something lua or renoise specific about handling arrays. You cannot just substitute one element of an array like that, most of the time you will have to calculate the whole new array replacing the old one before substituting the whole array at once. It’s also much faster approach (not to mention more stable, when firing a tool like this while renoise keeps playing!) to ‘first get your data ready’.
I think in the documentation this is explained somewhere around lines about modifying the edit_pos/play_pos arrays in renoise.song().transport.
Oh I got it. I’ve got a few operations working already, but I’m gonna hold off on posting the tool until I’ve got at least most of the things in there that I want.