controlling Sliderpack idx from a different OnControl??
-
@ten7kur var is any value that you wish to set the sliderpack property to.
-
I cant get it to compile.
-
@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"
-
..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
-
@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.. -
Anyone?
Would really appreciate some input to get this working. -
vol.set("vol", (value) ); //ERROR!!
What are you trying to do here? And what do you think
vol.set
does? -
@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 -
@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.
-
@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? -
@ten7kur Well the sliderPack doesn't have a property called
vol
-
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,
egvol.setSliderAtIndex(1, (value));
,it doesnt work anymore!
Same goes for if using:vol.setAllValues(value);
It only adjusts index 0.??
-
eg vol.setSliderAtIndex(1, (value)); ,it doesnt work anymore!
What do you mean by doesn't work?
-
@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.
-
I just took a look at your project. Are you putting each mic position in a separate sampler?
-
@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.
-
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.
-
@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. -
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;
-
Appreciate the code but where would i insert this? im guessing in the muteSolo() function? bit overwhelming!