Avatar

Please consider registering
Guest

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
Saving Presets / Overwriting Controls
No permission to create posts
November 18, 2015
5:36 am
Avatar
Frodson
Member
Members
Forum Posts: 38
Member Since:
September 7, 2015
sp_UserOfflineSmall Offline

Hi,
I'm looking for a way to give the user the ability to save and load patches. Saving isn't a problem really, but when loading I need to overwrite the control-values. For all I know by now I could cache the pointers to every single control and then set the values manually. This seems to be a bit tedious (doable though), is there an easier way to achieve patch saving?
Thanks, Fred

November 18, 2015
8:09 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

First (for the general population reading this), RAFX has built-in preset (or patch) saving/loading using the toolbar buttons and drop-down list box. Load your plugin and then create patches and hit the button that looks like an old floppy-disc to name and store the presets. When done, re-compile the plugin and the presets will be saved in your plugin object. You can have as many presets as you want in RAFX, however only the first 16 presets will be ported out to VST and AU (as well as RAFX-as-VST-DLL paradigm). I know you have already done this - just wanted to make sure others were aware of this feature.

If you need more than 16 presets, or want to make your own system, then you will need to setup either a file loading/saving mechanism, or store the patches in the plugin object itself, perhaps in preset-structures - it sounds like you have already done this.

In order to update the GUI to match the patch you have loaded, use sendUpdateGUI( ).

When you load the patch, alter the underlying RAFX control variables according to the patch, then call sendUpdateGUI( ) -- you only need to call this update function once after all variables have been set.

See the post here:

http://www.willpirkle.com/foru.....updategui/

You might also want to check out the post here on saving "user variables" in Presets (though this pertains to RAFX and ported project Presets, not your exact situation).

http://www.willpirkle.com/foru.....r-presets/

NOTE: if you are using files to load and save presets, then you need to be careful - the MacOS ported projects (VST and AU) will need to use file reading/writing specifically for MacOS. You can do that easily with #defines. See the post here:

http://www.willpirkle.com/foru.....cos/#p1018

- Will

November 18, 2015
9:12 pm
Avatar
Frodson
Member
Members
Forum Posts: 38
Member Since:
September 7, 2015
sp_UserOfflineSmall Offline

Hi Will,
That's exactly what I was looking for! Wink I'm trying to set up a file based patch system, so the built in option doesn't really work.
Thank you!
Fred

November 18, 2015
10:51 pm
Avatar
Frodson
Member
Members
Forum Posts: 38
Member Since:
September 7, 2015
sp_UserOfflineSmall Offline

I just tried it and it appears to me that sendUpdateGUI() only updates the RAFX prototype controls not the customGUI ones. The values on the customGUI change when I close and open the GUI again. Am I missing something here?

EDIT
I just found that the GUI-changes work (mostly) fine when loading the plugin in Ableton. So I guess RAFX is updating the GUI differently?
There is one issue though: When having controls that are exponential or logarithmical, calling sendUpdateGUI() will result in the control graphics being set where it would be if it was a linear control. (or at least that's my theory on what's happening)

For example:

1. Filter cutoff is 500 Hz, knob is around 12 o'clock
2. call sendUpdateGUI()
3. Filter cutoff is still 500 Hz, but the knob is somewhere around 9 o'clock

Fred

November 19, 2015
1:44 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

Hi Fred

I have fixed these issues in the newest beta, which will be uploaded tomorrow. The RAFX and VST plugins are affected; the AU versions work properly.

This will be in version 6.6.2.7 and higher.

- Will

November 22, 2015
9:27 pm
Avatar
Frodson
Member
Members
Forum Posts: 38
Member Since:
September 7, 2015
sp_UserOfflineSmall Offline

Hi Will, sorry it took me so long to answer.
I'm sorry to report that for my case nothing has changed. I'm now on 6.6.2.8 and the result is exactly the same:
- Knobs don't change in RAFX unless you open and close the GUI (I don't know whether this is intended or not)
- in Ableton logarithmic/ exponential control jump when calling sendUpdateGUI (note that this happens even without changing the value manually)
Do you have an idea what I'm missing?
Fred

November 23, 2015
12:10 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

This was a problem in the beta version 6.6.2.8

It has now been resolved and fixed.

- Will

September 22, 2016
11:50 pm
Avatar
Derek
Member
Members
Forum Posts: 41
Member Since:
November 19, 2015
sp_UserOfflineSmall Offline

Hi all,

I have a custom preset manager created and it works saving off the values and preset name to a file.

However, when saving a session in a DAW, the DAW will save off the plugin's values and reload them the next time the project is loaded.
The control values are saved and reload fine from the DAW, but how would I get the DAW to save off the preset name? This is using an exported VST project btw.

thanks,
Derek

September 25, 2016
7:40 am
Avatar
Derek
Member
Members
Forum Posts: 41
Member Since:
November 19, 2015
sp_UserOfflineSmall Offline

Found it. For anyone interested:

Inside VSTProcessor save off your preset name in getState(IBStream* fileStream)

after all the other control values are saved off
presetName = ((MyProjectRAFX* )m_pRAFXPlugIn)->GetCurrentPresetName();
if (!s.writeStringUtf8(presetName)) return kResultFalse;

and inside setState(IBStream* fileStream)

after all the other control values are read in
if (!s.readStringUtf8(presetName, 99)) return kResultFalse;
((MyProjectRAFX*)m_pRAFXPlugIn)->SetCurrentPresetName(presetName);

Of course you'll have to write your GetCurrentPresetName / SetCurrentPrestName functions, pass that to your GUI, and handle the TCHAR* format.

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online:
2 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 476

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 482

Posts: 1876

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