@d-healey Thanks! I've been diving into the Interface Editor for the last couple days and am pretty happy with what I'm able to accomplish. And the linking widgets to parameter id's is a breeze.
But there are still some things I'll have to script and I'm unsure about how to go about it. For instance, say I setup a knob called "randomPitch" in the interface. I assign the processor id to "detuneRandom" (a Random Modulator in a pitch modulation module in the sampler container). I then assign the parameter id to "Intensity". Works. Great! But I don't want the knob to be able to go all the way 12. ;) This knob is for a chorus-y detuned effect, so I really only want it to have a range of +/- 50 cents. Well, I can sort of do this in the component specific properties by setting the "Max" field to .041 (1/24), but then the smallest step size available is .01....so not enough resolution for this type of control. So, I tried a little scripting. I put this in the onControl callback:
if(number==randomPitch) { const var detuneRandom = Synth.getModulator("detuneRandom"); detuneRandom.setAttribute(detuneRandom.Intensity, (value/24); }where "randomPitch" is my widget id, and "detuneRandom" is my pitch random modulator module. A couple of questions about this:
Is the onControl callback the best place to put this script? I know from reading some of Christoph's posts, there are efficiency concerns with where to put scripts.
I also read on some post that the first value of the .setAttribute method should actually be an integer instead of a string? And that integer is an index of each modules parameter? Is there a way to to determine what index number pertains to what parameter?
Is this very simple code I thought would be easy, very wrong?