How to compare actual track length with length from Tag Source?

I'm finding myself defeated by a tagging challenge that I hope someone here can assist with. I have performed some batch tagging via source scripts, which is remarkable accurate, but also occasionally mis-matches. In order to help identify the mismatched tracks, I wish to compare the known track length with the "Time_Check" field that came from the Tag Source; in this case Beatport. Good matches usually have an accuracy of +/- 2-3 seconds for these values. Consequently. I would like to create a calculated field value to help identify any tracks whose variance between these two fields is greater than 3 seconds. I cannot find a suitable combination of functions to accomplish this, seemingly simple, task. Anyone have a trick/method that I could employ to accomplish this? Thanks.

The arithmatic functions are described in the documentation:

As you do not say what the data in

looks like, it is hard to go into more details than
would return the difference.
It could be that you have to transform %time_check% into seconds as well:
(this works only for files of a length shorter than 1 hour)

I would not clog up the tags but use a filter with GREATER or LESS

1 Like

Great suggestions. I'll be experimenting with these to see what works well/best. Much appreciated!


That was exactly the hint I needed to do this, so many thanks.

First, I created a Calculated field column to show the variance:


Then, I added a filter to show only items whose variance was greater than 3 or less than -3. NB. I could really use an $abs() function here, but don't see documentation for one anywhere.

$sub(%_length_seconds%,$add($mul($num($meta(_TIME_CHECK),1),60),$num($right($meta(_TIME_CHECK),2),2))) LESS -3 OR $sub(%_length_seconds%,$add($mul($num($meta(_TIME_CHECK),1),60),$num($right($meta(_TIME_CHECK),2),2))) GREATER 3

These seem to be solving my initial problem quite well. Many thanks.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.