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: foo_truepeak True Peak Scanner (Read 3746 times) previous topic - next topic - Topic derived from Re: Resampling Hi-Res...
Case and 1 Guest are viewing this topic.

Re: foo_truepeak True Peak Scanner

Reply #50
Your question doesn't address you are asking a developer to remove already existing functionality just for you. Again, if you share a skin, share the config files with it with your desired tags conventions. Like everyone else does. Georgia skin shares the entire profile folder and works fine for thousands of people.

Whatever I do with my tag names is my problem, the same like you. And that's my point. Your "problem" doesn't have higher priority than everyone else, specially when tags are already configurable for a reason (since the plugin allows to replace replaygain). This is like saying TF expressions should be removed from foobar, because your skin populates the Album list panel by path xd makes zero sense.

Now, suggesting changing the default tag names, that's another thing.

Fine. We disagree. My request for change was addressed to Case to consider tag naming (since it's beta) not to you.

Re: foo_truepeak True Peak Scanner

Reply #51
Fine. We disagree. My request for change was addressed to Case not to you.
And that's perfectly fine. And as another user using this plugin, I also give feedback to Case to not remove existing functionality for no reason xd Changing tag names? Great. Removing entirely the possibility to change tag names? Nope.

All your "problems" are gone if you share the plugin config files with your skin. Set your tags as you like, and share the config file. Profit.

You seem to ignore that part  ::) If you don't want to share a skin in a proper way, ok... but then don't convert your problem in everyone's problem.

Re: foo_truepeak True Peak Scanner

Reply #52
Fine. We disagree. My request for change was addressed to Case not to you.
And that's perfectly fine. And as another user using this plugin, I also give feedback to Case to not remove existing functionality for no reason xd Changing tag names? Great. Removing entirely the possibility to change tag names? Nope.

All your "problems" are gone if you share the plugin config files with your skin. Set your tags as you like, and share the config file. Profit.

You seem to ignore that part  ::) If you don't want to share a skin in a proper way, ok... but then don't convert your problem in everyone's problem.

There is no problem :-) I just ask to change a little thing that is still in beta.

Re: foo_truepeak True Peak Scanner

Reply #53
Me xd and that's why I request it.

JS aside, it's a perfectly fine feature request and I can see it has been added.

But scripting components are using buggy code inherited from WSH panel mod. Right now, they don't check menu flags so they return true for disabled items simply because they exist, not because you can run them or not.

They really should return false and I've just updated JSP3 to do this...

https://github.com/jscript-panel/FB2K/commit/3350f5b8a66aaeb08085b8cec97e669b0c742d39

For curious browsers, only portions of JSP3 are open source. You can't get anywhere close to compiling it.

Re: foo_truepeak True Peak Scanner

Reply #54
I kinda use this tool to validate the quality of the replaygain values that are being used upon playing a file.
The main drawback of the fields that are written by the replaygainscanner that they don't tell you anything about the settings of the replaygainscanner that were current upon writing these values.
The original ReplayGain author actually suggested storing the used calculation method in a tag already over 20 years ago, but it never got wide (or any) adoption. If I can find the suggestion or if there is an existing tag, I could add this to my tool.

The issue I have is that the names of the fields you write are non-mandatory and can be set by the user. I'm developing a skin and I have no way of knowing what the user has set for custom tag field names.
The field names are configurable because there is no standard for them. If there are other tools that do the same I would love to use the same names. Interoperability is important. But if there is no standard or widespread naming convention for something, I don't want to force a potentially silly name.

I'm not skinning expert but if you wish to use non-standard fields, I would make it super easy for users to customize them.

Same for clip count and peak position fields.
And if I may make a suggestion. Start all custom field tags with TruePeak to differentiate more easily from the actual replaygain tags.
You do realize that this component is 10 years old and the default True Peak field names have been "replaygain_track_true_peak" and "replaygain_album_true_peak" all this time? I can't change them lightly.
Also if I change the LRA tag fields to start with "truepeak" that means there is zero chance they have any interoperability with any other tool.

The beta that writes the gain values was just released this afternoon. Don't think many people already made adjustments for the new fields.
The gain values are quite new but they were added for a version released on Sunday, it's not a beta version. This test version added the Loudness Range tags.

I hope that as a minimum the tags truepeak_scanner_album_gain and truepeak_scanner_track_gain that were introduced in the beta get the same name convention upon installation as the earlier replaygain_album_true_peak and replaygain_track_true_peak from the non beta.
Now I'm confused. Earlier you wanted custom tags to start with "truepeak", now you want fields to resemble existing replaygain tags?

