Cabbage Logo
Back to Cabbage Site

Revisiting a combobox problem, slippery item

Some of the items in a combobox seems to behave in a slippery manner, that means: when selected, the combobox somehow slips back to the previous item in the list. For example, in the attached example, if ‘pitch’ is selected, the combobox resets itself to ‘env_dyn’. I’ve tried to replicate the matter with different number of items in the combobox, and different text for the items. This seems to affect the behaviour, but it is hard to pint down exacly.

As a first step, could you test the attached example, set the first combobox to ‘pitch’ and the second combobox to ‘seven’. See what happens, and note the numbers printed in the csound output widget. Use it in a DAW, save the project and reopen, and see if the selected item is the same as saved. Sometimes it will slip back to previous item immediately, sometimes it will happen when reopening a saved project.

<Cabbage>
form size(520, 150), caption("Combobox recall"), pluginID("com1")
combobox channel("source1_parm1"), bounds(10, 10, 100, 20), items("rms", "rms_dB", "transient", "trans_dens", "env_crest", "env_dyn", "pitch", "s_centroid", "s_spread", "s_skewness", "s_kurtosis", "s_flatness", "s_crest", "s_flux", "rhythm_irreg", "rhythm_cons", "rhyt_con_dev", "ra_flux", "ra_crest", "mfcc1", "mfcc2", "mfcc3", "mfcc_diff"), value(1)
combobox channel("test"), bounds(110, 10, 100, 20), items("one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "tem", "eleven", "twelve", "thirtn", "fourtn", "fiftn", "sixtn", "svntn", "eigtn", "nintn", "twenty", "twone", "ttwo", "tthree", "tfour"), value(1)
csoundoutput bounds(10, 30, 500, 95) text("Output") 
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -m0d
</CsOptions>
<CsInstruments>

nchnls = 2	
0dbfs = 1
	
instr 1
k1 chnget "source1_parm1"
printk2 k1
k2 chnget "test"
printk2 k2, 10
endin
        
        
</CsInstruments>
<CsScore>
#define SCORELEN #86400#
i1 0 $SCORELEN        
e
</CsScore>
</CsoundSynthesizer>

Ahhhgghh! I mean… thanks Oeyvind for bringing this to my attention :wink:

Have you noticed that slippage only seems to appear when items are multiples of 7?!? I think you brought this up before. I could be wrong, but I think there is some kind of odd feedback loop happening. Perhaps when the combobox is updated, it sends a changed event in the GUI, which then sends a value to Csound, which then tries to update the GUI. I’ll take a look. The good news is I can recreate it in both standalone and plugin mode. I’ll let you know when I find a fix.

Yes, it seems to be related to multiples of 7. I had it on item 7 and item 14. Oddly enough, I did not see it on item 21, so I did not mention it in the original post, as to not mix too much black magic into the bug report…

Also, comboboxes seem not to recall their values for me in the latest Cabbage version (CabbageCanonicalSetup_Wed_Jan_24_15-45-35_2018.exe).

The following csd contains a single combobox with the items 1,2,3,4.
If used in a Reaper project, and I set the combobox to for example ‘3’, it will have the value ‘1’ when I reopen the project.

<Cabbage>
form size(200, 200), caption("Combobox test"), pluginID("ctst")
combobox channel("heythere"), bounds(100, 20, 50, 20), items("1", "2", "3", "4")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -m0d
</CsOptions>
<CsInstruments>

instr 101
endin

</CsInstruments>
<CsScore>
#define SCORELEN #86400#
i 101 0 $SCORELEN
e
</CsScore>
</CsoundSynthesizer>

Thanks Oeyvind. Life with combo-boxes is not easy! I think I’ve narrowed the initial problem down to a rounding error. As you know all VST parameters are scaled between 0 and 1. I think splitting that range into discrete sections is causing some problems. As for the second problem, that may already be fixed. Can you try this package:

https://github.com/rorywalsh/cabbage/releases/download/v2.0.0/Cabbage64Setup.exe

I think I have this sorted now. Addressing the rounding issue seems to have fixed a lot of different problems we’ve had with combo boxes down through the years! I’ll let you know when I have a binary for you to test. Oh yeah, i must sort that ‘always on top’ issue too. Seems to be Ok on OSX, must be Windows only.

Can you try the link I posted above again Oeyvind. I’ve fixed the dialogues appearing behind plugin windows, and the combo box issue should hopefully be resolved now. (Deep intake of breath…)

Yes! It seems good now. Great! Thank you.

(…lengthy exhale!) :grinning:

What happens for you guys when picking an item near the end of the combobox list, and then picking a new one near the beginning? It still triggers this “slipping” behavior in a combobox with ~36 or so entries for me on OSX. If it helps you test it Rory, this should be visible in any instrument I’ve sent you that uses $FILT_MENU (analog and multi-filt are the first examples to come to mind)… but if you can’t duplicate or need fresh files, I’ll repack a few and take note of some specific combobox choice sequences that trigger the issue, but so far it’s pretty consistent for me.

Also, it’s not an important comment, but it seems like the rendering color of rsliders has changed slightly, or am I imagining that? I didn’t check too many other widget types, but since a lot of my instruments are rslider heavy, this jumped out at me pretty quickly on the first render. The color seems slightly darker or muted… not a big deal, but if this is intended then I’ll go ahead and adjust my colors definitions to compensate.

But hey, at least all of my imported widgets are showing up again! :joy:

Hi Kevin, did you try the latest release for OSX?

I think so, I’m using the OSX 2/8 build form the betas page. Any prior but recent builds gave issues with imported widgets not showing up if I had more than a certain number of them (I think the key was too many types of widgets), so I had been using a much older build before that issue had crept in… I think 12/27.

I’ll try reinstalling fresh just to be sure tho.

The releases page on the cabbageaudio website now has the most up to date release. I’ll update the beta page to reflect this, but sure there will probably be a new beta release in a few days anyway :stuck_out_tongue:

That new version (still 2/8, but had a different md5 than the 2/8 beta) appears to have fixed the “slippery combobox” issue! I’ve bounced around the multifilt settings every which way and haven’t encountered an issue yet!

The “window size / macro” issue from the other thread still doesn’t appear to be working… but I’ll give it another go tomorrow… it might be user error.

The window size issue will mostly likely need my attention. I haven’t addressed that at all yet.

No worries and no rush, just keeping you apprised of the current status :slight_smile:

I’ll spend some time later today running all of my stuff through the paces with this new version, make sure everything works and gather some overall feedback for you.

Btw, sliders did undergo the very smallest of changes, sorry if this messed up your colour scheme. You seem to have very sensitive eyes!

No sweat, none of my color schemes are finalized anyway… I just wanted the theme idea to work and I’ll settle on final colors once everything else on my end is closer to finished.

My only concern (and I haven’t actually checked this) would be if the same hex values render differently for different widget types, but even that isn’t a huge deal… just makes mixing and matching a more involved process.

Actually, the only different should be on the mouse over / focus / active alpha values. In normal resting usage there shouldn’t be any difference. I just remember tweaking that stuff to give more feedback to the users. Rendering should be the same across all widgets, although I’ve never actually tested it!

Ok, I confirmed I’m not imagining it! These were both just taken, with no changes other than the cabbage version used.

Here’s a shot from the newest release version:

And here’s a shot using the 12/27 beta:

It’s subtle, but definitely noticeable!