Cabbage Logo
Back to Cabbage Site

Proposed change to preset files

I’m considering modifying the preset file system so that it only uses a single file per instrument. This file would have the same filename as the .csd file, but a different extension. It would contain as many presets as the user wishes. I find the saving of presets to different files a little messy when a single file would do. I would provide a script for converting old presets to the new forma.

I’m also considering scrapping the ‘browse for’ dialogue for presets, as under the new system all presets will be saved in the same file. It might be easier just to get users to use the ‘snapshot’ mode with a filebutton. One can always modify the xml afterwards to give each preset a unique name.

Let me know what you think.

Reducing file bloat sounds good to me. I think the many files created by presets made me resist adopting them. Are the benefits to using separate files? Do some people like picking, choosing and deleting preset files manually?

I don’t really know. I rarely use the presets myself, but others, like @Karamel1, seem to use them quite a lot. I nearly have it implemented now, so I guess the wind of change is already blowing!

I totally agree with Rory proposal.
I must say that having more than 40 files of presets for one synth is really difficult to manage, especially that actually it is not possible to associate a comment with each of the snapshot preset.
My wish (should I have one) would be to be able to save within one file, all my presets and to name them : i;e., 1 : FLute , 2: Low Pad, etc…which could be displayed within a combobox for reloading them.

With the new system all presets will be saved in one file, but if you wish to add meaningful names to them you will need to edit the .snaps file manually. Is this Ok?

This would be really OK. Do you mean that each preset will be identified by a tag in xml file ?

Yes. For example(see below), this is how a test xml files look like now, it has two sliders, and I’ve snapped 2 presets. The instrument is named Untitled, and each preset is automatically name with a unique number after it. You change the preset name manually. The next time you start Cabbage it will update the combobox with the new names.

<?xml version="1.0" encoding="UTF-8"?>

<CABBAGE_PRESETS>
  <Untitled0 rslider3="0" rslider4="0" combochan5="1"/>
  <Untitled1 rslider3="0.73600006103515625" rslider4="0.88400006294250488281"
             combochan5="1"/>
</CABBAGE_PRESETS>

I am not sure if this will allow space within names.
Do you think that a solution like below could allow more flexibility ? (Should it be possible to implement of course… but it sounds more xml friendly to me and maybe easier to parse.

<?xml version="1.0" encoding="UTF-8"?>

<CABBAGE_PRESETS>
  <PresetName="Untitled0" rslider3="0" rslider4="0" combochan5="1"/>
  <PresetName="Untitled1" rslider3="0.73600006103515625" rslider4="0.88400006294250488281"
             combochan5="1"/>
</CABBAGE_PRESETS>

That shouldn’t be too tricky, but I need to make sure it doesn’t mess up the session saving mechanism.

It will need to look like this:

<?xml version="1.0" encoding="UTF-8"?>

<CABBAGE_PRESETS>
  <PRESET0 PresetName="Untitled 0" rslider3="0" rslider4="0" combochan5="1"/>
  <PRESET1 PresetName="Untitled 1" rslider3="1" rslider4="1" combochan5="1"/>
  <PRESET2 PresetName="Untitled 2" rslider3="0.29600000381469726562" rslider4="1"
           combochan5="1"/>
  <PRESET3 PresetName="Untitled 3" rslider3="0.29600000381469726562" rslider4="0.62000000476837158203"
           combochan5="1"/>
</CABBAGE_PRESETS>

Where PresetName can be renamed anything you like. I need a child element, hence the <PRESETN> will need to remain.

Yes ! This is very clear .
One last thing and question … Do you think is is possible to insert a blank line between each of the presets (for better reading) ?
Also, what will happen if the user deletes <PRESET1 …>, will next recorded preset replace the missing one or is the numbering important ?

Users can delete any entry without messing up the presets. The xml parser I’m using will ignore blank lines and won’t write them to file. This is usual for xml parsers. If you add lines manually, the parser will remove them. Not really much we can do about that I’m afraid.