Tool Widget:Column Masking

I have been whipping up a column masking widget.
It is basically selecting and toggling columns as you can do in the advanced edit, but in this one you also have the note sign (flat or signed) and octave options to mask.
The values are written to an XML file and can be simply read loading the mask_file variable.

There are a few shortcuts available for mask toggling (single on or off, all on/off or all inverted of what they currently are), mask selection columns are divided into two areas depending where the cursor is (note area or effect area)
Whatever the user is doing in the dialog, the changes are written instantly to the document.

Perhaps a good start for pulling over the advanced edit functions to scripts?
2081 com.vvoois.Masking_mode_class_Rns270_V1.xrnx

Animated demonstration:

I’m confused. Would you please explain more?

Here I am, clicking away at the tickboxes and selecting and unselecting stuff in the pattern editor, testing the shortcuts but somehow feel like nothing is going on or I’m just not getting what this is doing? :)

— edited later:

The values are written to an XML file and can be simply read loading the mask_file variable  

This is apparently the thing I missed after promptly forgetting everything the original post mentioned - and just testing it in Renoise out of the blue :)

Well i have added a gif animation for the demonstration in the first post.
Indeed the xml values you can use to read what the user have set and then use these values to apply changes to the pattern object that the user allows you to do.
With this widget any Lua scripter can simply use the values stored so that the user doesn’t have different masking settings for each tool that uses this widget (that is the idea: to make the life of the ordinary user as least ackward as possible)

This only snippet contains all the third party info you need.
The ‘require “masking_class”’ takes care that the mask_file variable is defined for you (is a class keyword) so you only need to setup the table by calling MaskingTable() and shift the output to your own table variable and then read the user current configured values from the mask_file.

local function show_mask_values()  
 local masking_table = MaskingTable()  
 local ok,err = masking_table:load_from(mask_file)  
 print ("Mask not:"..masking_table["Note"].value)  
 print ("Mask sgn:"..masking_table["Sign"].value)  
 print ("Mask oct:"..masking_table["Octave"].value)  
 print ("Mask ins:"..masking_table["Instrument"].value)  
 print ("Mask vol:"..masking_table["Volume"].value)  
 print ("Mask pan:"..masking_table["Panning"].value)  
 print ("Mask del:"..masking_table["Delay"].value)  
 print ("Mask fxn:"..masking_table["EffectNumber"].value)  
 print ("Mask fxv:"..masking_table["EffectValue"].value)  
 print ("Mask aut:"..masking_table["Automation"].value)  

Hiya, I’m just wondering, is there a way to put a keyhandler into this script so that even if you’re clicking tickboxes on/off, you can still use the ’ shortcut to toggle one or the other out, and still use the cursor keys to navigate around?
I saw something like this in MPE:

 local function my_keyhandler_func(dialog, key)  
 if not (key.modifiers == "" and == "esc") then  
 return key  

and tried to add it to your script but didn’t know where.

BTW, I’m trying to realize what this as a class does and uses and how to utilize it in specific ways, or if I can even figure out what to do with it, that is. I have this feeling that there’s something here that I want, and thus I’ll try and figure out if I can tell it to mask specific places and to then have the specific places affected by functions…

Am I reading this correctly that this means that I can have multiple column masking xml’s available in a script, already saved, and functions can call these masking from file and do functions to them? I did do a save once and when loaded back, the selection had changed to column masking version, which was amazing to me!

Well, perhaps i should remove the default defined keys inside the keyhandlers completely as the programmable shortcuts should do the thing.
Your lua snippet to simply do a return key should do the trick, but i suspect that only works when the pattern editor was focussed before you popped up the mask widget.
Or you should change the keybind shortcut definitions in the start of the file to be put in the global keybind definitions of Renoise.

the “Global Keybind Definitions”? Can scripts maintain Global Keybind Definitions?

As simple as changing

renoise.tool():add_keybinding {  
 name = "Pattern Editor:Navigation:Custom Jump Lines Up",  
 invoke = function() jump(JUMP_UP) end  


renoise.tool():add_keybinding {  
 name = "Global:Transport:Custom Jump Lines Up",  
 invoke = function() jump(JUMP_UP) end  

Aha, hahah, so that’s why the RecOn script works in Order List, sample editor and instrument list, cos it’s global!
Good to know :)