HISE Logo Forum
    • Categories
    • Register
    • Login

    Sliderpack resize "issues"

    Scheduled Pinned Locked Moved General Questions
    21 Posts 4 Posters 829 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.
    • Christoph HartC
      Christoph Hart @d.healey
      last edited by

      @d-healey said in Sliderpack resize "issues":

      You need to store the value of the additional sliders and restore them when the number changes. You can use a data object for this.

      That‘s actually pretty hacky. A clean solution would be the possibility of defining a fixed upper limit and then the resizing would just change the pointer instead of reallocating new memory when you resize a slider pack.

      This should be rather easy to implement, I‘ll see what I can do later.

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

        @lalalandsynth here's what I'm using...

        inline function onARPSLIDERSNUMBERControl(component, value)
        {
            		local lastAmount = SliderPack5.get("sliderAmount");
            
                		for (i = 0; i < SliderPack4.get("sliderAmount"); i++)
                {
                   	SliderPack4Data[i] = SliderPack4.getSliderValueAt(i);
        
            	}
            	
           		
                		for (i = 0; i < SliderPack5.get("sliderAmount"); i++)
                {   
                    SliderPack5Data[i] = SliderPack5.getSliderValueAt(i);
        
            	}
        
        					SliderPack4.set("sliderAmount", value);
        					SliderPack5.set("sliderAmount", value);
        			              	
        
                            Arpeggiator1.setAttribute(Arpeggiator1.NumStepSlider,value);
        
        
        	if (lastAmount < value)
            {
                    	for (i = 0; i < SliderPack4.get("sliderAmount"); i++)
                    	    {
                        	    SliderPack4.setSliderAtIndex(i, SliderPack4Data[i]);
        
                            }
                
                
                    	for (i = 0; i < SliderPack5.get("sliderAmount"); i++)
                    	    {
                       	 	    SliderPack5.setSliderAtIndex(i, SliderPack5Data[i]);
        
                            }
                    
            }
                        NOTEAMOUNTLABEL.set("text", Math.round(value));
        
        };
        Content.getComponent("ARPSLIDERSNUMBER").setControlCallback(onARPSLIDERSNUMBERControl);
        

        This was for two sliderpacks btw.

        Would much prefer @Christoph-Hart's permanent solution however 😆

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

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

          Looks like Christoph's solution is ready :)

          Link Preview Image
          - added SliderPackData.setUsePreallocatedLength() to retain slider va… · christophhart/HISE@2b7471a

          The open source framework for sample based instruments - - added SliderPackData.setUsePreallocatedLength() to retain slider va… · christophhart/HISE@2b7471a

          favicon

          GitHub (github.com)

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

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

            @d-healey Awesome!

            https://lalalandaudio.com/

            https://lalalandsynth.com/

            https://www.facebook.com/lalalandsynth

            https://www.facebook.com/lalalandsynth

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

              @lalalandsynth so how do we implement this?

              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 is it something like

                Sliderpack1.setUsePreallocatedLength(16);
                

                Assuming that our max limit of sliders is going to be 16?

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

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

                  Basically yes, but I haven't pushed the autocomplete yet (I did just now). I also made it accesible through the SliderPack class, not just the SliderPackData class like before.

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

                    @Christoph-Hart Thanks. I'm getting 'Unknown Function' error...

                    HiseSnippet 1158.3ocuW0sSiaDEdbHCcSnvBaWodazdEqJMJdWJcWUUUHPnMkEv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ZuunMh0WezAHpirdXVWZr9DZxrBkCoWo2oK9Qbmdmz5gYcIKA1fhCHJDfmM3AN5duytBnPi74zSiT9QpG.SsA8XqNXe8fwFKyHUJsQdr1HcDt2wDqWxxpko+.NoSAkj2cdVbpZoajm9Rp7iZqeSQJCbjsot8RO2pHDyhy+li4X96VEN+cgCjUR3tA0hqbFTLdqT.d0S38eLdmLWPmd8vroLvVkd36VzmtLGP4LYjhK5eLSEv0S2nu1EePGdUQRRU33Txz0sF202FDtsFWlmxzbbQflo4Xl3TaNAxO3jjOpeuzihofXRD+TwZ3aVw0MxFtk1ROrG9LtO33ncEeIh8h04EKfNubAzY6EPmuZAzYmEPmudAz4UyTG8Kn2KRIGlTlfDr5D+L.CijKhiyHI+6tvtFm
                    

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

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

                      @DanH SliderPack1 not Sliderpack1

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

                      DanHD 2 Replies Last reply Reply Quote 0
                      • DanHD
                        DanH @d.healey
                        last edited by

                        @d-healey doh!

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

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

                          @d-healey also is there a better way of controlling multiple sliderpacks from one SP than the below?

                          inline function onSliderPack5Control(component, value)
                          {
                              SliderPack12.setSliderAtIndex(value, component.getSliderValueAt(value));
                              SliderPack13.setSliderAtIndex(value, component.getSliderValueAt(value));
                              SliderPack14.setSliderAtIndex(value, component.getSliderValueAt(value));
                              SliderPack16.setSliderAtIndex(value, component.getSliderValueAt(value));
                          };
                          SliderPack5.setControlCallback(onSliderPack5Control);
                          

                          I saw a linkTo API....

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

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

                            @DanH If you want them to be completely linked, so that changing one will always change the others, then you can use a data object.

                            HiseSnippet 879.3ocuVstaSCCE1taFQKWDCwCPz9Um.pZKitMgPqqWFTfsTsNXf3GSdItslkX243LnfPhGEdm3Eg2.33jrlTnL1pDjeT0yU+cN9juS5pjNrf.oBgyu+3QLD95jdiE5gMGR4BTmVH7MI6PCzLkUrpFiGQCBXtHLdgmXTfyuHJ546a1f5QENrTUHzqjbG1K39bcp1t0eN2yaapKaeteFuWsdGGonozSFB3YARYzHpywzArcoF2xQP3qz1kqkpdZplE.9zP5Nt2P46Ew9+Jd.+HOlQnBpGjnX0nlC4dtcOqVCPH7hcSq7Ehq76P1g6xmnOsCbqHCVoQjsGfycdPpxk.R3LPhDCokH8bT7Q5TKF7bMRGAbgzmBs5rPY2P+ddbWlpKz1.nPvXnqFmATtugIMkPbBcIe5wrsUfvj7TrV4x2yB9YkGUn.bIDnsBljpVTM05wVsEC3BVIGECpzsDt6wFvMCF8lxwhYRwoTkUp0JPNNCACX5lR+QRAHTb4L9rLDcFwRJVelZeYTlmFQ+oio5E3XpN8wT8ubL8CENZtTXIE6J0LaQwUJ7oB4K74BV+po98moMCfTROOlZllMuGnNu.KJB8OhotGTqdgrINBywSO8ckK1zmSb+IiiRQGAWaOhkHuszy0LUY9+uOqhRZvvTatDDBPQGMyd6jY1z1KhCI5FjLWqnnxvLglGRlKzlQ32RpsZI3o+c+HuwAq2buAmL1V6t+Su66Zbf8ZF4Pau23s5Fu19YGUqI35o1GX+r013n0EmViexSZqsqvaTciVFsF6OvNJekhw6kDjU+uCxW1wLvYXBRZuPKeDSo4laVbK1o.UZLuPdRKVvwZ4nn9ex.9k6F3CS3c+Js93TR3MqilqLVMSF+xTYzsNJCy1hwU.voJcC8n5oIZMaTRL.y+SwtY3pDAb83rabtDrukOW12KJDWhzkqcFNaLlaFXz7Jx+.Llry5Fj186ybzo.bQx1uddWP8WN98jgZtXvNTshCW1Dy9FXUsCCNcgf4EsxImgcHVtrQ1zA5wDtQB+.dRLVYx9IvXkyLh7oNJ4gNwutZ1Jd0HM.lDQeDPd3qQ.YqTJDR4RkQ9vB5CcbLk+8ABqYGS04HlGLGwr5bDyCmiXpMGwr1bDy5maLluMZqPszO90APQ21Q7XXbaAElrhlBQ+DmO+Ms
                            

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

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

                              @d-healey ok thanks

                              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

                              7

                              Online

                              1.7k

                              Users

                              11.8k

                              Topics

                              102.8k

                              Posts