Seperator in umenu uses up a slot number....

davidestevens's icon

I'm using a umenu to store the names of the presets in a VSTi, so that I can recall presets without opening the plugin editor.
As there are 127 presets in the menu, I added in a little patch to put in a separator between chunks of the menu items.
The problem is that the separator counts as an item in umenu, so every time there's a separator, the numbers going to the VSTi to select the desired preset get one more out of sync. (ie, if there's a separator after item 9, then item 10 outputs "11" from the LH output of umenu)
Wouldn't it make more sense if separators were just graphic/display items that don't "take up" a slot number?

I don't suppose there's a flag somewhere that sets this, is there?

thanks

David

Roman Thilenius's icon

that is simply how menus in mac os and windows are working, too.

davidestevens's icon

:-( bummer. Guess I'll do without the separators then. Pity - it makes the menu easier to read.

Chris Muir's icon

Why not just use something like a coll or another (hidden) umenu to translate the numbers?

davidestevens's icon

Something like that had drifted through my mind, but I want to allow for loading of different vsts rather than using just the same one. The original impetus was that some VSTis group their presets alphabetically by type (eg basses A-Z; guitars A-Z etc), and I wanted to put a separator between each sub group, by detecting the presence of a letter lower than (say) D at the front of the name string when appropriate.
I could still do it using coll to map, and incrementing the counter every time a separator turns up ... (thinks...)

hmmm, shouldn't be that difficult - I might give that a try tomorrow.

Chris Muir's icon

It sounds like a reasonably simple problem, to me. Perhaps you could post your patch, or some of the menu contents.