Would you like tags like album, title or replaygain_album_peak to be user configurable?
ReplayGain is a standard. That is a different scenario.

Talking about tag names, I would like to change the default "truepeak_scanner_clipped_samples" field to include indicator that it's for a track now that I was asked to add another field for album. With current naming convention the tag should obviously be called "truepeak_scanner_clipped_samples_track".
I'm open to suggestions to all default tag names.

I did some digging and I noticed that the so called ReplayGain 2.0 specification mentions field names "replaygain_track_range" and "replaygain_album_range" as being used by some tools to store LRA. If that's the case I would like to use the same fields, in which case configuration of LRA tag field names can be removed.

Re: foo_truepeak True Peak Scanner

Reply #55
The field names are configurable because there is no standard for them. If there are other tools that do the same I would love to use the same names. Interoperability is important. But if there is no standard or widespread naming convention for something, I don't want to force a potentially silly name.

I'm not skinning expert but if you wish to use non-standard fields, I would make it super easy for users to customize them.
Skins based on CUI Panel Splitters and ELP have very limited options for user configurability. In ELP I have a kind of workaround to achieve this, but in PSS it is impossible, which means I have to use $if3(tag,synonym1,synonym2,etc) and add every new tagname for the same thing to the code. I do use a central routine which sanitizes tags like artist, trackartist, albumartist (because tagging is often a mess) and I only use these sanitized tags in the rest of the code. So if I have to I will add the if3's to that routine and create sanitized tags for all user configurable truepeak tags to use in the rest of the code.

You do realize that this component is 10 years old
Nope. Search in this forum has never worked for me which is quite a nuisance because I'm pretty sure I'm asking things that have been asked a million times before.

The gain values are quite new but they were added for a version released on Sunday, it's not a beta version.
Same thing. I did not know. It's not in browse components. Best site I find to follow to check for updates is an external Japanese url.

Now I'm confused. Earlier you wanted custom tags to start with "truepeak", now you want fields to resemble existing replaygain tags?
It is simple. In a perfect world I would like all the tags that are custom to this component to have tagnames starting with truepeak. If you have reasons to not do this, fine. If that is the case and you introduce similar fields for gain then follow the naming convention for the earlier fields. I asked, nothing more than that too it. I just like things to be consistent and standardized. And I'm certainly not a fan of optional tagnames for reasons I think I explained. That said ... If tagnames are optional I will never change the default they come with upon installation, because most people probably won't change them so chances are best to write your code based on this defaults.

Talking about tag names, I would like to change the default "truepeak_scanner_clipped_samples" field to include indicator that it's for a track now that I was asked to add another field for album. With current naming convention the tag should obviously be called "truepeak_scanner_clipped_samples_track".
I'm open to suggestions to all default tag names.

"replaygain_track_range" and "replaygain_album_range" as being used by some tools to store LRA. If that's the case I would like to use the same fields, in which case configuration of LRA tag field names can be removed.
It's consistent, so I'm all for it. And I personally don't mind if you would change tagnames for relatively new fields now. I read these tags  only once in a central routine and the required rescanning to write these renamed tags is fast as well (since I don't want to introduce the dreaded if3's lightly).
The nature of a forum is unfortunately that there's always people that are going to object for valid or obscure reasons.
I like you're open to suggestions, but it is your tool and not a democracy, you decide, I'll follow.

Re: foo_truepeak True Peak Scanner

Reply #56
The field names are configurable because there is no standard for them. If there are other tools that do the same I would love to use the same names. Interoperability is important. But if there is no standard or widespread naming convention for something, I don't want to force a potentially silly name.

I'm not skinning expert but if you wish to use non-standard fields, I would make it super easy for users to customize them.
Skins based on CUI Panel Splitters and ELP have very limited options for user configurability. In ELP I have a kind of workaround to achieve this, but in PSS it is impossible, which means I have to use $if3(tag,synonym1,synonym2,etc) and add every new tagname for the same thing to the code. I do use a central routine which sanitizes tags like artist, trackartist, albumartist (because tagging is often a mess) and I only use these sanitized tags in the rest of the code. So if I have to I will add the if3's to that routine and create sanitized tags for all user configurable truepeak tags to use in the rest of the code.

You do realize that this component is 10 years old
Nope. Search in this forum has never worked for me which is quite a nuisance because I'm pretty sure I'm asking things that have been asked a million times before.

The gain values are quite new but they were added for a version released on Sunday, it's not a beta version.
Same thing. I did not know. It's not in browse components. Best site I find to follow to check for updates is an external Japanese url.

