Cabbage Logo
Back to Cabbage Site

Presets.. once again.. again

This old chestnut :laughing: It’s recently been reported that the channelStateSave/Recall way of saving presets doesn’t work in Cubase or Logic unless you start running your session. It’s a unique use case, but a problem all the same. So it’s time for yet another preset discussion :roll_eyes:

Part of the reason I wrote the channel save/recall opcodes was so users could save individual preset files, which would make them easier to share. So I guess it’s time to bow to pressure and add this feature into the native preset system. The question is, how best to do it. There are a few options here.


Solution One

Simply add two new modes to the filebutton:

  • mode("named preset multi")
  • mode("preset multi")

When we add the multi label, Cabbage will write each preset as a single file in current directory, or in the plugin’s system dirs. The mode("remove preset") should be clever enough to search for presets across any number of snaps files and remove accordingly.

Solution Two

Add a new presetFileType("Single/Multi") to the form identifier. This would provide a very quick solution for anyone wanting to switch single def preset files. It would be set to multi by default so as the match the current system. This is also the simplest to implement.

Solution Three

We (I :rofl:) basically start from scratch and take the best of the current preset system and combine it with some new features to create a super improved system of saving/recording and restoring presets. I think in this case it might be best to introduce a new presetbutton and presetcombo widget. It would be a little work, but it would create a clean separation between the preset system and Csound.


I don’t mind doing the work. If people think the current system with support for multiple files would be good enough, then solution 2 would certainly be the simplest. Let me know your thoughts.

p.s. I’m pinging some users who have contributed to preset discussions in the recent past, I hope this doesn’t come across as spam! I just want to get the community involved in this. @Gerbo, @flaviogaete, @Karamel1, @hdale94 , @chronopolis, @Kzz, @RZorn, @vallste, @Samo, @Retornz

I’m quite happy with the system as it is right now, and can’t say I have met any notable issues in any DAWs. The only thing I’ve been missing is splitting the presets into single files, and maybe organizing synth presets into categories inside the combobox (but that may be possible already, not sure)

Category

So I guess Solution Two sounds fine for me.

It would be very convenient to be able to differentiate between factory and user presets, the latter with opening folders to read and save :grinning:
I don’t know if it will be possible to use both types with the solution (2), (single = factory), (multi = user)
but if not, then I think it would have to be (3) :sweat_smile:

Hi, i prefer use ftload,ftsave . this way you can combine knobs data with sample data(if there any) and save to single file which is easy to share.

But if you try to modify any of your sliders in Cubase or Logic, before you hit play, nothing will be saved because Csound will not have run.

Thanks for the heads up Rory!

I personally didn’t end up using (in my first & most recent device!) the current preset system for a couple of reasons:

  • I managed to setup my widgets so they’re recognized by the DAW directly (Ableton & Logic in my case)…
  • Because I had a need to create my ‘own’ preset system, internal to the plugin itself (a contained grid system); to shamelessly plug my own work, but really to illustrate the point, I’ve made a small video of a case in point:

I have a couple of thoughts about this, from a user perspective –– I realize some (or all) of this might be just too complicated to implement, but perhaps it’s useful feedback before you launch on such an enterprise…

I would love to have the following:

  • Add two identifiers to all the widgets: includeInPreset(y/n), and saveToPresetFileAutomatically(y/n)
  • Have say only three widgets (for now, though the idea to have a menu w/ categories would be cool to have at some point) –– combobox, slider, checkbox/radio buttons –– with also two identifiers: isPresetMasterController(y/n) [and Cabbage could only recognize ONE widget in the system as a “preset widget”], and recallPresetsAutomatically(y/n).
  • Perhaps also add to the button widget, two identifiers as well (in this new system/3rd solution –– I realize there’s the current system now that offers some similar implementation): saveWidgetsCurrentState() and loadCurrentIndex(default) –– this last identifier would be dependent on the master preset widget’s current index value or would otherwise load a default preset.

So in the end, we could have say one master preset.json or something of the sort with a raw index at the top level, something like this:

1:
    category: "lead synths"
    presetName: "Super Saw"
    channels:
        "slider1": 0.35
        "slider2": 1.
        "slider3": 0.2
        "combo1": 3
        "combo2": 1
2:
    category: "basses"
    presetName: "Jazz Bass"
    channels:
        "slider1": 0.5
        "slider2": 0.95
        "slider3": 0.35
        "combo1": 2
        "combo2": 3
...etc.

AND we could still do a cabbageSetValue to this so called master preset widget :grin:

But personally I love the idea of presets being “automatically saved” and the user just selecting the “current preset” to work on, if that makes sense?

Anywho, my two cents, I hope they help!

BTW, if you’re curious about my device, you can get it for free here

Hi @flaviogaete, the new device looks great. really slick UI. I haven’t had a chance to test it yet, but I will do when I get a chance.

