Cabbage Logo
Back to Cabbage Site

Reading combobox strings

I am using a combobox of type file. The file contains GM patches, like: ‘Bank: 0 Preset: 0 Piano 1’. I want to read the selected line via chnget and extract the bank and preset numbers as floats and then pass these to fluidProgramSelect.

I do not understand the following comment:
A combobox can also be set up a work with strings. In this case Csound will receive the currently selected string instead of the current index. Note that using a combobox in this way renders it useless in terms of host automation. Host automation can only be achieved when a combobox is sending the current index, rather than the current string
If I convert the string items to floats and then use them in fluidProgramSelect, why should it be useless in terms of host automation?

Also, the chnget does not seem to work. The combo box starts with empty string, I can select an item but the result is always ‘’, empty…fluidGUI.csd (764 Bytes) GM_list.txt (11.1 KB)GM_test.txt (1.3 KB)

A combobox with channeltype(“string”) cannot be controlled properly with host automation. Host expect float parameters. If you want to be able to control a combobox with a host you will need to use plain old combo boxes.

I see this here too. It’s a bug. I’ll try to get it sorted asap.

This is fixed now. You’re building from source right? Can you try the latest dev branch and let me know :wink:

I’m a bit lost. What files/folders should I download again? :grimacing:

Sorry, it is I who am lost. Give me a moment and I’ll send you a link to the Linux binaries for the current beta.

I think (?) I compiled and installed Cabbage now. It is version 2.5.0. is it not? I am afraid it behaves the same…

Click on the last run from here. Then click on the published link to get access to Linux binaries. They are contained in a zip called CabbageLinux.zip.

The Azure interface is a little confusing, but here you will find all the latest dev builds for Cabbage.

I do not know what published link you mean. But I downloaded CabbageLinux.zip earlier from the repo, that contained the version 2.5.0. But like I said that does not seem to work with my simple csd file: the combobox is still blank initially…

You need to get the binaries produced by the CI build.
https://dev.azure.com/rorywalsh/cabbage/_build/results?buildId=889&view=artifacts&type=publishedArtifacts

I executed the binary in /install/bin, but the result is the same. Version is 2.5.4.

Your .csd file works without any modification for me here:

You sure your audio settings are correct?

Yes, it is ALSA now.

I’m not really sure then why it is not working? We are using the same binaries, and the same .csd file. I checked 2.5.4 on Windows and OSX and your example also works fine there.

I am on Linux Mint, but will try on OS X also…

And when you select an item from the combobox what appears in the output? Nothing will appear until you select an item?

No, nothing appears when I select an item. BTW, when I start the csd again, it crashes. This is consistent.

Can you update your version of Csound? This version uses a new feature of 6.15. Upgraded should fix the crash issue.

I followed the steps for compiling csound, but it remains at version 6.15…

Version 6.15 is the latest version. Strange. I will build binaries for you later and send you a new link.