Now I'm confused. Earlier you wanted custom tags to start with "truepeak", now you want fields to resemble existing replaygain tags?
It is simple. In a perfect world I would like all the tags that are custom to this component to have tagnames starting with truepeak. If you have reasons to not do this, fine. If that is the case and you introduce similar fields for gain then follow the naming convention for the earlier fields. I asked, nothing more than that too it. I just like things to be consistent and standardized. And I'm certainly not a fan of optional tagnames for reasons I think I explained. That said ... If tagnames are optional I will never change the default they come with upon installation, because most people probably won't change them so chances are best to write your code based on this defaults.

Talking about tag names, I would like to change the default "truepeak_scanner_clipped_samples" field to include indicator that it's for a track now that I was asked to add another field for album. With current naming convention the tag should obviously be called "truepeak_scanner_clipped_samples_track".
I'm open to suggestions to all default tag names.

"replaygain_track_range" and "replaygain_album_range" as being used by some tools to store LRA. If that's the case I would like to use the same fields, in which case configuration of LRA tag field names can be removed.
It's consistent, so I'm all for it. And I personally don't mind if you would change tagnames for relatively new fields now. I read these tags  only once in a central routine and the required rescanning to write these renamed tags is fast as well (since I don't want to introduce the dreaded if3's lightly).
The nature of a forum is unfortunately that there's always people that are going to object for valid or obscure reasons.
I like you're open to suggestions, but it is your tool and not a democracy, you decide, I'll follow.

If those changes would mean we have to rescan all files or make some other huge changes I would voto - NO - do not change it. It is good.

Re: foo_truepeak True Peak Scanner

Reply #57
If those changes would mean we have to rescan all files or make some other huge changes I would voto - NO - do not change it. It is good.

You misunderstood. You don't have to rescan.

You have the option to use this in your display column:
[$replace($if3(%replaygain_track_range%,%lra_track%,%lra%), LU,)]

Re: foo_truepeak True Peak Scanner

Reply #58
Released a new version with the Loudness Range (LRA) ability included. Download from https://foobar.hyv.fi/?view=foo_truepeak.

There are also some internal changes. I did a lot of peak testing and speed testing and noticed that apart from full integer oversample factors being faster in (all) resamplers, SoX resampler really likes when resampling factors are powers of two. Since SoX is also generally fastest I made the component automatically try to pick SoX resampler. If it finds it, it will use a power of two oversample factor for speed. That will also give even better peak accuracy as it means higher sampling rate.

I also improved result dialog by adding a visible status column when needed even for minor issues and not just fatal errors. And results are more pleasant to look at as dialog uses real unicode minus signs so plus and minus have identical widths.

Re: foo_truepeak True Peak Scanner

Reply #59
Released a new version with the Loudness Range (LRA) ability included. Download from https://foobar.hyv.fi/?view=foo_truepeak.

There are also some internal changes. I did a lot of peak testing and speed testing and noticed that apart from full integer oversample factors being faster in (all) resamplers, SoX resampler really likes when resampling factors are powers of two. Since SoX is also generally fastest I made the component automatically try to pick SoX resampler. If it finds it, it will use a power of two oversample factor for speed. That will also give even better peak accuracy as it means higher sampling rate.

I also improved resource dialog by adding a visible status column when needed even for minor issues and not just fatal errors. And results are more pleasant to look at as dialog uses real unicode minus signs so plus and minus have identical widths.


I removed the installed beta and installed this version.
Is it intentional you decided not to rename truepeak_scanner_clipped_samples to truepeak_scanner_clipped_samples_track?

Can you give some info about the oversample factors that are in effect for the different source frequencies?
For instance what do you do with 88kHz and 176kHz SACD sourced files?

Re: foo_truepeak True Peak Scanner

Reply #60
The default clipped sample field name is changed, but if a configuration already exists it won't get automatically reset. You can right click on the field name and select 'Reset' to get the new default name.

If you look at the console output while the component is scanning or after scanning is done you can see it report information like "Oversampling to 352800 Hz with Resampler (SoX)".
The default oversampling multiplier is calculated by dividing the minimum wanted sampling rate by the source material sampling rate. If the result isn't a full integer, the multiplier gets rounded up to next full integer. For example the 88 kHz source you mentioned would give an oversampling factor of 3 with the default 192 kHz minimum sampling rate (192 kHz ÷ 88 kHz ≅ 2.18, fractional result gets rounded to next full number 3). But if SoX resampler is found, the multiplier gets rounded up to the next number that is a power of two. With these example numbers that would mean 4 x oversampling.
For 176 kHz source file the oversampling factor would be 2 with the default minimum sampling rate target. 2 is a the smallest full integer and it's also a power of two.
But for example 192 kHz ÷ 44.1 kHz ≅ 4.35, normal oversampling ratio would be 5 x but with SoX it would be 8 x.

