HISE Logo Forum
    • Categories
    • Register
    • Login

    SliderPackLAF

    Scheduled Pinned Locked Moved General Questions
    26 Posts 5 Posters 243 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.
    • DanHD
      DanH @DanH
      last edited by

      @Lindon @Oli-Ullmann @ustk

      Took some to-ing and fro-ing but I got there:

      HiseSnippet 1704.3oc0X0uSibCDeCvdpIsmZup9.3dUmtDNRHIj.jfpJeSQkChZn209Wmb75j0hcsSscBDppTeT5qRefpTeCtN1dI6FHzqGp2ezffHOiGO+lO8X5HEDpRIjd4Jb9jgTubehe2Ibc3dgXF26388x8o9DkpaDKfJ6fIW3s6jgXkhF3kK2hGY1Tt7K4Y+7Weyt3HLmPSI448JAiPOgEyzoT6r82whhNDGPOmEmY2M19XhfumHRLB.zh9U8FBZDOfdJ1rsE789VrJzK2x9s5uVqMWuJdsfMITBoQ+lardCbsFq0DSasVebMBcil0I.HezAALsP1Ui0TkWtk1UDLoan3RtSAuhoX8hnlE075BZ1Q9PQTfwDMT81KjEEz4FOkxCNkNo9sEc9suv+kr.1T5o9uOyx.kJQVGXtElEdKNC7pkEdUy.u4.obYfzRNH8D+tDIanNkiAOer+wbMU1GCworPwsWuEtHu+dBXGbckX7EzCkvhoRTb8pUWAA+ozVEJ.wJkFklZbxNGh9ZzMBSjTvlNQPvQmHDWrCO3PJMp37DrVFwFP06IhGJ3vhhOMyddpQR3SFRUTT8cTvL3wHypq9kn851s7+S9TXFCvXhGyiXbZW8jHZ2PJEbKEJTQYCWJ6dMUIE9kB46AeOPJFwCJSfbEYajVh4pgXI3L2B3KjvtKKwArQp1nZCuZqB+J3fVdYj8zQ5PJhwCXiYAivQH2oqpfVd0BULJwQvnJhKb0FUtbOFGKmTdLNZDsMhDgiGVr.B9TcE6WP7gTbLVVrraOkPu.UCsJxQBSHijXxjRkxr64wF3VBs7sICVULVNfwAyoRKiAketl9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SQXamVBXdTTsVsVuYyF0qWyK8tPCiF0a0n05aTuUSOWB+NwPBdlSBs8MEm.sG8mu06s1yOsySB4+v8zn6LEO79AQf4ZkYeTg4oWILfLsYlj2Lstom0jrOM6+rWZ7uEhOwuCSSBmOFWXNXDRJ9Pfwj2m8X+CrWjjBvk7O7G+v7XLuuGtJ.tY6kXsjAIg9mNJtKDpITP6bNMRcSYTx5pl0FOPWJOvt3svmDl0Lqykvr1ML8hwDo3MDWkr4EfejkBfIt80x48eoYMZZgapeNFdP5aHjYOp6HX8Gpfq8PErwCUvlOTAW+gJ3FOTA27cKn4+WvNifa2ckMdduryA1tl4xc.2LMpMa06ugFlGif
      

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

      DanHD Oli UllmannO 2 Replies Last reply Reply Quote 1
      • DanHD
        DanH @DanH
        last edited by DanH

        @d-healey I'd prefer my sliderpack values to show 0-100 on my UI - easy, set the sliderpack value to 0-100. However the sliderpack also controls another sliderpack who's values have to be 0-1. Hise doesn't like me using the '/' character in the callback. Any ideas? The reason I'm doing this is because I can't just multiply the value by 100 in CSS.

        Line 6791, column 24: '/' is not allowed on the Object type
        
        inline function onSliderPack_NOTE_LENGTH_UIControl(component, value)
        {
        	SliderPack_NOTE_LENGTH.setSliderAtIndex(value, component.getSliderValueAt(value / 100));
        };
        
        Content.getComponent("SliderPack_NOTE_LENGTH_UI").setControlCallback(onSliderPack_NOTE_LENGTH_UIControl);
        

        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 value the slider index not the slider value - you know how to get the value because you're doing it on the next line ;) component.getSliderValueAt(value)

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

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

            @d-healey yes, it wasn't working and I wondered if I was doing it wrong, hence the v in the wrong place. In any case, I can't do:

            inline function onSliderPack_NOTE_LENGTH_UIControl(component, value)
            {
            	SliderPack_NOTE_LENGTH.setSliderAtIndex(value, component.getSliderValueAt(value / 100));
            };
            
            Content.getComponent("SliderPack_NOTE_LENGTH_UI").setControlCallback(onSliderPack_NOTE_LENGTH_UIControl);
            

            either...

            EDIT - I can do:

            inline function onSliderPack_NOTE_LENGTH_UIControl(component, value)
            {
            	local v = component.getSliderValueAt(value);
            
            	SliderPack_NOTE_LENGTH.setSliderAtIndex(value, component.getSliderValueAt(v / 100));
            };
            
            Content.getComponent("SliderPack_NOTE_LENGTH_UI").setControlCallback(onSliderPack_NOTE_LENGTH_UIControl);
            

            but the linked sliderpack doesn't read the value properly

            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 d.healey

              @DanH component.getSliderValueAt(v / 100) Do you have 100 sliders?

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

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

                @d-healey no 😆 right I'm getting confused, obviously. 32 sliders. I just want to send the value of the sliderpack / 100 to the next sliderpack

                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 Why not set both sliderpacks to use a range of 0 - 1 and then multiply the value for display purposes in your LAF function?

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

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

                    @d-healey because I'm using CSS, which can't multiply a value.

                    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 d.healey

                      @DanH Ah i see,

                      So the slider value you want is:

                      local v = component.getSliderValueAt(value) / 100;

                      Then you can set the other sliderpack with:

                      myOtherSliderPack.setSliderAtIndex(value, v);

                      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 yes, that's what I expected to work, but the value received is still 0-100. Let me make a minimal snippet

                        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 DanH

                          @d-healey right, don't worry, finally got the right combo 😆 thanks!

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

                          1 Reply Last reply Reply Quote 1
                          • Oli UllmannO
                            Oli Ullmann @DanH
                            last edited by

                            @DanH
                            cool! Thank you! 😊

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

                            17

                            Online

                            1.7k

                            Users

                            11.8k

                            Topics

                            102.6k

                            Posts