Skip to main content
Topic: [Not my release] ESLyric (foo_uie_eslyric) (Read 16205 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[Not my release] ESLyric (foo_uie_eslyric)

ESLyric is a foobar2000 lyric component coded by ttsping ( @ohyeah ).

Download here: https://hydrogenaud.io/index.php/topic,111240.0.html
(thanks @zeremy that we have an English version now and the official English version may be released weeks later for ttsping is busy)

Current version: 0.3.4b1

Features
- Lyric display panel(embebed/popup)
- Desktop lyric show
- Search lyrics from tags/local/internet, and can save it to local disk/tags.
- It Can search mutiple local directories
- You can write your own JScript to search/grab lyrics from internet.
- Advanced features like lyric parse(which can handle some special lyric format like *.krc get from Kugoo Music) and more...
- ......

Refer:
* A simple tutor(In Chinese...): here.
* a BaiduMusic source script: https://github.com/JumuFENG/foobar2000_ESLyricScript
A rose will bloom, it then will fade.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #1
A js script for ESLyric to grab lyrics from http://syair.info
Code: [Select]
//===================================================
//=========Syair Source For ESLyric===========
//========See "Tools->Readme" for more info==========
//===================================================

var xmlhttp = new ActiveXObject("Msxml2.ServerXMLHTTP.6.0");
var doc = new ActiveXObject("htmlfile");

var debug = false; // 如果要调试的话,改为 true.


function get_my_name()
{
return "Syair";
}

function get_version()
{
return "0.0.1";
}

function get_author()
{
return "Jeannela";
}

function start_search(info, callback)
{
var url = "http://syair.info";

//
var title = process_keywords(info.Title);
var artist = process_keywords(info.Artist);

var search_url = url + "/search.php?artist=" + artist + "&title=" + title;

try {
xmlhttp.open("GET", search_url, false);
xmlhttp.send();
} catch (e) {
fb.trace(get_my_name() + ": can't get access to site.");
return;
}

var new_lyric = fb.CreateLyric();

if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
// parse HTML
var reList = /<h3.*href=\"(.+?)\">(.+?).lrc<\/a><\/h3>/g;
var list = [];
var ret;

for (var i = 0; ;i++) {
ret = reList.exec(xmlhttp.responseText);
if (ret == null) {
break;
}
list.push(ret);
}

debug && fb.trace(list.length);
debug && fb.trace(list[0]);

var page_url = "";
//var reLRC = /<a href=\"(.+?)\".*rel="nofollow"><span>Download/g;
// 遍历每一个歌词项
var len = Math.min(10, list.length);
for (var i = 0; i < len; i++) {

            page_url = url + list[i][1];
           
try {
xmlhttp.open("GET", page_url, false);
xmlhttp.send();
} catch (e) {
                fb.trace(get_my_name() + ": Failed to download lyric");
continue;
}

if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                var arr = list[i][2].split(" - ");
                var content = getElementsByTagName(xmlhttp.responseText, "span");
                for (var j in content) {           
                    if (content[j].innerText && content[j].innerText.indexOf("[id:") > -1) {
                        debug && fb.trace(content[j].innerText);
                        debug && fb.trace(arr[0]);
                        debug && fb.trace(arr[1]);
                       
                        new_lyric.Artist = arr[0];
                        new_lyric.Title = arr[1];
                        new_lyric.Source = get_my_name();
                        new_lyric.LyricText = content[j].innerText;
                        callback.AddLyric(new_lyric);
                        break;
                    }
                }
}

}

}
    new_lyric.Dispose();
}

function getElementsByTagName(value, tag) {
doc.open();
var div = doc.createElement("div");
div.innerHTML = value;
var data = div.getElementsByTagName(tag);
doc.close();
return data;
};