Re: foo_truepeak True Peak Scanner

Reply #61
The default clipped sample field name is changed, but if a configuration already exists it won't get automatically reset. You can right click on the field name and select 'Reset' to get the new default name.
That did the trick.

If you look at the console output while the component is scanning or after scanning is done you can see it report information like "Oversampling to 352800 Hz with Resampler (SoX)".
The default oversampling multiplier is calculated by dividing the minimum wanted sampling rate by the source material sampling rate. If the result isn't a full integer, the multiplier gets rounded up to next full integer. For example the 88 kHz source you mentioned would give an oversampling factor of 3 with the default 192 kHz minimum sampling rate (192 kHz ÷ 88 kHz ≅ 2.18, fractional result gets rounded to next full number 3). But if SoX resampler is found, the multiplier gets rounded up to the next number that is a power of two. With these example numbers that would mean 4 x oversampling.
For 176 kHz source file the oversampling factor would be 2 with the default minimum sampling rate target. 2 is a the smallest full integer and it's also a power of two.
But for example 192 kHz ÷ 44.1 kHz ≅ 4.35, normal oversampling ratio would be 5 x but with SoX it would be 8 x.
Am I correct to assume SoX foo_resampler 0.8.7 is the most current and preferred version?

EDIT: Maybe a good idea after all to also write a (optional) tag that has the name/settings of the upsampler that was used upon the scan.

Re: foo_truepeak True Peak Scanner

Reply #62
The default clipped sample field name is changed, but if a configuration already exists it won't get automatically reset. You can right click on the field name and select 'Reset' to get the new default name.

If you look at the console output while the component is scanning or after scanning is done you can see it report information like "Oversampling to 352800 Hz with Resampler (SoX)".
The default oversampling multiplier is calculated by dividing the minimum wanted sampling rate by the source material sampling rate. If the result isn't a full integer, the multiplier gets rounded up to next full integer. For example the 88 kHz source you mentioned would give an oversampling factor of 3 with the default 192 kHz minimum sampling rate (192 kHz ÷ 88 kHz ≅ 2.18, fractional result gets rounded to next full number 3). But if SoX resampler is found, the multiplier gets rounded up to the next number that is a power of two. With these example numbers that would mean 4 x oversampling.
For 176 kHz source file the oversampling factor would be 2 with the default minimum sampling rate target. 2 is a the smallest full integer and it's also a power of two.
But for example 192 kHz ÷ 44.1 kHz ≅ 4.35, normal oversampling ratio would be 5 x but with SoX it would be 8 x.

Where exactly is this "reset" option. I can't find it.

All files that were scanned earlier display everything ok in the columns. Will this change after reset? I do not use any kind of Library. I  Manyally add a folder with the record I want to hear. Will I have to scan/change/reset every LP I already scanned?

After installing the new version of component and scanning new track my columns show only timestamp and album clips. There is no track LRA, album LRS nor track Clips. What exactly do I have to do to see it (what formulas to put in Columns and if I change then will I loose all previously scanned data)?

Re: foo_truepeak True Peak Scanner

Reply #63
Please try not to full quote everything. The threads get very annoying to follow when they are mostly filled with just blocks of quotes.

You can reset the "Clipped samples in track" field name to the new default string by right clicking the option name in advanced preferences and select 'Reset':
X

Note that these changes only affect what the tag fields are called. Files that are already scanned will stay the same. You could use foobar's Properties dialog and its 'Automatically fill values...' feature to copy data from the old field to the new one. Or you could rescan the tracks if there aren't that many.
Another option would be to use titleformat code with fallbacks and support showing data from multiple field names.

As for how to show the data, most field names you can see in the preferences window. For example to show data for the clipped samples, copy the field name and add percentage signs to both sides of the field name, like this:
Code: [Select]
%truepeak_scanner_clipped_samples_track%
To support also the old name, you can use this:
Code: [Select]
$if2(%truepeak_scanner_clipped_samples_track%,%truepeak_scanner_clipped_samples%)

Note that foobar2000 displays a question mark by default for a missing field, to hide that use square brackets around the part that will be hidden if metadata isn't present:
Code: [Select]
[%truepeak_scanner_clipped_samples_track%]