In what sense? In that a user pushes a button and everything gets saved, or in that the plugin somehow automatically saves presets as you work with it?

The problem with this is that it once again gets tied to Csound.

Incidentally, when you launch your plugin in Logic and make some changes before you ever hit play, those changes won’t be saved because Csound is not running. Or, if they are, we need to know how you did this :rofl:

[edit] Just tried your plugin. Very nice :clap:

1 Like

Thanks Rory! Looking forward to your feedback!

In the 2nd sense, actually, AND so that when the user changes a preset widget value, all the (specified) settings are also automatically recalled.

Ah, OK, well in that case the first idea I can live with: a special “Cabbage-only” button.

Will test this! But I understand now :slight_smile:

I ran some tests and found some erratic but yet curious behaviour: on a first save – random things were remembered; on a 2nd pass, the settings were effectively saved – without ever running play…

…at any rate, in a dream world, I’d vote for an independent system (based on say a json file that one can either export/import externally or that can be edited), but which can be accessed from Csound anyway (that is, I want the full Mc Happy Meal :rofl:). Another idea that’s floating in my head (and not sure if it can be implemented with some widget customization) is if…

  • Each widget/channel would automatically belong to some kind of array (that’s only expanded on as the need arises and perhaps with a cap or something).
  • Not sure if something like this could be implemented with gen tables, still too green with Csound to really know or understand (so that any values may be stored within the Csound patch, independently of the DAW?).

Mmm, not sure if I’m following actually. I tried something with the channelStateSave and channelStateRecall opcodes and I managed to save into discrete preset files, and so they seemed to work OK in Logic without ever pressing play or including any Csound stuff for that matter (save from calling up separate ‘save’ and ‘recall’ instruments)…

PresetSetGet.csd (4.2 KB)

Hmm, is that an effect or a synth? What Mac OS, and version of Logic are you running there?

That was an AU synth, and I’m running MacOS 11.6 and Logic 10.6.3

Can you try exporting it as an effect?

Hi Rory,

I was finally able to test this and yes, on an AU effect it’s broken, but on an instrument it works well.

I’ll include my latest example that I’ve tweaked to include MIDI control. It’s most likely not the most efficient way to write this…

PresetSetGetMIDI.csd (12.3 KB)

if anyone would like to give it a shot making the code more efficient, it’ll be greatly appreciated! I was having trouble with the order of commands when passing global info dynamically by adapting a channel, say for example:

SPreset sprintfk "preset%d", gkPreset

(and then “save preset on channel SPreset”).

Yeah, it seems that the synths work fine. We’ve always had the issue with effects. I know it’s a very unique and probably seldom met situation, whereby you might tweak any parameters before hitting play, but I guess it’s still something that might jar the user a little.

In Cubase, there is a way to activate the plugins, but the vast majority of users are reluctant to use this option:

In Logic, since the old versions of the 90s, the plugin “Test Oscillator (installed on first insert and shutdown)” is used for the same purpose. Also the monitor input, activates the channel:

The ingenuity of @rorywalsh can with everything, as long as his paternity allows us :wink:

Thanks @gerbo, you’re too kind! Am I right in assuming that most users would be Ok if I scrapped the multiple presets in a single file approach? It seems that way to me. In order to do this without breaking old instruments, I think a new set of preset widgets might be the best way to go. So we need:


  • a preset button to trigger saving of presets - with user definable default directory
    - should we add the save with generic name option? Does anyone use this?
    - when clicked should this bring up a named preset window, or a file browser window? (or perhaps the option for either)

  • a preset combobox / listbox
    - should behave in much the same way as the current combobox, but dedicated to presets
    - would be nice if one could double click an item and rename it?
    - should come with a way of protecting certain elements as in the current system

  • a preset button for removing the current preset
    - similar to how the current remove preset

  • a preset button for load a preset directory?

  • the last opened preset directory should be saved when a session is saved.


These buttons can probably be implemented as a single widget with various modes. Am I missing anything?

[edit]

  • especially for @flaviogaete - a way to call presets from Csound. So although the new preset system will be Csound agnostic, that’s not to say we can find a way to hook into it once Csound is running. We might as well aim for the stars here!
1 Like

A new concept of widgets would be nice, leaving the current ones

It would be very interesting to be able to save the user presets in
different folders, for example; drums, guitars, voices, etc.

Presets are more difficult to rewrite, if they are in folders. But if factory and user can be differentiated, then factory might have the protection option.

I think being able to choose the name you want would be the best option

  • Would the submenus in listbox and combobox be possible?
1 Like

Something like that for example, could be implemented? :face_with_monocle:
menu

This is also easier to implement :wink:

Certainly worth exploring, should be possible with a combobox, but I’m not sure about a listbox. In fact, now is the time to discuss whether a combobox or listbox are even the best widgets for this purpose. We can also design our own from the ground up. A clickable menu might also be worth explored.

I guess one could add multiple preset buttons for saving, each one pointing with a unique directory?