HISE Logo Forum
    • Categories
    • Register
    • Login

    Store values in ScriptPanel data object

    Scheduled Pinned Locked Moved General Questions
    51 Posts 6 Posters 2.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • toxonicT
      toxonic @d.healey
      last edited by

      @d-healey Okay,thank you for your quick response! 😊
      How will the AppData folder be created? When i compile a plugin i usually only find the compiled binary. Is there any information on that topic out there?

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @toxonic
        last edited by

        @toxonic That folder is created automatically when the plugin/standalone runs the first time. If you want to put files in it then you'll need to build an installer that creates the folder and puts the files there.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        toxonicT 1 Reply Last reply Reply Quote 0
        • toxonicT
          toxonic @d.healey
          last edited by

          @d-healey uhh, that sounds complicated... 🤔

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @toxonic
            last edited by

            @toxonic Yup :)

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey
              last edited by

              If these are standard HISE preset files though (.preset) then they will automatically be in the appData/User Presets folder.

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              toxonicT 1 Reply Last reply Reply Quote 0
              • toxonicT
                toxonic @d.healey
                last edited by

                @d-healey so, could i just change the file extension to .preset ? 😏

                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @toxonic
                  last edited by

                  @toxonic I doubt it

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  toxonicT 1 Reply Last reply Reply Quote 0
                  • toxonicT
                    toxonic @d.healey
                    last edited by

                    @d-healey Mhh, i compiled the plugin for testing purposes, but i cannot find the appData directory. Where is the place, i should search for?
                    I build a vst3 fxplugin and put the dll to my standard vst3 folder. It works fine so far in the DAW (except the preset issue), but i there's no appData directory created after the first launch.

                    LindonL 1 Reply Last reply Reply Quote 0
                    • LindonL
                      Lindon @toxonic
                      last edited by

                      @toxonic
                      appdata (in windows) is at

                      C:/Users//AppData

                      HISE Development for hire.
                      www.channelrobot.com

                      toxonicT 1 Reply Last reply Reply Quote 1
                      • toxonicT
                        toxonic @Lindon
                        last edited by

                        @Lindon Well, I'm on Linux, but I'd assume, that it should be in my home directory (analogue to windows) - but there's no AppData directory.... do I need to check any options in the HISE settings?

                        LindonL d.healeyD 2 Replies Last reply Reply Quote 0
                        • LindonL
                          Lindon @toxonic
                          last edited by

                          @toxonic David is your UNIX guy...

                          HISE Development for hire.
                          www.channelrobot.com

                          1 Reply Last reply Reply Quote 0
                          • d.healeyD
                            d.healey @toxonic
                            last edited by

                            @toxonic /.config/company name

                            Libre Wave - Freedom respecting instruments and effects
                            My Patreon - HISE tutorials
                            YouTube Channel - Public HISE tutorials

                            toxonicT 1 Reply Last reply Reply Quote 1
                            • toxonicT
                              toxonic
                              last edited by

                              @d-healey Ah, thank you! :-) So, on Linux there is no AppData directory?
                              The folder /.config/My Company/Plugin Name contains (among others) a User Presets directory, and surprisingly, it transferred the text files which I gave the .preset file extension, but the content of each file is null...

                              d.healeyD 1 Reply Last reply Reply Quote 0
                              • toxonicT
                                toxonic @d.healey
                                last edited by

                                @d-healey Okay, i just changed the preset file names, at the moment they have no file extension.
                                Everything works fine in HISE, but not the compiled plugin. It sets up all the needed files in the AppData Directory (or whatever I should call it on Linux... ;-) ) , but changes of parameters won't be saved to the preset files. What am I missing?
                                I use the following functions to store and recall values from the preset files:

                                var PresetDir = FileSystem.getFolder(FileSystem.UserPresets);
                                // store
                                inline function writePreset (FILE, ARRAY)
                                {
                                    local PresetFile = PresetDir.getChildFile(FILE);
                                    PresetFile.writeObject(ARRAY);
                                }
                                //recall
                                inline function recallPresets (FILE)
                                {
                                	local PresetFile = PresetDir.getChildFile(FILE);
                                	return PresetFile.loadAsObject();
                                }
                                
                                1 Reply Last reply Reply Quote 0
                                • d.healeyD
                                  d.healey @toxonic
                                  last edited by

                                  @toxonic AppData is just the generic name, it's actually only on Windows that it's called appData

                                  Libre Wave - Freedom respecting instruments and effects
                                  My Patreon - HISE tutorials
                                  YouTube Channel - Public HISE tutorials

                                  1 Reply Last reply Reply Quote 0
                                  • toxonicT
                                    toxonic
                                    last edited by

                                    Any ideas, why the compiled plugin won't saveparameter value data to the preset files? Inside Hise it works like a charme, but not the compiled plugin... 🤔

                                    d.healeyD 1 Reply Last reply Reply Quote 0
                                    • d.healeyD
                                      d.healey @toxonic
                                      last edited by

                                      @toxonic No I'm not sure, but presets are an xml format so writing an object to it doesn't make sense.

                                      Let's go back to the beginning, there is probably a better way to do whatever it is you are trying to do. What do you want to achieve?

                                      Libre Wave - Freedom respecting instruments and effects
                                      My Patreon - HISE tutorials
                                      YouTube Channel - Public HISE tutorials

                                      toxonicT 1 Reply Last reply Reply Quote 0
                                      • toxonicT
                                        toxonic @d.healey
                                        last edited by toxonic

                                        @d-healey Yeah, "preset" might be the wrong word.
                                        Okay, so far I have a multieffect plugin, each effect has it's own sequencer track to trigger the effect.
                                        Each effect has a UI Section, where you can adjust the effect parameters.
                                        Now, I want to be able to store and recall 10 parameter sets of each effect individually, so you can automate these "presets" in the DAW, instead of automating each parameter of each effect, which would be tricky and time consuming. I can't use the HISE preset system because of the inbuilt sequencer, which will always stop playing, when i would change a preset.
                                        Actually, I got it working to store the parameter sets as a 2 dimensional arrays for each effect.
                                        So, for example the 10 values of the first parameter of effect one's parameter set would be stored in effectOneArray [0] (just an example name).
                                        And to save the parameter sets between the sessions, i store these arrays as objects into files, via the mentioned functions above. As i already said, this work fine in HISE itself, but for some reason, the compiled plugin won't write any values to the files in the AppData directory.

                                        ulrikU 1 Reply Last reply Reply Quote 0
                                        • toxonicT
                                          toxonic
                                          last edited by

                                          Noone? 🤔

                                          1 Reply Last reply Reply Quote 0
                                          • ulrikU
                                            ulrik @toxonic
                                            last edited by

                                            @toxonic Do you have a small example snippet?

                                            Hise Develop branch
                                            MacOs 15.3.1, Xcode 16.2
                                            http://musikboden.se

                                            toxonicT 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            18

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.8k

                                            Posts