$lt doesn't appear to work

I have the following (simplistic) script:

$set(TEMPO,$if($lt(%bpm%,171),Allegro Vivace))
$set(TEMPO,$if($lt(%bpm%,161),Molto Allegro))
$set(TEMPO,$if($lt(%bpm%,140),Allegro con Brio))
$set(TEMPO,$if($lt(%bpm%,117),Allegretto Moderato))
$set(TEMPO,$if($lt(%bpm%,101),Andante Moderato))

I’nm trying to set a ‘Tempo’ value for each track. The problem is that the ‘TEMPO’ variable is not being set at all!

What I am trying to do is check the bpm value and set the ‘TEMPO’ accordingly

Any ideas or suggestions would be very much appreciated

The problem is that in each of your $if() cases, you don’t have an “else” condition, so it is setting the value to empty which removes the tag. Instead try changing your lines to something like:


That did it, many thanks for the quick assist, have a good evening