-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading non .vstpreset files with load_preset function #245
Comments
Googling for
To confirm this theory, we can download a free preset pack as follows:
For macOS, this will give us a From the terminal, we can then expand that pkgutil --expand-full Vintouch_Vol_1__1_0_0_798.pkg ./extracted Which will give us a directory structure like the following: ⇒ ls -la ./extracted
Distribution
Resources/
Scripts/
'Vintouch Vol 1-1.0.0-Darwin-presets.pkg'/
'Vintouch Vol 1-1.0.0-Darwin-samples.pkg'/
'Vintouch Vol 1-1.0.0-Darwin-shared.pkg'/ We can then look in the ⇒ cd extracted/Vintouch\ Vol\ 1-1.0.0-Darwin-presets.pkg/Payload/Library/Arturia/Presets/Mini\ V3/Factory/Vintouch\ Vol\ 1
⇒ ls
'K.I.T. Bass'
⇒ file K.I.T.\ Bass
K.I.T. Bass: data I was expecting that the
I then started wondering if we would be able to deserialise this format without having to use boost itself, which lead me to:
Looking closer at the docs for Boost Python there didn't seem to be any immediately obvious examples of using it together with the deserialisation code; so it may be that some C++ would still need to be written to support this use case if desired:
I then wondered if we could just parse the format more directly ourselves, and came across this page:
Looking through some of the code files there, and using ChatGPT to help parse through them, I eventually got to these ones which seemed to give some useful info:
But even with that, it sounds like you would pretty much have to know/reverse engineer/guess the particular layout of the structs used in the Mini V loader to be able to decode it all properly:
Looking at the GitHub repo for the Boost serialization lib we can see some example code that writes out a file with a similar format as the presets: We can also see where the And the And where it's used in the implementations of the various archive serializer/deserializers:
It seems like anything not handled in those files can then fall back to implementations in other more common files, but it all got a bit deep/hard to follow for me at that point. But based on that information, we can see that the start of my test file:
Ends up parsing as something like:
Looking at my test file, it seems like a LOT of the parameters seem to follow this [length][space][string][space] format as a basis, with some higher order formats at times as well. For example near the start there seems to be a list of
|
@gonzaloarca I can't test this myself since I don't have from pprint import pprint
from pedalboard import load_plugin
# Load the VST
mini = load_plugin('/Library/Arturia/Mini V3/Mini V3.vst3')
# Show the GUI
synth_plugin.show_editor()
# TODO: manually load the preset in the GUI here, then close the GUI
# Show the plugin parameters
print("Plugin Parameters:")
#pprint(synth_plugin.parameters)
for key, parameter in synth_plugin.parameters.items():
raw_value = parameter.raw_value
print(f". {key}: {raw_value}") In the code I've been playing around with today, I do something a little more complex to capture the initial default state of the synth params, and then print out how they changed after showing the editor: print("Capturing initial state of synth params..")
initial_synth_params = {key: synth_plugin.parameters[key].raw_value for key in synth_plugin.parameters.keys()}
print("Showing synth GUI..")
synth_plugin.show_editor()
print("Capturing state of synth params after showing GUI..")
new_synth_params = {key: synth_plugin.parameters[key].raw_value for key in synth_plugin.parameters.keys()} Depending on your needs, you could then either use the parameter names and values shown here to help figure out the structs/order to reverse engineer the preset file format (alongside my notes above); or perhaps just save the param keys/values (eg. in a json file) and implement your own manual 'load_json_preset' sort of function (though for that to work, you would obviously then need to convert all of your existing presets to the new json format) There's a basic example of saving preset patches as json like this here: And a slightly more robust variation of it here: And then can load back from the json file like this: |
This other issue may also be be relevant here, as it talks about another way of controlling preset loading/changing within VST plugins: |
Just wanted to note that #297 just got merged, which may provide one potential angle of a solution here:
Docs:
|
Here's some example code of using the new
@gonzaloarca It would be interesting to see what the output looks like for your VST's Edit: I express a similar idea (but for Serum) in this comment: #277 (comment) |
I'm currently trying to load the Mini V3 plugin from the Arturia V Collection using the Pedalboard library and change presets programatically. I can load the plugin correctly, but for some reason I'm not able to load the factory presets.
The presets are not in .vstpreset format, and I actually believe they use some proprietary format from Arturia.
Library versions
OS: macOS 13.4
Steps to reproduce
Output
Preset file structure
Here's what the 24 VCO Unisson preset file looks like in plain text:
Any idea as to what might be going on? Is there any way I could possibly load this preset? Maybe convert it to .vstpreset format? I apologize if that makes no sense, I'm not too familiar with this type of files and I'm pretty new to this library.
Thanks!
The text was updated successfully, but these errors were encountered: