Aah, alright. Does that mean UI is rendered with the gpu instead of cpu?
Dropdown Dropdown?
In this instance no, but it is possible to offload to the GPU. For the simple widgets that Cabbage shows however there is very little gained in doing this. In my tests I saw no noticeable difference at all in performance.
@rorywalsh - a couple questions on this:
Would numerical idicies work if:
#define $LPF items:1(āButterLPā, āToneā,āLPF 18ā, āK35ā, etc)
#define $HPF items:2(āButterHPā, āAtoneā, āK35ā, etc)
#define $BPF items:3(āButterBPā, etc)
#define $BRF items:4(āButterBRā, etc)
But you only used $BRF (text:4)? In other words, I assume it takes the index from the items declaration and not is location in the menu?
Similarly, if you used $HPF and then $LPF in that order, would they reorder numerically or appear in the order they were called? (just curious, not sure what Iād prefer on that honestlyā¦ will have to think about it)
Would that problem be negated by the key pair idea, since each entry would have itās final value paired and no ācalculatingā the index is needed? The more I think about it, the more I feel like this is the right direction to go for making a more complex submenu systemā¦
But I need to keep thinking on itā¦ itās been a weird few days and I havenāt really had much focus on code.
So I nearly have this implemented to use strings or numbers. In the end it doesnāt really matter what we use, because Cabbage will build the menu depending on where the text:ā¦() appears in the declaration.
I agree, but I think if we were to do this we would probably need to move away from the simple syntax of Cabbage and start using JSON/XML instead. Itās just too awkward with the current syntax. And I would rather not make it any more complex. In JSON things would be neater, but your Cabbage section would suddenly become 100s if not 1000s of lines long. But just for demo purposes, a simple multi-menu demo could be built doing something like this:
{
"form": {
"title": "example",
"size": [400, 300]
},
"rslider" : {
"bounds": [0, 0, 200, 200],
"channel": "frequency"
"range": [0, 1, 0, 1, .01]
},
"combobox" : {
"channel" : "newMenu",
"items": {
"Waves" : [[1, "Sine"], [2, "Square"], [3,"Tri"]]
"Sounds" : [[10, "Awesome"], [11, "Mediocre"], [12, "Outstanding"]]
}
}
}
Thatās awesome! Do you think youāll go the route of numbers, text, or either? I still prefer text because it allows the upper āindexā to be descriptive and related to itās contents. For example, with calling them, especially if the entries are defined as a macro in an included file, itās much easier to remember items:lpf is the one iām looking for vs items:3. I think either would work fine for me tho, just a loose preference.
Ooof. No thanks on the JSON for the whole cabbage section. That looks like a major headache. The only way I could see that being realistic is if a new menu widget was created that uses/imports JSON files. Probably not gonna happen either, but just a thought.
So I guess now I just need to settle on a good way to convert the dynamic index place from the generated combobox into a correlated constant that matches everywhere in the codeā¦
Iāll give it some more thought tomorrowā¦ my brain is still on holiday for some reason.
Hmm, the XML/JSON kinda reminds me of css. Maybe we could structure it like that?
Drop-down {
Bounds: 35, 32, 53, 30;
Items: item1, item2, item3; {
Item1: subitem 1, subitem 2;
Item3: subitem 1, subitem 2;
}
Colour: #3599db;
}
Edit: Iām on mobile so sorry for bad formatting. Maybe we could import code like that one adsr example?
My point about JSON/XML is that is gives much greater scope for complex configurations. But I wouldnāt add it for one widget. That would be a nightmare.
I donāt follow. Can the indices not simply be assigned according to where the item:() identifiers appear in the combobox declaration? For me this is the simplest solution, and users can then use number or strings.
What I meant was this:
items:lpf() on itās own yields items starting at 1.
But in another instrument I might have items:hpf() before items:lpf(), so now lpf starts at something unknown, other than 1.
Like I said tho, itās probably pretty trivial once my headās wrapped around itā¦ Iāve just been not having a good week or so when it comes to coding, my brain took an unexpected vacation without me.
Also @AveAcsent keep in mind that JUCE Comboboxes āblinksā in LMMS when you try to click on them, thatās why I added some āhandlesā (just knobs links to the index of the Comboboxes) for LMMS user to be able to select waveforms, filters, etcā¦ in ToneZ in LMMS
I have this implemented now. The index of each item is determined by when it is added to the combobox.
Wowā¦ i dont even know what to say except thank you. its crazy that i only found cabbage in march, and some of my suggestions have already been put into cabbageā¦ Thank you so much for adding this!
It was a good suggestion It only works with numerical indices, which is Ok with me, because thatās what the host will get anyway in terms of parameter values.
This looks awesome, canāt wait to try it out. Not quite sure how Iāll implement it yetā¦ but it will definitely get used soon! Iām going to try overcomplicating it firstā¦ should really help clean up my ~40 entry menu for filtersā¦
Is this available in the beta builds already?
Should be in the latest beta build
What version of Cabbage is this? I merged some pull requests in the last week or so, perhaps my changes were lost. Iāll take a look later, your code looks fine to me.
according to the output console, im using 2.3.50. wtf. Im installing newest beta rn so ill let you know
theres no windows installer
Sorry, just trying new build now. The Windows build keeps getting stuck on something. Not sure what. Itās something to do with Azure.