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: Is there a way to have the currently selected ReplayGain Source Mode displayed? (Read 2265 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Is there a way to have the currently selected ReplayGain Source Mode displayed?

Hi all

I switch between Track and Album ReplayGain fairly often and would love to set things up so that I can see - at a glance - which mode is currently selected. 

If I could choose, my preference would be a drop down menu.  I have the "Playback order" drop down menu and an RG drop down beside it would be perfect.  It isn't there as an option, but I wasn't sure if it might be possible to customise one? 

If not, the next best option would be custom buttons.  I already actually have them; one for "None", one for "Track" and one for "Album".  But they do not highlight or show as de-pressed.  So whilst it makes switching nice and quick and easy, it doesn't show me which mode is currently in use.  Is it possible to do anything with those buttons so that I can see which one is currently "on"/selected? 

Failing both of those options, would it be possible to display in the top bar (the "Window Title") which RG mode is active, and if so how. 

If that's not possible, I can't think of any other solutions but am open to ideas :)

Many thanks

Max

Re: Is there a way to have the currently selected ReplayGain Source Mode displayed?

Reply #1
Still looking for a solution if anyone out there can help... 
 
Cheers


Re: Is there a way to have the currently selected ReplayGain Source Mode displayed?

Reply #3
Hi philodoxxx

Thanks for the reply and the head's up.  I have come across that component before.  To be honest, I would prefer to stick with doing it manually, for a number of reasons I won't bore you (or anyone else reading this) with. 

So if anyone else out there knows whether I can achieve any of the options described in the OP, it would be great to hear from you.

Many thanks

Re: Is there a way to have the currently selected ReplayGain Source Mode displayed?

Reply #4
Anybody else? 

Cheers

Re: Is there a way to have the currently selected ReplayGain Source Mode displayed?

Reply #5
A workaround using the COM Automation Server https://hydrogenaud.io/index.php/topic,39946.0.html and a Jscript Panel. http://www.foobar2000.org/components/view/foo_jscript_panel

The below Jscript panel script will show you the current Replaygain Mode.

Code: [Select]
// ==PREPROCESSOR==
// @name "ReplayGain Mode Panel"
// @author "zeremy"
// ==/PREPROCESSOR==

// Jscript Panel (http://www.foobar2000.org/components/view/foo_jscript_panel)
// Requires COM Automation Server installed (https://hydrogenaud.io/index.php/topic,39946.0.html)

var fb2k = new ActiveXObject("Foobar2000.Application.0.7");
var rg_mode_array = ["None", "Track", "Album"];
var rg_mode = fb2k.Playback.Replaygain.Mode;
var g_font = gdi.Font("Segoe UI", 12, 0);
var DT_WORDBREAK = 0x00000010;
var DT_CENTER = 0x00000001;
var DT_VCENTER = 0x00000004;
var DT_NOPREFIX = 0x00000800;

function RGB(r, g, b) {
return (0xff000000 | (r << 16) | (g << 8) | (b));
}

function on_size() {
ww = window.Width;
wh = window.Height;
}

replaygain_mode_timer = window.SetInterval(function () {
rg_mode = fb2k.Playback.Replaygain.Mode;
window.Repaint();
}, 1000);

function on_paint(gr) {
gr.GdiDrawText("Current ReplayGain Mode: " + rg_mode_array[rg_mode], g_font, RGB(0, 0, 0), 0, 0, ww, wh, DT_WORDBREAK | DT_CENTER | DT_VCENTER | DT_NOPREFIX);
}

Works for "None , Album , Track" Modes.

If "New ReplayGain playback mode picking album/track gain depending on current playback order" is selected (versions 1.3.8+) the script will crash because the new method doesn't exist in COM Automation Server fbReplaygainMode.

Re: Is there a way to have the currently selected ReplayGain Source Mode displayed?

Reply #6
@zeremy, the next release of JScript Panel will have RG mode detection built in so you won't need COM server.