Author Topic: Some help on how to improve MusicBee's lyrics results?  (Read 7086 times)

hiccup

  • Sr. Member
  • ****
  • Posts: 7880
I am not very knowledgeable or experienced in the use of lyrics in MusicBee.
Out of the box I very often get 'No lyrics found'.
Even for songs I am sure being quite popular.

I installed the 'Lyrics Reloaded!' plugin, but I see it is almost three years old, and from MusicBee's configuration panel the 'Configure' button doesn't do anything.
And after just installing it 'redo search' in the lyrics panel doesn't seem to work much better either.

If somebody has some tips or perhaps a quick-guide how to make MusicBee show lyrics for a lot more songs it would be much appreciated.

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
I rely on MiniLyrics, it still seems to have the best collection.  The only downside is if you want it to auto-download, it has to stay open and tends to pop up on top of things.  Media Monkey had a nice plugin that would display the lyrics as part of the window.  Wonder if that would be possible for MB?
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

hiccup

  • Sr. Member
  • ****
  • Posts: 7880
Thnx. But I am trying to get it to work for somebody else, and would like it to be as simple as possible (for her).
So preferably keeping things 'stock' as much as possible.

I tried changing providers in the auto-tagging configuration panel, and that seemed to improve things quickly.
So it will now be some trial and error to see what lyrics providers are useful and which ones are not so much.
Suggestions on that are welcome. (for general popular music)

Is there a way so when you have a lyrics loaded for a track that you agree on, you can see from what provider it was sourced?
That would help a lot in the process of selecting the good ones.

Alumni

  • Sr. Member
  • ****
  • Posts: 1007
You need to manually add custom providers for best results, some have been shared in the Lyrics Reloaded forum thread. From personal experience I recommend Genius and A-Z Lyrics.

Copy and paste either of the code snippets below into notepad and save the document with file extension yml. Place the file in the directory; <MusicBee's appdata folder>/mb_LyricsReloaded/providers/

Code
name: "Genius"

variables:
    artist:
        type: artist
        filters:
        - strip_diacritics
        - lowercase
        - [replace, "!!!", "chk-chik-chick"]    # !!! (Chk Chk Chk) artist exception
        - [regex, '(?<=\W|\s)+(feat.+|ft[\W\s]+|(f\.\s)).+', ""]
                                                # ^ Strip F./ft/eat/uring + everything after
        - [regex, '\s&(?=\s)', " and"]          # Replace " &" with " and"
                                                    ## ^ Currently superfluous (for ARTIST) bc plugin preemptively replaces "&" with "and"
                                                        ### ^ But still necessary for <title> "&" replacement
        - [regex, '\.+|,+|(\W+(?=$))|(^\W+)', ""]   # Strip "." + "," + beginning/end of string non-word chars
        - [regex, "'", ""]                      # Separate expression bc of annoying way YAML escapes '
        - [regex, '(?<=[a-z0-9%])[^\sa-z0-9%]+(?=[a-z0-9%]+)', "-"]
                                                # ^ Replace medial non-alphanumeric char(s) with single "-" e.g., f**k > f-k
        - [regex, '((?<=\s)([^a-z0-9\s-])+(\s|\W)+)|((?<=\w)([^a-z0-9-])+(\s|\W)+)', " "]
                                                # ^ Clean up any remaining successive non-alphanumeric chars before strip_nonascii
                                                    ## ^ Long & stupid bc couldn't figure out YAML-friendly non-capturing "(?:...)"
                                                        ### ^ EZ version: [regex, '\W+(?:\W)(?<!$)', " "]
        - [strip_nonascii, -]
    title:
        type: title
        filters: artist

config:
    url: "http://genius.com/{artist}-{title}-lyrics"
    pattern: ['<div\s+class="song_body-lyrics"[^>]*?>[\s\S]*?<p>(?<lyrics>[\s\S]*?)</p>', s]

post-filters:
- strip_html
- clean_spaces
- utf8_encode

Code
name: A-Z Lyrics Universe

variables:
    artist:
        type: artist
        filters:
        - lowercase
        - strip_nonascii
    title:
        type: title
        filters: artist

headers:
    User-Agent: 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0' # Firefox 30 Win x64 user agent

config:
    url: "http://www.azlyrics.com/lyrics/{artist}/{title}.html"
    pattern: ['<!-- Usage of azlyrics.com.*?-->(?<lyrics>.+?)</div>', s]
    
