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_outinfo (Read 2369 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_outinfo

@Case

Can you add the active replaygain mode description to the output tags your component creates?

For instance %output_rgmode% with values:
"Disable", "Track", "Album", "Track/Album by playback order"

As a bonus it would be nice to also publish the actual replaygainvalues that are in effect.

Re: foo_outinfo

Reply #1
You already have the replaygain mode in JSP3.
https://web.archive.org/web/20241201230443/https://jscript-panel.github.io/docs/namespaces/fb/

And while I would disagree with exposing things which should be handled by JSP3 code itself, I see it could be useful to have %output_rgmode% as tag for flex_dsp and dynamic_dsp components, since it would allow different DSPs depending on replaygain mode used. (for ex. disabling replaygain could automatically activate an ebu r128 normalizer DSP)

Quote
As a bonus it would be nice to also publish the actual replaygainvalues that are in effect.
Do you mean album/track gain? Since it depends on the actual playback context, I also agree about it. There is no other way to get it, since the mode doesn't tell which one is used in all cases.

Re: foo_outinfo

Reply #2
You already have the replaygain mode in JSP3.
https://web.archive.org/web/20241201230443/https://jscript-panel.github.io/docs/namespaces/fb/
I know and I based buttons on it, but I need them in TF to show the active status in a TF based Text Display.

And while I would disagree with exposing things which should be handled by JSP3 code itself, I see it could be useful to have %output_rgmode% as tag for flex_dsp and dynamic_dsp components, since it would allow different DSPs depending on replaygain mode used. (for ex. disabling replaygain could automatically activate an ebu r128 normalizer DSP)
The Text Display already also displays the active DSP preset and when desired the full DSP chain based on existing foo_outinfo tags.

Quote
As a bonus it would be nice to also publish the actual replaygainvalues that are in effect.
Do you mean album/track gain? Since it depends on the actual playback context, I also agree about it. There is no other way to get it, since the mode doesn't tell which one is used in all cases.
Yes, exactly.

Re: foo_outinfo

Reply #3
Quote
The TD already also displays the active DSP preset and when desired the full DSP chain based on existing foo_outinfo tags.
I'm not talking about displaying, but actually changing DSP chains based on the tag.

You can already hack the titleformat evaluation in JSP3 and replace %output_rgmode% with the mode before eval, it just requires a simple RegExp. There is zero need for an external component to do that, since your TF display is based on JSP3. BUT having it as a tag, allows further usage by other components like foo_flex_dsp. That's why I agree and as a plus it would also work with non JS text display panels.

And I only added these comments because I would expect case to be somewhat reluctant to keep adding more and more tags just for your text display script when there is a native JSP3 way to do it. But in this case it also has actual usage in other things.

Re: foo_outinfo

Reply #4
I would expect case to be somewhat reluctant to keep adding more and more tags[/url] just for your text display script when there is a native JSP3 way to do it. But in this case it also has actual usage in other things.
More people might be interested in TF versions of this info than just me and "my script" in order to use it anywhere where you can enter TF.

I don't think (me included) many people can create this stuff themselves in SMP or JS3.

That said, I don't want an endless discussion. I have made my RFC and will leave it at that.

Re: foo_outinfo

Reply #5
@Defender @regor
as nod-coding/developing foobar user I would certainly know where and how to use %output_rgmode% but have no idea how to use fb.ReplaygainMode. assuming there are more users like me (not coding) something like %output_rgmode% would be much apperciated.
By the way - we now have the ability to use "RG mode" (none, album, track...) in the upper bar but is there any way to display the processing (none, apply..., prevent...) - either in "bar" or "in JS3 text display"?



Re: foo_outinfo

Reply #8
@Defender @regor
as nod-coding/developing foobar user I would certainly know where and how to use %output_rgmode% but have no idea how to use fb.ReplaygainMode. assuming there are more users like me (not coding) something like %output_rgmode% would be much apperciated.
Not relevant anymore, but it may be for further exposed settings by JSP. I was not suggesting at all that final users should be coding or using "fb.ReplaygainMode". If you have a text display script, then all that should be handled by the script. I just pointed that it's perfectly possible to write something like:

Code: [Select]
%output_rgmode% - %ALBUM% - %ARTIST%

And just replace placeholder tags in JSP3 or SMP code before evaluating the TitleFormat expression:
Code: [Select]
const userInput = .... \\ %output_rgmode% - %ALBUM% - %ARTIST%
const tf = fb.TitleFormat(userInput.replace(/%output_rgmode%/gi, fb.ReplaygainMode));
...
Which would do the same than having the new update of foo_outinfo, without that requirement. (obviously there are other benefits when using the component as already discussed)

This pattern may be applied to many more things. For ex. in my scripts I allow things like #YEAR# (current year), #PLAYLIST# (playlist name), etc. which are dynamically evaluated on every call.

SMP has a list of exposed globals here. JSP3 should have a similar one:
https://theqwertiest.github.io/foo_spider_monkey_panel/assets/generated_files/docs/html/fb.html#.GetNowPlaying

So following the pattern, this would be possible via TF too:
Code: [Select]
%ALBUM% - %ARTIST%$crlf()
Volume: %VOLUME%$crlf()
Playlists: %PLAYLISTCOUNT%$crlf()

Code: [Select]
const userInput = .... \\ See above
const tf = fb.TitleFormat(
          userInput.replace(/%output_rgmode%/gi, fb.ReplaygainMode)
                    .replace(/%VOLUME%/gi, (100 + fb.Volume) + '%')
                    .replace(/%PLAYLISTCOUNT%/gi, fb.PlaylistCount)
);
...
Would output:
Code: [Select]
Hey Joe - Jimi Hendrix
Volume: 90%
Playlists: 24

There are so many things which can be retrieved this way.

Thanks for the update case :)

 

