Cabbage Logo
Back to Cabbage Site

Presets.. once again.. again

At the top (which could be the same surface to click), could there be some sort of display with the name of the preset? :thinking:

You mean that the preset button might show the current preset name? That should be possible. I would like for users to be able to control the appearance of the preset button with Csound, as they can other buttons.

And this is exactly where I would recommend users to save presets. I think it’s up to the plugin installers to create these default locations, which Cabbage can then pick up.

For example, on Mac with Packages, there is no problem for installation in Application Support.
In Windows with Inno Setup and in the Roaming folder, I have presets hosted in that directory working without problems.

It would be very good, if it could have the same settings as any button, as long as it is continuously active :rofl:

Another issue has surfaced here. When I select ‘save preset’ where should it save? In the user folder, or the factory folder? I’m starting to think that the factory folder should be read only.

A developer who is creating presets for their synth can save presets in the user folder. When they are ready for distribution they can move them to the factory folder. This would mean I don’t have to add any protection to the factory folder, as it will always be read-only. Moving your presets is a slight inconvenience, but it makes things simpler in Cabbage, which makes things easier to maintain, and less prone to bugs. @gerbo, what do you think?

The settings to save are those of the user. Factory folders are read-only. If instead of protecting them with the previous system, they are implemented directly read-only, much better.

That we have to move the presets from the user folder to the factory folder is a lesser evil. Don’t worry @rorywalsh because that’s not inconvenient.

1 Like

Ok @gerbo, I have something for you to test. I just triggered a new build now so it will take about 30 minutes to cook. The new presetbutton widget comes with a few new identifiers:

  • textColour() - sets the colour of the menu items text (fontColour() is still used to set the button font colour
  • highlightedItemColour() - the colour of a menu item when the mouse is hovering over it
  • highlightedTextColour() - the colour of a menu item’s text when the mouse is hovering over it
  • presetNameAsText(val) - sets whether the presetbutton will have its text set automatically when a user changes preset. This will cause the button text to update regardless of whether Csound is running or not. So users of plugin effects in Logic and Cubase can see what preset is selected even if a session if not running.
  • userFolder("folder", "extension") - a user folder for saving and reading presets from. This can be passed a folder macro, which makes managing preset locations a little easier.
  • factoryFolder("folder", "extension") - a factory folder for presets. This is read only and can’t be modified by Cabbage. This can also be passed a folder macro.

The following example illustrate:

  • Loading and saving presets
  • How submenus are created from sub folders
  • Dynamically setting a presets from the Csound orchestra (especially for @flaviogaete) -

    must be given a full path…

  • Retrieving the current preset

    will always return a full path…

  • Dynamically updating a label with the current preset name

Let me know how it goes. I don’t think it’s anywhere near production ready, but it’s a good start :wink:

2 Likes

Thank you @rorywalsh and @Gerbo for all this work!

1 Like

I have just arrived, and I have done some tests with the previous one assigning folders to it and for now it works in the IDE, in passive and active mode. I have not had time to test it in the DAW, but I will when I finish this one that is under construction. What I just read, it looks super pro. Precious @rorywalsh :wink:

Thanks also to you @flaviogaete, for your interesting contribution

1 Like

I think that with, Save and Save As …, it is very easy to set the presets that are being retouched. On the one hand Save, it stores the changes instantly and, with Save As …, if you want to save as a different preset.
Prests Folder, to be able to access in case its elimination is required.

Are these changes possible?
For now everything is working fine. Tomorrow I will do more tests with Logic and Cubase.
Good night and rest as long as your baby allows you :wink:
newpresets1

Yes, good ideas. I’ll add them to the list :slight_smile:

I have applied both root directory and user paths to “Application Support” on Mac and both Logic and Cubase respond correctly in either of the two

  • lavel, without the session running, does not assign the name of the preset. When you save the session and reopen, it does appear correctly.
    Anyway, the presets button is enough. He does keep the name perfectly.

These first tests on Mac are very satisfactory.
Thank you very much @rorywalsh. This preset system is going to be a break :+1:

I think this is expected in effects running in Logic and Cubase. That’s why I added the presetNameAsText() option you suggested :wink: I’m just working on your recent suggestions now. :+1:

presetNameAsText () its operation is correct and everything responds with great precision :+1: I will do more tests with several Mac systems and in Windows 8 and 10. For now I will not be able to with Windows 11, I do not have it installed :thinking:

I just pushed the latest suggestions to git, a new build should be ready shotly. Let me know how it goes :+1:

@rorywalsh The latest azure build does not contain the Windows installer :roll_eyes:

These latest changes work perfectly :+1: :
Save
Save As
Preset Folder

For now I have only been able to do them on Mac and in the main DAWs.
The new macros reserved for user paths, are they only available for combobox and populate?

Great. I’ve not been spending much time on Windows myself these days so I haven’t got to test them there, but I will when I get chance :+1:

They should be available to any widget that uses populate() or of course userFolder() and factoryFolder(). It is no problem to add them to other widgets. Just let me know which identifiers you think should support them and will add them :+1:

The question is mostly directed at the new widget “presetbutton” userFolder / factoryFolder and its work with Windows. With Mac all tests done on the root and user directory are satisfactory.

So should this reserved macro do its job well ?:
Windows:
factoryFolder ("# USER_APPLICATION_DATA_DIRECTORY \ Roaming \ DeveloperName \ PluginName \ PresetsFolder", “* .psts”)
It has not yet been proven.

Mac:
factoryFolder ("# USER_APPLICATION_DATA_DIRECTORY / DeveloperName / PluginName / PresetsFolder", “* .psts”)
The latter is tested and working :+1:

Yes, that should work fine. :+1: