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
2
Support - (fb2k) / display Album Art in actual size, if smaller than panel
Last post by Sancho -
or, don't expand to fill panel, but if larger, do shrink to fit panel while preserving aspect ratio.

I think that sums it up. Don't see any option for that in v. 2.1.6 [x86]. I'm using Columns UI, which no longer deals with artwork source settings. My recollection is that these options used to exist (pre-v.2).

If there is no such option, any chance it could be implemented?

Thanks.
3
General - (fb2k) / Re: How to Copy a Panel from Default UI to Columns UI?
Last post by dix-hill -
Here's a way better solution I just came up with.  I am legend.

  • Install Flowin.
  • Choose View > Flowin > New Flowin
  • In the Flowin window, Right-Click and choose Add New UI Element > SQL Tree
  • Copy any SQL Tree Query or folder and Paste into the Flowin window
  • Switch to back to Columns UI or Default UI
  • Copy and Paste any query or folder into any SQL Tree panel

Done.
4
General - (fb2k) / AI programs Spider Monkey Panel
Last post by BHershey -
Issue: When I play music in the entire house I mix all our playlists together and then use the PREVIEW feature to listen to the first 3 minutes of each song. That way people get less irritated putting up with songs they might not like.

What I don't like is music AFTER the 3 minute mark is never heard by anyone... LAME.

I asked AI (Chat-GPTo1 with Canvas) that I want foobar2000 to play 3 minutes of every song but don't start at the beginning. It suggested I use Spider Monkey panel because it's gives a window into foobar functions using javascript. It told me to install the component and add a panel, click the panel and paste the code below.

PERFECT - songs that are under 3 minutes (or however long I select on the slider) play from the beginning. All other songs start in a random position that has at least 3 minutes remaining to play. It's like listening to new music.

Thank you Master AI!!




Code: [Select]
let randomStart = 0;
let enableRandomPlayback = true;
let playDuration = 150; // Default playback duration in seconds

function playRandomSegment() {
    if (!enableRandomPlayback) return; // Exit if random playback is disabled

    let track = fb.GetNowPlaying();
    if (!track) return; // Exit if no track is playing

    let duration = track.Length; // Get the track length in seconds
    if (duration > playDuration) { // If the track is longer than the selected duration
        randomStart = Math.random() * (duration - playDuration);
        fb.PlaybackTime = randomStart; // Set playback time to the random start point
    } else {
        randomStart = 0; // Start from the beginning if the track is shorter
    }
}

// Playback time event handler - runs every second
function on_playback_time(time) {
    if (time >= randomStart + playDuration) { // Check if selected time has elapsed since randomStart
        fb.Next(); // Move to the next track
    }
}

// Event listener for track change
function on_playback_new_track(metadb) {
    playRandomSegment(); // Trigger the function when a new track starts
}

// Paint event handler for drawing UI elements
function on_paint(gr) {
    // Draw the checkbox
    gr.FillSolidRect(10, 10, 15, 15, enableRandomPlayback ? RGB(0, 128, 0) : RGB(128, 128, 128));
    gr.DrawRect(10, 10, 15, 15, 1, RGB(0, 0, 0));
    gr.GdiDrawText("Enable Random Playback", gdi.Font("Segoe UI", 12), RGB(0, 0, 0), 30, 10, 200, 20);

// Draw the slider on the same line as the checkbox label
    gr.FillSolidRect(200, 15, 200, 5, RGB(150, 150, 150)); // Slider track
    let sliderPos = 200 + ((playDuration - 30) / (300 - 30)) * 200; // Calculate position based on playDuration
    gr.FillSolidRect(sliderPos - 5, 10, 10, 15, RGB(0, 0, 255)); // Slider handle
    gr.GdiDrawText("Playback Duration: " + playDuration + " sec", gdi.Font("Segoe UI", 12), RGB(0, 0, 0), 410, 10, 200, 20);

}

// Mouse click event handler for checkbox and slider
function on_mouse_lbtn_up(x, y) {
    // Handle checkbox click
    if (x >= 10 && x <= 25 && y >= 10 && y <= 25) {
        enableRandomPlayback = !enableRandomPlayback;
        window.Repaint(); // Repaint to update the checkbox state
    }

// Handle slider click or drag
    if (x >= 200 && x <= 400 && y >= 10 && y <= 25) {
        let newValue = Math.round(30 + ((x - 200) / 200) * (300 - 30));
        playDuration = newValue;
        window.Repaint(); // Repaint to update the slider position
    }
}

