Author Topic: Museexmatch - Musixmatch for MusicBee [+ synced]  (Read 10412 times)

slonopot

  • Jr. Member
  • **
  • Posts: 37
Fixed the logging issue, moved the plugin to %APPDATA%.
Grab the update here and move the plugin from Program Files/MusicBee/Plugins to %APPDATA%/MusicBee/Plugins.

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9383
@slonopot

You should update the start-post to indicate a new version is available. Users may come across this thread, read the first post and download the former 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

slonopot

  • Jr. Member
  • **
  • Posts: 37
You should update the start-post to indicate a new version is available. Users may come across this thread, read the first post and download the former version.

If you check the first post of this thread, there is a link to Github releases page which shows the latest release first. The post is made as a notification to those who are subscribed to the thread.

GermanKiwi

  • Newbie
  • *
  • Posts: 17
Hi @slonopot, I've just installed your Museexmatch plugin and got it up and running. It works well overall. However, it doesn't seem able to grab the lyrics for songs where I have text inside of [square brackets] in the ID3 song title of my MP3 file.

For example, I have these MP3s, which all have Artist = "Coldplay", and these song titles:
* Miracles (Someone Special)
* Something Just Like This [feat. The Chainsmokers]
* Princess Of China [feat. Rihanna]

I've set "trimTitle" = true in my conf file, like this:

Code
{
  "allowedDistance": 5,
  "delimiters": [ "&", ";", "," ],
  "verifyAlbum": false,
  "addLyricsSource": false,
  "trimTitle": true
}

My understanding is that trimTitle=true should remove whatever is inside square brackets in the song title, and only search Musixmatch using the remaining text. Therefore it should search for "Princess of China", for example, without including [feat. Rihanna] - is that not correct?

Yet the log file shows that it isn't doing this:

Code
2023/11/08 23:11:53.448 | Debug | MusicBeePlugin.Plugin.RetrieveLyrics | source="", artist="Coldplay", title="Princess Of China [feat. Rihanna]", album="Mylo Xyloto", preferSynced=true, providerName="Musixmatch via Museexmatch"
2023/11/08 23:11:53.448 | Info | Museexmatch.MusixmatchClient.getLyrics | Attempting to search for "Coldplay" - "Princess Of China [feat. Rihanna]" ("Mylo Xyloto")
2023/11/08 23:11:53.448 | Debug | Museexmatch.MusixmatchClient.search | artist="Coldplay", title="Princess Of China [feat. Rihanna]", album="Mylo Xyloto"
2023/11/08 23:11:53.598 | Info | Museexmatch.MusixmatchClient.search | No results for this search
2023/11/08 23:11:53.598 | Info | Museexmatch.MusixmatchClient.getLyrics | Nothing found at all

Any idea why this is, and what I can do to improve it?

hiccup

  • Sr. Member
  • ****
  • Posts: 7937
Hi @slonopot, I've just installed your Museexmatch plugin and got it up and running. It works well overall. However, it doesn't seem able to grab the lyrics for songs where I have text inside of [square brackets] in the ID3 song title of my MP3 file.

I'm not using this plugin, but just a thought giving this a brief look:

Perhaps do this?:
Code
"delimiters": [ "[", "&", ";", "," ],

slonopot

  • Jr. Member
  • **
  • Posts: 37
My understanding is that trimTitle=true should remove whatever is inside square brackets in the song title, and only search Musixmatch using the remaining text. Therefore it should search for "Princess of China", for example, without including [feat. Rihanna] - is that not correct?

