Cabbage Logo
Back to Cabbage Site

How to play and audio file by choosing in a combobox

Hi!

How can play and audio file with a play/stop button choosing in a combobox. I already know how to create the combobox using populate to call all .wav files in a folder, but i don’t know how to play them.

1 Like

I just noticed a few issues with comboboxes in Cabbage 2, they only load samples from the current directory, and they don’t take the file extension. I’ll fix these issues tomorrow but for now you will need to put your samples into the same directory as the .csd file you are working with. I’ve attached a simple instrument that will loads all samples from the current directory into a combobox and let users chose which sample to play. comboboxSamples.csd (1.2 KB)

Thanks rory, but It didn’t work to me! i set the location folder and the combo box worked, but i can’t play the chosen audio file.

Ok, it looks like we need to create a new build for OSX. I can prepare one early next week if you can hold on that long. I won’t be anywhere near an OSX machine until then I’m afraid.

Ok Rory! I can hold on that long!

Thank you!

1 Like