HISE Logo Forum
    • Categories
    • Register
    • Login

    How to include the samples when building the plugin?

    Scheduled Pinned Locked Moved Newbie League
    20 Posts 4 Posters 1.5k 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.
    • d.healeyD
      d.healey @daniloprates
      last edited by

      @daniloprates You might be able to with the alert window look and feel functions. It's been a while since I've used it.

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      D 1 Reply Last reply Reply Quote 0
      • D
        daniloprates @d.healey
        last edited by

        @d-healey thanks!

        1 Reply Last reply Reply Quote 0
        • D
          daniloprates
          last edited by

          Is there a way to re-trigger this screen?

          After deleting the samples and replacing the component file the plugin didn't ask to install the samples and it's muted

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

            @daniloprates

            Yes, delete the link file in the app data folder and the screen will show up again the next time you launch the plugin. I cover this in the HISE Bootcamp too.

            https://audiodevschool.com/courses/hise-bootcamp/

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

            D 1 Reply Last reply Reply Quote 0
            • D
              daniloprates @d.healey
              last edited by

              @d-healey great!

              Do you know if it's possible to add a button in HISE that re-triggers that screen, in case the user wants to relocate the samples?

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

                @daniloprates Yes you could script a button that deletes the file, the user would still need to restart the plugin though.

                It's probably more user friendly to script a custom screen where the user can select a folder. All the functions needed for this are available in the scripting API.

                Free HISE Bootcamp Full Course for beginners.
                YouTube Channel - Public HISE tutorials
                My Patreon - HISE tutorials

                J 1 Reply Last reply Reply Quote 1
                • J
                  jeffd @d.healey
                  last edited by

                  @d-healey

                  Where in the scripting API is the link file in the app data folder referenced?
                  If one wanted to create a button to reset the sample folder for the user if they decided to move the samples.

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

                    @jeffd You can use the file and file system APIs to access the app data folder.

                    You can use Settings.setSampleFolder() to update the link file.

                    Free HISE Bootcamp Full Course for beginners.
                    YouTube Channel - Public HISE tutorials
                    My Patreon - HISE tutorials

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      jeffd @d.healey
                      last edited by

                      @d-heale
                      ok let me try it.
                      thanks

                      J 1 Reply Last reply Reply Quote 0
                      • J
                        jeffd @jeffd
                        last edited by

                        @jeffd ```
                        so I created a button to reset the sample folder for the user,
                        but it doesnt retrigger a reset for the compiled plugin. I dont get any scripting errors in HISE but I am missing something.
                        what could be wrong here?

                        code_text

                        inline function onResetBtn(control, value)
                        {
                            if(value) // button is pressed
                            {
                                // This clears the sample folder setting
                                Settings.setSampleFolder("");
                        
                                
                                Console.print("Sample folder has been reset. The plugin will ask for a new folder next time.");
                                
                                
                                Engine.showMessageBox("info", "Please restart the plugin or reload it to set a new sample folder.", "OK");
                            }
                        }
                        ResetBtn.setControlCallback(onResetBtn);
                        LindonL d.healeyD 2 Replies Last reply Reply Quote 0
                        • LindonL
                          Lindon @jeffd
                          last edited by Lindon

                          @jeffd er.. doesnt that just give you an empty Link file? what you actually want in this approach is to have the link file deleted.

                          You'd be way better off just asking (in the plugin) for the new folder...and replacing the current Link file value.

                          HISE Development for hire.
                          www.channelrobot.com

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

                            @jeffd As Lindon says, to retrigger the overlay you need to delete the link file entirely, not just change the path within it.

                            Free HISE Bootcamp Full Course for beginners.
                            YouTube Channel - Public HISE tutorials
                            My Patreon - HISE tutorials

                            J 1 Reply Last reply Reply Quote 0
                            • J
                              jeffd @d.healey
                              last edited by

                              @d-healey can i delete the link file via a script?
                              not sure i understand.

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

                                @jeffd Yes, the file and filesystem API has what you need. Just be careful when deleting files.

                                6d3a983b-ae6a-4e1e-b05a-4285b5efaafe-image.png

                                Free HISE Bootcamp Full Course for beginners.
                                YouTube Channel - Public HISE tutorials
                                My Patreon - HISE tutorials

                                J 1 Reply Last reply Reply Quote 0
                                • J
                                  jeffd @d.healey
                                  last edited by

                                  @d-healey
                                  isnt the link file going to be located in a different location for each operating system?

                                  Is there documentation somewhere on how to get HISE to find the path in the operating system?

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

                                    @jeffd

                                    These should help

                                    https://docs.hise.dev/scripting/scripting-api/filesystem/index.html#getfolder
                                    https://docs.hise.dev/scripting/scripting-api/filesystem/index.html#special-locations

                                    Free HISE Bootcamp Full Course for beginners.
                                    YouTube Channel - Public HISE tutorials
                                    My Patreon - HISE tutorials

                                    J 1 Reply Last reply Reply Quote 1
                                    • J
                                      jeffd @d.healey
                                      last edited by

                                      @d-healey got it working!

                                      1 Reply Last reply Reply Quote 1
                                      • First post
                                        Last post

                                      17

                                      Online

                                      2.0k

                                      Users

                                      12.6k

                                      Topics

                                      109.7k

                                      Posts