[Solved] Programatically Loop A Group Of Patterns

Is it possible to programatically loop a group of patterns as described in the documentation below? I tried setting renoise.song().sequencer.selection_range[], but that didn’t loop the range.

http://tutorials.renoise.com/wiki/Pattern_Sequencer#Looping_Patterns

“Using the column to the immediate left of the pattern numbers, you can cause a pattern or sequence of patterns to loop. Left-click and drag in this column to indicate the patterns you want to loop. To remove a loop just click on a single slot twice.”

I think this is what you are looking for? Never used that one, though.

EDIT: linked to an old api release… fixed.

renoise.song().transport.loop_sequence_range = {3, 3} would loop 3rd pattern
renoise.song().transport.loop_sequence_range = {1, 3} selects pattern 1 to 3

renoise.song().transport.loop_sequence_range = {} clears selection

Bingo! Thanks guys.