Inserting plugin presets into MediaBay suggestions

Hi, I was playing earlier today with creating an app for fast importing presets of Vsts into the MediaBay.
I’ve seen similar trials in the past from other users, and my process didn’t differ a lot.
My trial was created for Arturia’s Pigments but I plan to do this for all my plugins, because I really want (and will) import everything to mediaBay. I do have Komplete Kontrol, which works great, however, I like to get out of the wrapper logic, since mediaBay is loading the actual plugin. At the same time, seems like I’m able to use my midi controller and an external app, to browse through mediaBay accurately, and this is a big plus, because I won’t have to depend on the NKS approach all the time.

I’ve used auto keys and mouse moves/clicks to correctly move through the presets (my test was limited to 100 presets) save them to mediaBay and in the end assigning category/subcategory to each preset based on the corresponding ones of Pigments.

It took around 3 minutes for this import, this means that if I had continued the process, it would take around half an hour for the whole default pigments lib to import.
Not bad, not perfect either. Since, I have plugins with more than 5,000 each (omnisphere is an example), this means that even with such automation, it will take many hours eventually to import.

Here’s the video showing this import:

Now, I was wondering if anyone came up with a better approach, i.e. instead of setting up a robot to perform automated keyboard/mouse actions, actually import straight away into vstPreset file format. I can, and did in this test, read vst’s database to correctly get preset names and properties, i can even write to the mediabay db, no problem at all. However, I have no knowledge on how I could create (if it is really possible) the vstpreset corresponding files.

Anyone had success with something like this?

1 Like

Interesting!
How you manage adding tags/categories to presets ?

Hello my friend, I just read them from Arturia’s database, and updated the mediaBay’s one accordingly.
Most vsts do have similar databases to exploit these properties.

1 Like

