Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: tag check returns false due to tiny value? (Read 1794 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

tag check returns false due to tiny value?

hi, i just made something to show whether or not the files have replaygain information.
i wanted to check if they have both album and track rg tags, and show 'yes' (for example), and 'no' if both are not there. (so, 'no' if even only one exists)

so i came up with this:
$if($and(%__replaygain_track_gain%,%__replaygain_album_gain%),'YES!','NO!')

and it works, ALTHOUGH, i have some silent tracks, literally, some are just silence... and while they DO have rg information, i guess they are returning false because the value is so small, and i assume there is a cut off point.
one silent track has 0.000061 as the track value, and another has 0.000000.

originally i had the script trying to use $meta_test, so, i had:

$if($and($meta_test(__replaygain_track_gain),$meta_test(__replaygain_album_gain)),'YES!','NO!')
but it did not work...

i thought meta_test returned true if the tag exists. i did not realise %__replaygain_track_gain% returned 'true', i thought i would have to use something to check if it exists or not in the first place, but the script at the beginning works.

but yeah, when i have a tiny value, it must return false, and so i get a NO! on my check in my playlist.
is there anyway to accomplish what i want, taking into account the tiny tiny values?

thanks a lot, i appreciate it!

-edit. it only affects 23 tracks out of 3100+, but still, it would be nice to fix

tag check returns false due to tiny value?

Reply #1
is this really not a problem? it seems to me a bug if something is returning as false, or 0, when in fact that is not true.

tag check returns false due to tiny value?

Reply #2
one silent track has 0.000061 as the track value, and another has 0.000000.

That is value of track peak, for very silent track. RG value on a contrary is large for such track
I can't reproduce your problem, so I assume that those tracks that return false, indeed does not have either RGTG or RGAG values

tag check returns false due to tiny value?

Reply #3
yes, well, the technically have values, just very small ones.
i want to sort whether a file has replaygain tags or not, so that i can easily see which files i need to run through replaygain.
is there not some value in foobar to change or something, that gives more accuracy, and lets (for example) 0.000061 return true?

tag check returns false due to tiny value?

Reply #4
romor is pointing out that those are peak values, not gain values, given that a silent track would have a high replaygain value. Thus those near-zero values wouldn't even be showing up as the values for the %__replaygain_track_gain% and %__replaygain_album_gain% tags as you claim.

tag check returns false due to tiny value?

Reply #5
ah! i was very mistaken.... sorry for the confusion... all my fault
so, the 'slient' tracks i have, they get NO track gain calculated/applied, and the so instead of track gain, yes, i was looking at the peak gain  thanks for pointing that out!

although, why is no track gain calculated or applied (to the tags)?
should it not be something? i have the track peak, album peak, and album gain, but no track gain.

i guess i should only check if album gain exists in my case then.. hmm

 

tag check returns false due to tiny value?

Reply #6
why is no track gain calculated or applied (to the tags)?

I don't know either, but to stop the false positives when checking for un-replaygained tracks I just edited those tracks & put (I think it was) "+0.00 dB" in the field.