New Tool (2.8, 3.0): Flexible Pattern Resizer


(ashy!mpala) #41

Thanks for the very handy tool dblue. :)

Just found a problem, not sure if it’s only me encountering this or it’s a bug: Everytime I try to enter a pattern length manually in the ‘New Pattern Length’ field by double clicking on it and using the keyboard, it returns 01.


(dblue) #42

How strange! I can confirm that it happens for me as well. After taking a quick look and testing some things, I just added tostring() and tonumber() functions to the valuebox control and now it seems to be working normally again. I thought that I had used the valuebox this way before without the converter functions, but maybe I’m just imagining things.

Seems like tostring() and tonumber() are actually required, even when handling the simplest forms of conversion, for example: from the string “64” to the number 64. This makes sense, but I had assumed that Renoise was handling some of that basic functionality automatically, and if the programmer wanted to do more advanced conversions then they could simply replace those functions.

I guess the behaviour here could possibly be related to this.

Anyway…

v1.03 Update: Fixed this bug mentioned by Ashkan Asgary :)


(taktik) #43

tostring and fromstring are optional. Nothing should break when not specifying them. Could you provide an example for this so that I could take a deeper look into this?

Found the issue and will fix this for the next update.


(ashy!mpala) #44

Glad I could help. :)

P.s. Here’s also a small suggestion: ‘New Pattern Length’ remembers the last entered value each time the tool starts already, of course it makes sense in one way, but I thought it would also be nice if it returns the current pattern’s length. Not sure if either one is more logical.


(dblue) #45

Yep. I’ll probably make this optional at some point. There’s still a lot of usability left to figure out.


(esaruoho) #46

btw, is it possible to make FlexiblePatternResizer show in the Pattern editor right-click context menu? :)


(dblue) #47

It’s currently available via Pattern Editor > Pattern > Resize

I wasn’t quite sure what the etiquette was on menu placement, but this seemed like the most sensible place for it?

It could certainly be moved if people feel that it would be better positioned one level higher at Pattern Editor > Resize Pattern, but I’m not sure which is best. I would like to avoid clutter within the context menus, but I’m open to suggestions.

Personally, I’ve just mapped the tool to the key binding LAlt + R, which fits into my workflow a lot better.


(Conner_Bw) #48

Still a great tool.

Feature request: Pass keystrokes to Renoise.

Example: I resize by clicking on the Tool’s interface, I don’t like, I click CTRL-Z to undo and nothing happens. I have to click out to undo. It would be nice if I didn’t have to do this.

I looked at the code. This can be done by changing:

  
 dialog = renoise.app():show_custom_dialog(TOOL_NAME, content)   
  

To:

  
 local function key_handler(dialog, key)  
 return key  
 end  
 dialog = renoise.app():show_custom_dialog(TOOL_NAME, content, key_handler)   
  

Cheers.


(Syflom) #49

can we get shrink/expand selection too.
thanks


(dblue) #50

Thanks for the great tip! I’m definitely still learning the ins and outs of the API. I will add your suggestion to the next update.

Yep, I already have a few interesting ideas for ways to handle shrinking/expanding selections. Hopefully I will spend some more time with it soon.


(dblue) #51

v1.04 : Updated for Renoise 2.7


(rhowaldt) #52

is it me or does this tool only allow you to resize one pattern at a time? from reading the forum thread i figured it would let you change all patterns in the song?


(dblue) #53

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.


(rhowaldt) #54

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)


(Djeroek) #55

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


(danoise) #56

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


(rhowaldt) #57

@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.


(Djeroek) #58

Yo Dblue,

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

Cheers,

:drummer:


(Djeroek) #59

Seems like my prayers have been answered already :)


(Kameleontti) #60

Thanks for this, patching renoise is totally awesome!