HISE Logo Forum
    • Categories
    • Register
    • Login

    Lottie animation controlling parameters?

    Scheduled Pinned Locked Moved General Questions
    25 Posts 7 Posters 1.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healeyD
      d.healey @Mickolos
      last edited by

      @Mickolos Why do you need two knobs?

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      M 1 Reply Last reply Reply Quote 0
      • M
        Mickolos @d.healey
        last edited by

        @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.

        d.healeyD 1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey @Mickolos
          last edited by

          @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

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          M 1 Reply Last reply Reply Quote 0
          • M
            Mickolos @d.healey
            last edited by

            @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.

            d.healeyD 1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey @Mickolos
              last edited by d.healey

              @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");

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              11

              Online

              1.8k

              Users

              11.9k

              Topics

              104.0k

              Posts