it seems that I have noticed a minor bug in RackAFX (6.2.6). Sporadically I get duplicates when saving presets. I could verify that for the .spf files in the /presets folder - sometimes two have the same patch inside and one of the other presets is lost. I have the feeling that this happens when updating a preset from RackAFX (saving the same name) when newer patches exist. Is that a known issue?
I've been having a few issues with saving presets when using the make VST function. After compiling in VS2010 and loading into several DAWs the preset list is empty. It works fine when using the VST2 generated project and I can see the kNumPrograms in my projects header file. What am I overlooking in the VST3 project?
The VST3 projects do not yet support saving presets/banks.
Steinberg made a big change in the way presets work for VST3, greatly complicating it and not backward compatible with VST2, so this is something you will need to add to the code on your own (at least for now) to the project that Make VST generates. This requires studying the VST3 SDK.
I think that Tom is doing this already, perhaps he can help you there.
Not sure when presets will be active in Make VST, but I do have a major revision coming in the next month or so, and I may address it then,
I have added the code for Factory Presets in the VST3 export function. This will be included in the new revision, out sometime in May.
However, with a little cut-and-pasting, you can modify your existing VST3 ports pretty easily for preset functionality.
Let me know if anyone is interested in that option for now.
beggining of answer maybe:
Bonus Project: Implementing a Custom View COptionMenu
A RackAFX user asked about creating a Custom View drop-list (the COptionMenu object) that could be populated with menu strings programmatically, and not connected to an underlying RackAFX variable. This bonus project uses a Plugin User Variable and a Custom CView object, which becomes the COptionMenu. The User Variable is a special type called VSTGUI which is discussed here: VSTGUI User Variables
Must be confirmed by Will...
Yes, several users have done this. However, it does not use the built-in preset mechanism from RackAFX. You have two options for creating internal factory presets:
1. EASY: create the presets as data structures within your plugin, hard-coded (usually in the constructor). Each preset structure contains the data needed to set your internal variables to their preset values. Store the set of preset structures in an array or a std::vector which are both zero-indexed by default. Create the COptionMenu custom view that Gwen points out above and load it with the Preset Names, each corresponding to one of the structures in your array/vector. When the user selects a preset from the menu, you will receive a notification via checkUpdateGUI( ) and there you can select the preset data structure from your array using the index value from the COptionMenu; then you update the GUI with the preset control values -- do not alter your underlying GUI-linked variables as this isn't thread-safe -- allow the normal variable updating to occur; but if you save non-GUI linked data, then you can update that without a problem.
2. ADVANCED: create your presets in files that you store in folders in the same directory as your DLL (you need to read up on the getMyDLLDirectory (Windows) and getMyComponentDirectory (MacOS) functions from my Synth Book in order to find this folder at run-time). Use the custom view COptionMenu to display the preset names. When the user selects a preset, you then open the preset file and read its contents. This means you need to understand how to read a file's contents (called "serialization") and to be platform independent, you would need to use the <iostream> and <fstream> mechanisms to read the file. Then, the process follows as above to update the GUI and let the thread-safe mechanism update your internal variables. This option also requires that you install your preset folders in the target plugin DLL location (Windows and Mac) when the user installs your plugin.
Maybe same question as Skyler, but different:
i hard coded my internal presets. Created a UINT with presets names. Used this UINT with DropList/COptionMenu.
All works fine !
but all my presets names are orders verticaly. if i had for example 100 presets, the dropdown menu go outside screen ( and vst synth) 🙁
is there a way to reorder presets name in Horizontal columns with section (10 by 10 for example) ?
Maybe like PolygonSheep did in this Stealth Delay ?
In the presets selection in Stealth Delay, I did not use COptionMenu. I extended the IDataBrowserDelegate class along with the CDataBrowser class, both are from the VSTGUI api. You can set the number of columns and rows in IDataBrowserDelegate along with fonts and colors. I have a IDataBrowserDelegate for the folder tree view and another for the presets list. The presets are implemented similar to Will's "2. ADVANCED" technique listed above, although that doesn't matter for display purposes.
Check out the docs on those and let me know if you have questions.
Hello CoffeeMate !
That's you PolyGonSheep ?!?
your delay plugin is absolutly fabulous !
For my internal presets i use the "easy" method (1) from Will. Hardcoded in the main .cpp in "checkUpdateGui". Simple, easy, and all knobs/sliders/switches are easily updated when loading preset. So i can use the coptionMenu easily.
for my external presets i use saving/loading paradigm based on "stream" (fstream/iostream, etc...) "like classical" c++ softwares to open/save files. but it's in the constructor. So preset is been read but knobs/sliders/etc. .... are not updated on my GUI. didn't find the way to yet.
i will take a look at the VSTGUI api and try to understand how to use it for my presets viewer.
image showing that i want to do:
Yes, I am PolygonSheep. Probably need to get Will to change my username, I created this account before the company.
Thank you for the kind words!
I see what you're trying to do with the preset list, but I'm not sure how to do that with COptionMenu easily. There is a setNbItemsPerColumn function but it's only for Windows. The only place I used COptionMenu was for the dropdown Resize list which only has 1 column. The IDataBrowserDelegate should do what you want but is a bit more complicated.
The other option is to create multiple COptionMenus (1 for each column), line them up side by side, and display / hide them all at the same time.
Hello Coffe'Gonsheep (:D)
i only work on windows. have no apple products. So i will take a look at this setNbltemspercolumn function. maybe just what i want.
if, for using IDataBrowserDelegate, it is somewhat similar to adding load/save mechanism/pardigm, it's not easy but could be done with some work.
SetItemsPercolumn = same dropdown scrolldown (light grey).
IdataBrowser delegate = personalized colors.
i thought creating 8 menus (because 64 presets on 8 banks - like vintage hardware synth) at the same place and set them visible false/true, driven by a general COptionMenu (with bankA,BankB,etc. ...)
but the problem was before i added 16 buttons on my GUI (like old Juno-106/Jupiter-8) 8 left banks & 8 right presets selection and that was really good, But I have reached the limits of rackafx and if I use this system I no longer add anything.
So I removed these 16 buttons to add new functions (a ring mod / cross mod) and therefore replaced my buttons by a dropdown menu.
will take a look at the modicication possibilities of COptionMenu ...
Most Users Ever Online: 152
Currently Browsing this Page:
Guest Posters: 1
Newest Members:duo.dirtykidz, Paul, Reakenzo, jflo, dan_1, phlub, josh, bmarx, Tom Helvey, Ludovic
Moderators: W Pirkle: 555
Administrators: Tom: 74, JD Young: 80, Will Pirkle: 0, W Pirkle: 555, VariableCook: 3