Cabbage Logo
Back to Cabbage Site

Using populate("*.dll", "C:/Program Files/VSTPlugins/") with filebutton not working

Hello, I’m working to use Cabbage to create a basic VST plugin host that I can use to create FX chains. Thus far the code is very basic and it seems to me that nothing is wrong, but the filebutton’s “populate” attribute does not seem to be working (the other attributes I have set are working but “populate” acts as default, showing all file types and starting up in the working directory). Everything else works normally; the code compiles without any errors and I can select a file and print its path to the console. Is there something I’m missing here (I want the filebutton to show only .dll files and start in the user’s VST plugins folder)?

<Cabbage>
form caption("Untitled") size(400, 300), colour(58, 110, 182), pluginid("def1")

filebutton bounds(5, 5, 100, 40) populate("*.dll", "C:/Program Files/VSTPlugins/") channel("filebutton1") text("Load Plugin", "Load Plugin")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d 
</CsOptions>
<CsInstruments>
; Initialize the global variables. 
ksmps = 32
nchnls = 2
0dbfs = 1


instr 1

;counter for printing at k-rate
kcount init 0
kcount+=1

a1 inch 1
a2 inch 2

SFile chnget "filebutton1" 

if changed(SFile)== 1 then
    printf "%s\n", k(1), SFile
    SMessage sprintfk "text(\"Selected File:%s\") ", SFile
    puts SMessage, kcount
endif

outs a1, a2
endin

</CsInstruments>
<CsScore>

I think this was a bug that file a while back. Can you try the latest beta version:

https://dev.azure.com/rorywalsh/cabbage/_build/results?buildId=684&view=artifacts&type=publishedArtifacts

Hello, it appears VST loading using the vst4cs opcodes is no longer supported. Is there any other way I can create a VST that loads other Cabbage instruments I have already created in some kind of effects rack (either packaging the code of one .csd into another, packaging the audio processing code of a .csd as a UDO, or loading/launching an existing plugin inside another plugin as a .csd rather than as a .dll)?

That’s correct. The author of these opcodes no longer produces binaries for OSX or Windows.

You can easily put your code into a single .csd file and chain the signal between different instruments. I would probably create a set of UDOs for this as I think it makes it easier to manage, and gives you more modularity. Creating some mechanism for dynamically modifying the signal graph might be a bit of work, but should also be possible.