Not every control, you can do a check to see if the control is in the array before looping, which now that I think of it would give you the array index of the control so you wouldn't need a loop after all.
I just realised that's what Christoph has suggested.
Huge Thanks for You! I've got couple of very hard days, and the night should br also very busy, but tomorow I will try everything.
By the way, i tried to fix it before the first compilation:
somehow your sample references got messed up. If you copy the Main Container in the clipboard and paste it in Sublime Text or another text editor, you'll see that the file references in the samplers look like this:
But couldn't. The matter is, I think, there was wrong sample and i just deleted it from the map.
You'll need to build a new HISE
Scares only the first time, then everything just a cup of tea)
I figured out why my code had been pasted in the on Controller callback. I'd put the timer callback before the controller callback in my script - I think I've done this in a lot of scripts because I setup a template for it... time for some revision 🙂
Coming from Kontakt I think of it this way, each sampler you use in HISE is essentially what you get when you have a single NKI in Kontakt. Each sampler can have groups, just like a Kontakt instrument, into which you can map your RR or dynamic layer samples.
My use case was to put a CC modulator in each sampler to control gain via expression and then have a table on the interface that controls the table of each modulator. After playing with it some more I realised I could just grab the CC value in the script and scale it to the table setting, then forward that to the modulator. This saves me having to specify the modulators in the script too.