Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Updating GUI from loading external file in 6.8 ?
No permission to create posts
April 2, 2017
5:24 pm
Forum Posts: 32
Member Since:
November 1, 2016
sp_UserOfflineSmall Offline

hello !

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 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:


loadStream >> variable1 ;
etc. ..


sendUpdateGUI(); // Only work with version.

return true;


I'm searching to replace the old "sendUpdateGUI" by something working on the new 6.8


Any idea ?





April 3, 2017
8:36 am
W Pirkle
Forum Posts: 247
Member Since:
January 29, 2017
sp_UserOfflineSmall Offline

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.

- Will

April 3, 2017
12:18 pm
Forum Posts: 32
Member Since:
November 1, 2016
sp_UserOfflineSmall Offline

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:

844417example1.jpgImage Enlarger


external preset selected:

270633example2.jpgImage Enlarger

June 10, 2017
3:50 pm
Forum Posts: 48
Member Since:
November 17, 2015
sp_UserOfflineSmall Offline

Hey guys,

I am currently working on a plug in that has different presets per parameter grouping, have you had any trouble utilizing rackafx presets along with custom presets?


I have setup a switch to change preset groupings however, I have lost the ability to call or save Rackafx presets?

June 10, 2017
4:21 pm
W Pirkle
Forum Posts: 247
Member Since:
January 29, 2017
sp_UserOfflineSmall Offline

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( ).

- Will

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online:
6 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Peter: 41

Frodson: 40

clau_ste: 39

Gwen: 32

JimmyM: 30

TheSmile: 27

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 522

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 31

Topics: 545

Posts: 2134

Newest Members:

Bill, hill william, NAUN_SONAR, sufy, Diane, Richard, drvenkman, venkman, Jfx, drorh

Moderators: W Pirkle: 247

Administrators: Tom: 67, JD Young: 80, Will Pirkle: 0, W Pirkle: 247