Re: foo_outinfo

Reply #9
@Case
thank you for yet another great addition.
Could you please confirm (or correct me if I am mistaken) that when used with "album" as a source the %output_rg_peak% and %output_rg_peak_db% values are presented actually for the whole album and not for the playing track (not for each track)? If I understand the RG correctly - when I use "prevent clipping" with "album mode" the RG takes the highest peak from all the tracks in the album and lowers the volume of every track in that album by such (constant) amount that causes the highest peakt to be 0,00. So for example if one track on the album peaks at 0,5 and the rest of the tracks peak at -0,5 - the loudest track would be lowered to 0,00 and the rest of the tracks would be lowered to -1,00. But %output_rg_peak% and %output_rg_peak_db% display 0,00 for every track (and not 0,00 for the loudest and -1,00s for the rest). If so would it be possible to also display actual values of those 2 features (%output_rg_peak% and %output_rg_peak_db%) for playing tracks?

Re: foo_outinfo

Reply #10
The RG peak info was reporting the album peak information when in album mode. But I changed it to report track peak data in the just released new version as that makes more sense.
The component can now also parse configuration from ReplayGain DSP if core ReplayGain is disabled. Note that when the DSP is in use the "by playback order" actually means the smart mode. And peak may not be right if extra headroom is requested.

Re: foo_outinfo

Reply #11
The RG peak info was reporting the album peak information when in album mode. But I changed it to report track peak data in the just released new version as that makes more sense.
The component can now also parse configuration from ReplayGain DSP if core ReplayGain is disabled. Note that when the DSP is in use the "by playback order" actually means the smart mode. And peak may not be right if extra headroom is requested.
Does this mean there is a new version?
Oh sorry,  yes there is.

Re: foo_outinfo

Reply #12
The RG peak info was reporting the album peak information when in album mode. But I changed it to report track peak data in the just released new version as that makes more sense.

Thank you.


Re: foo_outinfo

Reply #14
The component gives you access to new titleformat fields. You decide where and how to show the information, and you can show it anywhere you can use custom titleformatted text.
Best place out of the box is the player status bar. To use that, navigate to Preferences -> Display -> Default User Interface, and add the fields you want to the status bar string.
If you use Columns UI instead of Default UI, status bar titleformat string is on page Preferences -> Display - Columns UI -> Status bar.

Re: foo_outinfo

Reply #15
Hello. thanks for the reply. However I can't find that setting..
Thanks

Re: foo_outinfo

Reply #16
Your "Display" configuration tree is unexpanded. Double click the entry or click on the small arrow.

Re: foo_outinfo

Reply #17
Hello, thanks that did the trick!
Cheers