post-filters:
- strip_html
- trim
- utf8_encode
Last Edit: February 13, 2017, 12:07:39 PM by Alumni

hiccup

  • Sr. Member
  • ****
  • Posts: 7880
Thanks Alumni, this is working nicely indeed.
I noticed that MusicBee by default already has 'A-Z Lyrics Universe' available. So when I copied the yml file per your suggestion, it wasn't clear to me that something was changed or added.
Just to be certain I renamed the yml to 'A-Z Lyrics Universe 2', and now it's a separate option indeed.
That's probably not necessary, but it assures me that MB is now indeed using the new yml file.

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9353
I noticed that MusicBee by default already has 'A-Z Lyrics Universe' available. So when I copied the yml file per your suggestion, it wasn't clear to me that something was changed or added.
Just to be certain I renamed the yml to 'A-Z Lyrics Universe 2', and now it's a separate option indeed.
That's probably not necessary, but it assures me that MB is now indeed using the new yml file.
I seem to recall the 'original' A-Z Lyrics Universe had some issues returning results and someone created the 'new' version.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

Alumni

  • Sr. Member
  • ****
  • Posts: 1007
One more thing, a companion script for Genius to help fetch results with "the" prefix in artist names;

Code
name: "Genius (the)"

variables:
    artist:
        type: artist
        filters:
        - strip_diacritics
        - [regex, '^The\s', ""]
        - lowercase
        - [replace, "!!!", "chk-chik-chick"]
        - [regex, '(?<=\W|\s)+(feat.+|ft[\W\s]+|(f\.\s)).+', ""]
        - [regex, '\.+|,+|(\W+(?=$))|(^\W+)', ""]
        - [regex, "'", ""]
        - [regex, '(?<=[a-z0-9%])[^\sa-z0-9%]+(?=[a-z0-9%]+)', "-"]
        - [regex, '((?<=\s)([^a-z0-9\s-])+(\s|\W)+)|((?<=\w)([^a-z0-9-])+(\s|\W)+)', " "]
        - [strip_nonascii, -]
    title:
        type: title
        filters:
        - strip_diacritics
        - lowercase
        - [replace, "!!!", "chk-chik-chick"]
        - [regex, '(?<=\W|\s)+(feat.+|ft[\W\s]+|(f\.\s)).+', ""]
        - [regex, '\s&(?=\s)', " and"]
        - [regex, '\.+|,+|(\W+(?=$))|(^\W+)', ""]
        - [regex, "'", ""]
        - [regex, '(?<=[a-z0-9%])[^\sa-z0-9%]+(?=[a-z0-9%]+)', "-"]
        - [regex, '((?<=\s)([^a-z0-9\s-])+(\s|\W)+)|((?<=\w)([^a-z0-9-])+(\s|\W)+)', " "]
        - [strip_nonascii, -]

config:
    url: "http://genius.com/{artist}-{title}-lyrics"
    pattern: ['<div\s+class="song_body-lyrics"[^>]*?>[\s\S]*?<p>(?<lyrics>[\s\S]*?)</p>', s]

post-filters:
- strip_html
- clean_spaces
- utf8_encode
- [regex, 'googletag.*\);', "\n"]

Credit to the code authors; frediDarpon, LostFuzz, redwing and anyone else I missed.

hiccup

  • Sr. Member
  • ****
  • Posts: 7880
One more thing, a companion script for Genius to help fetch results with "the" prefix in artist names;

Almost all the 'The' artists I tried got lyrics already, but I am not sure if they came from A-Z or Genius, so I'll probably better be safe and add this as a third yml.
Thnx. again.

TheInvoker

  • Jr. Member
  • **
  • Posts: 74
You need to manually add custom providers for best results, some have been shared in the Lyrics Reloaded forum thread. From personal experience I recommend Genius and A-Z Lyrics.

Copy and paste either of the code snippets below into notepad and save the document with file extension yml. Place the file in the directory; <MusicBee's appdata folder>/mb_LyricsReloaded/providers/



i don't have that folder

Alumni

  • Sr. Member
  • ****
  • Posts: 1007
i don't have that folder

It should appear after installing the plugin, if not you can just create it yourself.

xHitode

  • Newbie
  • *
  • Posts: 1
Hello!
Looking from the code it takes artists and album name and put it into the url to search for the lyrics.
I was wondering if there is any way for it to convert Japanese, Chinese or other special sign names into roman letters to make the search possible?

Or is my only solution to translate it myself to make search easier?