Well, the documentation for the file format for a vstpreset is here:
https://steinbergmedia.github.io/vst3_dev_portal/pages/Technical+Documentation/Locations+Format/Preset+Format.html
As is a bit typical for Steinberg, it is a bit sparse and doesn’t fully help… (e.g. it is not described what the “chunks” and “chunk list” are, you have to dig further to find out that there seem to be three type of chunks, one for the VST3 Component (with the state data of the plugin, the “preset”), one for the VST3 controller (with any special data for the controller, but then there are plugins that are a SingleComponentEffect, in that case the two seem to be identical), and one for XML meta information.
Now you could theoretically take a preset file from an third party plugin, write it to a vstpreset (probably everything apart from the Controller data is optional, dunno), but you have to be really sure that it is exactly the same format that you get when you call the Controller::getState() method of the plugin, and that thus the plugin expects when setState() ist called, else the result is probably unpredictable…
I tried to find out for Arturia, if I export a preset file from the plugin gui, the file format is a bit different than what gets save in the vstpreset file, there is some additional header. I couldn’t really find out where user presets are saved with Arturia plugins, is it some sqlite-DB somewhere?

1 Like

Hi, thank you for your input!

When you compare the initial preset with the vstPreset there is a whole new array in the vstPreset. However, once you “save as” from the internal vst’s browser, you get a file very similar to the vstPreset apart from a section which I think can be just copy/pasted if not omitted. Of course in the vstPreset we have a header and a footer containing the xml, no problem here.

I couldn’t make it work using the original vst files in pigments, the vstpreset was showing in the explorer as expected, however pigments refused to load it, no error or warning.
Perhaps I missed some data to add, I will surely have a more careful look.

If I understood correctly, they are save under C:\ProgramData\Arturia\Presets\PluginName\User\User

There is an sqlite too, it holds all arturia’s presets, and this is where I take the attributes data to populate mediaBay’s db.

You mean, manually copy paste tags from pigments to Mediabay ?

Manually, nope :slight_smile:
I read Arturia’s db, get the attributes in a map. Then open mediaBay’s db, and update the attributes there based on my map.

1 Like

Yes! Actually I had to have a good look at the file format. It includes as expected chunks and offsets. I’ve made a small routine to add the sections properly, and it now works as expected! However, this was done with 2-3 presets of Pigments, I’ll get back as soon as I test some more vsts. A short note: Comp and Cont were identical. I really have to compare more files to conclude this is generally the case.
But! It’s a start! Thank you again!

Just for fun I started writing a vst3preset class in python :smile:, but atm I just completed a parse_from_file() function… write still to do…

Comp and Cont are not always identical, there are presets where Cont is empty, or where there is some data. My guess is that if the plugin is a SingleComponentEffect (VST 3 SDK: SingleComponentEffect Class Reference), it is identical. You can check that in the vst3plugins.xml, if the plugins only has an “Audio Module Class”, I think it is a SingleComponentEffect (despite the name, it can be an instrument)

1 Like

Yes, just saw that in other vsts, so it must be worked out as well.

Let me know how it goes :slight_smile:

I don’t even know yet whether I have a use case for it, but I guess it’s just a case of “a man’s gotta do what a man’s gotta do” :wink:

Although I have tried once to “port” vstpreset from old VST2 plugins to their VST3 counterpart (if they don’t have the same id, which some sadly don’t), I tried that manually by editing the values in the preset files, and it didn’t work… Maybe it works better if done properly with a program…

We’ll see. If I can make it as a proper python module, I’ll put it on github…

:joy: :joy: :joy:

I have prepared an external app which in combination with my midi remote script, can read mediaBay, and let us browse through its contents using our controller while at the same time viewing on our controller (and a small utility again I’ve made for viewing controls on another window) this browsing.
Now, this would not be very useful, if my mediaBay holds just factory presets by Steinberg, it’s much more useful (to me, most people tend to use their mouse, that’s cool, np) to add to the mediaBay all my vsts, similarly to what I have done with my NKS libs.

I published the first public beta for my vstpreset-module:

At least it can parse a vstpreset file and write to a new one that is identical, so it can’t be too wrong…
And it was fun and I learned how to use python’s “struct” module :smile:

1 Like

Thank you for sharing this, it is really useful, since I could compare it with what I’ve done in a bit different way, due to different functions involved, in B4J.
Seems we have identical final output, that’s cool, if not, we’re both doomed :joy:

As said, in a previous post, after the insertion of all presets automatically (again using Pigments for now) I’ve updated all entries in the mediaBay according to characteristics of the original preset. Unfortunately there is no way of doing such thing without reading the plugins presets database, thus my utility cannot be universal. One needs to find this db, search for the right fields and proceed. My next stop is Omnisphere and after that, Elektra, Nexus and Hive.

Let me know if you (or anyone else obviously) think to step into such process, I can happily share the code :slight_smile:

Oh, and a benchmark: Each preset took 3-4 ms on my PC. Now we have speed at least.

Never heard of B4J before… So it is some framework with a VB like language that runs on a JVM?

Yeah, there is no way around it, every plugin vendors has different ideas on how to store presets and metadata (if at all), and you need to cover them individually. Just lucky that if the vendor uses a database for that, it is pretty much guaranteed to be a sqlite!
Also, you definitely need to check if the preset data saved in the vendor’s files is identical to that what the plugin returns from getState() and what Cubase then saves as a .vstpreset . I did actually already find an (FX) plugin where there were actually slight differences (but didn’t test whether it makes a difference tbh).

I don’t know if I can help you with the project, as a) I am not very fluent in VB, only some traumatizing experience with VBA in Word97 :flushed: and b) tbh, I don’t really use neither the MediaBay nor many VI anyway, and if so, rarely presets apart from some homemade ones :wink: , so I probably have limited use for your project, as cool as it may be.
But I guess other could be definitely interested, why not make a dedicated topic and ask around here?

It’s a pretty good app, “Basic For Java”. You create Java apps, using coding a bit similar to Basic. And absolutely free. I’ve turned to it for developing of some cross-platform apps, and actually never looked back to VB (though I still have to use VC).

True. I will only work on ones with sqlite (and hopefully not ciphered) databases and if there is no db but some xmls or jsons or txts that can be read in a matter of minutes, I will have a look took.

Np, it’s finished already, at least to the extent I needed it to be :slight_smile:

It’s for preset junkies like me, no worries, I totally understand!

Interesting! Can you share the name so I can have a look? To me, it seems like there is no need our file to be identical to the auto produced ones. Many states are just of null significance, as far I can tell.

I think that if someone needs something like this badly will find this thread by searching. Don’t we all do that? :slight_smile: But anyway, once I finish a more user-friendly GUI, I will post here a link.

1 Like

The plugin was FirComp2 (a compressor plugin), whose presets are basically xml, but in the vstpreset there was actually one additional element. But I think that most of the time the presets will have the exact same format as the Comp chunk, because everything else would actually be extra work for the developer.