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.
Recent Posts
92
3rd Party Plugins - (fb2k) / Re: JScript Panel script discussion/help
Last post by eurekagliese -
Apparently adding playback buttons and seekbar to Text Display is enough for me :)


Code: [Select]
// ==PREPROCESSOR==
// @name "Text Display with Playback"
// @author "marc2003"
// @import "%fb2k_component_path%helpers.txt"
// @import "%fb2k_component_path%samples\js\lodash.min.js"
// @import "%fb2k_component_path%samples\js\common.js"
// @import "%fb2k_component_path%samples\js\panel.js"
// @import "%fb2k_component_path%samples\js\albumart.js"
// @import "%fb2k_component_path%samples\js\text_display.js"
// @import "%fb2k_component_path%samples\js\seekbar.js"
// ==/PREPROCESSOR==

// https://jscript-panel.github.io/gallery/text-display/

var panel = new _panel({ custom_background : true });
var albumart = new _albumart(0, 0, 0, 0);
var text = new _text_display(LM, 0, 0, 0);

panel.item_focus_change();

//////////////////////////////////////////////////////////////
var colours = {
buttons : RGB(255, 255, 255),
background : RGB(30, 30, 30),
title : RGB(255, 255, 255),
artist : RGB(240, 240, 240),
time : RGB(240, 240, 240),
seekbar_background : setAlpha(RGB(255, 255, 255), 50),
seekbar_progress : setAlpha(RGB(255, 255, 255), 150),
seekbar_knob :  RGB(255, 255, 255),
sac : RGB(196, 30, 35),
};

var tfo = {
artist : fb.TitleFormat('%artist%'),
title : fb.TitleFormat('%title%'),
playback_time : fb.TitleFormat('[%playback_time%]'),
length : fb.TitleFormat('$if2(%length%,LIVE)'),
};

var seekbar = new _seekbar(0, 0, 0, 0);
var buttons = new _buttons();
var button_set_idx = 0;
var fluent_font = 'Segoe Fluent Icons';
var has_font = utils.CheckFont(fluent_font);
var img = null;
var bs = _scale(24);

var normal_font = CreateFontString('Segoe UI', 12);
var bold_font = CreateFontString('Segoe UI', 12, true);

if (has_font) {
button_set_idx = window.GetProperty('2K3.BUTTON.SET', 0);
}

buttons.update = function () {
var y = Math.round((panel.h - bs * 2));
var c = Math.round((panel.w - bs) / 2);
this.buttons.stop = new _button(c - (bs * 2), y, bs, bs, { char : chars.stop, colour:fb.StopAfterCurrent ? colours.sac : colours.buttons}, null, function () { fb.Stop(); }, 'Stop');
this.buttons.previous = new _button(c - (bs), y, bs, bs, { char : chars.prev, colour:colours.buttons }, null, function () { fb.Prev(); }, 'Previous');
this.buttons.play = new _button(c, y, bs, bs, { char : !fb.IsPlaying || fb.IsPaused ? chars.play : chars.pause, colour:colours.buttons}, null, function () { fb.PlayOrPause(); }, !fb.IsPlaying || fb.IsPaused ? 'Play' : 'Pause');
this.buttons.next = new _button(c + (bs), y, bs, bs, { char : chars.next, colour:colours.buttons }, null, function () { fb.Next(); }, 'Next');
this.buttons.queue = new _button(c + (bs * 2), y, bs, bs, { char : '\ue109', colour: colours.buttons}, null, function () {var handleList = plman.GetPlaylistSelectedItems(plman.ActivePlaylist); if (handleList && handleList.Count !== 0) { handleList.RunContextCommand("Add to playback queue");} }, 'Add to playback queue\nRight Click: Flush Queue');
this.buttons.preferences = new _button(c + (bs * 3), y, bs, bs, { char : chars.preferences, colour:colours.buttons}, null, function () { fb.ShowPreferences(); }, 'Preferences');
//this.buttons.console = new _button(panel.w - LM - (bs * 3), y, bs, bs, {char : chars.list, colour:colours.buttons }, null, function () { fb.ShowConsole(); }, 'Console');
//this.buttons.search = new _button(panel.w - LM - (bs * 2), y, bs, bs, { char : chars.search, colour:colours.buttons }, null, function () { fb.RunMainMenuCommand('Library/Search'); }, 'Library Search');

if (button_set_idx == 1) {
this.change_font(fluent_font);
}
}

function on_playback_starting() {
buttons.update();
window.Repaint();
}

function on_playlist_stop_after_current_changed() {
buttons.update();
window.Repaint();
}

function on_mouse_lbtn_down(x, y) {
seekbar.lbtn_down(x, y);
}

function on_playback_seek() {
seekbar.playback_seek();
}

function on_playback_edited() {
window.Repaint();
}

//////////////////////////////////////////////////////////////
function on_colours_changed() {
panel.colours_changed();
text.refresh(true);
}

function on_font_changed() {
panel.font_changed();
text.refresh(true);
}

function on_item_focus_change() {
if (panel.selection.value == 0 && fb.IsPlaying) return;
panel.item_focus_change();
}

function on_metadb_changed(handles, fromhook) {
if (!fromhook) {
albumart.metadb_changed();
}
text.metadb_changed();
}

function on_mouse_lbtn_up(x, y) {
text.lbtn_up(x, y);
if (buttons.lbtn_up(x, y)) {
return;
}
if (seekbar.lbtn_up(x, y)) {
return;
}
}

function on_mouse_move(x, y) {
text.move(x, y);
if (buttons.move(x, y)) {
return;
}
seekbar.move(x, y);
}

