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: NEW ESLyric v0.5 - an alternative lyric show component (Read 26573 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #25
@ohyeah:   it always begins the lyrics half-way down the display panel as shown below.  Is there a way to add a setting to begin the display closer to the top of the panel?
https://github.com/ESLyric/release/releases/tag/0.5.3.1018    you can try!
Thanks, I have updated to that version, but still do not see an option to start the display of unsynced lyrics at the top of the panel instead of in the middle.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #26
@ohyeah:   it always begins the lyrics half-way down the display panel as shown below.  Is there a way to add a setting to begin the display closer to the top of the panel?
https://github.com/ESLyric/release/releases/tag/0.5.3.1018    you can try!
Thanks, I have updated to that version, but still do not see an option to start the display of unsynced lyrics at the top of the panel instead of in the middle.
Right click on the lyrics panel, panel settings, there is a new menu, highlight line offsets. You try it. Since I don't have unsynced lyrics, I don't know if it will have the effect you expect. Or you can join the discord community to discuss.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #27
Right click on the lyrics panel, panel settings, there is a new menu, highlight line offsets. You try it. Since I don't have unsynced lyrics, I don't know if it will have the effect you expect. Or you can join the discord community to discuss.
Only seems to affect placement of synced lyrics.  It's OK, I can live with it, I know this plugin is primarily designed for synced lyrics anyway.  Thanks for replying.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #28
I've only just used the Desktop Lyric. Sort of forgot about it lol.

It's awesome.

What I'd love, though, is to have it only display when Foobar200 is in the foreground. Is that possible?

Sort of like it's just a different type of lyrics display panel within fb2k.

I was just playing around and had this (attached screenshot) in the top right. But I don't want the lyrics to show over other programs like my browser.

Thanks.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #29
Sort of like it's just a different type of lyrics display panel within fb2k.
It CAN be added as another display panel within fb2k.  Just go into Layout Editing Mode and either add a panel or add a tab to an existing panel area and "replace existing UI element" in the tabbed area--ESLyric will appear as a choice.  Then un-check the "Show the desktop lyric window" in its settings.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #30
Sort of like it's just a different type of lyrics display panel within fb2k.
It CAN be added as another display panel within fb2k.  Just go into Layout Editing Mode and either add a panel or add a tab to an existing panel area and "replace existing UI element" in the tabbed area--ESLyric will appear as a choice.  Then un-check the "Show the desktop lyric window" in its settings.
Thanks very much for the reply. Maybe I'm misunderstanding you but ...

I know how to add the ESLyric panel.

What I'm trying to do is only display the Desktop Lyric panel. And I'd like it to only display when fb2k is in focus.

So I don't really want a "desktop" panel. I just want the lyrics to display in that style within fb2k.

I'd like the lyrics to display just like in the screenshot I attached in my previous post, but not have the lyrics display over other programs.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #31
Sort of like it's just a different type of lyrics display panel within fb2k.
It CAN be added as another display panel within fb2k.  Just go into Layout Editing Mode and either add a panel or add a tab to an existing panel area and "replace existing UI element" in the tabbed area--ESLyric will appear as a choice.  Then un-check the "Show the desktop lyric window" in its settings.
Thanks very much for the reply. Maybe I'm misunderstanding you but ...

I know how to add the ESLyric panel.

What I'm trying to do is only display the Desktop Lyric panel. And I'd like it to only display when fb2k is in focus.

So I don't really want a "desktop" panel. I just want the lyrics to display in that style within fb2k.

I'd like the lyrics to display just like in the screenshot I attached in my previous post, but not have the lyrics display over other programs.
1、You can set a shortcut key to display desktop lyrics to quickly turn on or off when needed; 2、Double-click the ESL panel to enter the full-screen interface for better immersion! 3、If the taskbar display lyrics can meet your needs, I can share a solution; 4、If it's not enough, you can go to github to mention the demand and see if the author will consider adding it.

You can also add the esl panel in between the two panels in your screenshot and set the lyrics to scroll horizontally.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #32
Sort of like it's just a different type of lyrics display panel within fb2k.
It CAN be added as another display panel within fb2k.  Just go into Layout Editing Mode and either add a panel or add a tab to an existing panel area and "replace existing UI element" in the tabbed area--ESLyric will appear as a choice.  Then un-check the "Show the desktop lyric window" in its settings.
Thanks very much for the reply. Maybe I'm misunderstanding you but ...

I know how to add the ESLyric panel.

What I'm trying to do is only display the Desktop Lyric panel. And I'd like it to only display when fb2k is in focus.

So I don't really want a "desktop" panel. I just want the lyrics to display in that style within fb2k.

I'd like the lyrics to display just like in the screenshot I attached in my previous post, but not have the lyrics display over other programs.
1、You can set a shortcut key to display desktop lyrics to quickly turn on or off when needed; 2、Double-click the ESL panel to enter the full-screen interface for better immersion! 3、If the taskbar display lyrics can meet your needs, I can share a solution; 4、If it's not enough, you can go to github to mention the demand and see if the author will consider adding it.

You can also add the esl panel in between the two panels in your screenshot and set the lyrics to scroll horizontally.
2. Didn't know that. Thanks!
3. Not sure what taskbar display lyrics will do, but I don't think it's what I'm trying to do.
4. Thanks, I will.

1. This is a brilliant idea I should have thought of. This is the solution, I think. Thank you very much.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #33
Is it possible to have ESLyric scan for .lrc files (in the same folder as the tracks and with the same track title) and copy the lyrics to the lyrics tag?

I know ESLyric can look for local files before the tags, so most of the time the local files work fine.

But if I copy few tracks to an external mp3 player, the .lrc files don't go with them (unless I copy whole folders).

So I like to have all the lyrics stored in the lyrics tag.

I'd like to be able to copy lyrics files from another computer. I can do that easily (in the correct folder structure), but then I don't know how to force Foobar2000 to make sure the lyrics are then embedded in the tags.

Perhaps it can already do this but I haven't managed to find out how?

Many thanks.

 

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #34
You could try some experimenting with foo_masstagger.  It may be able to do this (create lyric tags then copy lyrics matching a specified criteria into those tags) in a couple of operations, but I don't have the expertise to go any further than suggesting you test.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #35
You could try some experimenting with foo_masstagger.  It may be able to do this (create lyric tags then copy lyrics matching a specified criteria into those tags) in a couple of operations, but I don't have the expertise to go any further than suggesting you test.
Thanks a lot. I'll see what I can do with it.

EDIT: Well, I can't see anything in Masstagger that would do it. Attached screenshot shows the options.

I'm looking into whether mp3tag can do it.

But I still wonder if ESLyric can.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #36
I think I've nearly worked out how to do the above with mp3tag so don't worry about that one. Thanks for the help, sveakul.

A separate thing:

Some of the lyrics that ESLyrics grabs are in this (karaoke?) format ...

[00:00.00]<00:00.00>There<00:00.91> <00:01.83>Ain't<00:02.74> <00:03.66>Half<00:04.58> <00:05.49>Been<00:06.41> <00:07.32>Some<00:08.24> <00:09.16>Clever<00:10.07> <00:10.99>Bastards<00:11.90> <00:12.82>-<00:13.74> <00:14.65>Ian<00:15.57> <00:16.48>Dury<00:17.40>
[00:17.42]<00:17.42>Noel <00:18.14>Coward <00:18.60>was <00:18.93>a <00:19.22>charmer<00:19.84>
[00:21.44]<00:21.44>As <00:21.84>a <00:22.19>writer <00:22.55>he <00:22.87>was <00:23.29>Brahma<00:24.02>
[00:25.56]<00:25.56>Velvet <00:26.29>jackets <00:27.00>and <00:27.34>pajamas<00:28.15>
[00:29.71]<00:29.71>Had <00:29.95>a <00:30.27>gay <00:30.73>divorce <00:31.23>and <00:31.52>other <00:31.83>dramas<00:32.39>
[00:33.53]<00:33.53>There <00:34.16>ain't <00:34.50>half <00:34.76>been <00:35.00>some <00:35.25>clever <00:35.49>bastards<00:35.74>
[00:36.39]<00:36.39>Lucky <00:36.68>bleeders <00:37.17>lucky <00:37.60>bleeders<00:37.89>

They are not compatible with the BlackPlayer music player on my phone (see attached screenshot) (or the OpenLyrics fb2k component).

1. Is it possible to tell ESLyric not to download those type of lyrics?

2. Is there any way to convert these lyrics into normal synced lyrics with just the timestamps in square brackets, maybe with regex in a text editor?

3. Any other suggestions to work around this?

Thanks.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #37
I'd like to edit my previous post above but can't.

Main problem solved. I'll leave this here in case it's any use to anyone.

Quote
Some of the lyrics that ESLyrics grabs are in this (karaoke?) format ...

[00:00.00]<00:00.00>There<00:00.91> <00:01.83>Ain't<00:02.74> <00:03.66>Half<00:04.58> <00:05.49>Been<00:06.41> <00:07.32>Some<00:08.24> <00:09.16>Clever<00:10.07> <00:10.99>Bastards<00:11.90> <00:12.82>-<00:13.74> <00:14.65>Ian<00:15.57> <00:16.48>Dury<00:17.40>
[00:17.42]<00:17.42>Noel <00:18.14>Coward <00:18.60>was <00:18.93>a <00:19.22>charmer<00:19.84>
[00:21.44]<00:21.44>As <00:21.84>a <00:22.19>writer <00:22.55>he <00:22.87>was <00:23.29>Brahma<00:24.02>
[00:25.56]<00:25.56>Velvet <00:26.29>jackets <00:27.00>and <00:27.34>pajamas<00:28.15>
[00:29.71]<00:29.71>Had <00:29.95>a <00:30.27>gay <00:30.73>divorce <00:31.23>and <00:31.52>other <00:31.83>dramas<00:32.39>
[00:33.53]<00:33.53>There <00:34.16>ain't <00:34.50>half <00:34.76>been <00:35.00>some <00:35.25>clever <00:35.49>bastards<00:35.74>
[00:36.39]<00:36.39>Lucky <00:36.68>bleeders <00:37.17>lucky <00:37.60>bleeders<00:37.89>

They are not compatible with the BlackPlayer music player on my phone (see attached screenshot) (or the OpenLyrics fb2k component).

Is there any way to convert these lyrics into normal synced lyrics with just the timestamps in square brackets, maybe with regex in a text editor?

A kind redditor helped me out.

Using mp3tag, you can select Actions>Action (Quick)>Replace with regular expression and then use

Regular expression:
<[^>]+>

Replace matches with:
leave field this blank

Magic.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #38
Is there any way to remove the lines in Chinese from the lyrics?

They don't show up in the ESLyric panel, but they do in other music playing apps and I'd like get rid of them.

Thanks.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #39
I don't suppose AutoLyric is possible to add as a source? It's the only other source for user-submitted LRC files (aside from MiniLyrics which is unreliable and will probably die again soon). Unfortunately it looks like you have to install the component in order to actually download the files, but I wonder if there's a way around that. If Genius.com would actually develop the site and adopt timestamped lyrics, that'd be great lol.

www.autolyric.com/en/latest-adopted-lyrics

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #40
I can only get ES Lyrics to work if experimental.pref.source.lyrics3 is set to 1. If set to 0, I get no lyric sources. Downloading scripts in "Get More" doesn't work. I'm wondering if it's because I'm running this in a Panel Stack Splitter.


Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #41
I can only get ES Lyrics to work if experimental.pref.source.lyrics3 is set to 1. If set to 0, I get no lyric sources. Downloading scripts in "Get More" doesn't work. I'm wondering if it's because I'm running this in a Panel Stack Splitter.
I assume you are asking this because you are running Lyrics Show Panel 3 also?  If set to 0 it should retrieve no hits from LSP3-only sources, but still get results from its own sources if selected in its preferences.  When you hit "Get More", what actually happens?  Does it show the scripts, but fail when you select to download them?

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #42
I also have LSP3 and foo_multisource. When I download AZLyrics (or anything else) under Get More it says Up To Date, but it does not show in the Lyrics Sources list. When I reboot Foobar, it will revert back to Not Installed.

The scripts will download, however, if I run it outside Panel Stack Splitter.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #43
I still really like this component, by the way. It's much better than LS3.

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #44
I still really like this component, by the way. It's much better than LS3.
I'm assuming you say this due to the synced lyrics handling specialty of ESlyric?  Otherwise hard to compare the available sources of LSP3+Multisource with the ones from ESlyric and the display of unsynced lyrics.  Of course, for 64-bit, there IS no LSP3.  I recommend giving foo_openlyrics a try, which does a great job with both lyric types and also has the 64-bit option.  It's a shame IMO its developer decided not to have an active discourse on the Foobar forums instead of just GitHub.


Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #46
I still really like this component, by the way. It's much better than LS3.
I'm assuming you say this due to the synced lyrics handling specialty of ESlyric?  Otherwise hard to compare the available sources of LSP3+Multisource with the ones from ESlyric and the display of unsynced lyrics.  Of course, for 64-bit, there IS no LSP3.  I recommend giving foo_openlyrics a try, which does a great job with both lyric types and also has the 64-bit option.  It's a shame IMO its developer decided not to have an active discourse on the Foobar forums instead of just GitHub.

Openlyrics is no good for me because it doesn't display artwork.

(Yes, I know this is a late reply)

Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #47
I still really like this component, by the way. It's much better than LS3.
I'm assuming you say this due to the synced lyrics handling specialty of ESlyric?  Otherwise hard to compare the available sources of LSP3+Multisource with the ones from ESlyric and the display of unsynced lyrics.  Of course, for 64-bit, there IS no LSP3.  I recommend giving foo_openlyrics a try, which does a great job with both lyric types and also has the 64-bit option.  It's a shame IMO its developer decided not to have an active discourse on the Foobar forums instead of just GitHub.

Openlyrics is no good for me because it doesn't display artwork.

(Yes, I know this is a late reply)

with this code in jscript panel 3 , you have the artwork :

// ==PREPROCESSOR==
// @name "Last.fm Bio"
// @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\lastfm.js"
// @import "%fb2k_component_path%samples\js\text.js"
// @import "%fb2k_component_path%samples\js\thumbs.js"
// @import "%fb2k_component_path%samples\js\albumart.js"
// @import "%fb2k_component_path%samples\js\rating.js"


// ==/PREPROCESSOR==
// https://jscript-panel.github.io/gallery/thumbs/
// https://jscript-panel.github.io/gallery/lastfm-bio/
// https://jscript-panel.github.io/gallery/album-art/


var panel = new _panel();
var lastfm = new _lastfm();
var text = new _text('lastfm_bio', LM * 50, TM * 5 , 0, 0);
var thumbs = new _thumbs();
var albumart = new _albumart(40, 60, 230, 230);
var rating = new _rating(40, 560, 16, RGB(255, 128, 0)); // x, y, height, colour

var lastfm_textlogo = utils.LoadImage(fb.ComponentPath + 'samples\\images\\Lastfm2.png');
var cover_img = null;
var cover_array = [];
var g_img = null;
var bs = _scale(22);
var ww = window.Width;
var wh = window.Height;

var tfo = {
   artist : fb.TitleFormat('%artist%'),
   lfm_loved : fb.TitleFormat('$if2(%lfm_loved%,0)'),
   title : fb.TitleFormat('%title%'),
   date : fb.TitleFormat(('%date%')),
   genre : fb.TitleFormat(('%genre%')),
   album : fb.TitleFormat(('%album%')),
   albumartist : fb.TitleFormat(('%album artist%')),
   codec : fb.TitleFormat(('%codec%')),
   copyright : fb.TitleFormat(('%encoding%')),
    label : fb.TitleFormat(('%label%')),
   play_count : fb.TitleFormat(('%play_count%')),
   totalplay : fb.TitleFormat(('%totalplayed%')),
   country : fb.TitleFormat(('%country%')),
   playback_time : fb.TitleFormat('[%playback_time%]'),
   length : fb.TitleFormat('$if2(%length%,LIVE)'),
};

//svg
var svg1_file = fb.ComponentPath + 'samples\\svg\\android.svg';
var svg2_file = fb.ComponentPath + 'samples\\svg\\svg2.svg';
var svg1 = utils.LoadSVG(svg1_file);
var svg2 = utils.LoadSVG(svg2_file);

var svg_stop_file = fb.ProfilePath + "images\\stop_white_24dp.svg";
var svg_stop = utils.LoadSVG(svg_stop_file);

var svg_sac_file = fb.ProfilePath + "images\\stop_after_current.svg";
var svg_sac = utils.LoadSVG(svg_sac_file);

var svg_menu_file = fb.ProfilePath + "images\\menu_white_24dp.svg";
var svg_menu = utils.LoadSVG(svg_menu_file);

var svg_fav_file = fb.ProfilePath + "images\\favorite_white_24dp.svg";
var svg_fav = utils.LoadSVG(svg_fav_file);
var svg_unfav_file = fb.ProfilePath + "images\\favorite_border_white_24dp.svg";
var svg_unfav = utils.LoadSVG(svg_unfav_file);

//flags
var cfg_foobarpath = window.GetProperty("foobar path:", fb.Profilepath);
var cfg_flag = window.GetProperty("flag folder:", "flags");
var flag_file = cfg_foobarpath + cfg_flag + "\\noflag.svg";
var svg_content = utils.ReadUTF8(flag_file);
var   country = fb.TitleFormat("%country%").Eval();
var flags = utils.LoadSVG(flag_file);

panel.colours.text = RGB(255, 255, 255);
panel.item_focus_change();

function on_colours_changed() {
   panel.colours_changed();
   window.Repaint();
}

function on_http_request_done(task_id, success, response_text) {
   thumbs.http_request_done(task_id, success, response_text);
}

function on_download_file_done(path, success, error_text) {
   text.download_file_done(path, success, error_text);
}

function on_font_changed() {
   panel.font_changed();
   window.Repaint();
}

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

function on_key_down(k) {
   text.key_down(k);
   thumbs.key_down(k);
}

function on_metadb_changed() {
   albumart.metadb_changed();
   text.metadb_changed();
   thumbs.metadb_changed();
   rating.metadb_changed();
}

function on_mouse_lbtn_dblclk(x, y) {
   thumbs.lbtn_dblclk(x, y);
}

function on_mouse_lbtn_up(x, y) {
   text.lbtn_up(x, y);
   thumbs.lbtn_up(x, y);   
   rating.lbtn_up(x, y);
}

function on_mouse_leave() {
   rating.leave();
}

function on_mouse_move(x, y) {
   text.move(x, y);
   thumbs.move(x, y);
   rating.move(x, y);
}

function on_mouse_rbtn_up(x, y) {
   if ( x > 40 && x < 300 && y > 40 && y < 300 ) {
      return panel.rbtn_up(x, y, thumbs);
    }
   if ( x > 300 && x < ww && y > 50 && y < wh ) {
   return panel.rbtn_up(x, y, text);
    }
   if ( x > 40 && x < 250 && y > 480 && y < 520 ) {
       return panel.rbtn_up(x, y, rating); 
   }
   
}

function on_mouse_wheel(s) {
   text.wheel(s);
}

function on_paint(gr) {
   
       var ratiow = ww / 2.2;
      var ratioh = wh / 2.2;
      gr.FillRectangle( 0, 0, panel.w, panel.h, RGB(60, 60, 60));
      var metadb = fb.GetFocusItem();
        // getColor(gr);
       for (var i = 0; i < cover_array.length; i++) {
          var cover_colour = cover_array[5];
       }
    if (metadb) {
      g_img = metadb.GetAlbumArt();
      g_art = metadb.GetAlbumArt();

   }
   if (fb.IsPlaying) {
      panel.colours.text = RGB(255, 255, 255);
       panel.paint(gr);
      gr.FillRectangle( 0, 0, panel.w, panel.h, RGB(60, 60, 60));
      if (g_img) {
            g_img.StackBlur(250);
         _drawImage(gr, g_img, 0, 0, panel.w , panel.h , image.crop_top, 0.6);
      }
      gr.DrawRectangle(40, 60, 280, 280, 1, RGB(255, 255, 255));
       gr.DrawLine(352, 140, panel.w - 20, 140, 1, RGB(255, 255, 255));
       gr.DrawLine(40, 360, 320, 360, 1, RGB(255, 255, 255));
      //Lastfm Logo logo
       //gr.DrawImage(lastfm_textlogo, window.Width - 60, 20, 40, 40, 0, 0, 2600, 800);
       //panel.draw_header(gr, text.header_text());
       var small_font = CreateFontString('Segoe UI', 10);
      var normal_font = CreateFontString('Segoe UI', 12);
      var big_font = CreateFontString('Segoe UI', 20);
      var big = CreateFontString('fontawesome ', 13, true);
      var bigtitle = CreateFontString('fontawesome ', 18, true);
      var bige = CreateFontString('fontawesome ', 11, true);
      var sma = CreateFontString('fontawesome ', 8 );
      var smal = CreateFontString('fontawesome ', 10 );
      gr.WriteText(tfo.artist.Eval(), bigtitle, RGB( 255,200, 0), 352, 7, 800, 125, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      gr.WriteText('Last.fm',small_font, RGB(255, 255, 255),352, 2, 275, 200, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      //gr.WriteText('Audioscrobbler',small_font, RGB(255, 255, 255),window.Width - 106, -84, 290, 200, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      gr.WriteText(tfo.genre.Eval(), small_font, RGB( 255,255, 255), 352, 2, 290, 235, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      gr.WriteText(tfo.title.Eval(), big, RGB( 255,255, 255), 40, 320, 240, 125, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      gr.WriteText(tfo.album.Eval(), bige, RGB( 255,200, 0), 40, 345, 275, 125, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      gr.WriteText(tfo.albumartist.Eval(), bige, RGB( 255,255, 255), 40, 400, 240, 125, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      gr.WriteText('Played ' + tfo.play_count.Eval() + ' times', smal, RGB( 255,255, 255), 40, 420, 240, 125, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      gr.WriteText('Released : ' + tfo.date.Eval(), sma, RGB( 255,255, 255), 40, 440, 240, 125, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      thumbs.paint(gr);
      rating.paint(gr);
      text.paint(gr);
   }
   //flags
   if (flags) {
   flags = utils.LoadSVG(cfg_foobarpath + cfg_flag + "\\" + country + ".svg");
   gr.DrawImage(flags, svg_flag_x, svg_flag_y, 50, 26, 0, 0, 640, 480);
   }
   
}
function on_playback_dynamic_info_track() {
   panel.item_focus_change();
   //if (type == 0) window.Repaint();
   //else update_album_art(fb.GetNowPlaying());
}

function on_playback_new_track() {
   panel.item_focus_change();
   thumbs.playback_new_track();
   //flags
   country = fb.TitleFormat("%country%").Eval();
   flags = utils.LoadSVG(cfg_foobarpath + cfg_flag + "\\" + country + ".svg");
   window.Repaint();
}

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

function on_playback_time(time) {
   thumbs.playback_time();
}

function on_playlist_switch() {
   panel.item_focus_change();
}
///////////////////////////////////////////
function update_album_art(metadb) {
   _dispose(g_img);
   g_img = null;
   if (metadb) {
      g_img = metadb.GetAlbumArt();
   }
   window.Repaint();
}

function on_item_focus_change() {
   //focus
   handle = fb.GetFocusItem();
   //cover colour
   if (cover_img) {
      cover_img.Dispose();
      cover_img = null;
   }
   cover_array = [];
   var metadb = fb.GetFocusItem();
   if (metadb) {
      cover_img = metadb.GetAlbumArt(); // omitting the type defaults to front

      if (cover_img) {
         cover_array = cover_img.GetColourScheme(10).toArray();
      }
   }
   window.Repaint();
}


function on_size() {
   panel.size();
   text.w = panel.w - (LM * 54);
   text.h = panel.h - (TM * 6);
   thumbs.size();
   text.size();
   //flag
   svg_flag_x = 40
   svg_flag_y = 520
}


Re: NEW ESLyric v0.5 - an alternative lyric show component

Reply #48
the jscript panel 3 for the composer also .
you need the flags folder .
 Put in : / AppData\Roaming\foobar2000-v2
Add "Country" in the properties album
Add "countrycomposer" also in properties album



the script :

// ==PREPROCESSOR==
// @name "Last.fm Bio"
// @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\lastfm.js"
// @import "%fb2k_component_path%samples\js\textperformer.js"
// @import "%fb2k_component_path%samples\js\thumbsperformer.js"
// @import "%fb2k_component_path%samples\js\albumart.js"
// @import "%fb2k_component_path%samples\js\rating.js"


// ==/PREPROCESSOR==
// https://jscript-panel.github.io/gallery/thumbs/
// https://jscript-panel.github.io/gallery/lastfm-bio/
// https://jscript-panel.github.io/gallery/album-art/


var panel = new _panel();
var lastfm = new _lastfm();
var text = new _text('lastfm_bio', LM * 50, TM * 5 , 0, 0);
var thumbs = new _thumbs();
var albumart = new _albumart(40, 60, 230, 230);
var rating = new _rating(40, 560, 16, RGB(255, 128, 0)); // x, y, height, colour

var lastfm_textlogo = utils.LoadImage(fb.ComponentPath + 'samples\\images\\Lastfm2.png');
var cover_img = null;
var cover_array = [];
var g_img = null;
var bs = _scale(22);
var ww = window.Width;
var wh = window.Height;

var tfo = {
   artist : fb.TitleFormat('%artist%'),
   lfm_loved : fb.TitleFormat('$if2(%lfm_loved%,0)'),
   title : fb.TitleFormat('%title%'),
   date : fb.TitleFormat(('%date%')),
   genre : fb.TitleFormat(('%genre%')),
   album : fb.TitleFormat(('%album%')),
   albumartist : fb.TitleFormat(('%album artist%')),
   codec : fb.TitleFormat(('%codec%')),
   copyright : fb.TitleFormat(('%encoding%')),
    label : fb.TitleFormat(('%label%')),
   play_count : fb.TitleFormat(('%play_count%')),
   totalplay : fb.TitleFormat(('%totalplayed%')),
   country : fb.TitleFormat(('%country%')),
   countryperformer : fb.TitleFormat(('%countryperformer%')),
   playback_time : fb.TitleFormat('[%playback_time%]'),
   length : fb.TitleFormat('$if2(%length%,LIVE)'),
};

//svg
var svg1_file = fb.ComponentPath + 'samples\\svg\\android.svg';
var svg2_file = fb.ComponentPath + 'samples\\svg\\svg2.svg';
var svg1 = utils.LoadSVG(svg1_file);
var svg2 = utils.LoadSVG(svg2_file);

var svg_stop_file = fb.ProfilePath + "images\\stop_white_24dp.svg";
var svg_stop = utils.LoadSVG(svg_stop_file);

var svg_sac_file = fb.ProfilePath + "images\\stop_after_current.svg";
var svg_sac = utils.LoadSVG(svg_sac_file);

var svg_menu_file = fb.ProfilePath + "images\\menu_white_24dp.svg";
var svg_menu = utils.LoadSVG(svg_menu_file);

var svg_fav_file = fb.ProfilePath + "images\\favorite_white_24dp.svg";
var svg_fav = utils.LoadSVG(svg_fav_file);
var svg_unfav_file = fb.ProfilePath + "images\\favorite_border_white_24dp.svg";
var svg_unfav = utils.LoadSVG(svg_unfav_file);

//flags
var cfg_foobarpath = window.GetProperty("foobar path:", fb.Profilepath);
var cfg_flag = window.GetProperty("flag folder:", "flags");
var flag_file = cfg_foobarpath + cfg_flag + "\\noflag.svg";
var svg_content = utils.ReadUTF8(flag_file);
var   country = fb.TitleFormat("%country%").Eval();
var flags = utils.LoadSVG(flag_file);

panel.colours.text = RGB(255, 255, 255);
panel.item_focus_change();

function on_colours_changed() {
   panel.colours_changed();
   window.Repaint();
}

function on_http_request_done(task_id, success, response_text) {
   thumbs.http_request_done(task_id, success, response_text);
}

function on_download_file_done(path, success, error_text) {
   text.download_file_done(path, success, error_text);
}

function on_font_changed() {
   panel.font_changed();
   window.Repaint();
}

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

function on_key_down(k) {
   text.key_down(k);
   thumbs.key_down(k);
}

function on_metadb_changed() {
   albumart.metadb_changed();
   text.metadb_changed();
   thumbs.metadb_changed();
   rating.metadb_changed();
}

function on_mouse_lbtn_dblclk(x, y) {
   thumbs.lbtn_dblclk(x, y);
}

function on_mouse_lbtn_up(x, y) {
   text.lbtn_up(x, y);
   thumbs.lbtn_up(x, y);   
   rating.lbtn_up(x, y);
}

function on_mouse_leave() {
   rating.leave();
}

function on_mouse_move(x, y) {
   text.move(x, y);
   thumbs.move(x, y);
   rating.move(x, y);
}

function on_mouse_rbtn_up(x, y) {
   if ( x > 40 && x < 300 && y > 40 && y < 300 ) {
      return panel.rbtn_up(x, y, thumbs);
    }
   if ( x > 300 && x < ww && y > 50 && y < wh ) {
   return panel.rbtn_up(x, y, text);
    }
   if ( x > 40 && x < 250 && y > 480 && y < 520 ) {
       return panel.rbtn_up(x, y, rating); 
   }
   
}

function on_mouse_wheel(s) {
   text.wheel(s);
}

function on_paint(gr) {
   
       var ratiow = ww / 2.2;
      var ratioh = wh / 2.2;
      gr.FillRectangle( 0, 0, panel.w, panel.h, RGB(60, 60, 60));
      var metadb = fb.GetFocusItem();
        // getColor(gr);
       for (var i = 0; i < cover_array.length; i++) {
          var cover_colour = cover_array[5];
       }
    if (metadb) {
      g_img = metadb.GetAlbumArt();
      g_art = metadb.GetAlbumArt();

   }
   if (fb.IsPlaying) {
      panel.colours.text = RGB(255, 255, 255);
       panel.paint(gr);
      gr.FillRectangle( 0, 0, panel.w, panel.h, RGB(60, 60, 60));
      if (g_img) {
            g_img.StackBlur(250);
         _drawImage(gr, g_img, 0, 0, panel.w , panel.h , image.crop_top, 0.6);
      }
      gr.DrawRectangle(40, 60, 280, 280, 1, RGB(255, 255, 255));
       gr.DrawLine(352, 140, panel.w - 20, 140, 1, RGB(255, 255, 255));
       gr.DrawLine(40, 360, 320, 360, 1, RGB(255, 255, 255));
      //Lastfm Logo logo
       //gr.DrawImage(lastfm_textlogo, window.Width - 60, 20, 40, 40, 0, 0, 2600, 800);
       //panel.draw_header(gr, text.header_text());
       var small_font = CreateFontString('Segoe UI', 10);
      var normal_font = CreateFontString('Segoe UI', 12);
      var big_font = CreateFontString('Segoe UI', 20);
      var big = CreateFontString('fontawesome ', 13, true);
      var bigtitle = CreateFontString('fontawesome ', 18, true);
      var bige = CreateFontString('fontawesome ', 11, true);
      var sma = CreateFontString('fontawesome ', 8 );
      var smal = CreateFontString('fontawesome ', 10 );
      gr.WriteText(tfo.albumartist.Eval(), bigtitle, RGB( 255,200, 0), 352, 7, 800, 125, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      gr.WriteText('Last.fm',small_font, RGB(255, 255, 255),352, 2, 290, 200, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      //gr.WriteText('Audioscrobbler',small_font, RGB(255, 255, 255),window.Width - 106, -84, 290, 200, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      gr.WriteText(tfo.genre.Eval(), small_font, RGB( 255,255, 255), 352, 2, 290, 235, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      gr.WriteText(tfo.title.Eval(), big, RGB( 255,255, 255), 40, 320, 240, 125, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      gr.WriteText(tfo.album.Eval(), bige, RGB( 255,200, 0), 40, 345, 240, 125, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      gr.WriteText(tfo.albumartist.Eval(), bige, RGB( 255,255, 255), 40, 400, 240, 125, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      gr.WriteText('Played ' + tfo.play_count.Eval() + ' times', smal, RGB( 255,255, 255), 40, 420, 240, 125, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      gr.WriteText('Released : ' + tfo.date.Eval(), sma, RGB( 255,255, 255), 40, 440, 240, 125, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_PARAGRAPH_ALIGNMENT_CENTER, DWRITE_WORD_WRAPPING_NO_WRAP, DWRITE_TRIMMING_GRANULARITY_CHARACTER);
      thumbs.paint(gr);
      rating.paint(gr);
      text.paint(gr);
   }
   //flags
   if (flags) {
   flags = utils.LoadSVG(cfg_foobarpath + cfg_flag + "\\" + country + ".svg");
   gr.DrawImage(flags, svg_flag_x, svg_flag_y, 50, 26, 0, 0, 640, 480);
   }
   
}
function on_playback_dynamic_info_track() {
   panel.item_focus_change();
   //if (type == 0) window.Repaint();
   //else update_album_art(fb.GetNowPlaying());
}

function on_playback_new_track() {
   panel.item_focus_change();
   thumbs.playback_new_track();
   //flags
   country = fb.TitleFormat("%countryperformer%").Eval();
   flags = utils.LoadSVG(cfg_foobarpath + cfg_flag + "\\" + country + ".svg");
   window.Repaint();
}

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

function on_playback_time(time) {
   thumbs.playback_time();
}

function on_playlist_switch() {
   panel.item_focus_change();
}
///////////////////////////////////////////
function update_album_art(metadb) {
   _dispose(g_img);
   g_img = null;
   if (metadb) {
      g_img = metadb.GetAlbumArt();
   }
   window.Repaint();
}

function on_item_focus_change() {
   //focus
   handle = fb.GetFocusItem();
   //cover colour
   if (cover_img) {
      cover_img.Dispose();
      cover_img = null;
   }
   cover_array = [];
   var metadb = fb.GetFocusItem();
   if (metadb) {
      cover_img = metadb.GetAlbumArt(); // omitting the type defaults to front

      if (cover_img) {
         cover_array = cover_img.GetColourScheme(10).toArray();
      }
   }
   window.Repaint();
}


function on_size() {
   panel.size();
   text.w = panel.w - (LM * 54);
   text.h = panel.h - (TM * 6);
   thumbs.size();
   text.size();
   //flag
   svg_flag_x = 40
   svg_flag_y = 520
}

ALSO Add in : / AppData\Roaming\foobar2000-v2\user-components-x64\foo_jscript_panel3\samples\js
the 2 .js