Cabbage Logo
Back to Cabbage Site

Finally, a better way of doing realtime graphics

I’m excited to share some work I’ve been doing on bringing next level graphics to Cabbage. I’ve been working on adding a webview widget that will display a webpage, which is being served directly from Cabbage1. This means we can use websocket opcodes2 to send data over and back between the webview and Csound. Here it is in action:

Not only does this provide us with a way of doing super efficient real-time graphics, it also means users can develop their entire UI with html5/JS. You will still need to add Cabbage sliders for plugin parameters, but if you place the webview over them they won’t be seen. And you can then provide the required hooks to update the parameters in your Csound code. I’m still working on some things, but the initial experiments seem vey encouraging.

[1] this build of Cabbage embeds a web server. You can set the port number when you create the webview
[2] These opcodes were written by Ed Costello. They are not part of the canonical Csound, and are not the simplest to build, so I plan to bundle them into Cabbage directly.


An obligatory scrolling waveform example :slight_smile:


That looks insane!
How will this work in an exported plugin? very curious to see where this is going

Should work just as it does in the videos posted above. I’ve been trying to send fft data so we can make some fabfilter like spectrograms, but it seems to get a little slow. It’s till early days, perhaps I’m chocking it somehow :grimacing:

[edit] I have this working faster now. When I get time I’ll try to port @oeyvind SVG spectral display instrument using something like snap.js or svg.js. The improvement in performance should be remarkable.

1 Like

Is this the way of the future? Moving away from JUCE?

Not at all. JUCE gives us the wrappers for all the plugin formats, and much more, This is just a way to generate nicer, and far more efficient graphics.

Fantastic :blush:

It looks insane! Can’t wait to try it

1 Like

This is so great! Any E.T.A. when it will be inside of Cabbage?

I’ve really gone down a rabbit hole with this :man_facepalming: I’m at the point where I think I can implement it without using websockets at all. As for ETA, I can’t really give one. I’m swamped with real work at the moment :sob:

Hi Rory,

Is it still in the pipeline? Can’t wait to try it out :smiley:

I think @Andy.Fillebrown is almost ready with the new websocket opcodes. Once they are ready I will implement this. I’m doing something similar in another project right now, so I have most of the part already complete, so with any hope it shouldn’t take too long to get it up and running.