// Helper function to define RGB color
function RGB(r, g, b) {
    return 0xFF000000 | (r << 16) | (g << 8) | b;
}
5
General - (fb2k) / Re: How to Copy a Panel from Default UI to Columns UI?
Last post by dix-hill -
I see.  This reddit thread, by me, has a good suggestion in the first response: https://www.reddit.com/r/foobar2000/comments/1g0mb7s/comment/lrbm2n5/?context=3

I had success copying my SQL Tree queries from DUI to CUI by editing the database with this method, but it's still cumbersome:

  • Switch to Columns UI
  • Create an empty SQL Tree query with the same name as the DUI query to be copied
  • Exit Foobar2000
  • Open foo_uie_sql_tree.db in the DB Browser app
  • In the Browse Data tab, choose Table >> ust_TreeItem
  • In the tri_label column, filter for the name of the DUI query you want to copy
  • Copy the tri_sql_query field from the DUI query to the CUI query
  • Copy the tri_sql_batch field from the DUI query to the CUI query (if necessary)
  • File >> Write Changes
  • File >> Save All
  • Open Foobar2000
  • Edit the query
  • In the Query Tab, Select All, Cut, Paste
  • In the Batch Tab, Select All, Cut, Paste, Open SQL Console >> Execute (if necessary)
  • Refresh the Query and boom, you're done.

If you don't Select All, Cut, Paste, then Foobar2000 crashes.

6
3rd Party Plugins - (fb2k) / Re: Wine/Spider Monkey Panel/Script bugs on Linux
Last post by Sue Dunham -
Came here looking for a solution to drag and drop, and it looks like that's still awaiting a solution. Phooey.

I'm using the JSplitter component in a 64-bit fb2k and using the CaTRoX playlist in my own theme. It all seems to work but for that. I'm getting an idea for a workaround though. Theoretically, the JSplitter could be used to load both that playlist and a standard DUI one with the ability to show/hide between them. I don't know how to do that, but it could be done, right? So, once I figure out how to do that, I could drag and drop into the one and then switch back to the other for looks?
7
Lossless / Other Codecs / Re: HALAC (High Availability Lossless Audio Compression)
Last post by Porcus -
Anyway, non-rigorous testing on my 38 CD images, HALAC 0.3.6 Ultra vs flac 1.4.3 --no-md5 -0b3072 -r0 as I suggested (uh, and no padding on the FLAC), it seems to encode and decode faster (encoding is not quite twice as fast), and compresses better - 56.6 percent vs 57.3 percent. But that depends on material: FLAC compresses classical music better.

And if I give FLAC the -M which does that loose stereo decorrelation (calculating only every now and then what is the best, and then sticking to it for some frames), I get it down below 55 percent. (There is a full CD that is near-mono in there.)

Since this version of HALAC insists on file extension, I cannot output to NUL.
8
Lossless / Other Codecs / Re: HALAC (High Availability Lossless Audio Compression)
Last post by Hakan Abbas -
HALAC does not apply any transformation to data of type lossyWAV. This is because the results are slightly better this way. But in other cases there is a quick selection mechanism. However, I cannot say that it is very efficient.
In the future, I plan to develop a more sensitive and faster channel analyser for multi-channel audio data. For example, there are definitely relationships in 5+1 or 7+1 channel audio data. I have encountered such a situation before when working with multispectral image compression. It is not a good approach to process channels completely independently in multichannel (2+) audio data.

And now I see that the HALAC decoder is significantly faster in my tests with an Intel processor. In my previous tests I used an AMD processor... Anyway...
9
Vinyl / Re: What's the ideal way to fix the pitch of a vinyl recording?
Last post by drumliner -
I really don't see that Audacity gives you anything to complain about

Oh I wasn't trying to say there's anything wrong with Audacity in this respect (I do have an issue with its fade in/out process on 16bit files though). I just know that some resamplers can do a bit of a mess (as you can see on the site I linked) and since I not knowing any better used some of those in the past, I'm a bit more cautious now. That's all.

If they are normalized to 0 dB ... I suggest reducing by 3 dB and asking for a report about clips. Likely there won't be any.
You can safely reduce by much more. Six dB is (nearly) one bit, but if it is saved as 16 bits, the bottom few are surface noise anyway.

The files are saved as 96khz / 24bits. Off topic tangent... with the sample rate / bit depth overkill, there's plenty of content recorded past the 20khz I'm toying with the idea of slowing it down into the audible range. Not to store as music of course, just to mess around with it to see if anything interesting pops out.

Actually, since Audacity uses floating-point internally it can go over 0dB and it won't clip.
Thanks for the tips. I actually already tried this earlier today and noticed it doesn't clip. I got some overs after testing with some processing, re-normalized the file and checked its highest peaks, none of which were clipped.