I am attempting to create an export script that uses variables to sum up %length% values as each %track% loop occurs. I am converting the current length to seconds as a $num(x,n) succesfully, and placing it in a variable. However I still can’t find a way to add the next track’s %length% value to it. $add doesn’t appear to work on user variables, and there is no real documentation on variables and how they can be used.
If anyone has notes on variable use or could reply with the proper script syntax to do the things below, I would be very grateful.
Generally, Variable1 loaded using $put(SLEN,($num(%_length_seconds%,5))), using Variable2 as the running total, by adding %_length_seconds% or Variable1 with the running sum of the loops.
%add() used with or without $num does not appear to work.
I could probably use %_total_time_seconds% without modifiacation, but it actually decrements total time by %_length_seconds% on each pass through the loop, which is the opposite of I would expect.
One more confusing area: If I load a variable using $put(SLEN,($num(%_length_seconds%,5))), which results in a $get value shown as “(nnnnn)”, whereas using %_total_time% displays nn:nn:nn.
More confusing is $num(%_total_time_seconds%,5) which yields 000000
I understand that this is all ‘very electric and dangerous,’ but if you have a reference or can show an example, it would be much appreciated.