Forum

    • Register
    • Login
    • Search
    • Categories

    Arpeggiator Presets

    General Questions
    10
    61
    643
    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.
    • DanH
      DanH last edited by

      Hi guys, what's the best way to go about creating arp presets?

      I see I can exportState of a midiProcessor (i.e the Arpeggiator) - is that the way to go?

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

        Will you be adding controls to the UI so the user can edit the arps parameters?

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

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

          @d-healey indeed I have already, I'd like users to be able to save their own presets. I have a system borrowed from @Casey-Kolb for tables which works great, I just need to apply it to the arp and figure out how to convert the settings to the right kind of external file

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

            @DanH If the UI controls the arp and the UI is saved in the preset, then it's already doing it, no?

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

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

              @d-healey No I mean creating Arp presets only - not saving the arp to the user presets. i.e a sub menu of arp presets etc

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

                @DanH Grab the values from each control, store them in an object, dump the object as a json file.

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

                1 Reply Last reply Reply Quote 0
                • Casey Kolb
                  Casey Kolb last edited by

                  @DanH I use a special Data folder to store all of the subpresets. You can add whatever file extension you want to, so for arp presets, I'm literally using .arp (it may not be the safest to be making my own file types but it's fun...). The CUBE folder for the end user looks like this:

                  Screen Shot 2021-09-30 at 9.39.30 AM.png

                  You can also see how I'm storing the values by opening one of the arp files in a text editor. It's just a JSON with all the values from the CUBE interface. Hope that helps!

                  Casey Kolb
                  Founder & CEO of Lunacy Audio
                  Composer | Producer | Software Developer

                  DanH 1 Reply Last reply Reply Quote 1
                  • DanH
                    DanH @Casey Kolb last edited by

                    @Casey-Kolb I think it does mate thank you! (If not will pm 😆 )

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

                      @Casey-Kolb Ok I'm real close 😆

                      Just need to figure out how to get the sliderpacks to store their values properly, I'm getting in a mess - SP's are super confusing!

                      "ARPDATA" :
                                  {
                                      local arppitcharray = [];
                                      "ARPPITCH" :
                                      for (i = 0; i < SliderPack4.getNumSliders(); i++)
                                      {
                                          arpitcharray = SliderPack4.getSliderValueAt(i));
                                      }
                                  }
                      
                      1 Reply Last reply Reply Quote 0
                      • d.healey
                        d.healey last edited by d.healey

                        @DanH Is that a loop and a local variable declaration inside an object?

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

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

                          @d-healey yup!

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

                            @DanH That's a new level of crazy, I wish you luck 😛

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

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

                              So you are telling us that the thing you typed there actually works and doesn't deinstall HISE when you try to compile it like it's supposed to do 🙂

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

                                @Christoph-Hart I think I'm into triple figures for crashes today!

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

                                  @d-healey Thanks, I've smoothed it out a bit. I have no idea how to work with objects. I can sometimes save the sliderpack arrays to the json files, but I can't get them to ever load back in.

                                  
                                  const var SaveOk3 = Content.getComponent("SaveOk3");
                                  
                                  
                                  inline function onSaveOk3Control(component, value) {
                                          if (value)
                                          {
                                              local presetName3 = PresetNameToSave3.get("text");
                                              PresetHandler3.savePresetFile(presetName3, getControlValues3());
                                              SavePreset3.setValue(false);
                                              SavePreset3.changed();
                                              populatePresetList3();
                                              {
                                              for (i = 0; i < 16; i++)
                                              
                                                  SliderPack5SAVEData[i] = SliderPack5.getSliderValueAt(i);
                                              }
                                              
                                              
                                              {
                                              for (i = 0; i < 16; i++)
                                              
                                                  SliderPack4SAVEData[i] = SliderPack4.getSliderValueAt(i);
                                              }
                                              
                                          }
                                      };
                                  
                                      
                                      inline function onSaveCancel3Control(component, value)
                                      {
                                          SavePreset3.setValue(false);
                                          SavePreset3.changed();
                                      };
                                  
                                      inline function getControlValues3() {
                                          return {
                                              
                                              "ARPITCHDATA" : SliderPack4SAVEData,
                                              "ARPLENGTHDATA" : SliderPack5SAVEData
                                              
                                          };
                                      }
                                      
                                      inline function setControlValues3(data)
                                      {
                                          
                                          for (i = 0; i < 16; i++)
                                          {
                                              SliderPack4[i].setSliderAtIndex(i, ARPITCHDATA[i]);
                                          }
                                          for (i = 0; i < 16; i++)
                                          {
                                              SliderPack5[i].setSliderAtIndex(i, ARPLENGTHDATA[i]);
                                          }
                                      }
                                  
                                  }
                                  
                                  d.healey 1 Reply Last reply Reply Quote 0
                                  • d.healey
                                    d.healey @DanH last edited by d.healey

                                    @DanH said in Arpeggiator Presets:

                                    I have no idea how to work with objects

                                    https://www.w3schools.com/js/js_objects.asp

                                     {
                                                for (i = 0; i < 16; i++)
                                                
                                                    SliderPack5SAVEData[i] = SliderPack5.getSliderValueAt(i);
                                                }
                                                
                                                
                                                {
                                                for (i = 0; i < 16; i++)
                                                
                                                    SliderPack4SAVEData[i] = SliderPack4.getSliderValueAt(i);
                                                }
                                    

                                    You have an unhealthy obsession with superfluous curly braces.

                                    I'm going to make a video for you right now, hang tight.

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

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

                                      @d-healey okay thanks!

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

                                        @DanH HD version is taking ages to process, hopefully it's done by the time you return.

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

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

                                          @d-healey Thanks, very helpful 🙂

                                          I can get my knob values saved into objects and restored all ok. Just the sliderpacks that confuse the bollox out of me.

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

                                            @DanH Make a simple example that takes the value of each of the sliderpacks sliders and puts them in an array. Or a simpler solution might be to use a slider pack data object.

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

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

                                            3
                                            Online

                                            977
                                            Users

                                            6.6k
                                            Topics

                                            60.6k
                                            Posts