Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#7432 - sncviewer - a plugin for viewing synchronised lyrics on player screen

Attached to Project: Rockbox
Opened by Eddy (bascule) - Saturday, 14 July 2007, 10:59 GMT+2
Last edited by Eddy (bascule) - Saturday, 14 July 2007, 11:09 GMT+2
Task Type Patches
Category Plugins
Status New
Assigned To No-one
Player Type Another
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Private No

Details

This is a plugin designed to view the contents of either:
synchronised lyrics file (.snc/.lrc)
synchronised lyrics tag information (id3v2.3 SYLT - MP3 only)
unsynchronised lyrics file (.txt)
picture file containing lyrics (.bmp)

Button mappings currently coded for the following players:
iriver H1x0
iriver H3x0
iPod
iAudio X5
Toshiba Gigabeat

Attached:
sncviewer.txt - Instructions
sncviewer.patch - diff/patch file

Forum thread:
http://forums.rockbox.org/index.php?topic=2372.0
.
   sncviewer.txt (9.2 KiB)
   sncviewer.patch (77.1 KiB)
 SOURCES     |    1 
 sncviewer.c | 2209 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 2210 insertions(+)

This task depends upon

Comment by Eddy (bascule) - Saturday, 14 July 2007, 11:01 GMT+2
Please note installation instructions are currently incorrect. The .patch file needs only to be applied like any other patch. There is no sncviewer.c file as stated.
Operating instuctions are fine.
Comment by Vuong Minh Hiep (vmh) - Saturday, 14 July 2007, 17:06 GMT+2
update:
- added: countdown marker
- some other small changes
   sncviewer.patch (77.8 KiB)
 SOURCES     |    1 
 sncviewer.c | 2229 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 2230 insertions(+)

Comment by Nikkhil (AceNik) - Saturday, 14 July 2007, 20:33 GMT+2
guys i love this patch , but can i or anyone add button codes for the iRiver H10 , will it work fine then ? or there is some other code needed too ?
Comment by Charles Philip Chan (cpchan) - Saturday, 14 July 2007, 21:26 GMT+2
Add button mapping for the e200 target.
   sncviewer.patch (78.9 KiB)
 SOURCES     |    1 
 sncviewer.c | 2242 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 2243 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Saturday, 14 July 2007, 23:18 GMT+2
iRiver H10 button mapping added
   sncviewer.patch (80.3 KiB)
 SOURCES     |    1 
 sncviewer.c | 2265 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 2266 insertions(+)

   sncviewer.txt (10.5 KiB)
Comment by Charles Philip Chan (cpchan) - Sunday, 15 July 2007, 04:31 GMT+2
Scroll wheel for volume fixed and documentation added for the e200 target.
   sncviewer.patch (80.4 KiB)
 SOURCES     |    1 
 sncviewer.c | 2265 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 2266 insertions(+)

   sncviewer.txt (0 KiB)
Comment by Charles Philip Chan (cpchan) - Sunday, 15 July 2007, 04:34 GMT+2
Oops, something strange happened to attaching the documentation. Here it is again.
Comment by Charles Philip Chan (cpchan) - Sunday, 15 July 2007, 05:28 GMT+2
Oops, something strange happened to attaching the documentation. Here it is again.
Comment by Vuong Minh Hiep (vmh) - Sunday, 15 July 2007, 08:35 GMT+2
I also got some warnings. I think the special characters (start and end tag) of a snc cause the problem.
Comment by Vuong Minh Hiep (vmh) - Friday, 20 July 2007, 16:30 GMT+2
update:
- added: cue sheet support (create (auto cue)/edit/save)

this update doesn't relate to lyrics, but it's useful for music podcast.
   sncviewer.patch (82 KiB)
 SOURCES     |    1 
 sncviewer.c | 2333 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 2334 insertions(+)

Comment by Nikkhil (AceNik) - Saturday, 21 July 2007, 00:11 GMT+2
guys apple has applied for a patent on this same feature for their ipods read more here

