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: WSH Panel Mod script discussion/help (Read 1511695 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

WSH Panel Mod script discussion/help

Reply #2100
@Falstaff
Many many many thanks again. You're my hero

Btw. this one is needed for replacing my font style in my display panel with png.
But the background has to be drawn then. And that for is this matrix.

WSH Panel Mod script discussion/help

Reply #2101
Hi, I would like to modify marc2003's Art Reader script so that when I drag and drop songs from the library to the Art Reader panel, it adds the songs at the end of the active playlist. Is this possible?


add this to the preprocessors (green text) at the top

Code: [Select]
// @feature "dragdrop"


then put this function anywhere in the script

Code: [Select]
function on_drag_drop(action) {
    if (plman.PlaylistCount == 0) {
        plman.CreatePlaylist(0, "New playlist");
        plman.ActivePlaylist = 0;
    }
    action.ToPlaylist();
    action.Playlist = plman.ActivePlaylist;
    action.ToSelect = false;
}

WSH Panel Mod script discussion/help

Reply #2102
ExtremeHunter

Can you modify your code at Post #2093 so instead of background squares we get cross-hatch lines like you see in graph paper?

Here are some examples of what I'm talking about: (1) plain grid (2) enhanced grid

Also, I would like the lines to be light-gray and the back to be dark-gray ....I want the pattern to look very subtle in the WSH panel.

WSH Panel Mod script discussion/help

Reply #2103
this is just a plain grid. you can customise the first 4 lines as you like.

Code: [Select]
spacing = 20;
line_thickness = 1;
bg = RGB(65, 65, 65);
colour = RGB(192, 192, 192);
//////////////////////////////////////////

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

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

function on_paint(gr) {
    gr.FillSolidRect(0, 0, ww, wh, bg);
    for(i = 0; i < Math.ceil(ww / spacing); i++) {
        gr.DrawLine(i * spacing, 0, i * spacing, wh, line_thickness, colour);
    }
    for(i = 0; i < Math.ceil(wh / spacing); i++) {
        gr.DrawLine(0, i * spacing, ww,  i * spacing, line_thickness, colour);
    }
}


enhanced grid version.

Code: [Select]
spacing = 8;
bg = RGB(65, 65, 65);
colour = RGB(192, 192, 192);
//////////////////////////////////////////

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

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

function on_paint(gr) {
    gr.FillSolidRect(0, 0, ww, wh, bg);
    for(i = 0; i < Math.ceil(ww / spacing); i++) {
        gr.DrawLine(i * spacing, 0, i * spacing, wh, i % 20 == 0 ? 4 : i % 10 == 0 ? 2 : 1, colour);
    }
    for(i = 0; i < Math.ceil(wh / spacing); i++) {
        gr.DrawLine(0, i * spacing, ww,  i * spacing, i % 20 == 0 ? 4 : i % 10 == 0 ? 2 : 1, colour);
    }
}

WSH Panel Mod script discussion/help

Reply #2104
Very nice marc, thanks a lot +++++++++

ExtremeHunter,
I am too stupid and cannot put a turntable as background image in your "WSH Spinning Disc Image Viewer" code!
Can you please modify this code so it works please, thanks:
Code: [Select]
// ============================================================================= //
// @name "Spinning Disc Image Viewer"    (2013-01-25-075628)
// @author "eXtremeHunter"
// ============================================================================= //

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


window.DlgCode = 0x0001; // arrow keys for DUI

var defaultDisc = gdi.Image(fb.FoobarPath + "addons\\wsh-spinning-disc\\disc.png");                      //<<<<<<<<<<<< is used as animated foreground
var backgroundimage = gdi.Image(fb.FoobarPath + "addons\\wsh-spinning-disc\\turntable.png");    //<<<<<<<<<<<< is used as still background
var margin = window.GetProperty("Margin", 50);
var zoomStep = window.GetProperty("Zoom Step", 30);
var useDiscMask = window.GetProperty("Use Disc Mask", true);

var angle = 0;
var minSize = 20;
var disc = defaultDisc;
var discAlpha = 100;  // disc transparency 0-255.
var rotationInterval = 50;
var rotationTimer;
var rotationTimerStarted = false;
// ============================== //
function on_paint(gr) {

    backgroundimage && gr.DrawImage(backgroundimage, ww, ww, ww, wh, 0, 0, window.Width, window.Height);

    disc && gr.DrawImage(resizedDisc, discX, discY, discW, discH, 0, 0, resizedDisc.Width, resizedDisc.Height, angle, discAlpha);

}
// ============================== //
function on_mouse_wheel(step) {

    if (utils.IsKeyPressed(16)) {

        if (step == -1 && discW <= minSize) return;

        var s = step * zoomStep;
        margin = margin -= s;
        window.SetProperty("Margin", margin);
        on_size();

        window.Repaint();

    }

}
// ============================== //
function on_key_down(vkey) {

    if (vkey == 38) on_mouse_wheel(1) //UP ARROW
    if (vkey == 40) on_mouse_wheel(-1); //DOWN ARROW

}
// ============================== //
function on_size() {

    ww = window.Width;
    wh = window.Height;

    discW = Math.max(minSize, ww - margin);
    discH = Math.max(minSize, wh - margin);

    if (discH < discW) discW = discH;
    else if (discW < discH) discH = discW;

    discX = ww / 2 - discW / 2;
    discY = wh / 2 - discH / 2;

    resizedDisc = disc.resize(discW, discH);

    if (useDiscMask) {

        var discMask = gdi.CreateImage(discW, discH);
        var g = discMask.GetGraphics();
        g.FillSolidRect(0, 0, discW, discH, 0xffffffff);
        g.SetSmoothingMode(2);
        g.FillEllipse(1, 1, discW - 2, discH - 2, 0xff000000);
        discMask.ReleaseGraphics(g);
        resizedDisc.ApplyMask(discMask);
        discMask.Dispose();

    }

}
// ============================== //
(function onRotationTimer() {

    getDiscImage();

    if (!fb.IsPlaying || fb.IsPaused) {
        return;
    }

    if (!rotationTimerStarted) {

        rotationTimer = window.SetInterval(function () {

            if (angle >= 360) angle = 0;
            angle += 10;
            (discW >= ww || discH >= wh) ? window.Repaint() : window.RepaintRect(discX, discY, discW, discH);

        }, rotationInterval);

        rotationTimerStarted = true;
    }

})();
// ============================== //
function stopRotationTimer() {

    window.ClearInterval(rotationTimer);
    rotationTimerStarted = false;

}
// ============================== //
function on_playback_stop(reason) {

    if (reason != 2) {
        stopRotationTimer();
        getDiscImage();
    }
}
// ============================== //
function on_playback_pause(state) {

    state ? stopRotationTimer() : onRotationTimer();

}
// ============================== //
function on_playback_new_track() {

    onRotationTimer();

}
// ============================== //
var tempAlbum;

function getDiscImage() {

    if (!plman.PlaylistItemCount(plman.ActivePlaylist)) return;

    var nowPlayingDisc;

    var metadb = fb.IsPlaying ? fb.GetNowPlaying() : fb.GetFocusItem();
   
    if(!metadb) return;

    var currentAlbum = fb.TitleFormat("%album%").EvalWithMetadb(metadb);

    if (currentAlbum == tempAlbum) return;

        nowPlayingDisc = utils.GetAlbumArtV2(metadb, 2);

        nowPlayingDisc ? disc = nowPlayingDisc : disc = defaultDisc;

        tempAlbum = currentAlbum;

    on_size();
    window.Repaint();

}
// ============================== //
function on_selection_changed(metadb) {
    if (!fb.IsPlaying) getDiscImage();
}
// ============================== //
function on_playlist_items_removed() {

    if (!plman.PlaylistItemCount(plman.ActivePlaylist)) disc = defaultDisc;
    on_size();
    window.Repaint();

}

WSH Panel Mod script discussion/help

Reply #2105
the only way i know of to do that requires that you use 2 lines of DrawString code.

Quote
PS. I use one line because I want the string align in center.


there's no reason why it can't be done with 2 lines. calculate the width of the entire text. subtract that from the overall width of your "text area". divide that by 2. that gives x for the first bit of text. after calculating the width of the first colour text (plus a space), add that on to give the value of x for the second colour.

obviously this method would be useless for text spread over multiple lines but it should work fine for anything on a single line.

Hi, thank you for quickly answer.  But I have tried to use 2 draw text codes in long time ago, and I found the API about CalcTextWidth, CalcTextHeight, and EstimateLineWrap isn't very accurate, and my string shows in panel is 1~5 lines, so use 2 draw text is not useful for me.  But anyway, thank you very much again!

WSH Panel Mod script discussion/help

Reply #2106
added a few more favicon images to my musicbrainz script (when in links mode).

https://dl.dropbox.com/u/22801321/samples.zip

changed / added files:
Code: [Select]
marc2003\common6.js
marc2003\images\flickr_small.png
marc2003\images\google_plus_small.png
marc2003\images\lyrics_wikia_small.png
marc2003\images\vimeo_small.png


I just played your sample, it's awesome!
Would you like to add search album function in art.exe? (I can't understand the source...)
If you are not interesting in it, skip my comment.

WSH Panel Mod script discussion/help

Reply #2107
that program is made for last.fm and it's not very good for album images. you could look at this instead.

http://www.hydrogenaudio.org/forums/index....showtopic=57392

BTW, i didn't make that art.exe program. the original is here:

http://www.hydrogenaudio.org/forums/index....showtopic=77425

i had to modify it to work with WSH panel mod so i had to include my modified source. (i just commented out a line or 2)




WSH Panel Mod script discussion/help

Reply #2108
Hi, I would like to modify marc2003's Art Reader script so that when I drag and drop songs from the library to the Art Reader panel, it adds the songs at the end of the active playlist. Is this possible?


add this to the preprocessors (green text) at the top



Perfect, thank you very much!! And where could I find some documentation for those functions?

WSH Panel Mod script discussion/help

Reply #2109
i just copy/pasted from the sample provided with the component. Drag Drop Basic.txt.

documentation will be in interfaces.txt and callbacks.txt (almost forgot preprocessors.txt)

WSH Panel Mod script discussion/help

Reply #2110
derty2

backgroundimage && gr.DrawImage(backgroundimage, 0, 0, ww, wh, 0, 0, backgroundimage.Width, backgroundimage.Height);

WSH Panel Mod script discussion/help

Reply #2111
Thankyou eXtremeHunter +++++++

Here is a screenshot of my panel in action:


How can I adjust the X-Y coordinates of the disc in the panel so its hole sits exactly at same location as the turntable spindle? (i.e. I want to center the disc on the turntable platter).

By the way, I have been observing the behaviour and performance of your script (with the panel as you see above) and it is not perfect news :-( . . . . . . . when the panel is active it impacts the performance of all other foobar2000 functions. The panel itself no longer spins the disc smoothly; it spins with a  stuttering, jerky action. If I try scrolling the playlist viewer, I get stuttering and lagging movement. If I try opening menus I get stuttering and freezing graphics, and CPU usage escalates to around 25%.

If you have time one day, maybe you can review your code; I think it needs some tweaking and optimizing. I wish I could do it myself by I am not a JS scripter (yet).

Thanks again for all your help eXtremeHunter +++++++

WSH Panel Mod script discussion/help

Reply #2112
i do not believe there is anything that can be done in script to solve that. this component is not optimised for working with images like that.

i'd happily like to be corrected though.

if you want to tinker with x co-ordinate. on line 16

Code: [Select]
gr.DrawImage(resizedVinylImage, vinylX, vinylY, vinylW, vinylH, 0, 0, resizedVinylImage.Width, resizedVinylImage.Height, angle);


change to

Code: [Select]
gr.DrawImage(resizedVinylImage, vinylX - 100, vinylY, vinylW, vinylH, 0, 0, resizedVinylImage.Width, resizedVinylImage.Height, angle);


change the -100 if you like

edited to make simpler

WSH Panel Mod script discussion/help

Reply #2113
Thanks for that marc, unfortunately if I resize the panel in the X-axis then we no longer have the same relative co-ordinate :-(
I'm guessing it is solvable with more math in the script.

WSH Panel Mod script discussion/help

Reply #2114
you can either wait for ExtremeHunter to reply or i could attempt to have a go but i'd need the full script and images to test with.

WSH Panel Mod script discussion/help

Reply #2115
derty2
use proportionality virtual center X/background width and virtual center Y/background hight as the center of origin of your rotating disc
your background

WSH Panel Mod script discussion/help

Reply #2116
Me again...
Hoping that someone can help me here again:

I'm on replacing the font used in my display with PNG's and it worked good so far, except one thing: the volume.
I have no clue how i can do it with the volume...
I used the format fb.Volume.toFixed(2).

Here is the working example code for playback time:
Code: [Select]
function TimeImage() {
this.image = gdi.CreateImage(120, 20);
this.currentTime  = "";

this.init = function(time) {
gr = this.image.GetGraphics();

this.drawDigit(time, 0, 0);
this.drawDigit(time, 1, 0);

g_rowImage && gr.DrawImage(g_rowImage, 36, 0, 6, 20, 234, 0, 6, 20);

this.drawDigit(time, 3, -12);
this.drawDigit(time, 4, -12);

g_rowImage && gr.DrawImage(g_rowImage, 78, 0, 6, 20, 234, 0, 6, 20);

this.drawDigit(time, 6, -24);
this.drawDigit(time, 7, -24);

this.currentTime = time;

this.image.ReleaseGraphics(gr);
}

this.draw = function(time) {
if (this.currentTime == "") this.init(time);
else {
gr = this.image.GetGraphics();

this.drawDigit(time, 0, 0);
this.drawDigit(time, 1, 0);

this.drawDigit(time, 3, -12);
this.drawDigit(time, 4, -12);

this.drawDigit(time, 6, -24);
this.drawDigit(time, 7, -24);

this.currentTime = time;

this.image.ReleaseGraphics(gr);
}
}

this.drawDigit = function(time, index, offset) {
var digitValue = time.charAt(index);

if (this.currentTime == null || this.currentTime == "" || digitValue != this.currentTime.charAt(index)) {
var xoffset = index * 18 + offset;
gr.FillSolidRect(xoffset, 0, 18, 20, ui_backcol);
                        drawSquares(gr, 2, 1, xoffset, 0, 18, 20);
g_rowImage && gr.DrawImage(g_rowImage, xoffset, 0, 18, 20, digitValue * 18, 0, 18, 20);
}

}
}

var g_timeImage = new TimeImage();
Later i call in on_paint:
Code: [Select]
var t_fmt = t_rem ? info.Remain : info.Elapse;
g_timeImage.draw(t_fmt);
gr.DrawImage(g_timeImage.image, Math.floor(ww / 2.55), 30, 120, 20, 0, 0, 120, 20);
g_noTimeImage && gr.DrawImage(g_noTimeImage, Math.floor(ww / 2.55), 30, 120, 20, 0, 0, 120, 20);

And as long the g_rowImage (where all needed numbers and signs are in) is there it works really well.
So i thought i could do something similar with the volume and rewrote it to this:
Code: [Select]
function VolumeImage() {
this.image = gdi.CreateImage(168, 20);
this.curVolume  = "";

this.init = function(volume) {
gr = this.image.GetGraphics();

this.drawDigit(volume, 0, 0);
this.drawDigit(volume, 1, 0);
this.drawDigit(volume, 2, 0);
this.drawDigit(volume, 3, 0);
       
g_rowImage && gr.DrawImage(g_rowImage, 72, 0, 6, 20, 240, 0, 6, 20);
       
this.drawDigit(volume, 5, -12);
this.drawDigit(volume, 6, -12);

g_rowImage && gr.DrawImage(g_rowImage, 114, 0, 18, 20, 216, 0, 18, 20);
g_rowImage && gr.DrawImage(g_rowImage, 132, 0, 36, 20, 264, 0, 36, 20);

this.curVolume = volume;

this.image.ReleaseGraphics(gr);
}

this.draw = function(volume) {
if (this.curVolume == "") this.init(volume);
else {
gr = this.image.GetGraphics();

this.drawDigit(volume, 0, 0);
this.drawDigit(volume, 1, 0);
this.drawDigit(volume, 2, 0);
this.drawDigit(volume, 3, 0);

this.drawDigit(volume, 5, -12);
this.drawDigit(volume, 6, -12);

this.curVolume = volume;

this.image.ReleaseGraphics(gr);
}
}

this.drawDigit = function(volume, index, offset) {
var digitValue = volume.charAt(index);

if (this.curVolume == null || this.curVolume == "" || digitValue != this.curVolume.charAt(index)) {
var xoffset = index * 18 + offset;
gr.FillSolidRect(xoffset, 0, 18, 20, ui_backcol);
                        drawSquares(gr, 2, 1, xoffset, 0, 18, 20);
g_rowImage && gr.DrawImage(g_rowImage, xoffset, 0, 18, 20, digitValue == " " ? 216 : digitValue * 18, 0, 18, 20);
}

}
}

var g_volumeImage = new VolumeImage();
furthermore:
Code: [Select]
function pad_right(x, y, z) {
    z || (z = ' ');
    return x.length < y ? z.repeat(y - x.length) + x : x
}
And in on_paint:
Code: [Select]
var vol = fb.Volume.toFixed(2) + " db";
g_volumeImage.draw(pad_right(vol, 10));
gr.DrawImage(g_volumeImage.image, ww - 194, 30, 168, 20, 0, 0, 168, 20);
But always get script errors (overflow in the g_rowImage line in this.drawDigit part)...
Does anybody have a clue why ones working ones not?
I guess it may be the "-" before the volume?
How could i get rid of?

Btw. all other codes (for tracknumber, totaltracks and bitrate) i rewrote from the time code works well too.
Only the volume will not work...

Edit:
Oh, i forgot...
This is one of the rowImages i use (this one in red):

WSH Panel Mod script discussion/help

Reply #2117
onv

Thanks for the "proportionality virtual center" tip and taking the time to post a diagram ++++
I think you are on the money here. . . .please show me some demo code to paste into the script I posted at Post #2105. Thanks

WSH Panel Mod script discussion/help

Reply #2118
derty2
at least for this I need a clean background picture, without disc

WSH Panel Mod script discussion/help

Reply #2119
onv
here is an uploaded copy of the turntable image used as background in the panel:

turntable.png.rar - 2.3 MB, No Password
Code: [Select]
http://filebeam.com/9a42860bc83d58bc0f78dd4b4c10b909

WSH Panel Mod script discussion/help

Reply #2120
derty2
Code: [Select]
// ================================================== //
// @name "Spinning Disc Image Viewer  (Jan 24, 2013)"
// @author "eXtremeHunter"
// ================================================== //
function RGB(r, g, b) {
return (0xff000000 | (r << 16) | (g << 8) | (b));
}
window.DlgCode = 0x0001; // arrow keys for DUI

var defaultDisc = gdi.Image(fb.FoobarPath + "images\\disc.png");
var backgroundImage = gdi.Image(fb.FoobarPath + "images\\turntable.png");
var margin = window.GetProperty("Margin", 50);
var zoomStep = window.GetProperty("Zoom Step", 30);
var useDiscMask = window.GetProperty("Use Disc Mask", true);

var angle = 0;
var minSize = 20;
var disc = defaultDisc;
var rotationInterval = 50;
var rotationTimer;
var rotationTimerStarted = false;
// ============================== //
function on_paint(gr) {

  backgroundImage && gr.DrawImage(backgroundImage, 0, 0, backW, backH, 0, 0, 1196, 944);

disc && gr.DrawImage(resizedDisc, discX, discY, discW, discH, 0, 0, resizedDisc.Width, resizedDisc.Height, angle);

}
// ============================== //
function on_mouse_wheel(step) {

if (utils.IsKeyPressed(16)) {

if (step == -1 && discW <= minSize) return;

var s = step * zoomStep;
margin = margin -= s;
window.SetProperty("Margin", margin);
on_size();

window.Repaint();

}

}
// ============================== //
function on_key_down(vkey) {

if (vkey == 38) on_mouse_wheel(1) //UP ARROW
if (vkey == 40) on_mouse_wheel(-1); //DOWN ARROW

}
// ============================== //
function on_size() {

ww = window.Width;
wh = window.Height;

discW = Math.max(minSize, ww - margin);
discH = Math.max(minSize, wh - margin);
backW = ww;
backH = wh;
if (discH < discW) discW = discH;
else if (discW < discH) discH = discW;

if (backH < backW) backW = backH*1.267;
else if (backW < backH) backH = backW/1.267;

discX = backW * 0.392 - discW / 2;
discY = backH * 0.493 - discH / 2;

resizedDisc = disc.resize(discW, discH);
 

if (useDiscMask) {

var discMask = gdi.CreateImage(discW, discH);
var g = discMask.GetGraphics();
g.FillSolidRect(0, 0, discW, discH, 0xffffffff);
g.SetSmoothingMode(2);
g.FillEllipse(1, 1, discW - 2, discH - 2, 0xff000000);
discMask.ReleaseGraphics(g);
resizedDisc.ApplyMask(discMask);
discMask.Dispose();

}

}
// ============================== //
(function onRotationTimer() {

getDiscImage();

if (!fb.IsPlaying || fb.IsPaused) {
return;
}

if (!rotationTimerStarted) {

rotationTimer = window.SetInterval(function () {

if (angle >= 360) angle = 0;
angle += 10;
(discW >= ww || discH >= wh) ? window.Repaint() : window.RepaintRect(discX, discY, discW, discH);

}, rotationInterval);

rotationTimerStarted = true;
}

})();
// ============================== //
function stopRotationTimer() {

window.ClearInterval(rotationTimer);
rotationTimerStarted = false;

}
// ============================== //
function on_playback_stop(reason) {

if (reason != 2) {
stopRotationTimer();
getDiscImage();
}
}
// ============================== //
function on_playback_pause(state) {

state ? stopRotationTimer() : onRotationTimer();

}
// ============================== //
function on_playback_new_track() {

onRotationTimer();

}
// ============================== //
var tempAlbum;

function getDiscImage() {

if (!plman.PlaylistItemCount(plman.ActivePlaylist)) return;

var nowPlayingDisc;

var metadb = fb.IsPlaying ? fb.GetNowPlaying() : fb.GetFocusItem();

if(!metadb) return;

var currentAlbum = fb.TitleFormat("%album%").EvalWithMetadb(metadb);

if (currentAlbum == tempAlbum) return;

nowPlayingDisc = utils.GetAlbumArtV2(metadb, 2);

nowPlayingDisc ? disc = nowPlayingDisc : disc = defaultDisc;

tempAlbum = currentAlbum;

on_size();
window.Repaint();

}
// ============================== //
function on_selection_changed(metadb) {
if (!fb.IsPlaying) getDiscImage();
}
// ============================== //
function on_playlist_items_removed() {

if (!plman.PlaylistItemCount(plman.ActivePlaylist)) disc = defaultDisc;
on_size();
window.Repaint();

}

very quickly, perhaps not very accurately
so

eXtremeHunter
sorry 

WSH Panel Mod script discussion/help

Reply #2121
Excellent work onv +++++++

you locked the aspect ratio of the turntable and added math calculations for resizing the disc to suit changing co-ordinates at function on_size() ....impressive ++++++

I've played with it a little bit as I type this ....it has a problem! ....panel will crash if I try resizing the panel in the Y-axis ....X-axis is OK

Man this is such a lovely visualization, I love it! ...I am a vinyl freak (if you didn't know :-) .....unfortunately, foobar2000 performance and usability are TOTALLY CRUSHED when this panel is working!!!!
It looks to me like this panel cannot be anything more than a proof-of-concept project .....a sad conclusion.

I think that Russian developer who made the "Analog VU Meter" ("foo_vis_vumeter") component —I think his name is DRON or something— could make something like this.
Maybe he should name it "Analog Turntable" ("foo_vis_turntable")
 
 
P.S. -- I tell you what would look really cool as the "Default Disc" in this panel .....watching the empty turntable platter spinning around !!!!!!

 

WSH Panel Mod script discussion/help

Reply #2122
Quote
....unfortunately, foobar2000 performance and usability are TOTALLY CRUSHED when this panel is working!!!!


i had a go at fixing this and i've basically done it. the only problem is on album change where the UI freezes for 2-3 seconds. it uses next to no cpu once the album change is out of the way. i just need to tidy it up a bit and i'll post it later on.

WSH Panel Mod script discussion/help

Reply #2123
foobar2000 performance and usability are TOTALLY CRUSHED when this panel is working!!!!

Maybe using RegisterRect(window.ID,x,y,discW,discH) can reduce CPU loading

WSH Panel Mod script discussion/help

Reply #2124
Hi all.

I'm currently using foo_uie_albumart and I'm looking for a replacement because I fear sooner or later it (or CUI itself) won't be compatible with fb2k.

So I had a look at marc's Art Reader and, while it works, it lacks some features I've grown accustomed to. I know the script is based on fb2k art reader and therefore my request should probably be addressed to Peter, but I don't think he's interested so I'll ask here just in case:

1) define multiple sources of images (with title formatting) and automatically cycle through them; for example, my current uie_albumart shows cover and artist images (if any) through the following setup:
Code: [Select]
E:\My Music\covers\%artist%_%album%.*
E:\My Music\artists\$substr(%artist%,1,1)\%artist%_*.*
2) define multiple sources of no-cover images (with title formatting) and automatically cycle through them; again, my current setup is
Code: [Select]
--$if($strcmp($left(%path%,4),http),E:\My Music\covers\onlineradio*.*,E:\My Music\covers\nocover*.*)
3) switch between currently playing and selected track (now, if I'm not mistaken, it always shows the art for the selected track)

Cheers.

Alessandro