New Tool (2.8, 3.0): Flexible Pattern Resizer

I don’t know where you got that impression from, but at the moment the tool only operates on single patterns.

I’ve already written a bit about this earlier in the thread:

It’s obviously something I hope to address later.

got the impression from the previous page i think, where you mention a request for a tool that… wait… maybe i think you mention a request for a tool that changes pattern length throughout the song, but i have not looked back at that particular request so maybe i was wrong. too lazy now to figure out.

thanks for the quick info and i hope you find some time to build this in someday. often with requests etc that i make it is not because i run into a problem a lot of times, but it’s more based on the situation i am in right at the time. so i rarely have the need to use this tool. so… what i’m trying to say is, don’t go and hurry up for me, or something. BLAH BLAH BLAH (really gotta get back to making music now)

There is a tool from Mogue called LBPx that does what you want for all patterns, can’t find it in the forum atm.

I found it here: Snippet: Convert Song From Lpb4 To Lpb12

@Jonas+danoise: thanks for that. it resizes all patterns indeed, but the only option you have is to multiply the current pattern length by a certain factor. i’d like for just an option to input a value and have all patterns set to that length. but i’ll request that one in the appropriate post.

Yo Dblue,

would this request fit in a remix / update of your pattern resizer tool?

Cheers,

:drummer:

Seems like my prayers have been answered already :)

Thanks for this, patching renoise is totally awesome!

Hi. I was looking at this (since you suggested I could just modify it so that keyboard shortcuts do *2(double) and *0.5 (halve) to the pattern content).
Got two buttons to work in the Gui, and they do as you would expect (32 -> 64… or 64 -> 32, and processing).

[details=“Click to view contents”] ```
vb:button {
height = 32,
text = ‘Double’,
notifier = function()
valuebox_length.value = adjust_pattern_length(2/1)
resize_pattern(valuebox_length.value)
end
},
vb:button {
height = 32,
text = ‘Halve’,
notifier = function()
valuebox_length.value = adjust_pattern_length(1/2)
resize_pattern(valuebox_length.value)
end
},

Emboldened by this, I thought, if it's this easy to do, a keyboard shortcut will be roughly as difficult.. Well, not quite ![:)](https://files.renoise.com/forum/emoticons/default/smile.gif)  

renoise.tool():add_keybinding { name=“Pattern Editor:Pattern:Halve”,
invoke = function()
local valuebox_length = nil
valuebox_length.value = adjust_pattern_length(1/2)
resize_pattern(valuebox_length.value)
end }

renoise.tool():add_keybinding { name=“Pattern Editor:Pattern:Double”,
invoke = function()
local valuebox_length = nil
valuebox_length.value = adjust_pattern_length(2/1)
resize_pattern(valuebox_length.value)
end }

  
End up getting a   
  
*** main.lua:298: attempt to index local 'valuebox_length' (a nil value)  
*** stack traceback:  
*** main.lua:298: in function <main.lua:296>  
  
How should the keybinding code be modified so that I can just stop thinking about alt-g and alt-f in schismtracker and just use them in renoise? ![:)](https://files.renoise.com/forum/emoticons/default/smile.gif)

Woo, got it working!
renoise.tool():add_keybinding { name=“Pattern Editor:Pattern:Halve”, invoke = function()
resize_pattern(adjust_pattern_length(1/2))
end }
renoise.tool():add_keybinding { name=“Pattern Editor:Pattern:Double”, invoke = function()
resize_pattern(adjust_pattern_length(2/1))
end }

thanks dBlue.

Would you please update this for 2.8? Thank you.

edit: ok, so I installed the current version and changed ApiVersion to 3. it seems to be working properly.

could you please update dblue?
pleeeeeeeeaaaase? :unsure:

Check the first post.

It simply slipped my mind, like many things these days.

awesome awesome! no worries, thanks sir!

This is great! If it hasn’t been said yet, it’d be good to have it be capable of changing a selection’s length independent of the pattern; this way you could stretch “live-played” elements to fit for any bpm.

also: I think percentages would be pretty helpful in a context like that.

Hey dblue,

there is one bug in the PatternResizer tool: If a automation point is on the very last position of a pattern (so the same position as the first in the next pattern), this point will be erased while a pattern shrink.

there is one bug in the PatternResizer tool

Nicely spotted. Looks like a pretty simple fix, but I’ll try to give it a bit more testing today.

Thanks, here maybe another one, or some priority thing:

If I shrink this track from 128 to 64 bars:

Attachment 5512 not found.

it looks like this after shrinking:

Attachment 5513 not found.

So instead of taking the F#4 for the second note, it takes the third and offsets it. Surely this is coded right, but wouldn’t be the F#4 expected instead, since it has a higher rhythmical priority? Even > uneven?

Thanks, here maybe another one, or some priority thing: (…)

In situations where two notes would collide in the smaller sized pattern, and one note must therefore be deleted due to space constraints, it will first give priority to notes that are louder (70 vs 40 in your example), or, if both volumes are the same, then it will give priority to the note which ends up with the least amount of note delay.

There are of course many other ways to handle this kind of thing, and some extra options in the tool itself would be great.

Ideally, the tool would not simply throw away those “in between” notes in the first place, but would instead create new note columns for them whenever possible.

As usual, this is all just crap that’s been saved in my todo.txt somewhere for a long time :wink:

Ideally, the tool would not simply throw away those “in between” notes in the first place, but would instead create new note columns for them whenever possible.

That would satisfy everybody! +1