Interface SliderPacks problem when connected to a ScriptProcessor sliderpack
-
Hi,
I have 2 SliderPacks in a Script processor
Figure 1In my interface I have a script that creates the same SliderPacks and connected with the following code:
//Set general props for components const var SCREEN_POS = {x:142,y:10,w:310,h:140}; const var PACKS = ["SliderPack1","SliderPack2"]; const var PACKS_PROPS = [[-24,24,1,310,140,10],[0,1,0.01,310,80,160]]; //Reference to ScriptProcessors SliderPacks const SLIDER_PACK_PROCESSOR = Synth.getSliderPackProcessor('ScriptProcessor_1') ; const SLIDER_PACKS = [ SLIDER_PACK_PROCESSOR.getSliderPack(0), SLIDER_PACK_PROCESSOR.getSliderPack(1) ]; //Function to generate the interface SliderPacks inline function initSliderPacks() { for ( n = 0; n < SLIDER_PACKS.length ; n++ ) { //Create SliderPack local pack = Content.addSliderPack ( PACKS[n] + "_1" , SCREEN_POS.x , PACKS_PROPS[n][5] ); //Set general props pack.set('parentComponent','pnl_SliderPacks_Editor'); pack.set('width', PACKS_PROPS[n][3]); pack.set('height',PACKS_PROPS[n][4]); pack.set('min',PACKS_PROPS[n][0]); pack.set('max',PACKS_PROPS[n][1]); //Get reference to ScriptProcessor SliderPack properties pack.set('stepSize',PACKS_PROPS[n][2]); pack.set('itemColour',0xAE53838B); pack.set('textColour',0x0000000); pack.set('bgColour',0xFF000000); //pack.referToData(SLIDER_PACKS[n]); pack.set('sliderAmount',SLIDER_PACKS[n].getNumSliders()); pack.set('SliderPackIndex',n); pack.set('processorId',"ScriptProcessor_"); pack.updateValueFromProcessorConnection(); } } initSliderPacks();
If I save my project, close and reopen I got in the interface the following:
Figure 2Then if I click Compile (from the Interface) I get the right SliderPack (1) :
Figure 3I noticed that the difference between the SliderPacks is that the first has the following properties:
- min : -24
- max: +24
- stepSize :1
- sliderAmoun: 8
the second one has:
- min: 0.0
- max 1.0
- stepSize 0.01
- sliderAmount: 8
If I build my project (VST or standalone) I got the problem (Figure 2) where the first SliderPack doesn't match with the ScriptProcessor sliderpack and the second works correctly.
Any idea? Thank you.