Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Save and load of ALL control and user data

For general discussion related FlowStone

Save and load of ALL control and user data

Postby Fritzi » Wed Nov 06, 2019 9:25 am

Hello,

I would like to make an application as exe, not as VST and I am wondering, how ALL user generated settings can be
saved as presets. I.e. the values of sliders, knobs, text boxes, numerical values and the settings of all internal controls, like colours, sizes, aso.
The build in preset management sems to work only with VST/DAW, but what I need is the saving and loading of user (and internal) settings in a file, that can restore EVERY value of ALL controls, so a user finds exactly the same settings he once made.
Loading and saving of "session1", "session2", aso., for example.

Thank you very much for your help
Fritzi
 
Posts: 10
Joined: Thu Oct 31, 2019 9:54 pm

Re: Save and load of ALL control and user data

Postby adamszabo » Wed Nov 06, 2019 1:55 pm

You can save anything in a simple text file
adamszabo
 
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: Save and load of ALL control and user data

Postby Fritzi » Wed Nov 06, 2019 2:13 pm

Fine, but how exactly ?
I am new to FS and Ruby. In VB I can do this easily, but in FS there are a lot of nested modules, when you use modules in modules, some of them communicating "wireless", too.
So the usual way of reading data like:

MyText1= Form1.Textbox22.Text (in VB)

won´t work.
That´s the reason for my stupid question, how to get them all to a text file and load them again in order to restore EVERY value of every module/GUI component.

Thank you very much for your help
Fritzi
 
Posts: 10
Joined: Thu Oct 31, 2019 9:54 pm

Re: Save and load of ALL control and user data

Postby Spogg » Wed Nov 06, 2019 3:16 pm

In an executable you would have to use the Program Manager to save a program (preset) to wherever you choose. This is saved as a text file.

When you next open the executable you would then have to manually load the program again to whatever slot you wanted in the Program manager. Assuming all the preset parameters have unique names, you would then restore all the settings stored in the program text file.

If you wanted to automatically reload the settings when opening the executable, you would have to use Ruby code for the file handling and I’m not aware that anyone’s done that before. The big advantage of using a DAW or VST hosting app is that it can store all the settings in the project (song) file so the state is saved. For this, Lock should be set to False in the Program Manager.

Cheers

Spogg
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Save and load of ALL control and user data

Postby Fritzi » Sat Nov 16, 2019 7:49 pm

Hi Spogg,
thank you very much. I tried to do so, but something is wrong.
I named all user control elements by different names (at least I think so) , but after saving some different setting under different file names and loading them agin, the user settings were NOT restored, but some weird behaviour appears, like moving other faders and knobs, but most of the user controls like knobs and sliders did not change their state at all.

What is wrong here ?

Thank you very much

Fritzi
Fritzi
 
Posts: 10
Joined: Thu Oct 31, 2019 9:54 pm

Re: Save and load of ALL control and user data

Postby Spogg » Sun Nov 17, 2019 9:33 am

I think at this point you’ll need to upload your schematic so we can take a look.

Cheers

Spogg
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Save and load of ALL control and user data

Postby billv » Mon Nov 18, 2019 1:10 am

Fritzi wrote: how to get them all to a text file and load them again in order to restore EVERY value of every module/GUI component.


Try this custom made Pre set manager that saves and loads from file automatically
Scroll down the thread and select Version 3
http://www.dsprobotics.com/support/viewtopic.php?f=3&t=2294
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: Save and load of ALL control and user data

Postby Fritzi » Mon Nov 18, 2019 6:42 pm

@billv Thank you very much, but I do not understand it, I am newbie

@ Spogg I attached an example with some GUI elements. Turning them all to 0 or off and saving as "preset1"
After that, turning them to maximum or on and saving that as "preset2"
After loading the presets,the vertical slider and the LED switch do not restore their old settings. Why ?

Thank you very much
Fritzi
Attachments
simple no go.fsm
(177.55 KiB) Downloaded 789 times
Fritzi
 
Posts: 10
Joined: Thu Oct 31, 2019 9:54 pm

Re: Save and load of ALL control and user data

Postby Spogg » Tue Nov 19, 2019 9:23 am

You made a very fundamental mistake!
Your demo schematic has two modules whose preset parameter name is Switch, and two called Preset name.
All parameter names must be unique, otherwise the preset manager system won’t know which value goes to which module.

Some time ago I made a little tutorial about this:

viewtopic.php?f=2&t=5985&hilit=preset+tutorial#p28501

Good luck and have fun!

Spogg
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Save and load of ALL control and user data

Postby Fritzi » Tue Nov 19, 2019 2:33 pm

Hi Spogg,

Great, thank you very much for your help !
If FS would automatically add preset names like preset 1, preset 2, aso. when a new element is used,
these things couldnt happen, I think.
They should add your preset manual to their user manual :-)

Thank you

Fritzi
Fritzi
 
Posts: 10
Joined: Thu Oct 31, 2019 9:54 pm


Return to General

Who is online

Users browsing this forum: No registered users and 81 guests