• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by teru - 2009-08-23
Last edited by teru - 2010-06-05

FS#10559 - lrcplayer: a plugin to view .lrc file

This is previously posted to FS#7432.

This plugin displays lyrics in .lrc file synchronized with song being played.
See attached lrcplayer.txt for details.

chages from lrcplayer.3.patch (in FS#7432).
* disable reading id3 for low mem targets.
* ignore word time tags in enhanced .lrc format instead of displaying them.

Closed by  teru
2010-06-05 12:08
Reason for closing:  Accepted
Additional comments about closing:  

committed as r26574

teru commented on 2009-08-27 13:53

this is very primitive/limited version of lrcplayer only shows enhanced .lrc format.

So far i've been unsuccessful in seeing lyrics off the ID3 tag on my MP3s. Is there a specific format/version of ID3 V2 the tag needs to be? I tag my MP3s using EvilLyrics Eviltagger.

ok nevermind i switched from EvilLyrics to MiniLyrics and checked only the option to embed Unsynced Lyrics. EvilLyrics only uses Lyrics3 tag. Now i can see the lyrics :)

teru commented on 2009-09-03 13:22

* implement displaying of enhanced .lrc format.

teru commented on 2009-09-05 11:33

*some minor fixes and changes.
*update lrcplayer.txt.

Wow, compiled this a couple of weeks ago and im loving it! Nice and basic with just the right amount of features.
Only one problem though. I use minilyrics to download the .lrc files and many of them say "no lyrics" when i try to open them with lrcplayer.
Aah, I see. The files not working are encoded in utf-16, sncrlrc would convert every file into utf8, thats why i never had a problem with the files.

If you could implement the utf-8 converter it would make this program perfect.

bahus commented on 2009-10-14 11:47

Add support for Unicode .lrc files.

teru commented on 2009-10-15 09:46

Update patch.

Thanks for the plugin. It rocks ;)

But I think that the scheme for lrc files is not perfect, for me at least. I added a lookup in the subfolder of the current playing file. Subfolder name is taken from the settings. Attached is the diff against 8-patch.

As for lrc-file placing scheme I see 3 options.
- The first is to store it alongside the file (it works, but not very clean for me).
- The second is to keep these files in the subfolder (as in this patch).
- And the third - is to store all lyrics in the special root folder, but in this case the lrc file should be named not after mp3 file (it can be renamed or like), but %artist% - %album% - %title%.lrc. The %title% is not enough since there may be different songs with the same title (or even different versions of the same song in different albums). These lrc files could be placed in subfolder, or just en masse in the special folder.

The third one may be the most elegant, but the second is enough to me. And I don't know rockbox internals also :)

Under 23943 revision the code is not working due to the changed viewscreen interface (namely, the "viewportmanager_set_statusbar" function is deprecated). The next patch contains

1) Commented out viewportmanager_set_statusbar calls - it appears that the plugin works Ok without it with the new statusbar code
2) Disabling theme backdrop on the plugin start (colourful backdrop causes difficulties in reading the lyrics)
3) The changes from my previous diff

teru commented on 2009-12-13 13:17

Update and resync patch.
* replace viewportmanager_set_statusbar with viewportmanager_theme_enable/viewportmanager_theme_undo and comment out them as they are not in plugin api.
* add checks for lyrics files in subfolder of current audio file (suggested by Boris Nazaroff) and remove some checks.
* use plugin buffer.

Thanks. But your patch does leave out the theme backdrop. I think that until the "theme_enable" and "theme_undo" are made "public", one should manually disable background picture.

Try for example the AR-150 theme.

teru commented on 2009-12-18 17:00

I prefer to display backdrop and am not going to remove it.
If the backdrop causes problem, add code to remove it or add theme_enable/theme_undo to plugin_api and uncomment relevant line by yourself.

Yes, it is possible to manually edit a patch, but not user friendly at all IMO. The best solution would be adding a preference option.

teru commented on 2009-12-20 03:19

I don't think so.

I've been trying to make this work on a Sansa Fuze but I couldn't. No lyrics are displayed but I can use the menu and even the Timetag Editor (so I know the correct lrc file is loaded).

Revision is 24120.

I'm having the same problem as braulio on my Fuze. There is a problem with the viewport because it's trying to use vp_lyrics[i].width but it's zero. I manually set the width and height so that putsxy was getting good coordinates on the screen but it doesn't draw the text.

teru commented on 2010-01-07 03:53

Update patch.

v12 works well on Fuze. Thanks, it's a nice app.

teru commented on 2010-02-13 04:08

update patch.
* reorganized menu tree.

teru commented on 2010-05-17 13:01

update patch:
* fix bug that .lrc file may be messed messed after edited under certain condition.
*add manual.

It doesn't compile against 3.5.1 (stable).

/rockbox-v3_5_1/apps/plugins/lrcplayer.c: In function ‘load_lrc_file’:
/rockbox-v3_5_1/apps/plugins/lrcplayer.c:1026: error: too many arguments to function ‘rb→creat’
/rockbox-v3_5_1/apps/plugins/lrcplayer.c: In function ‘save_changes’:
/rockbox-v3_5_1/apps/plugins/lrcplayer.c:1975: error: too many arguments to function ‘rb→creat’
make: *** [/rockbox-v3_5_1/build/apps/plugins/lrcplayer.o] Error 1

BTW, thanks for the wonderful plugin!

teru commented on 2010-05-17 15:53

to make it compile against 3.5.1, i think you need to remove ", 0666" in creat() in the lines shown in the error message (1066 and 1975).

Last post was an easy fix :) Now, I've found that some lyrics won't be displayed if the minutes are only one number long. For example:
[0:14.612], [1:47.121] and [5:37.809] won't be displayed unless a zero is added to the minute counter like this [00:14.612], [01:47.121] and [05:37.809].

teru commented on 2010-05-18 14:02

[00:14.612] still will not be displayed. it needs to be [00:14.61]. lrcplayer only recognize time tags in the formats described in manual.
if you want it to recognize tag like [0:14.612], i can add it but maybe take some time.

@ braulio

I have not seen any indication that single digits or more than two digits is an acceptable format for the time specification in an lrc file. All references I have found show the format to be [mm:ss.xx]

I should have RTFM… Anyway 99% of my files have the correct format, the wrong ones come from the same guy so not a big problem. Thanks for the quick reply.


Available keyboard shortcuts


Task Details

Task Editing