Spacechild1 / vstplugin

VST plugin support for Pd and SuperCollider (mirror of https://git.iem.at/pd/vstplugin). If possible, use the issue tracker at https://git.iem.at/pd/vstplugin/-/issues.
Other
84 stars 6 forks source link

Cannot list/change programs of ZynAddSubFX on Linux/Ubuntu #2

Closed Catsvilles closed 4 years ago

Catsvilles commented 4 years ago

Hi, I just got started with SC and VSTplugin and it's amazing, for the most part everything works fine but already for a few days I'm fighting to make VSTplugin and ZynAddSubFX work properly.

So, I've tried all ZynAddSubFX VST versions I could find and install, and oldest versions usually have problems like not opening native GUI (editor) but with the latest one (Zyn-Fusion) I'm able to open native .editor and change the blanks and preset from GUI but unfortunately it's not possible to do it via the code:

~zyn.info.printPrograms;
~zynReverb.info.printPrograms;

always returns one default preset.

I'm not sure what is the problem here and whose fault it is, I suspect though, it's ZynAddSubFX :) Any ideas? Thanks!

Spacechild1 commented 4 years ago

Hi, the "programs" are really the built-in default presets (hardcoded in the plugin as opposed to saved on disk). If you want to load/save user presets, use the savePreset and loadPreset methods (or the lower level readProgram and writeProgram methods).

Some plugins have their own preset management system which is only accessible via the GUI. What you can do is select a preset and save it with savePreset, so you can later load it with loadPreset.

Here's an easy way: ~fx.gui(params: false) opens a small SC preset manager. Load/make your desired preset in the VST GUI and then click "Save As" in the preset manager to save the preset on disk. Then the preset will be available in the drop down menu and you can also load it programmatically with loadPreset.

Some VST3 plugins install their presets in a standardized location on the filesystem (in the standard .vstpreset format ), so they will be automatically available in the SC preset manager.

Catsvilles commented 4 years ago

@Spacechild1 unfortunately I cannot browse the "build in presets" from ~fx.gui either, it's simply empty. One would think there are no built-in default presets but if you open the native editor - there are tons of presets coming with Zyn. Good idea with saving them to user defined presets but doesn't work in this case, since the list is empty.

Catsvilles commented 4 years ago

Similar problems with params, not sure if this how it is suppose to be:

// list VSTi parameters
~allPlugins = VSTPlugin.plugins(s);
(
~allPlugins.at('ZynAddSubFX').parameters.do { |param|
  postf("% || %\n", param['name'], param['label']);
};
)

returns: Slot 1 || Slot 2 || Slot 3 || Slot 4 || Slot 5 || Slot 6 || Slot 7 || Slot 8 || Slot 9 || Slot 10 || Slot 11 || Slot 12 || Slot 13 || Slot 14 || Slot 15 || Slot 16 ||

Catsvilles commented 4 years ago

Correction* built in programs are not exactly empty, there is just one program called Default if this makes any difference.

Spacechild1 commented 4 years ago

One would think there are no built-in default presets but if you open the native editor - there are tons of presets coming with ZynAddSubFX

What I was trying to explain is that those presets are not built-in programs as defined by the VST specs. I guess the plugin simply has its own preset management system.

Good idea with saving them to user defined presets but doesn't work in this case, since the list is empty.

You have to open the preset in the VST GUI and then save it as a user defined preset with savePreset.

Similar problems with params,

This is a problem with ZynAddSubFX. It should return meaningful parameter names.

Catsvilles commented 4 years ago

Got it now, it worked! Thank you very much! Last question, are these presets stored in some specific folder?

Just another idea if someone will stumble upon in future - I could explore converting bulk of existing native presets/banks to some standard VST extensions (.fxp).

Spacechild1 commented 4 years ago

Got it now, it worked! Thank you very much!

Great!

Last question, are these presets stored in some specific folder?

If you mean the user defined presets, check out the help for VSTPluginDesc.presets.

I could explore converting bulk of existing native presets/banks to some standard VST extensions (.fxp).

You would have to reverse engineer the preset system of every plugin... With VST3 it's a bit better because plugin vendors are encouraged to save presets in the standardized vstpreset format in known locations. Some vendors still use proprietory formats, though...