Lottie animation controlling parameters?
-
@Mickolos Why do you need two knobs?
-
@d-healey 1 = because if I link my lottie knob to the parameter I want it to affect then it stops controlling the lottie. 2 = I could not get Cristoph Hart's code he posted here in 2019 to work for me. So I thought if I could get the get a knob that is controlling the parameter to mirror the position of the lottie knob, then hide the non-lottie knob it would be good enough for me. I understand this is a bit of a hack, it's just what worked for me so I thought I'd share it in case someone found it useful.
-
@Mickolos said in Lottie animation controlling parameters?:
because if I link my lottie knob to the parameter I want it to affect then it stops controlling the lottie.
Use the knob's callback along with
setAttribute
instead of parameter/processor ID.I have a video here about using lottie with a hidden knob
And this video all about knobs
-
@d-healey I did. The lottie video is great but does not show how to link a knob to an actual parameter. And I watched the other video which is good for connecting knobs together but I could not figure out how to combine code from each, believe me I tried, I spent about 5 hours on it. - Again, as I said this is just a hack I found. My coding skills are not yet developed enough to decipher code from multiple videos and combine them into a specific feature I'm working on. But I'm making decent progress so I'll revisit the playing with sliders video again when my understanding of it improves in the future.
-
@Mickolos The solution is much simpler than the code you've already written :) It's basically just adding one line.
This is your knob callback
inline function onknbLottieControl(component, value) { pnlLottie.setAnimationFrame(value); }
Within this same callback you use
setAttribute
to control your module.inline function onknbLottieControl(component, value) { pnlLottie.setAnimationFrame(value); WaveformGenerator1.setAttribute(WaveformGenerator1.WaveForm1, value); }
The only extra thing you need to do is get a reference to the waveform generator within
on init
- HISE will create this for you if you right-click on the waveform generator module's header and select create generic script reference. Put this near the top of your script:
const var WaveformGenerator1 = Synth.getChildSynth("Waveform Generator1");