namida icon indicating copy to clipboard operation
namida copied to clipboard

[QUESTION] Mood and Lyrics tags

Open guitax opened this issue 1 year ago • 7 comments

Hi, I have some questions regarding tags usage for moods and embedded lyrics.

On my PC I mainly use foobar2000 to listen and tag my mp3 files (using ID3v2.3 format), and I usually have the following:

  • GENRE in TCON (separated with ;)
  • MOOD in TXXX (each mood in a different TXXX tag)
  • LYRICS (synced) in TXXX
  • UNSYNCED LYRICS in USLT

So my questions are:

  1. Finally a player that supports multi-genres 😄. But the sorting seems bugged (see screenshot)
  2. Where does the app read/write moods? It doesn't pick up the existing tags.
  3. The player takes only the unsynced lyrics (considering that I don't have any mp3 with only the synced ones). How should I get the app to prefer the embedded synced lyrics to the unsynced ones? Am I using the wrong tag?
  4. (Bonus) Is rating supported in any way? It would be very nice to filter by it (fyi my files use the RATING WMP - POPM tag)

Screenshots

Genre sorting Example song tags

Thanks and keep up the good work!

guitax avatar Jul 22 '24 15:07 guitax

sorry for being late it was such some detailed information

  1. lmao that was because they were sorted by the original genre no the splitted one, just fixed that and will push new beta soon (thanks for noticing)
  2. using faudiotagger or ffmpeg to read the moods tag. if it doesnt read it properly, can u provide a sample file? note that "moods" field that appears while editing tags, is only meant to be read once while indexing. if u tried updating moods directly from track dialog, it will edit the app-specific stats
  3. if you prefer embedded lyrics, make sure "prioritize embedded lyrics" is enabled in extra settings
  4. ratings are "supposedly" supported if faudiotagger was used, but there is no way to use it or filter by it. since its not a common tag and not all files support it. so we use a separate db for rating/tags/moods that are specific to namida (doesnt touch the original file). not sure if this behavior is the most correct but as said, uncommon tags like this cannot be really relied on you could for example make a script that reads all ur ratings and convert it to namida-readable format "tracks_stats.json". lemme know if ur interested in this

lemme know if u didnt get something or have further questions!

MSOB7YY avatar Jul 27 '24 13:07 MSOB7YY

Hi, sorry for the late reply.

  1. Nice 😄
  2. I didn't edit anything through the app. I just wanted/expected to see the TXXX MOOD tags read by it. I'm attaching a sample mp3 file.
  3. I have that setting enabled, and it takes embedded lyrics from the tag, but it seems it prioritizes the unsynced lyrics and ignores the synced ones.
  4. If I can't filter/sort by Rating I suppose converting the ratings to that json file isn't much useful 🙃

mood-rating-sample.zip

Thanks!

guitax avatar Aug 11 '24 10:08 guitax

i just opened the track in namida and the mood was available instantly, wether in track info or while generating tracks from queue..

Screenshot_20240811-153450_Namida

MSOB7YY avatar Aug 11 '24 14:08 MSOB7YY

Mmm I'm not sure how to get that panel then. If I select the 3 dots menu and than the "smile" icon I don't see neither moods nor rating: image

Btw, there should be 2 moods: Energetic and Party.

Also, did you manage to show the synced lyrics (and not the unsynced ones)?

guitax avatar Aug 11 '24 16:08 guitax

bcz this panel is only for app-specific moods/tags. original mood in the file itself can be edited only by editing track tags, and viewed by accessing track info (track dialog -> press top part)

the panel i showed you can be accessed while generating tracks for the queue "the plus icon" -> mood image

about the lyrics, sadly no. external ffmpeg shows that the unsynced lyrics are saved in lyrics-eng tag, while synced ones are in LYRICS unfortunately, namida relies on jaudiotagger, means its not really possible to modify the internal implementation, ffmpeg in namida is just a fallback. im not really sure what should i do about it

btw moods in the track are only Energtic. even external ffmpeg shows the same

MSOB7YY avatar Aug 11 '24 19:08 MSOB7YY

Oh nice. I found the 2 places with the (first) mood. If you check the 2nd image of the 1st post you can see that there are 2 (different) mood tags. I think jaudiotagger getFields (instead of getFirst) should be able to retrieve the list of moods (hopefully).

For the lyrics, well... too bad.

Now that I discovered the add tracks by mood, I have another question: can I create a playlist by mood (not just adding the first 20 songs) or should I just use m3u playlists to manage this?

guitax avatar Aug 11 '24 20:08 guitax

oh getFields might do it, will check and see. it might also do it for the lyrics as well

creating playlist directly using moods is not a thing currently. but you can modify the max limit by pressing this (pic) and set it to "unlimited" Screenshot_20240811-221317_Namida and then u select all and add to a new playlist

  • there should be moods and tags pages but im kinda lazy to do it #299

if you wanna use m3u thats up to you. its a nice choice if you are accessing the playlist from different app/device etc, things will be kept synced on modifications

MSOB7YY avatar Aug 11 '24 20:08 MSOB7YY

Ah perfect!

Just one last thing, then I stop bothering you (thanks for the patience 😄) Can you also check the rating? Right now I don't see the ratings anywhere (not even in the track info where I see the mood), and if I try to add songs to the queue by rating nothing gets added if I don't include 0%. I know that it's a bit tricky because there are many different ways to save it in tags (see: https://community.mp3tag.de/t/popularimeter-tag/2826/15), but I think jaudiotagger is smart enough to get only the numeric value and probably you would just have to map the numbers to 0/5 range (or 0/100%): 255 -> 5 | 100% 196 -> 4 | 80% 128 -> 3 | 60% 64 -> 2 | 40% 1 -> 1 | 20% missing -> 0 | 0%

That sample mp3, for example, should be 5 stars (so 255 retrieved by jaudiotagger). Btw, should I see it in the track info? I don't know if it's expected to be there or not (since maybe they are all considered 0 and not shown).

guitax avatar Aug 11 '24 21:08 guitax

@guitax hi! yeah ur suggestion was a nice one lmao getAll actually got both moods available, although it still gets the unsynced lyrics only. im still investigating but just wanted to assure u.

about the ratings yeah, jaudiotagger extracted 255 normally, i should map the numbers as u said but will be directly to percentage (x/255*100). i still have to think about a good way to differenciate between in-app rating & file actual rating while making use of both but yeah

im quite curious about ur knowledge tho lmao, have u used jaudiotagger before?

btw ur not bothering lmoa <3

MSOB7YY avatar Aug 12 '24 21:08 MSOB7YY

x/255*100 is maybe a bit strange for value 1 since it would be almost the same of a missing rating, but I suppose it's less bothersome (and who cares about songs rated 1 anyway 😄).

im quite curious about ur knowledge tho lmao, have u used jaudiotagger before?

before I was using metro and since it is more or less dead, I forked it and tried to look into the multiple genres thing even if I never developed on mobile. so I played a bit with jaudiotagger and then I discovered how shit is MediaStore and why all the music players don't support much more than the basics... 😬 And that's when I searched for something else that supposedly didn't use it and found namida that covers 95% of what I want in a music player (and other things like youtube that I don't really care about) 😁

