HISE Logo Forum
    • Categories
    • Register
    • Login

    controlling Sliderpack idx from a different OnControl??

    Scheduled Pinned Locked Moved General Questions
    39 Posts 4 Posters 1.5k 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 @ten7kur
      last edited by Lindon

      @ten7kur well no idea where its going wrong but near line 162 you have this:

      /vol.set("vol", (value) ); //ERROR!!
      

      vol is a ScriptSliderPack, and has no attribute called "vol"

      Selecting the widget and pressing ctrl-J shows you:

      [
      {
      "type": "ScriptSliderPack",
      "id": "vol",
      "x": 0,
      "y": 0,
      "sliderAmount": 3,
      "max": 36,
      "flashActive": 0,
      "width": 134.0,
      "height": 80.0,
      "min": -100,
      "": -100.0
      }
      ]

      Looks like your problems are in here:

      const var vol = sliderPackFactory(0, 0, "vol", {sliderAmount:simpleGainIds.length, min:-100, max:36, stepSize:0.01});
      

      and

      inline function sliderPackFactory(x, y, name, obj)
      {
      	var control = Content.addSliderPack(name, x, y);
      
      	//Set control properties
      	for (k in obj) //Each key in object
      	{
      		control.set(k, obj[k]);
      	}
      	
      	control.set("flashActive", false);
      
      	return control;
      };
      

      You seem to be trying to set attributes and they are not all arriving... but at no point have you "added" an attribute called "vol"

      HISE Development for hire.
      www.channelrobot.com

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

        ..and two minutes experimentation will show you that you cannot set the ScriptSliderPack Step size = 0.01, it can be either 0.1 or 1

        HISE Development for hire.
        www.channelrobot.com

        1 Reply Last reply Reply Quote 0
        • ten7kurT
          ten7kur
          last edited by

          @Lindon said in controlling Sliderpack idx from a different OnControl??:
          You say:

          well no idea where its going wrong

          But then you say:

          @Lindon said in controlling Sliderpack idx from a different OnControl??:

          Looks like your problems are in here:

          😏
          Ok great, could you show me how to fix it? How do i assign this "attribute"?
          My knowledge/understanding is not as great as some..

          1 Reply Last reply Reply Quote 0
          • ten7kurT
            ten7kur
            last edited by

            Anyone?
            Would really appreciate some input to get this working.

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

              vol.set("vol", (value) ); //ERROR!!

              What are you trying to do here? And what do you think vol.set does?

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

              1 Reply Last reply Reply Quote 0
              • ten7kurT
                ten7kur
                last edited by ten7kur

                @ten7kur said in controlling Sliderpack idx from a different OnControl??:

                Im trying to control each index of the sliderpack via other Knob/button.

                Want to control each index of a Sliderpack via other knob/button.
                My snippet already controls the Sliderpack items/Indexes but the Simple Gain module/component does not take effect from my knob.
                I know i can do this in the Property Editor but i want to do it from a Sliderpack.

                @d-healey said in controlling Sliderpack idx from a different OnControl??:

                vol.set("vol", (value) ); //ERROR!!
                What are you trying to do here? And what do you think vol.set does?

                Trying for my knob to push its value.. So that SimpleGain responds/re-acts/takes effect
                At the moment only the Slidepack takes effect

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

                  @ten7kur I think the problem is you are not familiar enough yet with sliderpacks. I don't have time to debug your code at the moment. Until I do, or someone else does make a simple project with 2 sliderpacks and play around with it so you have a good grasp of what everything does.

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

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

                    @d-healey said in controlling Sliderpack idx from a different OnControl??:

                    @ten7kur I think the problem is you are not familiar enough yet with sliderpacks. I don't have time to debug your code at the moment. Until I do, or someone else does make a simple project with 2 sliderpacks and play around with it so you have a good grasp of what everything does.

                    Probably not! Ok. will try. Got shitload of web develop to do. Havent even ate today! no gf :))
                    So @Lindon s advice of a missing attribute is a no?

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

                      @ten7kur Well the sliderPack doesn't have a property called vol

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

                      1 Reply Last reply Reply Quote 0
                      • ten7kurT
                        ten7kur
                        last edited by

                        Something strange is happening!
                        Could i have found another BUG?!

                        inline function onS__VolumeControl(component, value)
                        {
                            	if (value)
                                {   
                        	    vol.setSliderAtIndex(0, (value));
                        	    //vol.setAllValues(value);
                        	    vol.changed();
                                }
                        };
                        Content.getComponent("S__Volume").setControlCallback(onS__VolumeControl);
                        

                        This works! It adjusts/controls "S0"(the first sampler) volume. But if change the index to 1 or 2,
                        eg vol.setSliderAtIndex(1, (value)); ,it doesnt work anymore!
                        Same goes for if using: vol.setAllValues(value);
                        It only adjusts index 0.

                        ??🤔 🤔

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

                          @ten7kur

                          eg vol.setSliderAtIndex(1, (value)); ,it doesnt work anymore!

                          What do you mean by doesn't work?

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

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

                            @d-healey said in controlling Sliderpack idx from a different OnControl??:

                            What do you mean by doesn't work?

                            vol.setSliderAtIndex(1, (value)); 
                            

                            This should adjust S1's(sampler1) Volume , but it does not. Only index 0 responds.

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

                              I just took a look at your project. Are you putting each mic position in a separate sampler?

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

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

                                @d-healey said in controlling Sliderpack idx from a different OnControl??:

                                I just took a look at your project. Are you putting each mic position in a separate sampler?

                                I dont quite understand what you mean...
                                Im not specifically doing this for multi-mic samples. Just want to get the functionality working.

                                As you can see the SimpleGain's are in separate samplers.

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

                                  That's not how multi-mic samples work in HISE. You only need to use one sampler. You can read about it here - https://forum.hise.audio/topic/75/multimic-samples. I also have videos on my Patreon page about working with multi-mic samples in HISE.

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

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

                                    @d-healey said in controlling Sliderpack idx from a different OnControl??:

                                    That's not how multi-mic samples work in HISE. You only need to use one sampler. You can read about it here - https://forum.hise.audio/topic/75/multimic-samples. I also have videos on my Patreon page about working with multi-mic samples in HISE.

                                    Yes i know about that. Like i said "Im not specifically doing this for multi-mic samples. Just want this functionality that your script does." ie, the searching of a specific term in modules, and the grouping of all controls in sliderpacks.

                                    The question is when using vol.setSliderAtIndex(1, (value)); , why wont it respond.

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

                                      In the on control callback you are setting the simple gain[value] - so check what value is. But I wouldn't do it that way, I'd use individual control callbacks.

                                      	switch(number)
                                      	{
                                      		case vol:
                                      			if (mute.getSliderValueAt(value) == 0) //Channel isn't muted
                                      			{
                                      				gainFx[value].setAttribute(0, vol.getSliderValueAt(value));
                                      			}	
                                      		break;
                                      

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

                                      ten7kurT 2 Replies Last reply Reply Quote 0
                                      • ten7kurT
                                        ten7kur @d.healey
                                        last edited by

                                        @d-healey

                                        Appreciate the code but where would i insert this? im guessing in the muteSolo() function? bit overwhelming!

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

                                          @ten7kur said in controlling Sliderpack idx from a different OnControl??:

                                          The question is when using vol.setSliderAtIndex(1, (value)); , why wont it respond.

                                          It does respond - correctly - the second slider in vol moves... but if you dont connect vol to the samplers then nothing else is going to happen.

                                          I looked at your project snippet - you dont have a call back for vol

                                          HISE Development for hire.
                                          www.channelrobot.com

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

                                            @ten7kur

                                            Appreciate the code but where would i insert this? im guessing in the muteSolo() function? bit overwhelming!

                                            This is already in your snippet.

                                            It seems to me you just want a knob to control the gain knob of three simple gain effects. So why are you using slider packs at all?

                                            @Lindon said in controlling Sliderpack idx from a different OnControl??:

                                            I looked at your project snippet - you dont have a call back for vol

                                            It's in the master on control callback :)

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

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

                                            15

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.5k

                                            Posts