Cabbage Logo
Back to Cabbage Site

How to load file and play it from CLI?


I see that Cabbage can load .csd files from CLI when file is passed as an argument,
but can it also play it right away without the need to press play button?

My workflow is that I generate csd files from another program.
And when I hit enter in the interpreter I launch it with Csound
and it plays right away.

As FLTK was deprecated I would like to use cabbage instead of FLTK for UIs
But with my workflow it would be cool to be able to launch and play Csound file (augmented with cabbage code) right away for fast feed back.

Is it possible?

Hi Anton, if you export your instrument as a standalone then it will run whatever score is attached as soon as it starts. :+1: I just tested here on MacOS and it seems to work fine.

Thank you for the answer. I mean smth different.
Imagine how you invoke Csound on csd where FLTK is defined.
It shows UI and plays it right away.

I’d like to do the same with Cabbage, if it’s possible.
If I understand it right. You suggest to load csd in Cabbage and export it.

But I’d like t be able to use it as CLI and play it as it starts, without pressing the play button.
I mean even without exporting through the UI.

That’s not possible. One way or another you will need to launch the UI, and if you want it to play without hitting start you will need to first export the instrument as a standalone. But you could hobble together a system. You could export a single standalone, and simply replace the csd text before opening it. A simple bash file could be written that would do this. Would this not work for your workflow?

Sorry for late reply, yeah, probably it can be achieved this way.
Thank you for the hint.