Suggestions to port svgElements from Cabbage 2 to 3

I’ve use svgElements in image widgets for some custom display things in Cabbage 2. I guess this is now much simpler in Cabbage 3. What strategies would you use to adapt those displays to Cabbage 3? The use cases are a bit diverse, but commonly, I use them to display data generated from instruments (buffer displays with custom markers for record and play head, spectral displays, etc).

You should be able to use them in the same way as before. I noticed that the docs for the image widget are missing the svg part I will update this). The SVG JSON object looks like this:

"svg": {
    "markup": "",
    "padding": {
        "top": 0,
        "right": 0,
        "bottom": 0,
        "left": 0
    }
},

However, if I needed some kind of custom display, I would get an LLM to create a new widget to do all the heavy lifting. It would be much faster. Here is an example I showed a the Csound conference. I create a custom slider, but the general procedure would be the same for any widget.

Excellent, thanks. I was using github copilot in VScode and it could convert most of my Cabbage2 plugin, but it was stumped on svg display and csound output. Now that it is in the docs it will probably be able to find it. So good. Thanks.

@Oeyvind Here is a quick demo of how to create and integrate a custom widget to your Cabbage 3 projects. Thought it might be useful for some of your display systems.