It should indeed and for an unknown reason it doesn't. Make sure to download the latest version again and replace mb_Musixmatch.dll, I've been moving stuff for both Beenius and Museexmatch back in the day and they should now be stored at %APPDATA%/MusicBee/Plugins/ (paste this into your path bar in explorer, by default it's Users/xyz/AppData/Roaming/MusicBee/Plugins/). trim_title is not a default option, maybe your configuration file was not loaded for some reason. Take a look at the first line of the log file, it will say if the configuration file was loaded and which options were applied. If the log states that the defaults were loaded, make sure your configuration file is in %APPDATA%/MusicBee/Plugins/ and that it's museexmatch.conf and not museexmatch.conf.txt or whatever. Ping me if the issue persists.

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1084
  • Heal The World
With reference to the edit section on this post:
https://getmusicbee.com/forum/index.php?topic=36952.msg216568#msg216568

A while ago, I had directed a user towards you who'd wanted Musixmatch's synced lyrics in MusicBee - not sure if he ever contacted you.
Could you look into it if you ever get the time? I think it'd be a great benefit to MusicBee if you could crack that.
I already spend hours on end on social media. Might as well spare a few of those to a greater purpose here.

slonopot

  • Jr. Member
  • **
  • Posts: 37
A while ago, I had directed a user towards you who'd wanted Musixmatch's synced lyrics in MusicBee - not sure if he ever contacted you.
Could you look into it if you ever get the time? I think it'd be a great benefit to MusicBee if you could crack that.

Nope, it's the first time I hear about this.

I guess it's now a matter of MusicBee survival as a product to rearrange efforts from fixing LyricsReloaded to writing useful docs and hints. I've already spent my time writing how it won't work and that we need to create a custom component for synced lyrics to work and then it turned out that lyrics could be LRC and it will just work. Maybe there's also an undocumented way of running MusicBee in the cloud or on a Mac, let me know if it's common knowledge that I'm unaware of.

Advanced LRC (word by word) is not supported but it's available in Musixmatch. I'm not really interested in synced lyrics myself and won't trash my entire library for testing, but you can. This build is configured to prefer synced lyrics if available. Let me know if it works and if it's any good and I'll push it once I have any good feedback.

GermanKiwi

  • Newbie
  • *
  • Posts: 17
It should indeed and for an unknown reason it doesn't. Make sure to download the latest version again and replace mb_Musixmatch.dll, I've been moving stuff for both Beenius and Museexmatch back in the day and they should now be stored at %APPDATA%/MusicBee/Plugins/ (paste this into your path bar in explorer, by default it's Users/xyz/AppData/Roaming/MusicBee/Plugins/). trim_title is not a default option, maybe your configuration file was not loaded for some reason. Take a look at the first line of the log file, it will say if the configuration file was loaded and which options were applied. If the log states that the defaults were loaded, make sure your configuration file is in %APPDATA%/MusicBee/Plugins/ and that it's museexmatch.conf and not museexmatch.conf.txt or whatever. Ping me if the issue persists.

Thanks for the help! I double-checked everything and found the problem: I had not renamed "museexmatch.conf.template" to "museexmatch.conf" and therefore the configuration wasn't getting loaded. 🙈

Now it's fixed, and the log file shows that the configuration is indeed being loaded, and it's now correctly excluding text inside [square brackets].

One new thing I've noticed now as a consequence: it won't return a hit if the artist field contains a featured artist in square brackets on the Musixmatch website.

Example: I have an MP3 with artist = "Coldplay" and title = "Princess Of China [feat. Rihanna]". I prefer to put the "featured" artist into the title field, rather than the artist field, because I want the artist name to be consistent for all songs by that artist.

However, Museexmatch won't return any lyrics for this song. The log shows this:

Code
2023/11/13 01:45:42.934 | Info | Museexmatch.MusixmatchClient..ctor | Configuration file was used: allowedDistance=5, delimiters="&", ";", ",", verifyAlbum=false, addLyricsSource=false, trimTitle=true
2023/11/13 01:46:16.202 | Debug | MusicBeePlugin.Plugin.RetrieveLyrics | source="", artist="Coldplay", title="Princess Of China [feat. Rihanna]", album="Mylo Xyloto", preferSynced=true, providerName="Musixmatch via Museexmatch"
2023/11/13 01:46:16.202 | Info | Museexmatch.MusixmatchClient.getLyrics | Attempting to search for "Coldplay" - "Princess Of China" ("Mylo Xyloto")
2023/11/13 01:46:16.202 | Debug | Museexmatch.MusixmatchClient.search | artist="Coldplay", title="Princess Of China", album="Mylo Xyloto"
2023/11/13 01:46:17.068 | Info | Museexmatch.MusixmatchClient.search | No results for this search


The search results at https://www.musixmatch.com/search/coldplay%20princess%20of%20china show that they have the artist field written as "Coldplay feat. Rihanna". Could that be why Museexmatch can't get a hit, because it doesn't match what I have in the artist field?

Having said that, the actual lyrics page at https://www.musixmatch.com/lyrics/Coldplay/Princess-of-China shows the artist as "Coldplay, Rihanna" - with a comma - which should mean that the delimiters config setting should separate the two artists, right?

Any idea why I don't get the lyrics for a situation like this?

GermanKiwi

  • Newbie
  • *
  • Posts: 17
Another strange thing - not sure if this is related to the Museexmatch plugin or MusicBee itself...

In the MusicBee Tags preferences, I disabled all lyric sources except for Museexmatch:



With this configuration, if I search for song lyrics and there isn't a hit from Musixmatch, then it says "No changes".

However, for one song I searched for, it returned lyrics from a different song - ie. the wrong lyrics.

So I checked the museexmatch.log file and found that this particular song wasn't mentioned there at all.

I also manually searched on the Musixmatch website, and they didn't have this particular song there at all.

So now I'm wondering, which lyric source was used to grab these (wrong) lyrics, when I don't have any other lyric source enabled? And why didn't it simply return "No changes" like other songs do when they don't get a hit?

It feels like MusicBee is falling back to some other, default lyric source here, and getting the wrong lyrics as a consequence, but I don't know why or how to prevent this. I only want to use Musixmatch via the Museexmatch plugin, and if it gets no result, then I don't want it defaulting to any other source.

Any ideas?

slonopot

  • Jr. Member
  • **
  • Posts: 37
Having said that, the actual lyrics page at https://www.musixmatch.com/lyrics/Coldplay/Princess-of-China shows the artist as "Coldplay, Rihanna" - with a comma - which should mean that the delimiters config setting should separate the two artists, right?

Any idea why I don't get the lyrics for a situation like this?

That's the main issue with lyrics, I've explained it in detail back in Beenius thread somewhere. In a nutshell, the plugin trims present data as much as possible and compares it against server data with allowed distance which is tolerance to mistakes/inconsistencies measured in characters. In current conditions there's no option to get 100% precision since everything's messed up on "their" side. You may fill as much as possible with default allowedDistance and then increase it to 10-15 and make one more run on your tracks. This will inevitably lead to false positives but you'll be able to clear these out or reload them with another plugin later on when you encounter the error.

In case with Genius there are aliases for each artist and I use them for more precision, but for your particular track it's still a different page for "Coldplay & Rihanna" and there's nothing you can do about it other than editing your data or fixing theirs.

So now I'm wondering, which lyric source was used to grab these (wrong) lyrics, when I don't have any other lyric source enabled? And why didn't it simply return "No changes" like other songs do when they don't get a hit?

It feels like MusicBee is falling back to some other, default lyric source here, and getting the wrong lyrics as a consequence, but I don't know why or how to prevent this. I only want to use Musixmatch via the Museexmatch plugin, and if it gets no result, then I don't want it defaulting to any other source.

Any ideas?

No ideas, lyrics plugins were messed up until recent updates and fixes, try to update your MusicBee to the latest version and see what's happening. Maybe the settings were not saved before you did your check, MusicBee queries all plugins simultaneously and later makes a decision based on priority, something like this. I have Beenius first and Museexmatch second, zero issues since day one.

Last thing is that this is not perfect and never will be, even if the track is matched against Shazam for correct tags and those are used to query lyrics there will be issues. Both my plugins are made for a sole purpose to figure out the lyrics issue as much as possible with minimal effort. I bet on precise hits and leave vague options out of scope, you also have LyricsReloaded that will probably have you covered for almost any bassboosted remix there is, just balance those options as you prefer and you'll be good.

sveakul

  • Sr. Member
  • ****
  • Posts: 2493
So now I'm wondering, which lyric source was used to grab these (wrong) lyrics, when I don't have any other lyric source enabled? And why didn't it simply return "No changes" like other songs do when they don't get a hit?

It feels like MusicBee is falling back to some other, default lyric source here, and getting the wrong lyrics as a consequence, but I don't know why or how to prevent this. I only want to use Musixmatch via the Museexmatch plugin, and if it gets no result, then I don't want it defaulting to any other source.
It is defaulting to a few source(s) that were "built-in" to MusicBee's lyrics searching by Steven (into the MusicBee.exe file itself) and provided this ability before LyricsReloaded or even Lyrics Fetcher.  They were/are ChartLyrics, LyricWiki, Gracenote, and LoloLyrics.  Most are "dead" in that their search techniques or the site itself is now defunct.  I do know for a fact that one of the internal searchers (Chartlyrics) still is active but usually returns totally wrong results now.  That explains what you are seeing.  When you get a result from it, it will not include a source header from LyricsReloaded if that option is turned on, although the source will show if you right-click the lyrics panel in the greyed-out "Lyrics Source:" entry.

As far as I know there is no way to prevent this on the user end.
Last Edit: November 13, 2023, 07:04:59 AM by sveakul

GermanKiwi

  • Newbie
  • *
  • Posts: 17
It is defaulting to a few source(s) that were "built-in" to MusicBee's lyrics searching by Steven (into the MusicBee.exe file itself) and provided this ability before LyricsReloaded or even Lyrics Fetcher.  They were/are ChartLyrics, LyricWiki, Gracenote, and LoloLyrics.  Most are "dead" in that their search techniques or the site itself is now defunct.  I do know for a fact that one of the internal searchers (Chartlyrics) still is active but usually returns totally wrong results now.  That explains what you are seeing.  When you get a result from it, it will not include a source header from LyricsReloaded if that option is turned on, although the source will show if you right-click the lyrics panel in the greyed-out "Lyrics Source:" entry.

As far as I know there is no way to prevent this on the user end.

Gotcha - thanks for the explanation! Annoying that there's no way to stop this from the user's side.

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1084
  • Heal The World
This build is configured to prefer synced lyrics if available.
Let me know if it works and if it's any good and I'll push it once I have any good feedback.
Tested and confirmed. It's behaving exactly as described. Thanks.
From the reloaded thread, I know it's not everyone who's a fan of synced lyrics.
So maybe it'd be best if this was an option (with static lyrics continuing to be the default preference)?
I already spend hours on end on social media. Might as well spare a few of those to a greater purpose here.

slonopot

  • Jr. Member
  • **
  • Posts: 37
Tested and confirmed. It's behaving exactly as described.

Thanks for testing, the update is now live, anyone interested can grab it here.
I've added two option, one will enable synced lyrics and another will only use synced lyrics from Musixmatch and pass to the next plugin otherwise.