function on_mouse_rbtn_up(x, y) {
if (buttons.buttons.queue.containsXY(x, y)) {
fb.RunMainMenuCommand('Playback/Flush playback queue');
return true;
}
if (buttons.buttons.stop.containsXY(x, y)) {
fb.StopAfterCurrent = !fb.StopAfterCurrent;
} else {
panel.rbtn_up(x, y, text);
}
return true
}

function on_mouse_wheel(s) {
text.wheel(s);
if (seekbar.wheel(s)) {
return;
}
if (s == 1) {
fb.VolumeUp();
} else {
fb.VolumeDown();
}
}

function on_paint(gr) {
panel.paint(gr);
text.paint(gr);
buttons.paint(gr);

gr.FillRoundedRectangle(seekbar.x, seekbar.y, seekbar.w + _scale(6), seekbar.h, _scale(4), _scale(4), colours.seekbar_background);
if (fb.IsPlaying) {
var pos = seekbar.pos();

gr.WriteText(tfo.playback_time.Eval(), normal_font, colours.time, seekbar.x - _scale(72), panel.h /2 - bs * 0.6, _scale(60), panel.h, DWRITE_TEXT_ALIGNMENT_TRAILING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER);
gr.WriteText(tfo.length.Eval(), normal_font, colours.time, seekbar.x + seekbar.w + _scale(20), panel.h /2 - bs * 0.6, _scale(60), panel.h, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER);

if (fb.PlaybackLength > 0) {
            //progress
            gr.FillRoundedRectangle(seekbar.x, seekbar.y, pos, seekbar.h,  _scale(4), _scale(4), colours.seekbar_progress);
            //knob
gr.FillEllipse(seekbar.x + _scale(3) + seekbar.pos(), seekbar.y + _scale(3), _scale(6), _scale(6), colours.seekbar_knob);
}
}
}

function on_playback_dynamic_info_track(type) {
if (type == 0) text.metadb_changed();
else if (type == 1 && (text.properties.albumart.enabled || text.properties.layout.value > 0)) albumart.metadb_changed();
}

function on_playback_new_track() {
panel.item_focus_change();
}

function on_playback_pause() {
text.refresh();

buttons.update();
window.Repaint();
}

function on_playback_stop(reason) {
if (reason != 2) {
panel.item_focus_change();
}

buttons.update();
window.Repaint();
}

function on_playback_time() {
text.playback_time();
window.RepaintRect(panel.h, 0, seekbar.x - panel.h, panel.h);
}

function on_playlist_items_added() {
text.refresh();
}

function on_playlist_items_removed() {
text.refresh();
}

function on_playlist_items_reordered() {
text.refresh();
}

function on_playlist_switch() {
on_item_focus_change();
}

function on_mouse_lbtn_dblclk(x, y) {
// window.ShowConfigure();
fb.RunMainMenuCommand('View/Show now playing in playlist');
}

function on_size() {
panel.size();
text.size();

seekbar.x = _scale(96);
seekbar.w = panel.w - seekbar.x * 2;
seekbar.h = _scale(6);
seekbar.y = (panel.h - bs * 0.7);
buttons.update();
}
93
General Audio / Re: Can SoX handle float file with volume over 0dBFS?
Last post by mycroft -
I dislike users that just take first available shortcut someone else made already.
First available shortcut is not documentation.
Documentation are documented options for each filter.
I like to reinvent stuff to be better, faster and perfect in both implementation and design perspective not to do hacks or absurd limitations like SoX does.
For the afir filter to force not normalization of IR audio (which is by default set to very conservative values to not cause clippings in convolution output) in FFmpeg use afir=gtype=none and in Librempeg (better project than FFmpeg in any measurable way) use afir=irnorm=-1.

If you want even better quality there is option to toggle full double floating-point precision in convolution, I may also add to sinc filter to generate real double floating-point output for even better precision when filtering.
94
3rd Party Plugins - (fb2k) / Re: Playlist-Tools-SMP
Last post by paregistrase -
I have this enable in auto tags

X

Add tags on batch to selected tags do the FooID and ChromaPrint and stop. It is necessary to Manually force next step.

Then it starts scanning essentia and RG, but the audio md5 is not wrote.

The component is installed and the audio md5 scan in utilities-create audio md5 tags works fine
95
General - (fb2k) / Re: Loudness Range (LRA) measuring in Foobar
Last post by twikaros -
Probably a stupid question.

PLR and DR both have album versions available. LRA only writes track values.  Is there a way to also write a tagged value for album LRA?
(or is that somewhere in a wiki too).

Reason: In ELP Group Header (normally the album) I have only access to the LRA of the first track so I cannot calculate an average over track combined or track*time.

 What are the PLR ​​and DR values? How are they determined and which component or script is responsible for them?
100
Support - (fb2k) / Foobar 2.1.2 release fails to read DTS-CD's properly.
Last post by Geert -
When I installed Foobar 2.1.2 release to read and play several of my DTS-CD's, I found out that only the first track of such a CD is decoded by the ffmpeg decoder build in this release. Playing another track brings up the noise that you get when playing a DTS-CD in an ordinary CD-player. It seems that foobar2.1.2 does not apply the DTS decoder automatically on all the tracks of a DTS-CD.

You can force Foobar to play a track with noise using the DTS decoder by going into the preferences menu and change the processing of the ReplayGain into something else and click on apply. Then the track currently playing "noise" will be decoded by DTS. So foobar can recognize that the track is actually a DTS-track. Please apply this automatically as you would expect.

Can you change this behaviour to apply DTS-decoding automatically on tracks other then being track 1 only.

Thanks in advance.