New Tool (3.1): Line Counter

(cupcake) #1

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)

(joule) #2

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

(cupcake) #3

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

(cupcake) #4

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.

(cupcake) #5

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)