Cabbage Logo
Back to Cabbage Site

Plugin resizing (scroll down for latest solution)

Good morning @rory,
The example with guimode (“queue”) works well, what happens is that as you have told me, all the code based on “chnset” and “identchannels ()” at the graphics level disappears.
It is curious, how inserting the plugin “Test Oscillator (even if it is inactive)” activates any plugin that is inserted after it. It’s a very old trick in Logic.
More than a plugin, I suppose it is an application.

Yes, but it can easily be replaced with better more efficient options.

I have been taking a look at the new codes, and they look very interesting, especially because of the low CPU consumption that you mention. Now I am updating some plugins, and if I apply these new codes, the user sessions will not work.
Soon and with the new projects, I will apply them of course.

  • cabbageSet
  • cabbageGet
  • cabbageCreate
    This all looks great :wink:

Yes, these are best kept for newer plugins. For now the old behaviour and identchannel()'s are still the default. I don’t plan on changing that as it would break people’s code which we don’t ever want to happen!

Have a little issue with this. I removed the original code for resizing to implement this, but this happens when I run the code (have removed all previous resizing code)

Do you still have an identifier channel attached to the form? Maybe you can PM me your file?

I fixed the first issue, but I’m now looking into why the resize combobox isn’t set to 100% when the instrument first opens. I think there is something in the snaps file that is messing it up…

[edit] I think I spotted the problem. I think it uses a default channel name, like combo1, which is messing with some other things saved in the presets file… I’m just looking for a fix now…

I thought about something related. Would it be favorable for the .snaps file to somehow ignore the resizing-combobox value? With the way I had it set up before, if you set the resize value to 125%, and then switched preset, it would change back to 100% because the .snaps file had stored that value.

I don’t think the snaps file should save the sizes, I think the host should save those. This is a tricky one. I’m still trying to find the real cause of it…

Just pushed a fix for that now. It turns out that both the resize combo and the presets combo were using the same default channel name :see_no_evil: Let me know if this works better. It runs fine for me here.

Thanks :smiley:

Hi,

It works well on my plugin (with many many images so that’s really impressive). How can I resize the form as well?

Capture d’écran 2023-05-14 à 10.46.48

Relevant parts of the code:

form caption("Nymano AudioShaper") bundle("./assets") size(600, 470), pluginId("envf"), guiMode("queue"), colour(0,0,30) typeface("./assets/Middleschoolishard.ttf") $FrontColor latency(0.01)

combobox bounds(10,50,80,20) channel("sizes"), value(3) mode("resize")

Thanks :slight_smile:

Julien

If I remember correctly, in a DAW it will resize the form, but I think there is some bug that doesn’t allow resizing the form directly in Cabbage.

Correct, that plugin resizing is strictly for plugins :frowning:

Ok perfect then there are no issues. Thanks!

Is a custom percentage still possible to set ?

Being able to drag the sides would be a little more intuitive for people to work with I suppose.

No, I’m afraid not. But I can add more percentages, although it would be hard to do it now without breaking some people’s instruments. The problem with dragging is it makes the UI looks like muck because if the x/y ratio isn’t maintained everything gets skewed.

I see,
While setting relative coördinates according to the main window size in all GUI elements, I would still need to resize the main window some way.
The skewing isn’t really a concern for me.
Maybe a ‘set max size’ could be useful like in a regular window according to the used screen (desktop, ipad, tv-screen) while keeping the x/y in tact ?

It would be cool to have the combobox list of percentage options opened up and accessible, so that they can be tinkered through trial and error :upside_down_face:

Hit me up if you need a pen and paper to check off the rest