http://gizmodo.com/gadgets/apple/ipod-karaoke-patent-brings-fear-to-mass-transit-riders-280331.php

ps:can we have the highlight text thing in our sncviewer as well?
Comment by Vuong Minh Hiep (vmh) - Saturday, 21 July 2007, 18:33 GMT+2
"ps:can we have the highlight text thing in our sncviewer as well?"

If you mean highlight the word according to the word being sung, then the answer is no.
I can't find any prefabricated enhanced lrc files and I can't imagine I would do it manually.
Comment by Vuong Minh Hiep (vmh) - Sunday, 22 July 2007, 17:48 GMT+2
fixed: displaying title and artist containing characters not covered by sysfont
   sncviewer.patch (82.1 KiB)
 SOURCES     |    1 
 sncviewer.c | 2345 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 2346 insertions(+)

Comment by Kévin Ferrare (TiMiD) - Monday, 23 July 2007, 03:49 GMT+2
I just looked at the code of your plugin and I have some suggestions :
- For your keymappings, there are already standard actions defined in pluginlib_actions.h, maybe you should consider using some of them, that would reduce your source size
- If you want to handle multiple displays, use the "struct screen* screens[NB_SCREENS];" in the plugin API, that avoids code duplication (see other plugins)
- too much global variables makes the code difficult to follow, try to group them in structures and to pass those structures as functions parameters. That would make your code *WAY* easier to read
- externalize the bitmaps you use (see other plugins)
- split your sources into different files if possible ... +2000 lines is quite a lot
- if you are aiming for inclusion in SVN, follow the naming conventions and code guidelines of the project

Else it's a nice app to use !
Comment by Vuong Minh Hiep (vmh) - Monday, 23 July 2007, 07:16 GMT+2
- For your keymappings, there are already standard actions defined in pluginlib_actions.h, maybe you should consider using some of them, that would reduce your source size
At first glance it seems that I can use the action definition from there.

- If you want to handle multiple displays, use the "struct screen* screens[NB_SCREENS];" in the plugin API, that avoids code duplication (see other plugins)
- externalize the bitmaps you use (see other plugins)
I'll have a look at them.

- too much global variables makes the code difficult to follow, try to group them in structures and to pass those structures as functions parameters. That would make your code *WAY* easier to read
- split your sources into different files if possible ... +2000 lines is quite a lot
- if you are aiming for inclusion in SVN, follow the naming conventions and code guidelines of the project
Somehow I'm more interested in adding functionality than to (re)structure the code. But you're right it'll make it easier for others to read and maintain the code.
Comment by Vuong Minh Hiep (vmh) - Monday, 23 July 2007, 20:04 GMT+2
as suggested:
changed: use some predefined keymappings from pluginlib_actions.h
changed: use "struct screen"
   sncviewer.patch (79.6 KiB)
 SOURCES     |    1 
 sncviewer.c | 2317 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 2318 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Monday, 06 August 2007, 20:36 GMT+2
