Transition Loop

Can you explain why? Especially as when setting a Block Loop (as in the native Renoise function) it appears to set these settings? Or does it set both? (I haven’t looked at the other while making changes and my colleague is STILL here so can’t do so just yet…) It seems this should get to the core level of Renoise loops points and be flawless, but it isn’t, always stuttering the first line when looping back a pattern for some reason.

I was wondering for a minute why you’ve got a load of TPL stuff then I noticed you have the old and new method, to make it compatible with old songs. Something which I would never have thought to do! :)

Will have a look into the Beats method if it’s smoother, for my forthcoming Edit Shortcuts tool at least.

Can you explain why?

Well, I just experimented and observed. You can try it yourself, by replaceing loop_range_beats with loop_range
Comment out the last few lines where the beat-stuff is calculated, and insert a statement like this:

renoise.song().transport.loop_range = {loop_start,loop_end}

You’ll most likely see a lot of values get mixed up, not being set to the right value, or even shifting after the value has been set !!
I have no idea why, but the floating point value doesn’t seem to exhibit such a quirky behavior :slight_smile:

Btw: I just noticed that the looped pattern sequence gets painted with a “weak” highlight when you use such values
Normally, the looped is entirely filled with gray but these look different. Very subtle, but noticeable cool.gif/>

weak_sequence_loop.png?raw=1

It does that if only part of the pattern is looping but the loop spans more than one pattern (it does seem like it has been pretty much developed by the Devs just not quite implemented.)

You also get the highlighting of the line numbers, a la a Block Loop, with this method.

If you ask me, that’s the great thing about the API. You get these little surprises every now and then :slight_smile:

I’m doing some work on my own script right now, it needs to handle three modes of looping

  1. The native block loop, restricted in size by the coefficient value and transferred from pattern to pattern as you navigate
  2. The native sequence loop, restricted by the pattern size and overruled by the block loop (as you can have a block loop inside a sequence loop)
  3. The “custom loop”, based on beat values. This one seem like the solution for transition loops, but will reset both the block and sequence loop once defined.

Edit: oh, and there’s the pattern loop as well. I’ve chosen to leave that one alone, as it’s good to have a simple type of loop that can simply be toggled on and off.

The beats one will get thrown off if there are any changes to LPB wont it? Although I guess that is quite a special case at the time time a transition is exactly the place you’re most likely to have a change…

Yeah, if it was dynamically linked to the playback engine. But I think this is simply a fire and forget, where you set the range you wish to loop - just using some different terms. In the end I’m guessing it gets translated into static song positions.
Scratch that, it is in fact linked to the tempo and will update in realtime. I tried to create loop spanning a couple of patterns and then changed the LPB to a lower value. The result was a range that “crawled” back towards the beginning of the song.

But what is worse is that the coefficient is still affecting the possible size of the looped range. I thought I had come up with a solution, but if you take my example, and enter some “strange” value that cannot be properly expressed by a coefficient, then the loop will be set, but “snap back” once the playback is toggled.

So, even though I’m not really a fan of introducing a fourth kind of loop into the Renoise UI (block loop, pattern loop, sequence loop, and now a transition loop?), coming up with a reasonably solid scripted solution seems to be very tricky. We need a surefire way of specifying a looped range, one that doesn’t get modified on the fly and doesn’t cause tempo glitches - adding this to the most wanted API features list.

Sorry it’s taken so long but finally fixed this and also added a +1 I had missed from the Loop Clear section. Something strange was also going on here and Loop Selection had also disappeared from the shortcuts list, even though it was working as I had tested it…

3789 uk.deaddogdisko.TransitionLoop.xrnx

Hopefully that solves any outstanding issues, beyond the fact you can’t do it completely perfect with the APi.

First off, I LOVE this plugin. I didn’t even realize I needed it until I was messing around and trying to make a song in 9/8. Block selection sorta falls apart in weird time signatures. But your plugin works great!

But there might be an issue where you can’t have the loop encompass the very last line of a pattern, because the loop actually ends one line before the selected end point instead of on the line of the selected end point. What do you think?

I changed this:

  
-- Set Loop Selection  
 local function loopsel()  
 local s = rns().transport.edit_pos  
 local e = rns().transport.edit_pos  
 s.line = rns().selection_in_pattern.start_line  
 e.line = rns().selection_in_pattern.end_line  
 rns().transport.loop_range = {s, e}  
 end  
  

to

  
-- Set Loop Selection  
 local function loopsel()  
 local s = rns().transport.edit_pos  
 local e = rns().transport.edit_pos  
 s.line = rns().selection_in_pattern.start_line  
 e.line = rns().selection_in_pattern.end_line + 1  
 rns().transport.loop_range = {s, e}  
 end  
  

Note the 3rd-to-last line.

Everything seems to work properly, including clearing a loop. Now when you make a selection, the loop includes the last line of the selection as well.

What do you think?

Edit:

Looks like I posted too soon. For it to work the way I described, you have to edit the setend() function as well:

  
-- Set Loop End  
 local function setend()  
 local e = rns().transport.edit_pos  
 e.line = rns().selection_in_pattern.end_line + 1  
  
 rns().transport.loop_range = {rns().transport.loop_range[1], e}  
 end  
  

Attached is the version of the plugin that I am experimenting with. It may be unstable. I am still figuring out how to bundle plugins so bear with me.

Impulse Tracker has a nice feature in the form of a “playback marker” where playback will start from, no matter what pattern is selected and where you are in the pattern, as long as this marker is active. To move it, just mark it somewhere else, and to remove it, just mark where already selected, ie. mark twice.

This could easily be scripted in renoise, except making the pattern visible on the UI is the one thing that can’t.

On a related note, the green “playback indicator” line, when playback is stopped, is often annoying and just in the way, makes it hard to see the row highlighting + the color coding on this line disappears. I’d like to keep it during playback, but get rid of it when the song/pattern/block/etc. is NOT playing. I’m pretty sure there’s a snippet of code i could add to my “stop” function to do this…anyone?

Renoise 3.1 is out.

Is this ability to loop pattern transitions available? I’m hoping it’s baked into the software or maybe there’s a better way?

It would be nice to loop the end of pattern “A” with the beginning of pattern “B” to fine tune your transition from pattern “A” to “B”.

this would be so cool.