# Working with presets in Cabbage 3 with custom UI

**URL:** <https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975>\
**Category:** Cabbage 3\
**Created:** [13 January 2026 19:42 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975 "2026-01-13T19:42:48Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [18 January 2026 13:02 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975/21 "2026-01-18T13:02:41Z")

</div>

The following is working for me here?

```javascript
instr 1
    dirs:S[] = ["/Users/rwalsh/sourcecode/cabbage3-recipes/samples/GridSequencerPresets", "/Users/rwalsh/sourcecode/cabbage3-recipes/samples"]
    cabbageSet "presetCombo", "populate.directories", dirs
endin

```

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [18 January 2026 13:03 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975/22 "2026-01-18T13:03:26Z")

</div>

So is this:

```javascript
instr 1
    cabbageSet "presetCombo", "populate.directories", ["/Users/rwalsh/sourcecode/cabbage3-recipes/samples/GridSequencerPresets", "/Users/rwalsh/sourcecode/cabbage3-recipes/samples"]
endin

```

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [18 January 2026 13:04 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975/23 "2026-01-18T13:04:12Z")

</div>

If you enable verbose logging, it will show some debug logs, they might contain some useful info.

---

<div class="post-metadata">

**Author:** ![hdale94](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/hdale94/32/6371_2.png) [@hdale94](https://forum.cabbageaudio.com/u/hdale94)\
**Post date:** [18 January 2026 13:05 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975/24 "2026-01-18T13:05:08Z")

</div>

```csound
DEBUG: Received onFileChanged message for file: c:\Users\Dale\Desktop\GridSequencer\GridSequencer.csd [CabbageAudioApp.cpp (308) CabbageAudioApp::processIncomingMessage Thread ID: 18964]

DEBUG: File exists, adding InitCabbage to queue [CabbageAudioApp.cpp (313) CabbageAudioApp::processIncomingMessage Thread ID: 18964]

DEBUG: Received onFileChanged message for file: c:\Users\Dale\Desktop\GridSequencer\GridSequencer.csd [CabbageAudioApp.cpp (308) CabbageAudioApp::processIncomingMessage Thread ID: 18964]

DEBUG: File exists, adding InitCabbage to queue [CabbageAudioApp.cpp (313) CabbageAudioApp::processIncomingMessage Thread ID: 18964]

DEBUG: Processing InitCabbage command [CabbageAudioApp.cpp (727) CabbageAudioApp::onIdle Thread ID: 12036]

DEBUG: Devices successfully added to settings file. [CabbageAudioApp.cpp (943) CabbageAudioApp::addDevicesToSettings Thread ID: 12036]

DEBUG: Attempting to start audio with the following settings:

SR: 44100

Buffer Size: 512

Input device: Default Device

Number of input channels: 2

Output device: Default Device

Number of output channels: 2 [CabbageAudioApp.cpp (556) CabbageAudioApp::initialiseAudio Thread ID: 12036]

DEBUG: RtApi::openStream: a stream is already open! [CabbageAudioApp.cpp (636) CabbageAudioApp::errorCallback Thread ID: 12036]

DEBUG: RtApiWasapi::startStream(): the stream is already running! [CabbageAudioApp.cpp (636) CabbageAudioApp::errorCallback Thread ID: 12036]

DEBUG: Resetting csound ...

csound = 0000023005286C70 [Cabbage.cpp (150) cabbage::Engine::setupCsound Thread ID: 12036]

DEBUG: Merged populate config (processing deferred to avoid blocking) [CabbageParser.cpp (330) cabbage::Parser::mergeJsonProperties Thread ID: 12036]

DEBUG: === Starting addParameters() === [CabbageProcessor.cpp (134) CabbageProcessor::addParameters Thread ID: 12036]

DEBUG: Total widgets: 2 [CabbageProcessor.cpp (135) CabbageProcessor::addParameters Thread ID: 12036]

DEBUG: Created numeric channel for non-automatable widget 'formChannel' with default value 0 [CabbageProcessor.cpp (306) CabbageProcessor::addParametersForWidget Thread ID: 12036]

DEBUG: Created string channel for non-automatable widget 'presetCombo' [CabbageProcessor.cpp (299) CabbageProcessor::addParametersForWidget Thread ID: 12036]

DEBUG: === Finished addParameters() === [CabbageProcessor.cpp (177) CabbageProcessor::addParameters Thread ID: 12036]

warning:

could not open library 'C:\Program Files\Csound7\plugins64\\osc.dll' (-1)

Reading CSD file: c:\Users\Dale\Desktop\GridSequencer\GridSequencer.csd

--Csound version 7.0 (double samples) Dec 28 2025

[commit: 45b655eec6a0a24a1d737ff6253ef05f2ac5911f]

using callback interface

Compiling Csound code...

warning:

opcode printf_i has been renamed (uppercase to lowercase / underscores removed), line 44

warning:

opcode printf_i has been renamed (uppercase to lowercase / underscores removed), line 44

warning:

opcode printf_i has been renamed (uppercase to lowercase / underscores removed), line 57

warning:

opcode printf_i has been renamed (uppercase to lowercase / underscores removed), line 57

...done

Elapsed time at end of code compilation: real: 0.002s, CPU: 0.002s

using libsndfile-1.2.2

displays suppressed

sr = 44100.0,

kr = 4410.000,

ksmps = 10

0dBFS level = 1.0,

A4 tuning = 440.0

audio buffered in 256 sample-frame blocks

SECTION 1:

DEBUG: Num widgets : 2 [CabbageAudioApp.cpp (464) CabbageAudioApp::createCabbageProcessor Thread ID: 12036]

DEBUG: Cabbage processor created successfully [CabbageAudioApp.cpp (730) CabbageAudioApp::onIdle Thread ID: 12036]

DEBUG: setCabbageIsReady() called [CabbageProcessor.cpp (754) CabbageProcessor::setCabbageIsReady Thread ID: 12036]

DEBUG: Processing InitCabbage command [CabbageAudioApp.cpp (727) CabbageAudioApp::onIdle Thread ID: 12036]

DEBUG: Devices successfully added to settings file. [CabbageAudioApp.cpp (943) CabbageAudioApp::addDevicesToSettings Thread ID: 12036]

DEBUG: Attempting to start audio with the following settings:

SR: 44100

Buffer Size: 512

Input device: Default Device

Number of input channels: 2

Output device: Default Device

Number of output channels: 2 [CabbageAudioApp.cpp (556) CabbageAudioApp::initialiseAudio Thread ID: 12036]

DEBUG: RtApi::openStream: a stream is already open! [CabbageAudioApp.cpp (636) CabbageAudioApp::errorCallback Thread ID: 12036]

DEBUG: RtApiWasapi::startStream(): the stream is already running! [CabbageAudioApp.cpp (636) CabbageAudioApp::errorCallback Thread ID: 12036]

DEBUG: Resetting csound ...

csound = 000002300531FD40 [Cabbage.cpp (150) cabbage::Engine::setupCsound Thread ID: 12036]

DEBUG: Merged populate config (processing deferred to avoid blocking) [CabbageParser.cpp (330) cabbage::Parser::mergeJsonProperties Thread ID: 12036]

DEBUG: === Starting addParameters() === [CabbageProcessor.cpp (134) CabbageProcessor::addParameters Thread ID: 12036]

DEBUG: Total widgets: 2 [CabbageProcessor.cpp (135) CabbageProcessor::addParameters Thread ID: 12036]

DEBUG: Created numeric channel for non-automatable widget 'formChannel' with default value 0 [CabbageProcessor.cpp (306) CabbageProcessor::addParametersForWidget Thread ID: 12036]

DEBUG: Created string channel for non-automatable widget 'presetCombo' [CabbageProcessor.cpp (299) CabbageProcessor::addParametersForWidget Thread ID: 12036]

DEBUG: === Finished addParameters() === [CabbageProcessor.cpp (177) CabbageProcessor::addParameters Thread ID: 12036]

warning:

could not open library 'C:\Program Files\Csound7\plugins64\\osc.dll' (-1)

Reading CSD file: c:\Users\Dale\Desktop\GridSequencer\GridSequencer.csd

--Csound version 7.0 (double samples) Dec 28 2025

[commit: 45b655eec6a0a24a1d737ff6253ef05f2ac5911f]

using callback interface

Compiling Csound code...

warning:

opcode printf_i has been renamed (uppercase to lowercase / underscores removed), line 44

warning:

opcode printf_i has been renamed (uppercase to lowercase / underscores removed), line 44

warning:

opcode printf_i has been renamed (uppercase to lowercase / underscores removed), line 57

warning:

opcode printf_i has been renamed (uppercase to lowercase / underscores removed), line 57

...done

Elapsed time at end of code compilation: real: 0.002s, CPU: 0.003s

using libsndfile-1.2.2

displays suppressed

sr = 44100.0,

kr = 4410.000,

ksmps = 10

0dBFS level = 1.0,

A4 tuning = 440.0

audio buffered in 256 sample-frame blocks

SECTION 1:

DEBUG: Num widgets : 2 [CabbageAudioApp.cpp (464) CabbageAudioApp::createCabbageProcessor Thread ID: 12036]

DEBUG: Cabbage processor created successfully [CabbageAudioApp.cpp (730) CabbageAudioApp::onIdle Thread ID: 12036]

DEBUG: setCabbageIsReady() called [CabbageProcessor.cpp (754) CabbageProcessor::setCabbageIsReady Thread ID: 12036]

new alloc for instr 1:

DEBUG: populate property must be an object for widget type: comboBox [CabbageParser.cpp (334) cabbage::Parser::mergeJsonProperties Thread ID: 15604]

DEBUG: Checking widget for populate config: presetCombo [CabbageProcessor.cpp (476) CabbageProcessor::onIdle Thread ID: 15604]

DEBUG: Widget has populate field, type: object [CabbageProcessor.cpp (479) CabbageProcessor::onIdle Thread ID: 15604]

DEBUG: Populate config: {"defaultLabel":"Load Preset","directories":[""],"fileType":"*","fullFileAndPath":false,"labelWhenEmpty":"No Presets","order":"date"} [CabbageProcessor.cpp (490) CabbageProcessor::onIdle Thread ID: 15604]

DEBUG: Triggering processPopulateAsync for widget: presetCombo [CabbageProcessor.cpp (502) CabbageProcessor::onIdle Thread ID: 15604]

DEBUG: populate property must be an object for widget type: comboBox [CabbageParser.cpp (334) cabbage::Parser::mergeJsonProperties Thread ID: 15604]

DEBUG: processPopulateAsync thread started for widget: presetCombo [CabbageParser.cpp (877) cabbage::Parser::processPopulateAsync::<lambda_1>::operator () Thread ID: 19060]

DEBUG: populateConfig received: {"defaultLabel":"Load Preset","directories":[""],"fileType":"*","fullFileAndPath":false,"labelWhenEmpty":"No Presets","order":"date"} [CabbageParser.cpp (890) cabbage::Parser::processPopulateAsync::<lambda_1>::operator () Thread ID: 19060]

DEBUG: fileType: * [CabbageParser.cpp (916) cabbage::Parser::processPopulateAsync::<lambda_1>::operator () Thread ID: 19060]

DEBUG: Adding directory: [CabbageParser.cpp (923) cabbage::Parser::processPopulateAsync::<lambda_1>::operator () Thread ID: 19060]

DEBUG: Scanning directory: [CabbageParser.cpp (931) cabbage::Parser::processPopulateAsync::<lambda_1>::operator () Thread ID: 19060]

WARNING: populate directory does not exist or is not a directory: [CabbageParser.cpp (935) cabbage::Parser::processPopulateAsync::<lambda_1>::operator () Thread ID: 19060]

WARNING: No files found in directories [] with type '*' [CabbageParser.cpp (964) cabbage::Parser::processPopulateAsync::<lambda_1>::operator () Thread ID: 19060]

DEBUG: Total files found: 0 [CabbageParser.cpp (1050) cabbage::Parser::processPopulateAsync::<lambda_1>::operator () Thread ID: 19060]

DEBUG: No files found, using labelWhenEmpty [CabbageParser.cpp (1058) cabbage::Parser::processPopulateAsync::<lambda_1>::operator () Thread ID: 19060]

DEBUG: Result items count: 1 [CabbageParser.cpp (1064) cabbage::Parser::processPopulateAsync::<lambda_1>::operator () Thread ID: 19060]

DEBUG: Calling callback with result [CabbageParser.cpp (1068) cabbage::Parser::processPopulateAsync::<lambda_1>::operator () Thread ID: 19060]

DEBUG: Populate callback received for widget: presetCombo [CabbageProcessor.cpp (507) CabbageProcessor::onIdle::<lambda_2>::operator () Thread ID: 19060]

DEBUG: Result contains items: yes [CabbageProcessor.cpp (508) CabbageProcessor::onIdle::<lambda_2>::operator () Thread ID: 19060]

DEBUG: Items count: 1 [CabbageProcessor.cpp (510) CabbageProcessor::onIdle::<lambda_2>::operator () Thread ID: 19060]

DEBUG: Updated widget items in internal state [CabbageProcessor.cpp (517) CabbageProcessor::onIdle::<lambda_2>::()::<lambda_1>::operator () Thread ID: 19060]

DEBUG: Enqueued widget update for idle thread processing [CabbageProcessor.cpp (534) CabbageProcessor::onIdle::<lambda_2>::operator () Thread ID: 19060]

DEBUG: Merged populate config (processing deferred to avoid blocking) [CabbageParser.cpp (330) cabbage::Parser::mergeJsonProperties Thread ID: 15604]

DEBUG: Merged populate config (processing deferred to avoid blocking) [CabbageParser.cpp (330) cabbage::Parser::mergeJsonProperties Thread ID: 15604]

B 0.000 .. 1.000 T 1.000 TT 1.000 M:

0.00000

0.00000

new alloc for instr 2:

Number of presets found: 1

Found preset: No Presets at index 0

new alloc for instr 3:

Current preset is: at index 0

```

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [18 January 2026 13:08 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975/25 "2026-01-18T13:08:57Z")

</div>

That seems to show that the directory doesn’t exist. Aew you trying my simple example, or the grid sequencer?

---

<div class="post-metadata">

**Author:** ![hdale94](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/hdale94/32/6371_2.png) [@hdale94](https://forum.cabbageaudio.com/u/hdale94)\
**Post date:** [18 January 2026 13:09 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975/26 "2026-01-18T13:09:59Z")

</div>

Yeah trying your example

 ![image](https://forum.cabbageaudio.com/uploads/default/original/2X/0/0048094242415dbf4f387b5885ff30fe5b665ed3.png)

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [18 January 2026 13:11 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975/27 "2026-01-18T13:11:44Z")

</div>

I’ll have to check myself on Windows, could be a platform issue. Maybe it’s not parsing the directories correctly there.

---

<div class="post-metadata">

**Author:** ![hdale94](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/hdale94/32/6371_2.png) [@hdale94](https://forum.cabbageaudio.com/u/hdale94)\
**Post date:** [18 January 2026 13:13 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975/28 "2026-01-18T13:13:44Z")

</div>

It does parse it when it is a single string though, any upstream changes that didn’t make it into the release?

---

<div class="post-metadata">

**Author:** ![hdale94](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/hdale94/32/6371_2.png) [@hdale94](https://forum.cabbageaudio.com/u/hdale94)\
**Post date:** [18 January 2026 13:16 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975/29 "2026-01-18T13:16:12Z")

</div>

This works fine, just when I wrap it in an array, it doesn’t work

 ![image](https://forum.cabbageaudio.com/uploads/default/original/2X/2/25dddf0f2643d3bb7641946a5455477dbda2c516.png)

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [18 January 2026 16:28 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975/30 "2026-01-18T16:28:15Z")

</div>

> [@hdale94](#):
>
> It does parse it when it is a single string though, any upstream changes that didn’t make it into the release?

I don’t think so, I need to run it myself on Windows to see why its failing.

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [18 January 2026 17:33 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975/31 "2026-01-18T17:33:37Z")

</div>

That’s odd. There was an issue in my code that should have prevented this for working on MacOS too, but somehow I couldn’t recreate the issue there. Fixed now.

---

<div class="post-metadata">

**Author:** ![hdale94](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/hdale94/32/6371_2.png) [@hdale94](https://forum.cabbageaudio.com/u/hdale94)\
**Post date:** [18 January 2026 19:17 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975/32 "2026-01-18T19:17:33Z")

</div>

Nice, now it populates correctly, pulling the presets from the different folders aswell 😄

---

<div class="post-metadata">

**Author:** ![collie](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/collie/32/4564_2.png) [@collie](https://forum.cabbageaudio.com/u/collie)\
**Post date:** [7 March 2026 16:30 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975/33 "2026-03-07T16:30:47Z")

</div>

hello, just posting in here because I notice hdale94 had a similar issue to me..

In my csound file (cabbage3 + csound7) I am settings ksmps to 64, but when I run the file I always get the following in the console:  
sr = 44100.0,  
kr = 4410.000,  
ksmps = 10

It’s as if something is forcing ksmps to 10 which breaks the rest of my file (phase vocoder opcodes) because it all runs on multiples of 64, causing awful audio quality

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [7 March 2026 18:33 UTC](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975/34 "2026-03-07T18:33:48Z")

</div>

That’s odd, I just tried quite a few examples here and they all report the correct ksmps. Do you have a simple example you can share? I wonder if the issue isn’t caused elsewhere?

[Previous page](https://forum.cabbageaudio.com/t/working-with-presets-in-cabbage-3-with-custom-ui/4975.md?page=1)