or for the longer one:
[$if2(%truepeak_scanner_clipped_samples_track%,%truepeak_scanner_clipped_samples%)]
The Loudness Range (LRA) gets stored in tag fields that are already used by some tools. The fields are called replaygain_track_range and replaygain_album_range.
Note that capitalization doesn't matter, foobar2000's properties dialog shows them with all caps by default.
To show LRA value for a track, you probably want to use something like this:
Code: [Select]
[$replace($if3(%replaygain_track_range%,%lra_track%,%lra%), LU,, dB,,)]
The square brackets means it won't show a question mark if the info isn't present. $replace() part removes ' LU' and ' dB' from the end. And $if3() part picks data from any of the given field names, first from quite established %replaygain_track_range%, then it checks %lra_track% and last it checks just %lra%.

Re: foo_truepeak True Peak Scanner

Reply #64
Thank you and sorry for the long quotes but I do not know how to qoute just fragments - is it done manually by inserting "qoute.../qoute"?

I use both Track and Album data in one column and while you were kind to help me I managed to do it myself with somethong like this:

$if3(%truepeak_scanner_clipped_samples_track%,%truepeak_scanner_clipped_samples%)/%truepeak_scanner_clipped_samples_album%

and

$replace($if3(%replaygain_track_range%,%lra_track%,%lra%), LU,)/$if3(%replaygain_album_range%,%lra_album%,%lra%)

It look like lratrack/lraalbum LU

What other tools use those fileds (as I would not want to loose smth)?

Once again thank you and sorry for amateur questions but I am not a programmer and this is all new to me.


Re: foo_truepeak True Peak Scanner

Reply #65
I think the easiest way to quote a part is to use quote like you do but remove all unwanted text from inside the quote. If you use quote blocks manually you don't get the nice link to the original post you are quoting.

You learn the titleformat syntax best by using it. I'd recommend the following changes to your string:
For clipped samples:
Code: [Select]
[$if2(%truepeak_scanner_clipped_samples_track%,%truepeak_scanner_clipped_samples%)][/%truepeak_scanner_clipped_samples_album%]
Without the square brackets your string would have shown up as "?/?" for tracks that aren't run through the tool. Or for missing album clip count it would have shown "/?" behind the track clip count. Simple square brackets make the output clean.
I don't know if it matters in reality, but $if2() is meant for cases where there are only two fields to pick from, $if3 supports arbitrary amount. Using $if2 should be faster since there are only two fields, no need for titleformat parser to try to search for missing data.

and for Loudness Ranges:
Code: [Select]
$replace([$if3(%replaygain_track_range%,%lra_track%,%lra%)][/$if2(%replaygain_album_range%,%lra_album%)], LU,, dB,)
I removed the %lra% field from album part, %lra% field was only used for track based Loudness Range tagging in regor's scripts. Afaik %lra_track% and %lra_album% were very short lived tag fields too, only used by my foo_truepeak test version that was only linked on these forums for testing during few days.
I also added square brackets to hide question marks if the tag fields aren't found from tracks. And both track and album fields are covered by the same $replace() rule to remove the units that you don't want to see. And I added back the 'dB' unit you had removed, at least LoudGain writes dB units here even though LRA is an ITE standard and their units are 'LU'.

I linked this in the other thread, LRA is stored in these %replaygain_track_range%/%replaygain_album_range% fields at least by LoudGain and MusicBrainz Picard.

Re: foo_truepeak True Peak Scanner

Reply #66
Thank you.
I will try your formulas but will probably leave those "?" (non brackets) because they infrom me at once that I sould scan the files:).

Re: Dynamic Range plugin

Reply #67
Thanks marc2k3. I certainly don't like bright decorations that don't belong.
I added the DR scanning as an option to True Peak Scanner, and implemented the darkening changes there first. It was surprisingly difficult to make Windows use the new style, I couldn't make it work except by programmatically adjusting the dialog size.


I enabled dr scanning in the settings for truepeak scanner and removed components foo_dynamic_range and foo_dr_meter since they are obsolete (for scanning). Truepeakscanner 0.6.3 works excellent.

There are some minor UI issues though.

The text in the context menu is incomplete. It says Truepeak and positions but nothing about DRA,
I would not if it would only say Truepeak (and does all the things you enable in settings).

The popup window that comes up after the scan does not remember it's last size settings and there is now a couple of columns extra which I cannot see unless I everytime resize the popup window.

Finally ... I cannot clear DRA tags from the context menu, since I removed both foo_dynamic_range and foo_dr_meter.
Same as above I would not mind a context menu item that says remove Truepeak tags which removes all the things you set in truepeak scanner settings (including replaygain stuff).

Thanks for this great addition.

 

Re: foo_truepeak True Peak Scanner

Reply #68
Could be possible to have a menu entry to do only dynamic range scan? It would be very useful to scan albums that already have the others values.