function process_keywords(str) {
var s = str;
s = s.toLowerCase();
s = s.replace(/\'|·|\$|\&|–/g, "");
//truncate all symbols
s = s.replace(/\(.*?\)|\[.*?]|{.*?}|(.*?/g, "");
s = s.replace(/[-/:-@[-`{-~]+/g, "");
s = s.replace(/[\u2014\u2018\u201c\u2026\u3001\u3002\u300a\u300b\u300e\u300f\u3010\u3011\u30fb\uff01\uff08\uff09\uff0c\uff1a\uff1b\uff1f\uff5e\uffe5]+/g, "");
return s;
}
A rose will bloom, it then will fade.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #2
And you can set ESLyric Panel's fonts, background colors ..... in WSH Panel Mod like:
Code: [Select]
windows.NotifyOthers("_eslyric_set_background_image_",gdi.CreateImage(44,22));
windows.NotifyOthers("_eslyric_set_background_color_",RGB(25,50,100));
/*
strings like:
"_eslyric_set_text_color_normal_"
"_eslyric_set_text_color_highlight_"
"_eslyric_set_background_color_"
"_eslyric_set_text_font_"
"_eslyric_set_text_titleformat_fallback_"
"_eslyric_set_text_fallback_"
"_eslyric_set_background_image_"
*/
A rose will bloom, it then will fade.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #3
And you can set ESLyric Panel's fonts, background colors ..... in WSH Panel Mod like:
Code: [Select]
windows.NotifyOthers("_eslyric_set_background_image_",gdi.CreateImage(44,22));
windows.NotifyOthers("_eslyric_set_background_color_",RGB(25,50,100));
/*
strings like:
"_eslyric_set_text_color_normal_"
"_eslyric_set_text_color_highlight_"
"_eslyric_set_background_color_"
"_eslyric_set_text_font_"
"_eslyric_set_text_titleformat_fallback_"
"_eslyric_set_text_fallback_"
"_eslyric_set_background_image_"
*/


Only works with WSH Panel Mod PLUS
https://github.com/ttsping/foo_uie_wsh_panel_mod_plus/releases
and the correct syntax is
window.NotifyOthers("_eslyric_set_background_image_",gdi.CreateImage(44,22));
window.NotifyOthers("_eslyric_set_background_color_",RGB(25,50,100));

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #4
And you can set ESLyric Panel's fonts, background colors ..... in WSH Panel Mod like:
Code: [Select]
windows.NotifyOthers("_eslyric_set_background_image_",gdi.CreateImage(44,22));
windows.NotifyOthers("_eslyric_set_background_color_",RGB(25,50,100));
/*
strings like:
"_eslyric_set_text_color_normal_"
"_eslyric_set_text_color_highlight_"
"_eslyric_set_background_color_"
"_eslyric_set_text_font_"
"_eslyric_set_text_titleformat_fallback_"
"_eslyric_set_text_fallback_"
"_eslyric_set_background_image_"
*/


Only works with WSH Panel Mod PLUS
https://github.com/ttsping/foo_uie_wsh_panel_mod_plus/releases
and the correct syntax is
window.NotifyOthers("_eslyric_set_background_image_",gdi.CreateImage(44,22));
window.NotifyOthers("_eslyric_set_background_color_",RGB(25,50,100));
actually , it should work with other  wsh mod version, including the new JSPanel. i will fix it

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #5
Elia, how did you add those lyric sources (2 * TTMusic, Kugoo, QQ, TTPod and others I can't see)? I only have the three Chinese websites by default and I added Syair.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #6
Elia, how did you add those lyric sources (2 * TTMusic, Kugoo, QQ, TTPod and others I can't see)? I only have the three Chinese websites by default and I added Syair.
download the package and you will see a *.cfg file in it, put the cfg file in your foobar2000's configuration folder and restart then you will have those sources (except syair, you will have to add it by yourself again).

some scripts can be found on github:
ttpod & syair: https://github.com/elia-is-me/Foobar2000-WSH-Scripts/tree/master/ESLyric
baiduMusic: https://github.com/JumuFENG/foobar2000_ESLyricScript/blob/master/baidumusic.js

the author collected some scripts here: http://pan.baidu.com/share/link?shareid=503122&uk=2332534501#path=%252Ffoo_uie_eslyric%252FSourceScripts (not all scripts are the latest, I may ask tt to upload the latest ones)

and the "Chinese websites" are not websites at all, scroll down the plugin upload thread and you will find an english version, and some images.
(eslyric would have both Chinese and English version in 0.4, which ttsping garenteed).
A rose will bloom, it then will fade.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #7
Thanks. It worked.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #8
Great plugin. Unfortunately it doesn't work with streaming sources i.e. radio, so it's not yet time to retire good old Lyrics Show Panel.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #9
 :-[  could you show me one stream source which does not work?


Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #11
download the package and you will see a *.cfg file in it, put the cfg file in your foobar2000's configuration folder

Just to let you know, there is something wrong with the Kugou source.
The 2 TTMusic / TTPlayer sources are the same as Timestamped2b and 2c from foo_uie_lyrics3 v. 0.5.
"Baidu music" and the 3 default Chinese-character websites don't work at all (no search over the Internet).
So, I deactivated all of them.

The second "Baidu music", Xiami, TTPod, QQ Music and Syair are functional.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #12
download the package and you will see a *.cfg file in it, put the cfg file in your foobar2000's configuration folder

Just to let you know, there is something wrong with the Kugou source.
The 2 TTMusic / TTPlayer sources are the same as Timestamped2b and 2c from foo_uie_lyrics3 v. 0.5.
"Baidu music" and the 3 default Chinese-character websites don't work at all (no search over the Internet).
So, I deactivated all of them.

The second "Baidu music", Xiami, TTPod, QQ Music and Syair are functional.

Kugoo had an updated version.
Xiami may not work.

A rose will bloom, it then will fade.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #13
Kugoo had an updated version.

Thanks for the information. Although requests to Kugou seem to be a bit better now, I still don't get results from the website.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #14
Kugoo had an updated version.

Thanks for the information. Although requests to Kugou seem to be a bit better now, I still don't get results from the website.

Maybe kugoo do not have lyric that you search. kugoo lyric service is provided by a company in mainland China and may not have lyrics that Chinese people do not interest.
(I have test it and it works well.)
A rose will bloom, it then will fade.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #15
ESLyric have updates now but not released yet. It's based on ohyeah's will...
something changed,like
* the settings pages.
* blurred image background which use StackBlur instead of BoxBlur.
(wsh_panel_mod_plus had added interface of StackBlur days before but not publicly released yet too).
* fallback text settings
...
A rose will bloom, it then will fade.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #16
ESLyric v0.3.5 beta1
+ Added English version
+ Added “Tag search" & "Save to tag" settings - available by double-clicking ”Lyric Souce > Tag"
+ Added drag "Desktop Lyric" window size to automatically change the font size
+ Added "Hide the Desktop Lyric when fullscreen" option
+ Add script interface, see interface description(Script Editor > Tools > readme)
+ Fallback text settings
* Adjust the settings page
* Reconstruction of part of the search code

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #17
ESLyric v0.3.5 beta1
+ Added English version
+ Added “Tag search" & "Save to tag" settings - available by double-clicking ”Lyric Souce > Tag"
+ Added drag "Desktop Lyric" window size to automatically change the font size
+ Added "Hide the Desktop Lyric when fullscreen" option
+ Add script interface, see interface description(Script Editor > Tools > readme)
+ Fallback text settings
* Adjust the settings page
* Reconstruction of part of the search code

You can upload some updated scripts by tt or asion.
A rose will bloom, it then will fade.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #18
You can upload some updated scripts by tt or asion.

“kgmusic v0.0.8” & “ttplayer v0.0.3” is a script for getting lyrics, which is based on the (ESL v0.3.5 beta1)'s interface.
Installation: File > Preferences > Tools > ESLyric > Search > Add > Tools > Import.

"krc_parser v0.1.2" is used to resolve the KRC format lyrics. It is used to work with “kgmusic v0.0.8”.
Installation: File > Preferences > Tools > ESLyric > Search > Advanced > Add > Tools > Import.

Outside of China, I'm not sure whether they can properly get the lyrics. But you can learn to write a script to get lyrics on the other server.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #19
2 things:
- ttpod.js updated
- new script >>> netease.js which grab lyrics from NeteaseCloudMusic

url:
https://github.com/elia-is-me/Foobar2000-JScripts/tree/master/ESLyric

for nobody report anything so I just do not know whether it is possible for people out of mainland China to download lyrics from the two source sites.
A rose will bloom, it then will fade.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #20
2 things:
- ttpod.js updated
- new script >>> netease.js which grab lyrics from NeteaseCloudMusic

url:
https://github.com/elia-is-me/Foobar2000-JScripts/tree/master/ESLyric

for nobody report anything so I just do not know whether it is possible for people out of mainland China to download lyrics from the two source sites.
yeah NeteaseCloudMusic works great using it for like 3 days now, but i'm not getting anything from ttpod.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #21
Great component. It's a lot smoother and has more features than LSPv3 especially as a local lyrics viewer. However is it possible to change the lyrics editor font? Currently it's in monospace and it breaks Japanese characters . Also is it possible to export/import panel preferences as well?

Thanks in advance!


Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #22
Great component. It's a lot smoother and has more features than LSPv3 especially as a local lyrics viewer. However is it possible to change the lyrics editor font? Currently it's in monospace and it breaks Japanese characters . Also is it possible to export/import panel preferences as well?

Thanks in advance!

I'll report it to ttsping.
A rose will bloom, it then will fade.

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #23
Hello Elia and Everybody,
Thanks for making me discover ESlyric.

My music library is 70% English-American, 20% French, 8% Italian and 2% various (but no Chinese ...)

Therefore, my problem is :
   a) find (synced) lyrics in these 2 languages
   b) write a js to run with LSlyric ...

Beside, I know not much about lyrics databases ... but maybe MusicMatch.com would be a starting point ...

Could someone write for me (and others) such a script with databases available for French and Italian lyrics ?

Regards,

Re: [Not my release] ESLyric (foo_uie_eslyric)

Reply #24
Hello Elia and Everybody,
Thanks for making me discover ESlyric.

My music library is 70% English-American, 20% French, 8% Italian and 2% various (but no Chinese ...)

Therefore, my problem is :
  a) find (synced) lyrics in these 2 languages
  b) write a js to run with LSlyric ...

Beside, I know not much about lyrics databases ... but maybe MusicMatch.com would be a starting point ...

Could someone write for me (and others) such a script with databases available for French and Italian lyrics ?

Regards,

I'm sorry but I am not familiar with the English or other western languages' net world.
I just do not know from where do you usually download *.lrc files.
A rose will bloom, it then will fade.

 
SimplePortal 1.0.0 RC1 © 2008-2019