Triggering Patterns with OSC following the currently played line

Hi Hard Coders!

My goal is to replicate the behavior of the mouse scroll when it is over the Pattern Sequencer: to change the Pattern currently playing while keeping the current line number incrementing (not retriggering from line 1 of the Pattern, but follow from actual line in the next or previous sequence pattern)

I’ve tried to use the**/renoise/song/sequence/trigger(number)** osc implementation, but its behavior is different: the triggered Pattern restart from line 1 of the said triggered Pattern.

Is there any way I could customize or create a new function in the GlobalOSCActions.lua file. Any tips or suggestion would be very appreciated…

– /song/sequence/trigger

add_global_action {
pattern = “/song/sequence/trigger”,
description = “Set playback pos to the specified sequence pos”,

arguments = { argument(“sequence_pos”, “number”) },
handler = function(sequence_pos)
song().transport:trigger_sequence(clamp_value(sequence_pos,
1, song().transport.song_length.sequence))
end,
}

Thanks in advance,

cheers!

Instead of a mouse wheel, what do you intend to be controlling this position with?

I’m asking since Duplex has this thing called Navigator that does a lot of behind-the-scenes stuff to keep the rhythm going.

But right now, it can’t be controlled from knobs/encoders, onlybutton…and I get the feeling you’re looking for something else.

Hi Hard Coders!

My goal is to replicate the behavior of the mouse scroll when it is over the Pattern Sequencer: to change the Pattern currently playing while keeping the current line number incrementing (not retriggering from line 1 of the Pattern, but follow from actual line in the next or previous sequence pattern)

My tool, OSC Jumper, does this. https://github.com/Neurogami/renoise-ng/tree/master/lua/com.neurogami.OscJumper.xrnx

/ng/pattern/into   

Instantly jumps from the current pattern/line to given pattern and relative next line.

If the second arg (stick_to) is greater than -1 it schedules that as the next pattern to play, and turns on block loop for that pattern. 

Args: pattern_index, stick_to

You can look at the code to see how the custom OSC handler is written.

NEUROGAMI!!! Amazing!!! :w00t:

I was to post my reply to Danoise.

I will do so, just to complete the topic. But it looks like I will able to do what I wanted with your magic. Thanks a lot guys!

---- My reply would have been:

To explain the context:

I love the mangling results of quickly changing the currently played pattern using the mouse wheel (when over the pattern sequencer).
The pattern currently playing change while the line number continue incrementing where it were. I sometime record the audio result of these live jam.

The problem is that I can’t record the playhead moves of my mouse gesture in events/data/MIDI means…

To solve that, I figured out that I could try to use the OSC trigger command, but Renoise can’t send himself OSC.
So I’ve set up a Master Renoise that send a MIDI clock to the Renoise slaved along with a Max 7 that map the master MIDI to OSC commands to the slaved renoise.
See picture…

Everything works fine, but the trigger OSC command don’t behave like I would like.
It does not just change the currently played pattern to another.
It actualy change the pattern AND trigger it from line 1
I’m looking for a function that would just do like the mouse wheel do: change the currently played pattern without restarting to line 1.

I know its maybe a weird project, but I like complex setup… It’s so editable!

Feedback on the topic:

I just added theses lines to “GlobalOscActions.lua” and everything worked as expected!

Thanks a lot for sharing knowledge! Very appreciated.

-- /transport/jump/

add_global_action {
  pattern = "/transport/jump/",
  description = "Instantly jumps to given pattern number and relative next line.",
 
  arguments = { argument("pattern_index", "number")},
  handler = function(pattern_index)
    --print("pattern jump to ", pattern_index)
    local song = renoise.song  
    local pos = renoise.song().transport.playback_pos
    pos.sequence = pattern_index
    song().transport.playback_pos = pos
  end
}

Cool.

A more sophisticated approach would eliminate glitches when navigating between differently-sized patterns.

But I guess a bit of potential glitchynessis actually desirable here :slight_smile:

Cool.

A more sophisticated approach would eliminate glitches when navigating between differently-sized patterns.

But I guess a bit of potential glitchynessis actually desirable here :slight_smile:

True, when skipping right in the middle of a sequence, you can get nice staccato articulations on played instruments coming along new textures with the automation suddenly changing… Only Renoise offer that unexpected work path. : )

I’ve added these 2 functions to just skip to the next and previous while keeping actual line… updating thread just to share if any other beginner need it…

In GlobalOscActions.lua:

– /transport/jumpToNext/

add_global_action {
pattern = “/transport/jumpToNext/”,
description = “Instantly jumps to the next pattern number and relative next line.”,

arguments = nil,
handler = function()
–print(“pattern jump to next”, pattern_index)
local song = renoise.song
local pos = renoise.song().transport.playback_pos
–print("pos.sequence= ", pos.sequence)
pos.sequence = pos.sequence + 1
– print("pos.sequence + 1= ", pos.sequence)
song().transport.playback_pos = pos
end
}

– /transport/jumpToPrevious/

add_global_action {
pattern = “/transport/jumpToPrevious/”,
description = “Instantly jumps to the previous pattern number and relative next line.”,

arguments = nil,
handler = function()
–print(“pattern jump to previous”, pattern_index)
local song = renoise.song
local pos = renoise.song().transport.playback_pos
–print("pos.sequence= ", pos.sequence)
pos.sequence = pos.sequence - 1
–print("pos.sequence - 1= ", pos.sequence)
song().transport.playback_pos = pos
end
}