New Tool (3.1): Line Counter

Hi, this is a simple tool i started years ago to just count the number of lines selected in the pattern and display the result in the status bar. It was intended to be of use when playing in notes ‘rubato’ style, and helping to line stuff up. I think i intended to use the count to set the correct BPM eventually, but never got around to that part yet. I have cleaned up the code and commented it. There’s probably some redundancy in there, but it works quite well.

The next step for this tool is to add a menu entry and some options, like setting display time-out, an enable switch, and an offset timer to allow other status messages to display first, because as it is it interferes with other tools’ use of the status bar to show messages.

I might also add some kind of option to change the edit step based on the selected number of lines, as that could make it more useful perhaps.


greasy.cupcake.LineCounter.xrnx (2.1 KB)


Nice to see some contribution!

I tried to send a message to you, but I couldn’t. I think you have to zip the .xrnx again. The main.lua and manifest.xml files need to be at the top directory in the zip, but are now inside a folder named “v”.

Buh, sorted now i hope. I redid the zip with keka. Thanks for spotting that…

1 Like

Above file has been updated with a bug fix.

And i have been experimenting with adding an option to set the edit step from selection, and it works, and actually makes this tool quite useful.

Will finish it and upload soon.

Ok chaps here’s a more full-featured version which adds a new entry in the tools menu to allow setting of options for the tool, a preferences file to make the options persist, and the link to set the edit step to selection. It’s actually rather useful now as a way to set odd amounts of lines to the edit step.

I’m certain i could write the code better in some way, as it’s getting a bit unwieldy and that’s not what i had intended to do with such a simple tool. But then, perhaps it’s no longer that simple.

I must thank @Ledger for his very clear comment and coding style in his scripts which helped me to pick up the methods of deploying more advanced features in renoise tools.

greasy.cupcake.LineCounter.xrnx (2.6 KB)

1 Like

This is actually pretty cool.

However, when linked to Edit Step:
The Tool probably shouldn’t change the Edit Step already while making a selection/shift is pressed.
It would be far better if the EditStep changes after the selection is made/shift is released.

Otherwise, the shift-selections are all over the place. (And I mean all over the place… :wink: )

(This obviously only applies when using the keyboard. When using the mouse its all good,
but we’re in Renoise-Land here, right? )


I’m not sure quite what you mean about the shift-selections.

From my experience it seems to be ok, the tool doesn’t alter the functionality much when using the shift key. Are you referring to the usage of other keys at the same time to jump through the pattern to create large selections?


Starting with edit step 1: When the edit step link is on, it is impossible to make a 3-line selection with shift pressed. (because after a 2-line selection, the cursor will go up/down another 2 lines, giving you
edit step 4. )

Try it. It should be impossible to make a 3-line selection from the keyboard only
with edit step link enabled, because the edit step link always doubles the edit-step when adding to a selection.
(If not, let me know how you managed to do this.)

I think your setup must be using the ‘Move to Next Row with EditStep’ shortcut somehow while you’re holding the shift key, as i have no problem moving around row by row while holding shift, but if i use that key shortcut i cannot continue the selection and the cursor jumps by whatever the edit step has been set to.

I’m on a mac, so i press command+shift+down to move down the pattern by the edit step value.

If i just press shift+down i get a selection as long as i want it to be, adding a row each time i press down, and the tool sets the edit step to the length of the selection.

I am on a mac as well. Indeed, I have tweaked a lot of shortcuts,
I also use the EditStep/ZeroTweak and some other non-standart tools for navigating around
instead of the default ones.

I will check this, thanks for the heads up.

(EDIT: Moved things around a little bit. Got it all working now. Awesome, I really like this tool, thanks a lot.)

1 Like

Glad to hear it’s working and proving useful!