HISE Logo Forum
    • Categories
    • Register
    • Login

    Arp not saving in presets..

    Scheduled Pinned Locked Moved Bug Reports
    7 Posts 4 Posters 366 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.
    • LindonL
      Lindon
      last edited by

      OK so I have an Arp using the Arpeggiator1 midi processor from the hard coded scripts.

      I have built a panel and a bunch or controls to manage it.

      And made sure they are all set up as SaveInPreset. I mod some values in it and asave a preset.. I reload the preset later and all the arp settings are missing...

      I look inside the preset and see:

          <Control type="ScriptSliderPack" id="VelocitySliderPack" value="31" data="128...f5BA..HHD..PiP..f+BA..9KD..3uP...FBA..jHD..3uP..f+BA..9KD..3uP..f+BA..9KD..3uP..f+BA..9KD..3uP..f+BA..9KD..3uP..f+BA..9KD..3uP..f+BA..9KD..3uP..f+BA..9KD..3uP..f+BA..9KD"/>
          <Control type="ScriptSliderPack" id="NoteLengthSliderPack" value="31"
                   data="128....iBA..PGD...cP..fkBA..3HD..PgP..fkBA..VJD..XoP..fkBA..VJD..XoP..fkBA..VJD..XoP..fkBA..VJD..XoP..fkBA..VJD..XoP..fkBA..VJD..XoP..fkBA..VJD..XoP..fkBA..VJD..XoP..fkBA..VJD"/>
          <Control type="ScriptSliderPack" id="PitchSliderPack" value="31" data="128............................................................................................................................................................................"/>
          <Control type="ScriptPanel" id="ArpSettingsPanel" value="0"/>
          <Control type="ScriptComboBox" id="ArpSettings" value="3"/>
          <Control type="ScriptSlider" id="ArpSteps" value="32"/>
          <Control type="ScriptSlider" id="ArpTempo" value="11"/>
          <Control type="ScriptSlider" id="ArpSwing" value="0.17"/>
          <Control type="ScriptPanel" id="ArpDirectionPanel" value="0"/>
          <Control type="ScriptComboBox" id="ArpDirection" value="1"/>
          <Control type="ScriptSlider" id="ArpOctave" value="0"/>
          <Control type="ScriptSlider" id="ArpSetpIncrement" value="1"/>
          <Control type="ScriptButton" id="SaveSettings" value="0"/>
      

      So my arp data is being saved in the preset - but its not being reloaded(applied to the controls) when I select the preset.

      What am I doing wrong?

      HISE Development for hire.
      www.channelrobot.com

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

        OK so I worked out what was wrong -and its a bit of a logic bomb for anyone working in the same way.. explanation time:

        I have a set of widgets to manage ARP settings, I also have a combobox with 20 slots. You select one of these 20 and an arp set-up is deployed - you can save your current arp set up into any of these slots.

        So in review a set of widgets with values and a combo box and a set of 20 slots - each with a set of widget values.

        So the user changes some settings in the arp and saves a preset: all good everything is written out to the preset.

        The user loads a preset , everything good here too, all the values written back into the widgets, except that at some point in the process...... the combobox event gets called - and it uses its current value to identify a slot full of values and then overwrites all the gui settings....

        grrr..

        So I need a way to NOT have the preset values overwritten by an internally saved version. Any ideas?

        HISE Development for hire.
        www.channelrobot.com

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

          @Lindon What is the saveInPreset state of the combo box?

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

          1 Reply Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart
            last edited by

            This is actually pretty easy to solve: the combobox must restore its value before any other UI element. It will load its predefined and after that every control will override the value with its custom one.

            The order of restoring is simply the order in the list. It has some implications for the z-level hierarchy but I can‘t think of an scenario where this is an actual problem.

            Another solution might be to make the combobox not persistent - if every UI control you store in there is persistent, the state will be restored correctly anyway.

            LindonL DanHD 2 Replies Last reply Reply Quote 1
            • LindonL
              Lindon @Christoph Hart
              last edited by

              @Christoph-Hart Ok great - so al I need do is re-order the comboBox to the top of my arp panel and it will be actioned first by the preset load? Does the order that values are stored in the preset XMl itself make a difference? If so I can "python it" into another position.

              HISE Development for hire.
              www.channelrobot.com

              1 Reply Last reply Reply Quote 0
              • DanHD
                DanH @Christoph Hart
                last edited by

                @Christoph-Hart Wow I wish I knew this a while ago! So every time you switch a preset it loads according to the list order? Just playing and it's solving problem I had with reverbs and delays creeping through when switching presets...

                DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                https://dhplugins.com/ | https://dcbreaks.com/
                London, UK

                DanHD 1 Reply Last reply Reply Quote 1
                • DanHD
                  DanH @DanH
                  last edited by

                  @DanH nope! spoke too soon....

                  DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                  https://dhplugins.com/ | https://dcbreaks.com/
                  London, UK

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

                  55

                  Online

                  1.7k

                  Users

                  11.7k

                  Topics

                  102.2k

                  Posts