Script Screen Redraw Interfering with System Menus

I’m probably missing something super simple, but the screen-redraw function of my script interferes with the Norns menu system.

My script needs to redraw the screen every 16th note of a sequencer. I’m doing this simply by setting SCREEN_DIRTY true every step.

It seems that this forces screen redraw using my UI redraw function, even when attempting to use the Norns menus by pressing Button 1.

Do I need to explicitly disable my script’s redrawing function when Button 1 is pressed, in order to prevent this behaviour? I don’t see other scripts doing this.

Anyone come across this scenario and have any tips?

I’m not going to post code because the script makes heavy use of modules, so the relevant parts are sprayed across multiple files.

might be this common pitfall: your redraw function needs to be called redraw.

also, as always, sharing the code would help.

Ahh… that sounds likely! I’m calling a “redraw” function on a module table (“UI.redraw()”). I guess I need to make a little redraw() function in my master script file that does nothing but call the module function, and that way Norns will be able to automatically disable it when the menu is showing.

Understood. I plan to share the entire script when it’s in a better place. I think you’ve hit the nail on the head there though. I’ll do the above as soon as I get back home.

1 Like