November 1, 2016
i actually working on implementing a save/load mechanism based upon the .wav loading mechanism (used for example by convolution projects) but with "preset" files.
When loading/saving file - Synth variables are ok. You really ear the "patch/preset" you created with the synth.
in this code, with the old 126.96.36.199 if i use : sendUpdateGUI(); = GUI is updated.
But with the new 6.8 ? GUI is not updated.
i can't use directly checkUpdateGUI because i 'don't use GUI, i just read a file.
part of loading file is:
// OPEN FILE
// WRITE STUFF TO FILE
loadStream >> variable1 ;
// CLOSE FILE
// UPDATE GUI
sendUpdateGUI(); // Only work with 188.8.131.52 version.
I'm searching to replace the old "sendUpdateGUI" by something working on the new 6.8
Any idea ?
January 28, 2017
sendUpdateGUI() was not thread-safe and was changed to use a safer, and simpler method here:
The updates are triggered by a GUI event, so you will need to figure out a way to create a GUI event once the file is loaded/saved. Anytime a GUI control is changed in any way (even if audio is not flowing) the checkUpdateGUI( ) function will get called. You can check the value of the GUI event (float fValue) and the controlID to compare with.
November 1, 2016
Hello Will !
Thanks for answer 🙂
I suspected that i had to go through the checkUpdateGUI.
Currently the synth:
has internal presets (hardcoded & controlled via CUG) -> preset number (not name, like old vintage hardware ones) shown in LCD screen.
load and save presets.
show the preset name ( a mix code with the "ShowGUI" method you explain in advanced GUI tutorial page & pure c++) -> Which works only in VST, not in rackafx. But that's what I wanted, so ...
Last thing to do: Updating GUI with external presets.
internal preset selected:
external preset selected:
January 28, 2017
RackAFX presets are different than custom presets; they are stored along with each UI control object. Several people including Gwen above have made their own custom presets, read from files, so this is a fairly well known thing. You would need to use the checkUpdateGUI ( ) function to detect that a change occurred in the GUI control that selects the preset, decode the selected preset index, then send a set of GUI_PARAMETER structures back to update the GUI to reflect the new control locations.
If you also change your underlying variables associated with the stored preset values at the time the user selects the preset, then you are not being thread-safe. You need to make sure that your underlying variables are not updated until the pre-process phase of the audio buffer processing so that you don't write-access a variable from the GUI thread (which calls checkUpdateGUI ( ) ) while the audio thread may be running.
See http://willpirkle.com/Download.....essing.pdf for info on the thread-safety mechanism.
This is not too difficult to do but requires some diligence.
To do that, modify the processRackAFXMessage( ) method in your derived class. After the base class call, which is always the first instruction in the function, you can safely update your internal variables to the preset values. You'll need to figure out a way to signal that a preset-bulk-variable update needs to take place - that's up to you - do the bulk variable change, then clear the signal.
The RackAFX preset mechanism does something similar - it slots the new preset values into the GUI_PARAMETERs just before they are sent to your plugin during the pre-process phase via processRackAFXMessage( ).
Most Users Ever Online: 36
Currently Browsing this Page:
Guest Posters: 1
Newest Members:sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc
Moderators: W Pirkle: 143
Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 143