Btw, regarding getAll, it could be useful also for genres if you want to support id3v2.4 format. iirc in that version each genre is saved as a different tag entry (like my moods) and not concatenated anymore.

Thanks for the great work and the support. If you find a way for the synced lyrics too, you're the best!

guitax avatar Aug 12 '24 21:08 guitax

so i have good news and bad news i managed to extract synced lyrics successfully but ~one~ two smol issue

  • lines with multi timestamps (idk wats called) is not supported
  • even tho LYRICS field (and others) were extracted, there is no way to safely write back to the same fields. for example if u edit the lyrics and save, it might write to the other field

who cares about songs rated 1 anyway

i think the 255 is just the way its represented. in actual interface its not possible to rate something out of 255.. so yeah we're safe lmao


...and then I discovered how shit is MediaStore and why all the music players don't support much more than the basics... 😬

harsh truth i been always through


.. like youtube that I don't really care about) 😁

comee here i will not hurt you


Btw, regarding getAll, it could be useful also for genres if you want to support id3v2.4 format. iirc in that version each genre is saved as a different tag entry (like my moods) and not concatenated anymore.

yeah i just made it for all possible tags, (plus the manual extraction of TXXX) so yeah


Thanks for the great work and the support. If you find a way for the synced lyrics too, you're the best!

for that...

MSOB7YY avatar Aug 13 '24 21:08 MSOB7YY

i ended up writing my own multi-timestamped lrc parser lmao https://github.com/MSOB7YY/dart_lrc/commit/57389fa9dc98be5cd3e937121a8c77e226c62152

MSOB7YY avatar Aug 15 '24 19:08 MSOB7YY

as mentioned, the ratings/moods/tags are now properly handled. if you have any of them embedded, they will be used by default.

now the editing menu tries modifying the actual tags. if you edited them they will be preferred even if actual tag editing failed

and vice versa, editing the rating/tags/moods in the tag editor will modify the app related ones.

tldr; u should be fine using them now, and the issue is basically solved, thanks for reporting

for beta downloadss: https://github.com/namidaco/namida-snapshots/releases

MSOB7YY avatar Aug 28 '24 19:08 MSOB7YY