Hi,
I got the same problem in the past (I am not working on HISE at the moment because I don't have time) but I solved with a script.
Pratically is the script that manage and update the ScriptProcessor SliderPacks.
You can create an external script as Arpeggiator.js (in the Scripts folder) and in include in the Interface main script:
include("Arpeggiator.js");
Here the script
// create ScriptProcessor SliderPacks array using Synth.getSliderPackProcessor(__name_of_your_script_processor__)
// 0 = PitchPack
// 1 = VelocityPack
// 2 = LengthPack
const SLIDER_PACK_PROCESSOR = Synth.getSliderPackProcessor('SyncedArpeggiator') ;
const SLIDER_PACKS = [
SLIDER_PACK_PROCESSOR.getSliderPack(0),
SLIDER_PACK_PROCESSOR.getSliderPack(1),
SLIDER_PACK_PROCESSOR.getSliderPack(2)
];
//create your GUI SliderPacks array
// **** IMPORTANT ****
//!!! DO NOT SET the processorId !!! in your GUI SliderPacks
const var SLIDER_PACKS_GUI = [
Content.getComponent("PitchPack"),
Content.getComponent("VelocityPack"),
Content.getComponent("LengthPack")
];
// create a control inline function that updates automatically the ScriptProcessor SliderPacks
inline function onSliderPackControl(component, value)
{
local idx = SLIDER_PACKS_GUI.indexOf ( component );
for ( n = 0 ; n < component.get('sliderAmount'); n++ )
{
SLIDER_PACKS[idx].setValue(n,component.getSliderValueAt(n));
}
};
// set for each of the GUI SliderPack the controllCallback above (onSliderPackControl)
Content.getComponent("PitchPack").setControlCallback(onSliderPackControl);
Content.getComponent("VelocityPack").setControlCallback(onSliderPackControl);
Content.getComponent("LengthPack").setControlCallback(onSliderPackControl);
I hope this will help you. Contact me if you have any problem or question.
Have a good day
Antonio