HISE Logo Forum
    • Categories
    • Register
    • Login

    How to save current expansion in a DAW project

    Scheduled Pinned Locked Moved Solved General Questions
    15 Posts 3 Posters 411 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 @bendurso
      last edited by

      @bendurso said in How to save current expansion in a DAW project:

      Engine.setCurrentExpansion()

      Is this triggered in a control callback?

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

      bendursoB 2 Replies Last reply Reply Quote 0
      • bendursoB
        bendurso @d.healey
        last edited by bendurso

        @d-healey Is triggered inside a setMouseCallback of a child panel. I tried setting saveInPreset for the parent panel but it didn't work.

        O wait, maybe I should set saveInPreset for the child panel right?

        I think not, because I tried this and didn't work:

        	local p = panel.addChildPanel();
        	p.set("saveInPreset", true);
        

        I have child panels that show the image of the expansion, and when you click it, it loads the expansion.

        1 Reply Last reply Reply Quote 0
        • bendursoB
          bendurso @d.healey
          last edited by bendurso

          @d-healey I checked and you're make something similar in Rhapsody. But you're using expHandler.setCurrentExpansion instead of Engine.setCurrentExpansion. Maybe that's why?

          O and you're sending it to an inline function. You are not calling it inside the mouse callback for some reason?

          Christoph HartC d.healeyD 2 Replies Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart @bendurso
            last edited by

            @bendurso child panels cannot be saved in a preset

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

              @bendurso said in How to save current expansion in a DAW project:

              You are not calling it inside the mouse callback for some reason?

              Just to keep things organised and modular. Setting the current expansion goes in the Expansions namespace, while the UI/UX goes in a different namespace.

              It's still triggered from the mouse callback though.

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

              bendursoB 1 Reply Last reply Reply Quote 1
              • bendursoB
                bendurso @d.healey
                last edited by bendurso

                @d-healey Nice thanks. I tried using expHandler instead of Engine and it's the same.

                The image and presets of the expansion are restored, but the expansion samples are not restored (the samplemap combobox is empty).

                d.healeyD 2 Replies Last reply Reply Quote 0
                • d.healeyD
                  d.healey @bendurso
                  last edited by

                  @bendurso Send me the project with an expansion and I'll take a look

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

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

                    @bendurso said in How to save current expansion in a DAW project:

                    the expansion samples are not restored (the samplemap combobox is empty).

                    Is the expansion itself still loaded? The fact the image is restored indicates it is.

                    So the real issue is your sample maps aren't being restored.

                    Instead of loading the sample maps when the panel is clicked, you could try doing it from within the Expansion Callback - or even the post preset load callback.

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

                    bendursoB 1 Reply Last reply Reply Quote 1
                    • bendursoB
                      bendurso @d.healey
                      last edited by

                      @d-healey Oh, that was it—thank you so much!

                      I thought that since I was calling loadSampleMaps on init, it would be sufficient. But it only worked after I called it in the expansion callback, once the expansion was loaded.

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

                        @bendurso Nice :)

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

                        1 Reply Last reply Reply Quote 0
                        • bendursoB bendurso marked this topic as a question
                        • bendursoB bendurso has marked this topic as solved
                        • First post
                          Last post

                        9

                        Online

                        1.7k

                        Users

                        11.9k

                        Topics

                        103.5k

                        Posts