Any way to create/edit overlays in LUA?

Is there any way to directly access the overlay structures from LUA?
I would love to be able to generate a list of preset names for the user to use as a selection list.

If there was a way to even edit/replace the text in an overlay, I could create a blank list of 127 overlay entries and then update them with patch names dynamically. I know we can get/set the overlay ID, but that is just swapping between existing overlays rather than creating a new one on the fly.

1 Like

Yeah, this makes perfect sense. The main reasons why I was staying away from that is it might cause a memory fragmentation and may result in Electra running out of memory. Even the updates of the texts may cause that. I will give it some quality thinking.

Based on my reading of LUA in general, I know that the memory fragmentation and string handling can be difficult in any environment.

I would be OK with having to pre-define an overlay (in my specific case it would be 128 entries of 14 characters each plus trailing NULL if required), attach it to a control, and then be able to edit it as needed.

That way, all the space is predefined and the OS would only have to check for string length overflows.