Hi,
Please find the below example.
Translator 0.0 takes the incoming CC value and assigns is global value of ga (target value). Then it triggers a continuous timer with a 50ms delay between actions. I use zz as a flag for debug log messages. I also set a timer running flag so that if it is running we don’t set it again.
// Is timer running?
if gc==1 then exit rules, skip Outgoing Action
// Set timer running
gc=1
// debug
zz=1
// repeat duration in ms
qq=30
Translator 0.1 is the timer and it compares current value (global variable gb) with the target value (global variable ga) and either increments or decrements the current value. Then it sends it out.
If the values are equal it triggers a Perform Action of ‘Kill’
if gb>ga then gb=gb-1
if gb<ga then gb=gb+1
if gb>127 then gb=127
if gb<0 then gb=0
if ga==gb then Perform "Kill"
if ga==gb then gc=0
pp=39
qq=0
tt=qq+1
if zz!=0 then Log "Sending CC %pp% on MIDI Channel %tt% with value=%gb%"
Translator 0.2 is the Perform action which both kills the timer and sets the timer running flag of gc back to zero so therefore reenabling the fader.
// clear timer running flag
gc=0
Enjoy!
Fader-Timer-Example-2024-01-02.bmtp (1.7 KB)
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz