Cabbage Logo
Back to Cabbage Site

Import CSD from WITHIN Cabbage Feature Request

Hey Rory,

I’ve mentioned this progress in the mailing list, but anyway.

It would be cool to load a CSD from WITHIN a cabbage VST that saves the location of the CSD from within the project. Like say I create a blank template, load it into cabbage, then live code a bunch of instruments while I’m sequencing, then when I save from vim and save the project, the csd is loaded from disk when the project re-opens.

Right now, I have a blank patch with a bunch of GUI objects that I can call from within live parsed instruments and I have 16 blank instruments so that the 16 MIDI channels are mapped to the internal MIDI port. I also have multi-channel output.

Here’s a demo video and a full song using this method. Right now, I have to UDP send everything when the project opens which isn’t that bad, but it would be cool to do some day. :slight_smile:

I’m not sure I follow, but Cabbage does load a csd? That’s kind of a fundamental operation :rofl: What is it about the way things currently work that prevents you from working with it?

I mean from within a plugin. Basically a cabbage object that loads a csd from within the plugin within the daw, not in the main application.

Say I have some random csd on my drive, and I want to live code with it so I need to enable port 10000. If I make a cabbage plugin with like say, 64 generic knobs and 16 blank instruments with the port enabled, I can send instruments to it from vim-repl on the fly. (This is demonstrated in the youtube videos I linked)

I know this isn’t exactly a documented/supported use but it’s actually heavily time efficient. I can live code my instruments just from within the DAW, as I am sequencing and I don’t have to make a brand new cabbage plugin every time I want to make a new instrument or slightly change the architecture, or worry about inaccurate MIDI routes and coding dedicated OSC stuff to communicate between the DAW and the terminal, plus it’s accurately clock synced to the DAW itself. You gain tons of benefits doing it this way. It effectively turns csound into a realtime modular synthesizer but without all the gui baggage and cable mess of pd/reaktor/etc.

However, since there’s no way of importing csds from within a cabbage plugin itself, if I want to re-open that project, I’ll have to parse all that code again or make a dedicated cabbage plugin with the csd in it and re-map all the instruments to it (the first is much easier and more efficient).

There is an autoupdate() identifier you can use with the form widget. It allows for a kind of live coding where Cabbage will update itself whenever the underlying text changes. Note that adding widgets on the fly won’t work so you’ll need to create a generic GUI first. Try this and let me know. It’s not documented but I know some people who are using it without any problem.