update:
- adapting to the new rocks directory structure (rocks/apps)
- comments: // -> /* */
- some optimisations
   sncviewer.patch (79.3 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2273 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2275 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Thursday, 09 August 2007, 22:21 GMT+2
update:
- added: load translation file
- sncviewer.txt updated
   sncviewer.patch (76.6 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2339 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2341 insertions(+)

   sncviewer.txt (10.5 KiB)
Comment by Vuong Minh Hiep (vmh) - Thursday, 16 August 2007, 21:29 GMT+2
fixed: some ab-repeat issues
   sncviewer.patch (76.9 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2352 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2354 insertions(+)

Comment by shiloh (gree665) - Thursday, 23 August 2007, 19:47 GMT+2
I have unsynchronized lyrics in all my mp3s (in the id3v2.3 USLT tag). From reading the description, it doesn't look like I can read 'em with this patch. It would be cool if I could though, is this a possibility?
Comment by Vuong Minh Hiep (vmh) - Thursday, 23 August 2007, 21:12 GMT+2
there is already a patch which reads USLT from an id3 tag
see [url]http://www.rockbox.org/tracker/2999[/url]
Comment by Mike Miller (mikeage) - Sunday, 02 September 2007, 06:22 GMT+2
I just started using this patch... great work!

One note so far: for my iPod 4G, the scroll is backwards for volume. I would think that scrolling CW should _increase_ the volume, and CCW should decrease it.

Thanks!
Comment by Mike Miller (mikeage) - Sunday, 02 September 2007, 08:03 GMT+2
The scrolling is universally backwards on iPods (confirmed in the code).

One other note: if I start from a .txt file, and syncronize it to create a .lrc, is it supposed to delete the text file?
Comment by Vuong Minh Hiep (vmh) - Sunday, 02 September 2007, 10:01 GMT+2
volume:
oh, I see that the button definition in plugin_lib is not the same as I had defined in the code before using the lib. I assume you have the same issue with scrolling if you are in edit/browser mode?

I will fix it asap (Thursday/Friday).

text -> lrc:
yes, why do you want to keep the text file if have a lrc?
Comment by Mike Miller (mikeage) - Sunday, 02 September 2007, 10:11 GMT+2
re: scrolling: Correct

In theory, I don't need to, but here's the actual use case. I have a script which automatically downloads .txt lyrics for my MP3s (not working with other formats yet). If the .txt exists, it doesn't try and download a new one. Otherwise, it searches several sites and tries to find something.

I've since modified it to accept either a .lrc or a .txt file as evidence of valid lyrics, so I guess it's ok. I just didn't see anywhere in the docs that it would delete the old file.
Comment by Vuong Minh Hiep (vmh) - Sunday, 02 September 2007, 20:44 GMT+2
It's not explicitly mentioned, but line 135 in the doc "... the plugin will automatically check if the tagging is completed and it will rename the file extension to lrc/lrc8" implies it.

Your script sounds interesting. Where can I download it?
Comment by Mike Miller (mikeage) - Monday, 03 September 2007, 06:17 GMT+2
You're right about the document; I didn't read carefully enough

http://mikeage.net/2007/09/03/batch-downloading-of-lyrics-for-mp3/
Comment by Vuong Minh Hiep (vmh) - Saturday, 15 September 2007, 20:34 GMT+2
update:
fixed: ipod scrollbutton assignment
changed: save translation and peakmeter settings
   sncviewer.patch (77.7 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2372 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2374 insertions(+)

Comment by Simon Wenger (musician72) - Saturday, 15 September 2007, 21:29 GMT+2
Can't compile:

CC sncviewer.c
sncviewer.c:74: error: ‘BUTTON_MODE’ undeclared here (not in a function)
sncviewer.c:75: warning: missing initializer
sncviewer.c:75: warning: (near initialization for ‘button_context_snc[11].button_code’)
make[2]: *** [/home/simon/Desktop/iaudio/bleeding/rockbox/buildsim/apps/plugins/sncviewer.o] Error 1
make[1]: *** [rocks] Error 2
make: *** [build] Fehler 2

I don't understand the error. The mapping is declared, target is an X5.
Comment by Vuong Minh Hiep (vmh) - Saturday, 15 September 2007, 22:15 GMT+2
x5 doesn't have a button called BUTTON_MODE (#endif was at the wrong place)
   sncviewer.patch (77.7 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2372 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2374 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Sunday, 16 September 2007, 18:31 GMT+2
update:
fixed: problems related to load translation file
fixed: replace /,\,?,: with _ on loading album art (path/<album>.bmp)
   sncviewer.patch (78.3 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2401 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2403 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Monday, 17 September 2007, 19:11 GMT+2
update:
- changed: capitalize first letter in menu and splash screens
- changed: switch backlight behaviour also when plugged (use functions in helper.c)
- changed: replace these chars " | < > and * ? in <album>.bmp too
   sncviewer.patch (78.5 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2404 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2406 insertions(+)

   sncviewer.txt (10.4 KiB)
Comment by Nikkhil (AceNik) - Monday, 17 September 2007, 19:19 GMT+2
guys what can i do with the txt file attached, does t need to be placed somewhere for making the build i never did this till now?
Comment by Vuong Minh Hiep (vmh) - Monday, 17 September 2007, 19:31 GMT+2
Do you mean the sncviewer.txt? It's only a documentation. Only the sncviewer.patch is needed for building.
Comment by Vuong Minh Hiep (vmh) - Tuesday, 18 September 2007, 18:44 GMT+2
changed: don't use the function in helper.c because it doesn't turn on the backlight if the backlight is set to 0 (off)
   sncviewer.patch (78.8 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2419 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2421 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Saturday, 22 September 2007, 14:02 GMT+2
fixed: don't add time offset to not initialized time tags
fixed: unify behaviour for leaving plugin (quit plugin, audio stopped, usb connected)
   sncviewer.patch (79 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2422 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2424 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Monday, 01 October 2007, 13:38 GMT+2
some fixes ...
   sncviewer.patch (79.1 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2428 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2430 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Friday, 12 October 2007, 18:41 GMT+2
changed:
- save temporary tagged txt files in lrc-format
- reorder some functions
   sncviewer.patch (79 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2429 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2431 insertions(+)

Comment by Mike Miller (mikeage) - Tuesday, 16 October 2007, 16:45 GMT+2
If I may submit a feature request...

I download most of my lyrics automatically (see above). Often, that means I get the wrong song. It would be very nice if there was a way to delete the (wrong) lyrics file from within the plugin.

Thanks!
Comment by Vuong Minh Hiep (vmh) - Tuesday, 16 October 2007, 20:18 GMT+2
no problem, it's not a big thing to add it.

update:
added: delete lyrics entry in the menu
   sncviewer.patch (79.7 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2455 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2457 insertions(+)

Comment by Mike Miller (mikeage) - Tuesday, 16 October 2007, 22:24 GMT+2
nice, thanks!

i'll try it out on my commute tomorrow (don't worry, I don't drive myself to work <g>)
Comment by Vuong Minh Hiep (vmh) - Friday, 26 October 2007, 19:24 GMT+2
update:
fixed: doesn't notice track change in the recent build
changed: translation icon
   sncviewer.patch (80 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2460 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2462 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Tuesday, 06 November 2007, 21:10 GMT+2
added: USLT support
changed: capitalize enums, rename some variables, ...
   sncviewer.patch (81.5 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2498 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2500 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Saturday, 17 November 2007, 10:25 GMT+2
changed: track change handling, some other internal functions
   sncviewer.patch (82.3 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2512 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2514 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Wednesday, 23 January 2008, 10:31 GMT+2
fixed: backlight
changed: simplify track change handling
   sncviewer.patch (81.9 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2499 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2501 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Thursday, 24 January 2008, 14:16 GMT+2
fix a bug in yesterday's version: adjusting the volume will lead to a crash.
   sncviewer.patch (82 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2502 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2504 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Monday, 11 February 2008, 14:13 GMT+2
updated: sncviewer.txt
changed: scrolling in editor
fixed: some bugs
   sncviewer.patch (84.6 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2585 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2587 insertions(+)

   sncviewer.txt (10.6 KiB)
Comment by Vuong Minh Hiep (vmh) - Wednesday, 13 February 2008, 12:06 GMT+2
changed: rename all actions (e.g. ACTION_REC_HOLD -> SNC_SAVE)
fixed: validation of mp3entry
   sncviewer.patch (84.1 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2590 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2592 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Saturday, 01 March 2008, 13:21 GMT+2
fixed: lrc conversion from utf16 to utf8 ('count' is not the size in bytes!)
   sncviewer.patch (84 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2591 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2593 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Wednesday, 26 March 2008, 22:20 GMT+2
fixed: adapting to new plugin api (do_menu())
changed: using function find_albumart() from api saves some code
   sncviewer.patch (83.3 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2570 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2572 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Thursday, 24 April 2008, 22:05 GMT+2
Keymapping has changed! Using the WPS key mapping context saves the work to define the keymapping for every player.
Unfortunately the simple push for Record button isn't used in the WPS context.
   sncviewer.patch (78 KiB)
 CATEGORIES  |    2 
 SOURCES     |    1 
 sncviewer.c | 2453 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2456 insertions(+)

   sncviewer.txt (5.6 KiB)
Comment by Jan (dumbo20) - Thursday, 01 May 2008, 20:06 GMT+2
So does the plugin work for all rockbox players now?
Comment by Vuong Minh Hiep (vmh) - Friday, 02 May 2008, 15:24 GMT+2
> So does the plugin work for all rockbox players now?
I would say yes even I didn't test it on other rockbox targets.

update:
added: set AB in AB-Menu to enable players with no AB buttons to set AB
added: functions goto_next_gap() and clean_blanks() in main menu

   sncviewer.patch (79.5 KiB)
 CATEGORIES  |    2 
 SOURCES     |    1 
 sncviewer.c | 2516 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2519 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Monday, 12 May 2008, 10:17 GMT+2
added: configurable (vertical) scrolling behaviour
   sncviewer.patch (81.8 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2581 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2583 insertions(+)

   sncviewer.txt (5.9 KiB)
Comment by Vuong Minh Hiep (vmh) - Monday, 12 May 2008, 19:39 GMT+2
removed: one of the scrolling options (unnecessary and confusing)
fixed: wrong scrolling for translations
   sncviewer.patch (81.7 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2579 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2581 insertions(+)

Comment by Mike Miller (mikeage) - Wednesday, 14 May 2008, 09:30 GMT+2
Please note that as of r17492, the prototype for plugin_start needs to be:

enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter)

Both parameters became const
Comment by Vuong Minh Hiep (vmh) - Sunday, 18 May 2008, 18:42 GMT+2
added: possibility to show Album Art below the lyrics for players with lcd height > width
changed: colors
   sncviewer.patch (82.2 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2596 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2598 insertions(+)

Comment by Karl Anderson (D-Shadow) - Wednesday, 21 May 2008, 20:12 GMT+2
Great plugin, however I came across a few bugs.

The scroll-limit resets after every blank line in the lyrics. I'm attaching my lrc file and an animation of screen dumps for debugging purposes. Secondly, the line height of the highlighted line often increases unexpectedly.

I guess the bugs are purely cosmetic, but it would be great if you could fix them.
Comment by Vuong Minh Hiep (vmh) - Wednesday, 21 May 2008, 22:55 GMT+2
These two "bugs" are intended, thus I won't fix them. But you can easily fix them yourself.

>The scroll-limit resets after every blank line in the lyrics
My reasons for a reset:
1. A blank line as current line in the middle of the screen looks queer to me
2. A blank line usually represents an instrumental part and then a "new" beginning of the singing. The scrolling lyrics do the same.

if you don't want the reset, you can do as follows:
line 720:
if(IS_BLANK(id) ||
(id>0 && IS_BLANK(id-1)) ||
max_height < current_y0 + (snc->rows * fontheight) + tr_height)
current_y0 = scroll_y0;

remove the two IS_BLANK conditions:
if(max_height < current_y0 + (snc->rows * fontheight) + tr_height)
current_y0 = scroll_y0;

You also have to change the drawing line of the "countdown stars":
- turn the static variable current_y0 to a global variable
- use current_y0 instead of scroll_y0 in the drawing part of the "countdown stars"

> Secondly, the line height of the highlighted line often increases unexpectedly.
My reasons for the additonal space:
1. second highlighting effect (next to the color)
2. better distribution of the available space
(depending on the LCD height and the chosen font the empty space after the last lyrics line can be really large)
3. It has an animation effect if you place the scroll-limit at the bottom of the screen

If you don't want it just remove the following line in the code:
line 739: y+=((max_height-scroll_y0)%fontheight)>>1; /* additional space */
Comment by Vuong Minh Hiep (vmh) - Thursday, 22 May 2008, 20:15 GMT+2
fixed: wrong calculation of the maximum scrolling height (overlap with the "next song" line, see the picture from D-Shadow)
   sncviewer.patch (82.3 KiB)
 CATEGORIES  |    1 
 SOURCES     |    2 
 sncviewer.c | 2596 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2599 insertions(+)

Comment by Karl Anderson (D-Shadow) - Friday, 23 May 2008, 10:20 GMT+2
That worked just fine... only had a problem with the position of countdown stars, but figured it out after a few tries.

Thanks a lot for your help.
Comment by Vuong Minh Hiep (vmh) - Sunday, 15 June 2008, 18:14 GMT+2
added: possibility to set a backdrop (./rockbox/rocks/apps/sncviewer_bd.bmp)
added: invert colors
changed: menu icons
   sncviewer.patch (85.5 KiB)
 CATEGORIES  |    1 
 SOURCES     |    2 
 sncviewer.c | 2694 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2697 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Sunday, 15 June 2008, 20:36 GMT+2
safer code ...
   sncviewer.patch (85.6 KiB)
 CATEGORIES  |    1 
 SOURCES     |    2 
 sncviewer.c | 2697 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2700 insertions(+)

Comment by William (lee321987) - Tuesday, 17 June 2008, 03:48 GMT+2
I'm trying to compile this for my Sansa c200, but with no luck. I tried "make > output.txt", but none of the errors are not put into output.txt, so what I CAN say is that there are (at least) 294 errors that look like this:
sncviewer.c:6347: error: redefinition of 'store_line_'
sncviewer.c:1066: error: previous definition of 'store_line_' was here
sncviewer.c:6396: error: redefinition of 'store_line'
sncviewer.c:1119: error: previous definition of 'store_line' was here
They seem to all have the "previous definition" and "redefinition of" in them.
Then the last three lines are:
make[2]: *** [/home/Will/rockbox/build/apps/plugins/sncviewer.o] Error 1
make[1]: *** [rocks] Error 2
make: *** [build] Error 2
Any help would be much appreciated. Thank you.
Comment by Vuong Minh Hiep (vmh) - Tuesday, 17 June 2008, 17:55 GMT+2
It looks like you have applied the patch more than once. The file sncviewer.c doesn't have 6000 lines!
I think you can fix this manually:
- delete the file "sncviewer.c" in apps/plugins
- delete all the lines with "sncviewer" in the files apps/plugins/CATEGORIES and apps/plugins/SOURCES
- apply the patch

Always revert (patch -p0 -R < sncviewer_old.patch) the old patch before applying (patch -p0 < sncviewer_new.patch) the new one.
Comment by Vuong Minh Hiep (vmh) - Tuesday, 01 July 2008, 22:14 GMT+2
added: dictionary look up
   sncviewer.patch (90.4 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2870 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2872 insertions(+)

   sncviewer.txt (7.1 KiB)
Comment by Vuong Minh Hiep (vmh) - Sunday, 06 July 2008, 15:33 GMT+2
update:
- changed: clean blanks: the min blank length can be set; delete all uninitialized blanks
- fixed: reset scroll-limit if the font was changed
- changed: only reset scrolling if the length of the blank line is > 3s
   sncviewer.patch (91.2 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2885 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2887 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Sunday, 13 July 2008, 12:07 GMT+2
update:
changed: if the interval from 'auto cue' is set, then every song without lyrics will be auto cued
added: menu entry 'save'
   sncviewer.patch (91.6 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2896 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2898 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Sunday, 20 July 2008, 12:47 GMT+2
update:
changed: Album Art Icons
fixed: load translation messes up a-b position
changed: snc lyrics will be saved to lrc format
changed: same function for the 'next' button in both modes
and some other changes
   sncviewer.patch (92.6 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2934 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2936 insertions(+)

Comment by Vuong Minh Hiep (vmh) - Sunday, 27 July 2008, 10:06 GMT+2
update:
changed: double click '|<<' button will change to the previous song in both modes
fixed: corrupted last lrc line
fixed: turn off 'auto cue' clears the loaded lyrics
   sncviewer.patch (92.6 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2932 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2934 insertions(+)

Comment by Thomas Martitz (kugel.) - Sunday, 03 August 2008, 02:21 GMT+2
I'm getting a weird compiling error in line 169 ("expected identifier or '(' before string constant"). That's the file of the BOM const declaration. Commenting it out helps and seems not to be needed (there's a BOM define in the core: "#define BOM "\xef\xbb\xbf" " in misc.h).
Comment by Dominik Riebeling (bluebrother) - Sunday, 03 August 2008, 20:35 GMT+2
handling UTF-8 files should now be done using open_utf8() in misc.c ... this isn't exported to the plugin API yet.
(BTW, why add a trailing NULL byte to the BOM at all? You'd never check for that NULL anyway.)
Comment by Dominik Riebeling (bluebrother) - Thursday, 21 August 2008, 19:22 GMT+2
updated to follow changes in svn, and renamed the BOM variable. It still should use the core open_utf8() to handle the BOM issues though (but I haven't addressed this).

Besides, if someone is interested in getting this into svn, the file ignores the style guides quite a bit -- wrong indentation, constants written as macros etc.
   FS#7432-scnviewer_1.diff (92.6 KiB)
 CATEGORIES  |    1 
 SOURCES     |    1 
 sncviewer.c | 2932 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2934 insertions(+)

Comment by Przemysław Hołubowski (p.h.) - Wednesday, 07 January 2009, 16:33 GMT+2
Please update the way rb->read_bmp_file() is called. It is out of sync with SVN and produces an error during making.
Comment by Teruaki Kawashima (teru) - Sunday, 05 April 2009, 14:40 GMT+2
I wrote a plugin to display .lrc file. sorry if it's no good to upload this here.

this plugin is what i think enough to display lyrics synchronized with song playing,
but simpler or less functional than sncviewer.
some code to handle audio is taken from apps/gwps* and apps/plugins/lib/playback_control.c
and some code to read .snc and read USLT/SYLT in id3 tag is taken from sncviewer. thanks.

although code to read snc and USLT/SYLT is included, I have no idea if they work correctry.

instruction (lrcplayer.txt) is also attached.
   lrcplayer.patch (55.7 KiB)
 CATEGORIES     |    1 
 SOURCES        |    1 
 lrcplayer.c    | 1759 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 viewers.config |    1 
 4 files changed, 1762 insertions(+)

   lrcplayer.txt (3 KiB)
Comment by Ralph Soto (agalloch) - Wednesday, 27 May 2009, 02:13 GMT+2
snclrc (formerly sncviewer) is a Rockbox plugin for viewing synchronized lyrics in the lrc format
Found the source here http://yxz0123.yx.funpic.de/rockbox/index.html
All credit goes to the author of that site. (op?)
   snclrc.patch (105.5 KiB)
 CATEGORIES |    1 
 SOURCES    |    2 
 snclrc.c   | 3363 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 3365 insertions(+), 1 deletion(-)

   snclrc.txt (8.8 KiB)
Comment by Ralph Soto (agalloch) - Thursday, 28 May 2009, 05:17 GMT+2
Fixed.
   snclrc.patch (105.6 KiB)
 CATEGORIES |    1 
 SOURCES    |    1 
 snclrc.c   | 3363 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 3365 insertions(+)

Comment by Teruaki Kawashima (teru) - Friday, 19 June 2009, 17:54 GMT+2
updated my patch.
   lrcplayer.patch (74.9 KiB)
 CATEGORIES     |    1 
 SOURCES        |    1 
 lrcplayer.c    | 2352 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 viewers.config |    3 
 4 files changed, 2357 insertions(+)

   lrcplayer.txt (3.2 KiB)

Loading...