Page 1 of 2

Automatic reloading of previously used settings

PostPosted: Fri Nov 29, 2019 12:10 pm
by Spogg
Hello guys!

Our good friend Johan (djbrynte) asked me to help with something he wanted, but I confess it’s beyond me. Because he’s not confident with English, I offered to post here on his behalf.

If it’s actually possible, I feel convinced it would need a significant Ruby solution far beyond my basic grasp. So maybe someone here could help.

What he wants is a system whereby he would load a plugin for a new song, but the plugin would automatically restore all the settings when it was last used (in another song).

I believe this would require the creation of something like an ini file which was written to when any settings were changed. Then, when the plugin was next used, it would read the ini file and restore the last-used bank of presets.

Of course one could save a preset bank and reload that bank for a new song, but he would like it to be automatic.

We would really appreciate comments, ideas and, of course, solutions. If it’s NOT possible that’s also a valid response!

Cheers

Spogg

Re: Automatic reloading of previously used settings

PostPosted: Fri Nov 29, 2019 12:16 pm
by djbrynte
Thanks spogg. Im trying to use the synth to remember last used samples from some Maps. For example if i use a Map with samples i want so next time u use the plugin it remember last loaded samples;)

Re: Automatic reloading of previously used settings

PostPosted: Fri Nov 29, 2019 12:42 pm
by billv
Spogg wrote: the plugin would automatically restore all the settings when it was last used

My custom Preset manager can do this, although I'm not sure if this is what you after. :?
Scroll down the thread and select version 3.
http://www.dsprobotics.com/support/viewtopic.php?f=3&t=2294

Re: Automatic reloading of previously used settings

PostPosted: Fri Nov 29, 2019 4:26 pm
by Spogg
I checked this out Bill, thanks.

I made a VSTi and changed preset 1 name and settings and saved the song.
Then I started a new song (in Reaper) and loaded the VSTi into the new song.
The preset name had been remembered correctly from the previous song, but not the settings for that preset. The text file created alongside the plugin only listed the program names.

Maybe I misunderstood or did something wrong.

One issue I can see is where you have more than 1 plugin instance in a song. When the song is re-opened after saving, wouldn’t all the same VSTi plugins default to that saved file?

Cheers

Spogg

Re: Automatic reloading of previously used settings

PostPosted: Fri Nov 29, 2019 11:27 pm
by DaveyBoy
Hi Guys

If it helps here is a very simplified version of how I save and load my settings using Ruby.

Save & Load Demo.fsm
(1.44 KiB) Downloaded 139 times


Change the values in the top Ruby edit and save.
An 'ini' file is created in the directory where the schematic is saved

Load the file in the lower ruby edit to see the changes.

To automate in your schematic:
Save to file at the same time as you change settings
Load using an afterload prim.

Maybe someone with more experience than me could develop this into a Ruby based Preset Manager.... Spogg? :D

Re: Automatic reloading of previously used settings

PostPosted: Sat Nov 30, 2019 2:30 am
by RJHollins
I had to do something for a project design I was working on ... it was a MIDI Controller for a series of RAM heavy plugins [numerous] that seemed to cause reload of settings to mess up.

One of the GURU's here pointed me to a File Management system call MARSHAL.

It has been quite awhile back ... remembering details on this is not fresh, but I remember that the 'technique' worked great.

Re: Automatic reloading of previously used settings

PostPosted: Sat Nov 30, 2019 3:39 am
by billv
RJHollins wrote: File Management system call MARSHAL.

Here's a module that saves and loads ruby using Marshal. It might help...
Save_load_Ruby.fsm
(653 Bytes) Downloaded 147 times

Re: Automatic reloading of previously used settings

PostPosted: Sat Nov 30, 2019 4:02 am
by RJHollins
Nice .... thanks BillV 8-)

Re: Automatic reloading of previously used settings

PostPosted: Sun Dec 01, 2019 1:36 pm
by Spogg
Thanks for your input guys. :D

@DaveyBoy
This is clever and works well, but it would mean the whole current preset bank data would have to be dynamically updated and somehow reloaded into the FS preset manager to achieve what Johan was hoping for. I wouldn’t know where to start unfortunately, as my Ruby skills are still too basic. Plus, I don’t think a complete preset bank could be “forced” into the preset manager without dialogue.

@billv
Similar comments apply to your Ruby save and load. In this case the whole preset bank would have to be converted dynamically into a Ruby object, saved, and when re-loaded converted back to a preset bank that was automatically somehow forced back into the FS preset Manager.

I think the only viable solution would be a new Ruby-based preset manager which could handle all the parameters of a synth and, while that would be really nice, is way beyond me. It would also mean changing every control to interact with the new manager, since the “P” signal is proprietary in FlowStone so couldn’t be utilised.

At this point I’m thinking the “solution” for Johan is simply to ask his users to save the preset bank and reload it if they want to re-use the last settings. I believe this process can’t be automated with the FS Preset manager.

Cheers

Spogg

Re: Automatic reloading of previously used settings

PostPosted: Tue Dec 03, 2019 11:13 pm
by DaveyBoy
Here's a little auto-load & save demo that I've thrown together:

Auto Save & Load Demo.fsm
(608.28 KiB) Downloaded 135 times


I've modified the knobs to get it to work but the same principle can be applied to other types of controls or values.
ini file is created with defaults on first use and then updated on a mouse left up event (if moving a knob).

It works with standalone exes but I haven't tested with vst.

If anyone is interested I will endeavour to get it to work in parallel with the preset manager system . . . let me know

Have fun :D

Edit: Please re-download . . small error in knobs corrected