I’ve just started looking at the scripting so forgive me if this is covered somewhere. My goal is to trigger the next pattern in the pattern sequencer. So if pattern sequence n is playing in loop mode, I’d like to set the pattern sequencer n+1 to loop mode so at the end of pattern n, n+1 starts and begins to loop. This effectively would implement “Launch Next Scene” function similar to another DAW that will remain nameless.
I’ve looked at renoise.song().sequencer but don’t see any properties or functions that allow me to get the currently looping pattern or set the loop button on.
Is there is a way to do this? Thanks for any help.
Ok, got it working. The code from that other thread wasn’t quite right. It jumped to the next sequence immediately instead of waiting for the current one to finish. Here is the code from my two buttons “PREV” and “NEXT”:
vb:button {
text = "PREV",
tooltip = "Hit this button to move to the previous scene.",
notifier = function()
local position = renoise.song().transport.playback_pos
local my_text_view = vb.views.my_text
position.line = 1
position.sequence = position.sequence - 1
-- loop the prev sequence
renoise.song().transport.loop_sequence_range = { position.sequence, position.sequence }
-- schedule it
renoise.song().transport:add_scheduled_sequence(position.sequence)
my_text_view.text = "SEQ# " .. position.sequence
end
},
vb:button {
text = "NEXT",
tooltip = "Hit this button to move to the next scen.",
notifier = function()
local position = renoise.song().transport.playback_pos
local my_text_view = vb.views.my_text
position.line = 1
position.sequence = position.sequence + 1
renoise.song().transport.loop_sequence_range = { position.sequence, position.sequence }
renoise.song().transport:add_scheduled_sequence(position.sequence)
my_text_view.text = "SEQ# " .. position.sequence
end
}
I’ll pull that redundant stuff out to a new function, but this does work and it’s a start, so I wanted to share. I’ll map those buttons with MIDI and I’m almost there.