is it possible to sync a animation to the TM PRO Speed Knob?

treynterrio
treynterrio Member Posts: 64 Member
edited October 2024 in Scripting Workshop

Hi there,

is it possible to sync this animation Code to the TM PRO (Sampler Mode) - Speed Knob?

on init
    declare ui_button $anim_on_off
    declare ui_label $animation(1,1)
    declare $frame
    set_control_par_str(get_ui_id($animation),$CONTROL_PAR_PICTURE,"animation")
    set_listener($NI_SIGNAL_TIMER_MS,40000)
end on

on listener
    if ($NI_SIGNAL_TYPE=$NI_SIGNAL_TIMER_MS)
        if ($anim_on_off=1)
            inc($frame)
            if ($frame=300)
                $frame := 0
            end if
           set_control_par(get_ui_id($animation),$CONTROL_PAR_PICTURE_STATE,$frame)
        end if
    end if
end on


Comments

  • noY_T
    noY_T Member Posts: 37 Member

    All you can do is change the speed at which the listener callback is called. You could theoretically create a slider tht controls the speed parameter of TM Pro AND sets the listener speed accordingly. But this requires some math because the speed parameter is not linear.

This discussion has been closed.
Back To Top