Rockbox Technical Forums

Support and General Use => Plugins/Viewers => Topic started by: (:@) on January 12, 2006, 02:04:22 AM

Title: sncviewer plugin
Post by: (:@) on January 12, 2006, 02:04:22 AM
the plugin reads from a lrc/snc file and displays the lyrics.

screenshots and precompiled .rock files (http://yxz0123.yx.funpic.de/rockbox)

History:
...
update 17.3.06
- added: lrc support

update 20.4.2006
- added: a-b menu (clear/save/load/remove)
- added: button mapping for ipod (no a-b, because there are not enough buttons)
- changed: characters replaced by bitmaps in statusbar

update 23.4.2006
- added: edit a line (text edit)
- fixed: load utf-16 (be/le) encoded lrc files will be converted to utf8

update 13.8.2006
- added: button definitions for iaudio x5
- added: lrc time format: [m.ss.xxx] (www.lrcdb.org)
- fixed: problems with audio_ff_rew() (delay, ab-repeat)
- some other changes

update 26/28.9.2006
- changed: lyrics centered, time position, ..
- updated to the new button interface

update 12.2006
- changed: display of next playing artist/title for non-ascii chars (don't use sysfont)
- added: keymapping for toshiba gigabeat
- updated: sncviewer.txt

update 27.1.2007
- added: turn off/on backlight (unplugged)
- added: settings saved (backlight, album art on/off)
- changed: show album art and lyrics

update 3.2007
- added: display peakmeter if no lyrics can be found
- changed: replace old with the new menu api
- fixed: splash calls according to api changes, endless loop if next song is null

update 4.2007
- added: support for id3v2 SYLT embedded in a mp3 file
- updated: sncviewer.txt

update 7.2007
see
http://www.rockbox.org/tracker/task/7432
Title: Re: new plugin: sncviewer
Post by: roolku on January 12, 2006, 06:04:03 AM
This is great. I was wanting to write a lyrics display plugin myself, but then got stuck when i noticed that replaygain obliberated the lyrics data. Your approach should work better. I'll try it out as soon as possible.

Cheers
Title: Re: new plugin: sncviewer
Post by: kenshin on January 12, 2006, 11:15:28 AM
I haven't tried it yet but considering the lyrics are external can we assume they might work with non-mp3 files (i.e. ogg and flac)?
Title: Re: new plugin: sncviewer
Post by: perfectdrug on January 12, 2006, 12:07:32 PM
don´t work for me:
"incompatible model"

i have a h140... with bleeding edge build
haven´t compiled it for myself

can you give some more informations please?
do i have to put the plugin in the rocks folder or does it work as viewer?
i assume the mp3 has to play...?

 

Title: Re: new plugin: sncviewer
Post by: kenshin on January 12, 2006, 01:26:27 PM
Same here with my 120. Yesterday's daily. What model is this built for?
Title: Re: new plugin: sncviewer
Post by: roolku on January 12, 2006, 04:03:55 PM
I just had a play with it (compiled it with the latest CVS) and what can I say:

It is awesome!

This doesn't just display the lyrics in sync, but provides all sorts of related functionality such as a-b repeat, volume control, skip, list of all the lyrics, offset adjustment and others I might have overlooked.

Just a few comments/questions:

- is there a way to display accented characters (convert the file to utf-8 perhaps?)
- how do I quit a-b repeat without exiting the plugin completely
- save time offset (record button) doesn't seem to work
- some of my lyrics result in a "buffer has not enough rows" error - could the size be increased?
- what is the value in % in the status bar? how full the buffer is?
- the jump to the right for the current bit of lyrics is a little irritating - maybe something could be done with background colour?

Keep up the good work. I would love to see this integrated into rockbox.

Now I got to find some more snc files....

Thanks
  Roolku
Title: Re: new plugin: sncviewer
Post by: roolku on January 12, 2006, 04:08:31 PM
couple of screenshots

[attachment deleted by admin, too old]
Title: Re: new plugin: sncviewer
Post by: perfectdrug on January 12, 2006, 04:10:58 PM
sounds good  :)
hey can you provide the *.rock file please?
would be great...:)
Title: Re: new plugin: sncviewer
Post by: kenshin on January 12, 2006, 05:14:38 PM
Doesn't seem to work with FLAC files. It's working with an MP3, though. Is it possible to make the screen width match the player? It's only using half of my screen real estate and "long" lines are wrapped right in the middle of the screen.

I too see the same "buffer" error message.
Title: Re: new plugin: sncviewer
Post by: Shebb on January 12, 2006, 06:40:22 PM
Great plugin. 

Is there any plans for AB repeat to be added to the audio codec becuase it would be nice to have seemless transition from the end to the start which could only be done through buffering I guess.
Title: Re: new plugin: sncviewer
Post by: (:@) on January 13, 2006, 04:16:05 AM
Quote
- how do I quit a-b repeat without exiting the plugin completely
- save time offset (record button) doesn't seem to work
- some of my lyrics result in a "buffer has not enough rows" error - could the size be increased?
- what is the value in % in the status bar? how full the buffer is?
- the jump to the right for the current bit of lyrics is a little irritating - maybe something could be done with background colour?


- to quit a-b repeat you just have to press and hold a-b button
- save time offset just saves the filename and the offset into a file named offset.txt in the rootdirectory (hold recordbutton)
- "buffer has not enough rows" -> to increase the buffer you have to modify BUFFERSIZE and MAX_ROWS
Title: Re: new plugin: sncviewer
Post by: linuxstb on January 13, 2006, 04:36:17 AM
Doesn't seem to work with FLAC files. It's working with an MP3, though.

After looking at the code, that bug seems to be because the plugin is simply replacing the last three characters of the filename with "snc" to find the lyrics file.  So if you rename your lyrics file to ".fsnc" it should work.

The plugin should be using rb->strrchr(filename,'.') to find the last "." in the filename, rather than assuming the extension is three characters - which as you found fails for flac, and will also fail for wavpack (.wv).

Title: Re: new plugin: sncviewer
Post by: MoAv on January 13, 2006, 05:15:56 AM
What is the best way to find mass SNC files for entire albums ?
Title: Re: new plugin: sncviewer
Post by: roolku on January 13, 2006, 06:33:04 AM
What is the best way to find mass SNC files for entire albums ?


I don't think "mass SNC files for entire albums" exist. http://www.ilyrics.net/ is a good source. Also Ilyrics pro http://guino.home.insightbb.com/ilyricspro.html  can download/import different formats, some of which you will need to re-format and time sync yourself.
Title: Re: new plugin: sncviewer
Post by: MoAv on January 13, 2006, 07:39:19 AM
There isn't too much SNC or karaoke type files , only if it's popular .
Any chance you could add record mode in this plugin so I can change standart lyrics files that are SNC without the karaoke , into SNC while hearing the song . like Evillyrics does .
hmmm , was that clear ?
Title: Re: new plugin: sncviewer
Post by: (:@) on January 14, 2006, 07:15:04 AM
I have updated the plugin (see first page)
Title: Re: new plugin: sncviewer
Post by: Popmarter on January 14, 2006, 10:29:58 AM
AWESOME!!

Even a noob like me managed to get it working on my 120. for other noobs: copy the .rock in the .rock directory. find a lyric for a song on  the ilyrics database (see earlier post). copy the .snc file in the same directory as the mp3. make sure they are both named the same (song1.mp3, song1.snc) and play the song. then A-B to browse plugins and pick the sncviewer, voila!
Title: Re: new plugin: sncviewer
Post by: MoAv on January 14, 2006, 01:23:34 PM
Well , "the artist formally known as smiley" , can you add that feature ?
Title: Re: new plugin: sncviewer
Post by: Larsie on January 15, 2006, 04:31:13 AM
I ported it to H300, source and .rock included.

On request from some people I want it to make it read .lrc files aswell :)

So I'll patch it whan its completely finished

Same way as the startpost, rename the sncviewerH300.doc to sncviewerH300.zip

[attachment deleted by admin, too old]
Title: Re: new plugin: sncviewer
Post by: (:@) on January 16, 2006, 03:56:02 AM
the plugin is updated

There isn't too much SNC or karaoke type files , only if it's popular .
Any chance you could add record mode in this plugin so I can change standart lyrics files that are SNC without the karaoke , into SNC while hearing the song . like Evillyrics does .
hmmm , was that clear ?
no, I don't know what you mean. Or do you think of an snc editor? a tool in which you can add timetags to a normal lyric file?
Title: Re: new plugin: sncviewer
Post by: MoAv on January 16, 2006, 07:37:13 AM
Yes , instead of building one on the computer , why not do it on the player ? you're listening to the music anyway and you have more time on the road , like me . Don't have to be an editor per say , but just a quick button that captures the time on the mp3 and puts it on the SNC file . Can SNC be non karaoke ?
Title: Re: new plugin: sncviewer
Post by: chlide on January 16, 2006, 08:14:04 AM
I have tried sncviewer for H300, but it cannot show unicode like Chinese.
Will unicode support be added in this plugin?
 
Title: Re: new plugin: sncviewer
Post by: (:@) on January 16, 2006, 08:51:54 AM
Yes , instead of building one on the computer , why not do it on the player ? you're listening to the music anyway and you have more time on the road , like me . Don't have to be an editor per say , but just a quick button that captures the time on the mp3 and puts it on the SNC file . Can SNC be non karaoke ?

i don't think i will use this feature.

I have tried sncviewer for H300, but it cannot show unicode like Chinese.
Will unicode support be added in this plugin?

it should work if you convert your snc file (encoded in GB) to utf8.
i have the problem, that i sometimes got some delays ...


[attachment deleted by admin, too old]
Title: Re: new plugin: sncviewer
Post by: kenshin on January 16, 2006, 10:58:10 AM
Yes , instead of building one on the computer , why not do it on the player ? you're listening to the music anyway and you have more time on the road , like me . Don't have to be an editor per say , but just a quick button that captures the time on the mp3 and puts it on the SNC file . Can SNC be non karaoke ?

The difficulty being that you would have to anticipate how much text can squeeze into your available space for each time stop. Without having lyrics written out to see how much space each word uses you are likely going to get the timings wrong and your sync will have to be adjusted on a PC later anyway.
Title: Re: new plugin: sncviewer
Post by: MoAv on January 16, 2006, 04:58:55 PM
Yes , instead of building one on the computer , why not do it on the player ? you're listening to the music anyway and you have more time on the road , like me . Don't have to be an editor per say , but just a quick button that captures the time on the mp3 and puts it on the SNC file . Can SNC be non karaoke ?

The difficulty being that you would have to anticipate how much text can squeeze into your available space for each time stop. Without having lyrics written out to see how much space each word uses you are likely going to get the timings wrong and your sync will have to be adjusted on a PC later anyway.


AFAIK those karaoke files only gives each line a time stamp . This "record" mode can preper those regular text files into a SNC with each line having this time stamp : 00:00:00 , then updating every line when the process begins . A bit tricky , but I think it could work .
Title: Re: new plugin: sncviewer
Post by: roolku on January 17, 2006, 06:29:43 AM
I have tried sncviewer for H300, but it cannot show unicode like Chinese.
Will unicode support be added in this plugin?

it should work if you convert your snc file (encoded in GB) to utf8.
i have the problem, that i sometimes got some delays ...


I am struggeling to get the unicode working. When I am converting my latin-1 snc file to utf-8 (save as in notepad) the result doesn't work at all. Looking at the plugin source I believe I can see the following problems:
- The BOM (EF BB BF) at the beginning is not skipped.
- The magic bytes for the time stamp are C2 A2 C3 A2 while you check for: E2 91 A9

If I edit my unicode snc files to remove the BOM and replace C2 A2 C3 A2 with E2 91 A9 it sort of works: I get the accented characters, but the lines wraps too early  and as a result I get additional lines and a "not enough rows" error as a result.

What am I missing here - since it seems to work for you I must be doing something wrong.

Cheers
  Roolku
 
P.S. Would it be possible to convert the snc files to utf-8 within the plugin (taking into account the default codepage from the settings?). That would save the hassle with converting the files.

Roolku
Title: Re: new plugin: sncviewer
Post by: (:@) on January 18, 2006, 04:58:57 AM
the plugin is updated: change timetags is now possible
Title: Re: new plugin: sncviewer
Post by: MoAv on January 18, 2006, 09:11:49 AM
Is that what I think it is ??
Thanx !

EDIT :
Well it doesn't seem to work on my H120 , gives me :
I04:IllInstr
at 32F40000
Title: Re: new plugin: sncviewer
Post by: (:@) on January 19, 2006, 08:32:13 AM
Is that what I think it is ??
Thanx !
yes, i think it is what you have requested.

Quote
EDIT :
Well it doesn't seem to work on my H120 , gives me :
I04:IllInstr
at 32F40000
recently the plugin loader got many changes. the best way is to clean and rebuild rockbox instead of using the binary i've included in the sncviewer.doc
Title: Re: new plugin: sncviewer
Post by: roolku on January 19, 2006, 11:22:30 AM
Could you please comment on the UTF-8 issue.

Cheers
  Robert
Title: Re: new plugin: sncviewer
Post by: MoAv on January 19, 2006, 12:12:48 PM
the best way is to clean and rebuild rockbox instead of using the binary i've included in the sncviewer.doc

Sorry , I know nothing about programing , what do you mean by rebuilding rockbox , can't I just copy the plugin ?
Title: Re: new plugin: sncviewer
Post by: (:@) on January 20, 2006, 04:06:59 AM
the plugin is updated!

to rooku concerning utf8:
In the latest build I have updated the utf8-file handling. I don't think it is a good solution,
but it could work for you.
your utf8-file must meet these conditions:
- first three bytes of your file: EF BB BF (BOM)
- your original file is either encoded in latin or gb (may also work with other encodings)
- the timetag is 00xxxxxx (no hours)

note that if your file was encoded in latin then it could be that the last character and
the first on the new line aren't displayed correctly, because just wrapped after 16 bytes.

Sorry , I know nothing about programing , what do you mean by rebuilding rockbox , can't I just copy the plugin ?

yes, you can if the plugin interface didn't change.
Just download today's (20.1.06)
rockbox version and put my updated plugin (also some date) into the pluginfolder (rocks)
and try it out.
Title: Re: new plugin: sncviewer
Post by: inluxication on January 21, 2006, 11:47:38 PM
Quote
Here you go. Just remove the .doc and put it in your rocks directory on your h120/h140. Then with the song playing run the plugin.

Roolku
 sncviewer.rock.doc (5 KB - downloaded 27 times.)

I've tried that with today's build (2006 01 21) and, since it was specifically mentioned, yesterday's.  I get the "Incompatible model" message on my H140.

Does anyone have any ideas?  What does the error message mean, exactly?

I did what I think I was meant to.  Precompiled daily build.  sncviewer.rock into the rocks directory.  Play song xxx.mp3, with lyrics xxx.snc in the same directory.  While song is playing, run plugin.  Error.

Thanks smiley for the cool plugin -- what I do now (on the rare occasions I can be bothered) is display a lyrics text file while the song is playing.  This would be much nicer.

-Greg
Title: Re: new plugin: sncviewer
Post by: roolku on January 22, 2006, 06:39:52 AM
My posting was outdated and I deleted it. You need to use the updated .rock from the first posting in the thread (pick the right version for your model). Your other steps were fine.
Title: Re: new plugin: sncviewer
Post by: roolku on January 22, 2006, 08:06:51 AM
to rooku concerning utf8:
In the latest build I have updated the utf8-file handling. I don't think it is a good solution,
but it could work for you.
your utf8-file must meet these conditions:
- first three bytes of your file: EF BB BF (BOM)
- your original file is either encoded in latin or gb (may also work with other encodings)
- the timetag is 00xxxxxx (no hours)

note that if your file was encoded in latin then it could be that the last character and
the first on the new line aren't displayed correctly, because just wrapped after 16 bytes.

Thank you, that works a lot better. Just the occasional charecter moving on to the next line...

I also love the time tag editor.  Thanks a lot for the great plugin.
Title: Re: new plugin: sncviewer
Post by: inluxication on January 23, 2006, 03:34:18 AM
Roolku and (:@), many thanks -- I'll try it now.
...
...
Nice!
Title: Re: new plugin: sncviewer
Post by: idanm on January 25, 2006, 01:23:34 PM
could you make the plugin for the h300 as well for the latest build?
Title: Re: new plugin: sncviewer
Post by: (:@) on January 26, 2006, 06:45:48 AM
could you make the plugin for the h300 as well for the latest build?

a build for the h300 is included...
Title: Re: new plugin: sncviewer
Post by: chewy on January 27, 2006, 12:55:32 PM

- "buffer has not enough rows" -> to increase the buffer you have to modify BUFFERSIZE and MAX_ROWS


how?
Title: Re: new plugin: sncviewer
Post by: roolku on January 27, 2006, 01:09:30 PM
I have found that I typically get this error when I have empty lines at the end of the *.snc file. So getting rid of these lines fixes that for me.
Title: Re: new plugin: sncviewer
Post by: roolku on January 27, 2006, 06:29:22 PM
The plugin is working very well - thank you for your effort.

I got however tired of browsing to the plugins directory and so I created a little patch that will execute the sncviewer when you press the record button in the WPS. Maybe it is useful to somebody else as well.

Edit:

While I was at it I added the ability to display cover art with a long press of the record button. The code searches for <filename>.jpg  then <ID3tag_album>.jpg then folder.jpg in the same directory as the audio file. If found it calls the jpeg.rock plugin which has been patched to display the image while music is playing provided the jpeg is not too big. I use images with a hight of 512 and it works perfectly.

Enjoy

[attachment deleted by admin, too old]
Title: Re: new plugin: sncviewer
Post by: MoAv on January 28, 2006, 05:26:06 PM
Getting incompatible model when trying to use the rec patch . Hmmm... first patch I've tried , mabey it's me doing stupid stuff .
Title: Re: new plugin: sncviewer
Post by: roolku on January 29, 2006, 08:11:27 AM
Getting incompatible model when trying to use the rec patch . Hmmm... first patch I've tried , mabey it's me doing stupid stuff .

How did you apply the patch? Your error message sounds as if you were trying to load it on the player?

You will need to run

patch -p0 < filename.patch

from the top of the source tree. There are some instructions about patching on the Wiki: http://www.rockbox.org/twiki/bin/view/Main/SimpleGuideToCompiling.
Title: Re: new plugin: sncviewer
Post by: MoAv on January 29, 2006, 11:01:09 AM
Exactly what I did .
patched it , and then compiled .
made the zip , then unpacked it to my player , as I usually do with the daily build .
I can press the record button , but there's incompatible message , so it looks like the file was patched , but doesn't match to the CVS mabey ?
Title: Re: new plugin: sncviewer
Post by: roolku on January 29, 2006, 11:53:25 AM
Exactly what I did .
patched it , and then compiled .
made the zip , then unpacked it to my player , as I usually do with the daily build .
I can press the record button , but there's incompatible message , so it looks like the file was patched , but doesn't match to the CVS mabey ?
Ah, I see.  In my opinion that means it is trying to load the scnviewer.rock, but the plugin is out of date. Does it work when you try to run the plugin from the browse plugin menu? Maybe you still have an old version there?

My patch doesn't change the plugin, it only alters the main application to call the plugin. So you need to put in the source from the first post in your apps/plugin directory and added the filename to the apps/plugin/SOURCES file?
Title: Re: new plugin: sncviewer
Post by: Janco on January 30, 2006, 04:22:34 PM
Great plugin!

However, it would be even nicer if it wouldn't be a plugin but part of the wps screen.

I could then define a lyrics line (or a couple of them) in the wps definition (new tag type). In case a lyrics file is present, it would show the current lyrics at the defined line(s). In case it's absent, it would show some other useful (or useless) information (also defined by a tag, like next song title, or, who knows, album art bitmap).

This would give us more flexibility: we wouldn't need to start a plugin all the time, and and we wouldn't have to remember for which songs we do and for which songs we don't have lyrics on our player.
Title: Re: new plugin: sncviewer
Post by: omedina on January 30, 2006, 05:29:32 PM
Can you give detailed indtructions on how to make it work? Please. I do not know how to program so please be as specific as you can.  THANK YOU for your time and effort
Title: Re: new plugin: sncviewer
Post by: Janco on January 30, 2006, 06:13:50 PM
Well, in fact it was a suggestion for the programmer of the plugin to improve things (at least for me). Without programming this definitely doesn't work. Some fairly profound C knowledge is indispensible. Sorry!
Title: Re: new plugin: sncviewer
Post by: (:@) on February 06, 2006, 07:59:40 AM
the plugin is updated.
i think this is the final version...
Title: Re: new plugin: sncviewer
Post by: roolku on February 06, 2006, 09:57:16 AM
the plugin is updated.
i think this is the final version...

Thank you very much. I was just thinking how good it would be to have basic edit facilities, for example when your lyrics file doesn't contain repeated chorus lines. On a related issue: Can you suggest a way to insert blank lines (e.g. for guitar solos)? Maybe if neither are nor b are set, play-hold could insert an empty line? That would make it even better.

A pity to hear that you think it is the final version. This thread is currently the main reason I keep checking the forums. ;)

I must admit I have been hacking away on your program a little to change it to my liking. For example I have written a new read_line function that wraps according to the screen width taking into account the width of the characters. I also convert non-utf8 files on the fly to utf-8 using the function iso_convert from the plugin api, so I don't have to mess with my lyrics files. And some other small things. If you want I can supply a patch, but it is all a little hackish.

Anyway. Thanks again. A very nice contribution to Rockbox.

Roolku

Title: Re: new plugin: sncviewer
Post by: (:@) on February 07, 2006, 03:12:40 AM
On a related issue: Can you suggest a way to insert blank lines (e.g. for guitar solos)? Maybe if neither are nor b are set, play-hold could insert an empty line? That would make it even better.
if you want to insert a blank line you have to set 'a' to a blank line and then copy it. if you don't have any blank lines then you can set 'a' to the first line (<Timetag Editor>) and copy it. I know it's not very handy.

I must admit I have been hacking away on your program a little to change it to my liking. For example I have written a new read_line function that wraps according to the screen width taking into account the width of the characters.
I also thought about that. But I didn't implement it, because I thought it will delay the init process without much benefit.

Can you post your version?

Title: Re: new plugin: sncviewer
Post by: roolku on February 07, 2006, 03:43:38 PM
Okay, I finally had time to play with this version and incorporate my changes. What can I say. It is so much fun to sync & display lyrics now. Don't know how I could have done without it. ;)

Just a few comments:

I think a short readme would be very beneficial to discover all the features. Some of them I only discovered reading the code - which probably not every user will do.

Why did you take out the light-switch? Very handy when you want to sync a few lyrics before going to sleep. :)

I removed all the splashes, as I didn't like how they obscure the lyrics.

if you want to insert a blank line you have to set 'a' to a blank line and then copy it. if you don't have any blank lines then you can set 'a' to the first line (<Timetag Editor>) and copy it. I know it's not very handy.

Yes, I figured that out. It is good enough for me. There are gowever a few quirks:

- you can't copy past the last line which is annoying when the last chorus is missing. The workaround is to copy it just before the last line and then copy the last line infront of that block and delete the old version.
- but! if you work from a saved snc file, the last line seems to include the ************** ?
- you can't mark a block that includes the last line
- saveing an anfinished snc file will put all the unsynced lines into the last block.

Quote
I must admit I have been hacking away on your program a little to change it to my liking. For example I have written a new read_line function that wraps according to the screen width taking into account the width of the characters.
I also thought about that. But I didn't implement it, because I thought it will delay the init process without much benefit.

Yes, I can understand. But in German we have some horribly long words so it wraps very often. I would like to fit as much on a line as I can. Also your method would occasionally result in lines that are too long. I don't think my method is very efficient nor flexible. I guess the best way would be to read the whole file in as one block (probably into the pluginbuffer). Then parse it once and store the time, a pointer to the start of the text and a pointer to the end of the text in the sncs structure. Now when a line is displayed, it will get wrapped to the required width (full width/with time/for remote). As the icing of the cake this wrapping (i.e. pointers to the break points) could be stored/cached in the sncs structure for faster re-display. Editing become now pure pointer manipulation (many pointer can point   to the same string.) For saving the text lines don't need to be re-assambled from the row array etc. Does this make sense? I am just not sure if it is worth the effort.

Quote
Can you post your version?

Sure. I have also attached a patch file against your latest version, so you can easily spot my changes. Most of them are not very elegant solutions, just quick hacks to make it work the way I want it. You'll probably hate it. ;)

Anyway. Maybe it gives you some ideas.

Thanks a lot for sharing this with us.

[attachment deleted by admin, too old]
Title: Re: new plugin: sncviewer
Post by: roolku on February 08, 2006, 12:07:58 PM
- if you work from a saved snc file, the last line seems to include the ************** ?
- saveing an a finished snc file will put all the unsynced lines into the last block.

Ah, I think this is something I broke with my changes.....

Maybe a unified load_xxxfile is on order that can read txt, snc and lrc files... Hopefully I have some time over the weekend.
Title: Re: new plugin: sncviewer
Post by: (:@) on February 09, 2006, 03:22:53 AM
Quote
- Why did you take out the light-switch?
I already implemented it outside the plugin. I don't need it twice.
Quote
- you can't mark a block that includes the last line
??? (it's possible for me)
Quote
- saveing an anfinished snc file will put all the unsynced lines into the last block.
yes, that's why I have to distinguish between txt and snc files.
txt: every line is a block
snc: one block has max. 7 lines (it starts from a timetag to another or until the end of the file)

as long as the the tagging is not finished the lyrics file should have the extension txt. I saw that you modified the saving function, so that the player saves the changes to a snc-file and your txt-file will still remain on your player. In my version the txt file will be overwritten every time the saving function is called and if every block has a tag the file will automatically renamed to snc. so it's not possible to have an unfinished snc file.
Quote
I guess the best way would be to read the whole file in as one block (probably into the pluginbuffer). Then parse it once and store the time, a pointer to the start of the text and a pointer to the end of the text in the sncs structure. Now when a line is displayed, it will get wrapped to the required width (full width/with time/for remote). As the icing of the cake this wrapping (i.e. pointers to the break points) could be stored/cached in the sncs structure for faster re-display. Editing become now pure pointer manipulation (many pointer can point   to the same string.) For saving the text lines don't need to be re-assambled from the row array etc. Does this make sense? I am just not sure if it is worth the effort.
sounds great, but the only drawback I see is, you have to copy the parts everytime before displaying them, due to the missing terminating zeros.
Title: Re: new plugin: sncviewer
Post by: roolku on February 09, 2006, 05:25:31 AM
Quote
- Why did you take out the light-switch?
I already implemented it outside the plugin. I don't need it twice.

Fair enough. Maybe I should do this as well.

Quote
Quote
- you can't mark a block that includes the last line
??? (it's possible for me)

I just tried again with your original version. The line that you mark with the b marker is not included in the block for copying/deleting. And since you can't move behind the last line there is no way to include the last line in the a-b block. You can copy/delete the last line by itself by just using the a marker, but not as part of a block.

Quote
Quote
- saveing an anfinished snc file will put all the unsynced lines into the last block.
yes, that's why I have to distinguish between txt and snc files.
txt: every line is a block
snc: one block has max. 7 lines (it starts from a timetag to another or until the end of the file)

as long as the the tagging is not finished the lyrics file should have the extension txt. I saw that you modified the saving function, so that the player saves the changes to a snc-file and your txt-file will still remain on your player. In my version the txt file will be overwritten every time the saving function is called and if every block has a tag the file will automatically renamed to snc. so it's not possible to have an unfinished snc file.

Okay I didn't understand this. Better change it back to your version then.

Cheers

EDIT:

I  found another small glitch. If the first line doesn't start at: 0:00, it will normally sit in the waiting position until its time comes. However, if you press a key (e.g. volume) it will display in the active position prematurely.
Title: Re: new plugin: sncviewer
Post by: carmenm on February 12, 2006, 02:53:53 PM
Would it be possible for this plugin to be able to read lrc and lrc8 files??? there is no big difference between snc files and lrc files.
Title: Re: new plugin: sncviewer
Post by: (:@) on February 13, 2006, 05:06:58 AM
new update
contains only bugfixes (thanks to roolku)

Quote
I  found another small glitch. If the first line doesn't start at: 0:00, it will normally sit in the waiting position until its time comes. However, if you press a key (e.g. volume) it will display in the active position prematurely.
fixed

Would it be possible for this plugin to be able to read lrc and lrc8 files??? there is no big difference between snc files and lrc files.

no, I won't implement lrc support. maybe someone else have the time to do it.
Title: Re: new plugin: sncviewer
Post by: roolku on February 17, 2006, 08:43:31 AM
I thought I would share my modifications to this wonderful plugin. Basically I have tailored the editing mode to my preference and now syncing lyrics is a breeze. :)

If no a-b markers are set the keys are as follows:

play - insert empty line at current position
stop - delete current line
rec - merge current with next line (useful if next line contains just a single word)
up/down - scrolls through lyrics
select - set time stamp for current line
right - seek music to current position
left - leave edit mode

hold-rec - save lyrics file
hold-select - time shift lyrics
hold-stop - quit

When A marker is set it becomes

play - insert marked line at curren position
stop - delete marked line

And when A&B marker are set it becomes

play - insert marked block at curren position
stop - delete marked block
hold-select - time shift lyrics marked block

Maybe it is useful to someone else...

[attachment deleted by admin, too old]
Title: Re: new plugin: sncviewer
Post by: loveclaire on February 18, 2006, 02:08:46 AM
- "buffer has not enough rows" -> to increase the buffer you have to modify BUFFERSIZE and MAX_ROWS


how?
Title: Re: new plugin: sncviewer
Post by: roolku on February 18, 2006, 07:44:48 AM
- "buffer has not enough rows" -> to increase the buffer you have to modify BUFFERSIZE and MAX_ROWS

This shouldn'r really happen with a sensible snc file. Check how much text is between the timestamps. Chances are it won't fit on the screen anyway if the buffer overflows. Also check for empty lines at the end of the file.
Title: Re: new plugin: sncviewer
Post by: Assimalyst on February 21, 2006, 12:03:06 PM
- "buffer has not enough rows" -> to increase the buffer you have to modify BUFFERSIZE and MAX_ROWS


how?

I was just having this problem apparently because i was saving the file as a .txt then simply renaming it to .snc

Using iLyrics go to File -> Export Text, then save as a .snc, re-load the file onto your player and it should work, at least it did for me.  ;D

HTH
Title: Re: new plugin: sncviewer
Post by: PAL on February 21, 2006, 04:40:19 PM
Can I find anywhere some documentation about this plugin? I tried to edit some lyrics but so far didn't find out how to do it.

Great plugin, by the way!
Title: Re: new plugin: sncviewer
Post by: R-power on February 23, 2006, 09:42:46 PM
Wonderful job,
in my opinion.

A question.
This plugin will only work with an additional file.

Cuold not read lyrics from mp3 file,
like original iriver firmware works with LDB manager (from iriver korean website, or mediamonkey plugin)?

And also,
it could be possible in your opinion
build a WPS that reads also lyrics ???

thanks
ivo
Title: Re: new plugin: sncviewer
Post by: (:@) on February 24, 2006, 04:16:37 AM
Can I find anywhere some documentation about this plugin? I tried to edit some lyrics but so far didn't find out how to do it.
a small documentation is now included (first page: sncviewer.txt)

A question.
This plugin will only work with an additional file.

Cuold not read lyrics from mp3 file,
like original iriver firmware works with LDB manager (from iriver korean website, or mediamonkey plugin)?
yes, it can only read from a file.

Quote
And also,
it could be possible in your opinion
build a WPS that reads also lyrics ???
yes it's possible, but you have to ask the guys who are responsible for the wps to integrate something like this.
Title: Re: new plugin: sncviewer
Post by: carmenm on February 28, 2006, 06:28:12 PM
tomorrow i am gonna try to update the plugin in order for it to be able to play also lrc8 files. I was wondering, should i make something like:
if ( exist lrc8 file) ....
else if (exist snc file) ...

or should i do like a "different" version of the plugin that reads only lrc8 files???

If i choose the first option i think about using a bool to know in witch cas i am so that store_section and is_time_tag know what to do
What do you t=hink about that???
Title: Re: new plugin: sncviewer
Post by: roolku on March 01, 2006, 06:12:03 AM
tomorrow i am gonna try to update the plugin in order for it to be able to play also lrc8 files. I was wondering, should i make something like:
if ( exist lrc8 file) ....
else if (exist snc file) ...

That is how I do it. It tries several formats (including ID3 tags) until it finds the lyrics. It is however still work in progress. (so many formats, so little time). It

Quote
or should i do like a "different" version of the plugin that reads only lrc8 files???

Do you have an official spec for the format? I have come accross various flavours of the lrc format which I try to support, but it would be good to see what it is supposed to be like.

Quote
If i choose the first option i think about using a bool to know in witch cas i am so that store_section and is_time_tag know what to do
What do you t=hink about that???

It is probably sufficient if you want to support just another format (similarely how txt was added later).

Title: Re: new plugin: sncviewer
Post by: carmenm on March 01, 2006, 06:36:14 AM
ok seems to be done but cant compil it at work
So if you want roolku, here is the file .
Just changed load_sncfile, store_section and timetag
in store section the real difference is that each lyrics is on a line so dont need the while yet i kept it to prevent from reading the comments
Here is a file example
[ti:Soul Meets Body]
[ar:Death Cab For Cutie]
[al:Plans]
[by:zwj]
[00:00.00]Soul Meets Body  ---- Death Cab For Cutie      By  Ale


[00:12.85]I want to live where soul meets body
[00:22.84]And let the sun wrap its arms around me

[attachment deleted by admin, too old]
Title: Re: new plugin: sncviewer
Post by: (:@) on March 01, 2006, 09:46:32 AM
the plugin is updated again
Title: Re: new plugin: sncviewer
Post by: carmenm on March 04, 2006, 04:48:26 PM
Just realized that lrc format is more complexed than i thought. i manage to read line like
[00:12.85]I want to live where soul meets body

but the problem is that in fact in lrc format you have lines like
[00:10.46][01:19.26][01:27.87][02:28.71][02:37.51][02:46.15][02:54.78][03:29.59]Nothing's Impossible

which means taht "Nothing's Impossible" is the lyrics for all those time tags. My problem is thaht i dont know how to put them in the right order. Does your plugin need the lyrics to be in the right order???
Title: Re: new plugin: sncviewer
Post by: (:@) on March 06, 2006, 05:09:11 AM
Just realized that lrc format is more complexed than i thought. i manage to read line like
[00:12.85]I want to live where soul meets body

but the problem is that in fact in lrc format you have lines like
[00:10.46][01:19.26][01:27.87][02:28.71][02:37.51][02:46.15][02:54.78][03:29.59]Nothing's Impossible

which means taht "Nothing's Impossible" is the lyrics for all those time tags. My problem is thaht i dont know how to put them in the right order. Does your plugin need the lyrics to be in the right order???
yes, they have to be in the right order. you have to sort them according to the time.
Title: Re: new plugin: sncviewer
Post by: carmenm on March 08, 2006, 05:37:07 AM
Ok so i tried to implement it, i am almost there. But yet i am on the same problem for so many hours now.... i need some help. A lrc file is made so that on a line you can have multiple timetags for one lyric
Code: [Select]
[02:37.01][02:44.31]Where soul meets bodySo i had to put all the lyrics in a list, then to order them and finally to put them on list of lyrics sncs.
here is the code for the temp list before ordering
Code: [Select]
while((len = rb->read_line(fd, buf, BUFFERSIZE))>0)
{
buffer=buf;
j=0;
while (((is_time_tag =timetag(buffer,&temp.time_in_ms))==true) && (nrLRC <= MAX_SECTIONS) )
{
j++;
buffer=&buffer[10];

}
for(i=0;i<j;i++)
{
lrcs[nrLRC].time_in_ms=temp.time_in_ms;
lrcs[nrLRC].lyrics=buffer;
nrLRC++;

}
}
in the for i put all the lyrics which were on the same line. inthe for, if i rb->splash(HZ>>1,true, lrcs[nrLRC].lyrics); everything is ok.
but my problem is that just after that i want to order it and even before doing it, all the lyrics are wrong, in fact they contains the last lyric. So i think there must be a problem in the for above, may be when i change one i change all the others(that would explain yet if i splash it "seems" ok).  I am not sure and i spent all night on that so i would need some help. I think that i am almost there ... just one step.... :-\

Here is the file if someone wants to look at it




[attachment deleted by admin, too old]
Title: Re: new plugin: sncviewer
Post by: (:@) on March 08, 2006, 09:57:36 AM
lyrics:
- rb->read_line(fd, buf, BUFFERSIZE)): the buffer "buf" will be overwritten after every line; lrcs[].lyrics will point to a position in buf, but after reading the file, buf contains the last line and all your lrcs[].lyrics will point to a position in buf (the last line)

time:
- temp.time_in_ms will be overwritten every time timetag(buffer,&temp.time_in_ms)) is called.
lrcs[nrLRC].time_in_ms=temp.time_in_ms;// will only save the last time, even if you have more than one:
[00:00.00]                      lrcs[0].time_in_ms=0
[02:37.01][02:44.31]     lrcs[1].time_in_ms=02:44.31,lrcs[2].time_in_ms=02:44.31
[03:00.00]                      lrcs[1].time_in_ms=03:00.00

do you understand what I mean?
Title: Re: new plugin: sncviewer
Post by: carmenm on March 08, 2006, 10:06:46 AM
Yeah i understand quite well what you mean, but i am a little lost under c. I am used to develop under c++ where i can do new . Here i cant. How can i not point to buf but copy the content to lrcs[].lyrics ? I think that the only real problem i encounter to finish it

OUps!!!!And for time your right i tried to change my code to optimized but i made that quite big mistake...
Code: [Select]
while((len = rb->read_line(fd, buf, BUFFERSIZE))>0)
{
buffer=buf;
                j=nrLRC;
if ((is_time_tag = timetag(buffer,&(lrcs[nrLRC].time_in_ms))==true) )
{
nrLRC++;
buffer=&buffer[10];
while ((is_time_tag =timetag(buffer,&(lrcs[nrLRC].time_in_ms))==true) &&nrLRC <= MAX_SECTIONS )
{
nrLRC++;
buffer=&buffer[10];
}
i=0;
  for(i=j;i<nrLRC;i++)
lrcs[i].lyrics=buffer;
}
}
that way the time is right but i still always copy the same value for the lyric
Title: Re: new plugin: sncviewer
Post by: (:@) on March 08, 2006, 10:47:13 AM
How can i not point to buf but copy the content to lrcs[].lyrics ?
I use rb->plugin_get_buffer() to get the memory. you can use strcpy/memcpy to copy from buf to rb->plugin_get_buffer() or directly save to rb->plugin_get_buffer(). let the lrcs[].lyrics point to rb->plugin_get_buffer().
Title: Re: new plugin: sncviewer
Post by: carmenm on March 08, 2006, 10:57:50 AM
(sorry to keep on asking, but it saves me a lot of time...)
Code: [Select]
while((len = rb->read_line(fd, buf, BUFFERSIZE))>0)
{
rb->memcpy(buffer,buf,len);
                j=nrLRC;
if ((is_time_tag = timetag(buffer,&(lrcs[nrLRC].time_in_ms))==true) )
{
nrLRC++;
buffer=&buffer[10];
while ((is_time_tag =timetag(buffer,&(lrcs[nrLRC].time_in_ms))==true) &&nrLRC <= MAX_SECTIONS )
{
nrLRC++;
buffer=&buffer[10];
}
i=0;
  for(i=j;i<nrLRC;i++)
lrcs[i].lyrics=buffer;
}
}

there i use memcpy to copy buf into buffer. But when i do lrcs[].lyrics=buffer;, does all lrcs[].lyrics points to the same "buffer" or is buffer copied into lrcs[].lyrics???
Title: Re: new plugin: sncviewer
Post by: pabouk on March 09, 2006, 04:01:03 AM
Code: [Select]
lrcs[].lyrics=buffer;Just the pointer is copied. So it points to the same "buffer".
Title: Re: new plugin: sncviewer
Post by: carmenm on March 09, 2006, 04:11:27 AM
Ok i am almost done. I get the lyrics, i order them, they almost display ok. It seems that i have a problem with the first and the last lyric, there are mixed up. But i have an idea why, i am gonna test it tonight. It seems also that the list of lyrics is not well reset when changing track while in the plugin, it may come from the same problem.
Title: Re: new plugin: sncviewer
Post by: carmenm on March 09, 2006, 04:11:47 PM
Damn, i am stuck, i have a problem with the first and last lyrics. I read the file right but when i copy it to the list of lyrics, it goes wrong. I dont know why but the last lyric is empty(or i should say full of ******) and a part of it is in the first and second lyric. The first lyric appears nowhere.
I should add that all the times tags appear good, just those lyrics are messed up. All the others are ok.

If someone could help it would be great, i am begining to be desesperated...

Here is the file with lyric file

[attachment deleted by admin, too old]
Title: Re: new plugin: sncviewer
Post by: carmenm on March 17, 2006, 08:33:51 AM
Thank you a lot (:@)!

hope what i did helped you even a little...
Title: Re: new plugin: sncviewer
Post by: lenny on March 24, 2006, 06:14:36 PM
I thought I'd try this out but when I copied the .rock file into my rocks directory, I got "Incompatible version." I'm running a cvs build from yesterday.
Title: Re: new plugin: sncviewer
Post by: Ton on March 26, 2006, 04:03:51 PM
I wonder if I am doing something wrong.
I copied a lyrics text file in the music folder in my H120 and gave it the same name as the music file. Then I played the music file and opened the text file.
However when I hit the Rec. button, I only see the message "chop words" . Holding the Rec. button doesn't do anything.
What am I doing wrong if so ?
Title: Re: new plugin: sncviewer
Post by: (:@) on March 27, 2006, 02:52:15 AM
I wonder if I am doing something wrong.
I copied a lyrics text file in the music folder in my H120 and gave it the same name as the music file. Then I played the music file and opened the text file.
However when I hit the Rec. button, I only see the message "chop words" . Holding the Rec. button doesn't do anything.
What am I doing wrong if so ?
you have to load the sncviewer instead of the viewer. to tag a lyrics file (.txt):
- load sncviewer
- load txt file (select button)
Title: Re: new plugin: sncviewer
Post by: carmenm on March 30, 2006, 04:38:12 AM
Would it be possible to change the current lyric color to be the foreground color because i have a black background and so i never see the first lyric?
Title: Re: new plugin: sncviewer
Post by: (:@) on April 04, 2006, 04:20:20 AM
the plugin is updated!

bugfixes, ...

Would it be possible to change the current lyric color to be the foreground color because i have a black background and so i never see the first lyric?
use lcd_set_foreground() to set the foreground color, but how did you get a black background?
Title: Re: new plugin: sncviewer
Post by: carmenm on April 04, 2006, 04:27:09 AM
i have a black background by usiing the change background color under the LCD menu.
I use KOSH build, but i thought that color settings was in the cvs for long now.
But i will change with lcd_set_foreground()

Thanks
Title: blank screen...?
Post by: simi72 on April 05, 2006, 04:40:07 PM
Feeling a bit stupid...
I downloaded sncviewer.rock.300.doc copied it to my rocks folder and renamed it to sncviewer.rock
If I run it in play mode, I get a white screen, and the player hangs. (in stop mode , it tells me to use in play mode)
Did I miss something?
Thanks!
Simon
Title: Re: new plugin: sncviewer
Post by: lenny on April 06, 2006, 04:35:41 AM
well even though nobody offered to help me ::), I just came back to say I tried the updated version and it works great ;D
Title: Re: blank screen...?
Post by: (:@) on April 06, 2006, 07:14:27 AM
If I run it in play mode, I get a white screen, and the player hangs. (in stop mode , it tells me to use in play mode)

I think your lyrics file have a wrong format. can you post your lyrics file, so I can check it?
Title: Re: new plugin: sncviewer
Post by: BillyGates on April 18, 2006, 06:30:35 PM
Any chance this plug-in can work with a 5G Video iPod?

Looks awesome!  Just wish I could use it... :(
Title: Re: new plugin: sncviewer
Post by: (:@) on April 19, 2006, 10:41:38 AM
Any chance this plug-in can work with a 5G Video iPod?

yes, i will implement it asap
Title: Re: new plugin: sncviewer
Post by: BillyGates on April 19, 2006, 11:52:37 AM
Wow cool, thanks!!!  ;D
Title: Re: new plugin: sncviewer
Post by: (:@) on April 20, 2006, 02:30:19 AM
the plugin is updated!
(key mapping for the ipod and other changes)

to BillyGates:
key mapping for the ipod is described in sncviewer.txt (last section)

[attachment deleted by admin, too old]
Title: Re: new plugin: sncviewer
Post by: BillyGates on April 20, 2006, 01:07:32 PM
Wow!  Gotta love Open Source!  It will be years before Apple does this!

Thanks!  ;D
Title: Re: new plugin: sncviewer
Post by: (:@) on April 24, 2006, 02:48:55 AM
the plugin is updated!

the last version has severe bug, which could lead to an endless loop.
Title: Re: new plugin: sncviewer
Post by: carmenm on April 24, 2006, 03:05:11 AM
(:@), could you change the color of the current lyric to be the foreground color instead of being black. This would be juste great :)
Title: Re: new plugin: sncviewer
Post by: (:@) on April 24, 2006, 04:13:14 AM
(:@), could you change the color of the current lyric to be the foreground color instead of being black. This would be juste great :)

you can remove every line with rb->lcd_set_foreground (3 times) and rb->lcd_set_background (1 time) in the source code.
Title: Re: new plugin: sncviewer
Post by: carmenm on April 24, 2006, 04:17:54 AM
You dont want to do it in your version? Cause here i have to do it each time you release a new version.
Title: Re: new plugin: sncviewer
Post by: (:@) on April 25, 2006, 01:51:27 AM
I've changed the set foreground color behaviour:
the plugin won't changed the foreground color if the foreground and the background don't have the default values.
Title: Re: new plugin: sncviewer
Post by: carmenm on April 25, 2006, 02:52:33 AM
great thanks a lot (:@) :)
Title: Re: new plugin: sncviewer
Post by: c0rrupted on April 25, 2006, 03:00:52 AM
great plugin!!!!! is there anywhere esle to get .snc files as i noticed the link poasted earlier in this thread is outdated??
Title: Re: new plugin: sncviewer
Post by: carmenm on April 25, 2006, 03:05:37 AM
for snc files you could use foobar 0.83 with foo_lyrics. It automatly download snc files. Otherwise there is mini lyrics which works with most audio software. It also download lyrics automaticly on the web.
Title: Re: new plugin: sncviewer
Post by: c0rrupted on April 25, 2006, 03:17:46 AM
hey thanks, would u know where i could download both those programs and foo_lyrics
Title: Re: new plugin: sncviewer
Post by: carmenm on April 25, 2006, 03:25:41 AM
this is the site of foobar http://www.foobar2000.org/ (http://www.foobar2000.org/) BUT the actual version is 0.91 and not all the old plugins will work with it especially foo_lyrics.
Be careful foobar is a player for customisation, it could take you quite a long time to make it work like you want, but after its SOOOOO powerfull!!! :p
So if you want to use foo_lyrics(which can download and display lyrics IN foobar, you ll have to find foobar2000 0.83 which should not be too difficult. foo_lyrics can be found here :
http://pelit.koillismaa.fi/plugins/search.php?allsearch=lyrics (http://pelit.koillismaa.fi/plugins/search.php?allsearch=lyrics)

Second choice, you want to use foobar2000 0.91 and then you will have to use mini lyrics :
http://www.mycnknow.com/ (http://www.mycnknow.com/)

Last choice, use the player you want with mini lyrics ;)

Hope you ll all you need
Title: Re: new plugin: sncviewer
Post by: c0rrupted on April 25, 2006, 04:07:52 AM
thanks again, im downloading the older version of foobar but i when i goto download foo_lyrics i get page not found, if u have the file could you send it to me @ tsamuels@hello.net.au
Title: Re: new plugin: sncviewer
Post by: c0rrupted on April 25, 2006, 10:20:53 PM
i downloaded "mini lyrics magic" but when i goto install it i get an error saying "windows CE services not found on this computer, setup cannot continue and will now exit" so i tryed looking on there site for different version but that is all i could find

Edit: downloaded wrong program, im downloading this one(http://www.philocode.com/minilyrics/release.htm) now which i think is the right one
Title: Re: new plugin: sncviewer
Post by: da_ul on August 09, 2006, 12:42:23 PM
Hello,

is there already an iaudio x5 version of the sncviewer?

Uli
Title: Re: new plugin: sncviewer
Post by: roolku on August 15, 2006, 06:46:52 AM
Thanks for maintaining this plugin. Much appreciated. Could I just report a small bug in tt2int that breaks the [00:00]Lyrics format. If the lyrics contain a '.' character the timestamp will not be read correctly. I fixed it as below, but there might be better ways of doing it....

Code: [Select]
bool tt2int(unsigned char** buffer, int* number, char end_char){
  unsigned char* start=*buffer;
  bool ok;
  while((ok=**buffer!=0)==true && *(*buffer)++!=end_char);
  int size=*buffer-start-1;
  if(ok && size<=3){
    char xx[size+1];
    xx[size]=0; 
    rb->memcpy(xx,start,size);
    *number=rb->atoi(xx);
    return true;
  } else  {
    *buffer=start; 
    return false;
  } 
}

Cheers
  Robert
Title: Re: new plugin: sncviewer
Post by: paulheu on August 22, 2006, 08:31:03 AM
For the current version to work with the album art patch (and required bmp resize patch) change line 565 from:

path, &bm, size, FORMAT_ANY))<0 && ++i<max);

to

path, &bm, size, FORMAT_ANY, LCD_HEIGHT, LCD_WIDTH))<0 && ++i<max);
Title: Re: new plugin: sncviewer
Post by: deadlysyphen on August 24, 2006, 12:41:26 AM
I've gotten "Minilyrics" to work, but I keep getting bad versions of songs (either they end early, or the lyrics are cleary wrong). Anyone know a nice archive of "clean" lyrics (the type not contributed by users who just write random words while listening)?

& one more thing, just wondering, how do you guys use this plugin considering that the lcd backlight goes off every few seconds? Do you change the backlight off time, do you set it so that when you set it to hold the backlight goes on forever, or what?

Is there a plugin setting that keeps the lcd backlight on if there are lyrics? Or if there isn't any, can you please add one  ;D
Title: Re: new plugin: sncviewer
Post by: paulheu on August 24, 2006, 02:37:34 PM
I did a small patch that will add the oprion to keep backlight on when running a plugin..

http://www.rockbox.org/tracker/task/4988
Title: Re: new plugin: sncviewer
Post by: deadlysyphen on August 24, 2006, 09:08:16 PM
Ooh, nice to hear about the patch..

nvm, figured it out
Title: Re: new plugin: sncviewer
Post by: BigMac on September 02, 2006, 09:29:56 PM
I can't find any snc files anywere....Can someone tell me how to make some or a place were i can dl them?
Keep ROCKing On!
Title: Re: new plugin: sncviewer
Post by: iPodFoo on September 03, 2006, 11:41:24 AM
I realise the it might be a bit difficult to read, but is there going to be one for the Nano? It says "unsupported model" when I try running it.

Cheers.
Title: Re: new plugin: sncviewer
Post by: (:@) on September 04, 2006, 07:09:50 AM

I can find no snc files anywere....Can someone tell me how to make some or a place were i can dl them?
Keep ROCKing On!

how to make snc: you can make it with ilyrics pro

why don't you use lrc? there are more sources to download lrc files and you can also make them with the plugin.
Title: Re: new plugin: sncviewer
Post by: (:@) on September 06, 2006, 07:23:45 AM
small update:
- changed: keymapping (problem with play hold for iriver 1xx/3xx)


I realise the it might be a bit difficult to read, but is there going to be one for the Nano? It says "unsupported model" when I try running it.

Cheers.

luckily the keymapping for the nano is the same as for other ipods.


[attachment deleted by admin, too old]
Title: Re: new plugin: sncviewer
Post by: iPodFoo on September 17, 2006, 04:29:50 PM
massive repect  ;D
Title: Re: new plugin: sncviewer
Post by: Kisswert on September 22, 2006, 01:55:44 PM
Hi !

I've tried to install this plugin, but i've get an "unsupported model" error.

I don't understand why, because i put the plugin for my 5g iPod into the plugin "rocks" folder.

If you can help me, it would be graceful !

Thanks
Title: Re: new plugin: sncviewer
Post by: (:@) on September 26, 2006, 07:58:57 AM
update 26.9.2006
- changed: lyrics centered, time position, ..
Title: Re: new plugin: sncviewer
Post by: mmmoose on October 09, 2006, 08:30:54 PM
Hi,
This plugin looks great, I've been experimenting with .lrc files recently.  I have an iriver H120; where is the version for this?  The only one in the first post seems to be for the ipod video and gives me an "incompatible model" error.

Thanks in advance. :)

Edit: Instructions on how to compile it myself from the .c file would also be helpful.
Title: Re: new plugin: sncviewer
Post by: roolku on October 11, 2006, 08:48:23 AM

Edit: Instructions on how to compile it myself from the .c file would also be helpful.


If you have already set up the development environment and can compile rockbox, all you need to do is copy the sncviewer.c file to the /apps/plugins directory and add the line

sncviewer.c

to the top of the /apps/plugins/SOURCES file.

Distributing compiled binaries is a problem as they tend to go out of date quickly with changes to the API.
Title: Re: new plugin: sncviewer
Post by: mmmoose on November 08, 2006, 09:51:05 PM
Thanks for the help.  Don't worry, I got it working a month ago, not now.  It's just a belated reply. ;D

The lyrics themselves work great!  There's one small problem, though (I kept procrastinating on bringing this up, heh).  Where does the plugin read the song artist, song title, and next track info from?  I have Unicode (UTF-16) tags in Japanese, and Japanese filenames, as well (filenames made in Windows XP).  Rockbox and the iriver firmwares both read them correctly, but when I start the sncviewer plugin, the song artist/title info and the next track info show up garbled.  Any idea what the problem could be?
Title: Re: new plugin: sncviewer
Post by: (:@) on November 09, 2006, 04:20:19 AM
the system font (rockbox_default.fnt) doesn't contain any asian character, therefore next track only shows placeholders for the japanese characters.

what i don't understand, is that artist/title from the current track are garbled. the plugin gets the artist, title and next track information from the rockbox plugin interface (audio_current_track, audio_next_track).
Title: Re: new plugin: sncviewer
Post by: mmmoose on November 09, 2006, 07:11:10 AM
The current track has the same placeholders as next track, so I assume that's defaulting back to the system font as well.  Is there any way to change/set the font for those?
Title: Re: new plugin: sncviewer
Post by: (:@) on November 09, 2006, 08:17:06 AM
the plugin should display:
statusbar, timebar, next : system font
artist/title and lyrics: same font as wps

can you post a snapshot of your display?
Title: Re: new plugin: sncviewer
Post by: mmmoose on November 11, 2006, 11:36:25 AM
Sorry, there seems to be some confusion on my part.  A clarification:
I have an H140.  The Japanese artist and song titles displays fine on the main unit itself.  It's on the remote that it comes out garbled.  The remote doesn't show the next song, though; that only shows up on the main unit, and that's where that comes out garbled.
Title: Re: new plugin: sncviewer
Post by: bixiba on December 18, 2006, 04:45:11 AM
Hi

Is this plugin working with an Ipod photo 4G?

I have an 'incompatible model" error.

Thanks
Title: Re: new plugin: sncviewer
Post by: (:@) on December 18, 2006, 06:10:14 AM
i've uploaded a binary version for the ipod 4g on the first page. you can try it out.
but it's always better to build it yourself:



If you have already set up the development environment and can compile rockbox, all you need to do is copy the sncviewer.c file to the /apps/plugins directory and add the line

sncviewer.c

to the top of the /apps/plugins/SOURCES file.

Distributing compiled binaries is a problem as they tend to go out of date quickly with changes to the API.

Title: Re: new plugin: sncviewer
Post by: bixiba on December 18, 2006, 11:16:04 PM
Hum the 4g version doesn't work :(

I will try to setup the development tool and compilate myself

But if I compilate myself, what difference will it do? this will be working for sure ?

Thanks
Title: Re: new plugin: sncviewer
Post by: iwantanimac on December 26, 2006, 07:21:27 AM
I find the keymap for the iriver H10 to be a bit confusing and counterintuitive. Ill see if i can think of some way of making it better with the limited buttons available...

Other than that, it's a great plugin.
Title: Re: sncviewer plugin
Post by: Soader03 on December 29, 2006, 10:06:57 PM
Did anyone tried this on the Gigabeat F? If yes, where to download it?

Thanks
Title: Re: sncviewer plugin
Post by: (:@) on January 28, 2007, 07:03:10 AM
update 27.1.2007
- added: turn off/on backlight (unplugged)
- added: settings saved (backlight, album art on/off)
- changed: show album art and lyrics (see picture below)

[attachment deleted by admin, too old]
Title: Re: sncviewer plugin
Post by: ColdSphinx on February 13, 2007, 10:21:48 AM
newest sncviewer for the x5:
Download: iAudio x5 - sncviewer.rock (http://mitglied.lycos.de/djflib/rockbox/.rocks.dir/sncviewer.rock) (Save As...)
Title: Re: sncviewer plugin
Post by: Mega on February 23, 2007, 11:00:25 AM
Does this plug-in work on a ipod mini 1G?
Title: Re: sncviewer plugin
Post by: GodEater on February 23, 2007, 11:03:12 AM
Why wouldn't it ?
Title: Re: sncviewer plugin
Post by: Mega on February 23, 2007, 03:31:25 PM
I tried to compile it and there is this error :

(http://img267.imageshack.us/img267/6955/errorku0.th.png) (http://img267.imageshack.us/my.php?image=errorku0.png)
Title: Re: sncviewer plugin
Post by: (:@) on February 23, 2007, 04:19:48 PM
the api has changed. i have updated the file. you can download it from the first page and compile it again. it should work now.
Title: Re: sncviewer plugin
Post by: Mega on February 24, 2007, 09:40:40 AM
It works now.

But there is no volume control when the plug-in is active.
Title: Re: sncviewer plugin
Post by: (:@) on February 24, 2007, 10:42:22 AM
use the scroll wheel to change the volume. turn left to decrease and turn right increase the volume (see sncviewer.txt). if this doesn't work, please make a report again.
Title: Re: sncviewer plugin
Post by: Mega on February 24, 2007, 10:48:20 AM
The scroll wheel didn't anything : no change of volume and no scroll in editor mode.


I switched the code of ACTION_REC_REL: and ACTION_DOWN_REL: in handle_button_scroll.

Menu => vol+1 ok
Scroll up => no backlight
Title: Re: sncviewer plugin
Post by: (:@) on February 24, 2007, 11:43:55 AM

I switched the code of ACTION_REC_REL: and ACTION_DOWN_REL: in handle_button_scroll.

Menu => vol+1 ok
Scroll up => no backlight

=> indicates that the button and functions are o.k.
that's very weird. the volume control also works in the simulator.

I removed the prebutton condition. Please download the newest version from the first page and try it out.
Title: Re: sncviewer plugin
Post by: Mega on February 24, 2007, 12:39:29 PM
No change.

I have tested the plug-ins brickmania & plasma and the scroll work so the api aren't the problem.
Title: Re: sncviewer plugin
Post by: (:@) on February 24, 2007, 04:02:16 PM
next try:
only BUTTON_SCROLL_FWD/BACK without BUTTON_REL

hope this works now, otherwise I don't know what it could be.
Title: Re: sncviewer plugin
Post by: Mega on February 25, 2007, 07:39:08 AM
It works.
Title: Re: sncviewer plugin
Post by: (:@) on March 09, 2007, 02:59:00 PM
update 9.3.2007
- added: display peakmeter if no lyrics can be found
- fixed: compile error due to new rockbox api (the plugin won't remember the last selected menu position, but at least it's compilable)
Title: Re: sncviewer plugin
Post by: shadowrazor on March 13, 2007, 07:13:51 PM
[(http://img402.imageshack.us/img402/8284/errorud0.jpg) (http://imageshack.us)


I'm also getting an error, after i do "make"

Could someone upload the rock? It would be easier for many people
Title: Re: sncviewer plugin
Post by: (:@) on March 14, 2007, 02:03:28 AM

I'm also getting an error, after i do "make"

Your error is caused by settings_list.c. It has nothing to do with the sncviewer.
Maybe a clean and rebuild could help if you didn't apply any patches.


Could someone upload the rock? It would be easier for many people

Every player has a different rock file. Which player do you have?
Title: Re: sncviewer plugin
Post by: shadowrazor on March 14, 2007, 06:23:38 PM
Hm, that's weird, I didn't change anything in that file, the only file I changed was the "sources" file to add it to the list. I started a new one, even without the patch I get the error  ???

I'm having an Ipod Nano

Greets
Title: Re: sncviewer plugin
Post by: scorche on March 15, 2007, 04:36:08 AM
Shadowrazor's error is caused by not having an up-to-date (I assume he is building for an iPod) arm-elf-gcc.  You need 4.0.3
Title: Re: sncviewer plugin
Post by: shadowrazor on March 15, 2007, 06:41:39 PM
Thx for compiling it!

But after the tip of scorche, I could compile myself :)

Greetings an thanks for help scorche and (:@)
Title: Re: sncviewer plugin
Post by: (:@) on March 17, 2007, 09:00:41 AM
update 17.3.2007
- changed: replace old with the new menu api
- fixed: splash calls according to api changes
Title: Re: sncviewer plugin
Post by: nohitter151 on March 29, 2007, 08:12:26 PM
I hate to be a pest, but I'd really like to use this plugin for my ipod mini 2nd gen.  I have no idea how to compile or anything... maybe if someone could put this into a .rock file I could install it. Could anyone help me out?
Title: Re: sncviewer plugin
Post by: nohitter151 on April 02, 2007, 09:40:05 PM
Sorry for the double post.  Just wanted to say that support for id3v2 sylt tags would be awesome.  Managing music is hard enough, managing the lyrics on top of that becomes a real hassle. 

Still, great work!  I love what you've done and this should certainly be included in all builds of Rockbox!!
Title: Re: sncviewer plugin
Post by: (:@) on April 03, 2007, 05:32:48 AM
some reasons why I don't want to implement this feature:
- no standardized format/tag for storing synchronized lyrics in an audio file
- different file formats (ogg, mp3,...) have different tags
- no specifications

- have to scan through the audio file to find the specific tag
- just blow up the code with no additional functionality
- effort >> benefit
- ...
Title: Re: sncviewer plugin
Post by: nohitter151 on April 03, 2007, 12:41:28 PM
There is a standard tag, at least for mp3's as seen here:

http://www.id3.org/id3v2.3.0#head-792dcad788fe1b8bcd7f9d7e9eec7549e1864546

I realize that it wouldn't work with other filetypes, I guess I'm just being selfish because I already have all of my music stored as mp3's and all of them have synchronized lyrics in the tag courtesy of the program MiniLyrics (www.crintsoft.com).
Title: Re: sncviewer plugin
Post by: (:@) on April 30, 2007, 02:16:08 AM
update 4.2007
- added: support for id3v2 SYLT embedded in a mp3 file
Title: Re: sncviewer plugin
Post by: bluefish on May 11, 2007, 06:56:41 PM
Does anyone out there have a currently compiled build for the toshiba gigabeat that includes sncviewer.  It seems I am not very good at compiling.  
Title: Re: sncviewer plugin
Post by: Llorean on May 13, 2007, 06:12:53 AM
You may not have noticed this, but I've started enforcing the rules on attached files. The extension restrictions are in place for a reason. In all seriousness, the main forums aren't the place for maintaining a compiled version of a patch.
Title: Re: sncviewer plugin
Post by: (:@) on May 13, 2007, 06:26:23 AM
ok, didn't know that
Title: Re: sncviewer plugin
Post by: SilverRanger on May 21, 2007, 07:30:57 AM
Just would like to find out where I can find a compiled version of this for my H120, as I had no luck in compiling myself. thanks
Title: Re: sncviewer plugin
Post by: cpchan on July 13, 2007, 11:54:02 PM
Nice 8-). I integrated this into my custom builds for the e200 target today:

http://www.anythingbutipod.com/forum/showthread.php?t=12583.

Very hard to find any prefab lyrics that are not on a Clear Channel Playlist though.  ;)

Here are some test screen dumps:

(http://www.anythingbutipod.com/forum/attachment.php?attachmentid=2567&d=1184380255)  (http://www.anythingbutipod.com/forum/attachment.php?attachmentid=2568&d=1184380266)


I am curious, why is this not in Flyspray?

Charles
 
Title: Re: sncviewer plugin
Post by: bascule on July 14, 2007, 04:07:42 AM
This is a very cool and interesting feature, albeit not one I'd want to use myself.

However, I've been playing with it this morning and managed to make a .snc file (using iRiver's CaptionEditor  (http://www.iriveramerica.com/support/cd/caption_editor.aspx) software and compiled it OK and got it to work on my Gigbeat.

I was impressed with all the options and on-device editing functionality. Congratulations to the author.

I do, however, support Llorean's view that it should be a proper patch on Flyspray. To that end I have started the job for you!

http://www.rockbox.org/tracker/task/7432 is now up.
I have also made it into a properly diff'd patch, rather than a .c file.

(:@), you will have to get Flyspray access if you wish to maintain the patch, as I do not intend to do that, but as I had an hour or so free (and I wanted to learn how to patch for a plugin :) ) I thought I would kick it off for you.

I hope others think this is good move...
Title: Re: sncviewer plugin
Post by: cpchan on July 14, 2007, 04:25:55 AM
I hope others think this is good move...


Definitely. I will add the e200 key bindings after some further testing.

Charles
Title: Re: sncviewer plugin
Post by: (:@) on July 14, 2007, 10:15:57 AM

I am curious, why is this not in Flyspray?

some reasons:
- didn't have a flyspray account (now I have one)
- only a few people are interested in using it
- the code doesn't comply to the coding guideline (comments, indentations,...)
- no keymappings for all players supported by Rockbox
- some customized functions only used by me


I was impressed with all the options and on-device editing functionality. Congratulations to the author.

thank you, some of them are from roolku.


(:@), you will have to get Flyspray access if you wish to maintain the patch,

i'm now registered and have added an updated patch.
Title: Re: sncviewer plugin
Post by: cpchan on July 14, 2007, 10:24:36 AM

- no keymappings for all players supported by Rockbox


I will be adding my e200 keymap shortly.

Charles
Title: Re: sncviewer plugin
Post by: bascule on July 14, 2007, 10:39:15 AM

- only a few people are interested in using it
- no keymappings for all players supported by Rockbox
- some customized functions only used by me


Have you seen some of the other patches  ::) , I don't think you need to worry too much about how relevant it is to other people, especially as it's a take-it or leave-it plugin.

At least it is music-related. As has been seen on some of the other boards here recently, at first glance at the forum you would be likely to think Rockbox was game emulator software with audio thrown in as an afterthought...
Title: Re: sncviewer plugin
Post by: zelig on September 12, 2007, 07:45:29 PM
i am so happy to say that i find a good and usefull plugin, at least for me!

but i meet a trouble that i don't know anything about programming, so i can't compile the program by myself.

so i don't konw how to deal with it, is there any .rock files already to be downloaded?

i like the plugin very much, so i don't want to drop it, is there anyone can help me?

i have a ipod mini 2g.

thank you very much.
Title: Re: sncviewer plugin
Post by: nohitter151 on September 12, 2007, 11:23:47 PM
You can download the .rock from my website.
http://stplatt.googlepages.com/

If the .rock doesn't work for you, let me know (you can contact me through the site), I'll send you the whole .zip directory via e-mail or something.
Title: Re: sncviewer plugin
Post by: the_spaniard on September 14, 2007, 11:37:40 AM
Woa, this is a VERY interesting plugin!!!
Unfortunatley, i'm a noob here and I dont know how to patch, so I will ask if somebody could tell me where I could find an unofficial build for the iPod 5G with it intalled, or as zelig said, a page to download the .rock file (But obviously for my iPod model).

Thanks to (:@) for creating this extremely usefull plugin, which I think it should be included immediately on the official build.
Title: Re: sncviewer plugin
Post by: (:@) on September 15, 2007, 08:10:55 AM
for all those who don't know how to compile and want to use/try it can find some precompiled .rock files here:
sncviewer.rock (http://yxz0123.yx.funpic.de/rockbox/)

If you can't find the .rock file for your player, you can pm me.
Title: Re: sncviewer plugin
Post by: polygonal on September 15, 2007, 09:58:58 AM
This is quite a nice plugin. I'll probably like it enough that I will add this to my playback context menu or find a button for it in Wps.

There are a few things that bugged me though:
1. It does not seem to handle utf-8 text files properly. I have a properly encoded utf-8 txt file, and it refuses to recognize the german ss. And (consequently) the edited file was not saved properly as well.
2. The ipod scrolling is backward ;-) very non-intuitive. I guess a quick keymap change will solve this, but I'm just trying it out so haven't compile my own yet.
3. It "froze" on the yes-no "save change?" screen after a track change (if I changed something). It actually is not a freeze, though; a button press will unfreeze it, but the screen seems unresponsive (can't scroll to the "no" item, for example) that I at first thought it is a freeze.
4. Settings is not saved. I load translation files always, but I'll have to change the setting every time. Would be nice if settings are saved whenever it access the disk (when retrieving files, etc.)
5. Editing with translation files is problematic when there is empty lines (lines got eaten, and all kinds of weird things)
6. I much rather see a blank screen than the peakmeter when there is no lyric ;-)
7. I can't get album art to work. Is there a limit on the size?

Also it would be nice to read USLT from mp3 files. The other patch in flyspray is way out of date and I don't feel like fixing it (the patch contains a lots of nonsense, i.e. removing a empty lline, etc., and I'm not sure that I like the way it is implemented). Since this plugin already reads the synchronized lyric, it would be nice to extract the unsynchronized one and put that to the edit mode (save a temp txt file somewhere?).
Title: Re: sncviewer plugin
Post by: (:@) on September 15, 2007, 11:31:49 AM
Quote

1. It does not seem to handle utf-8 text files properly. I have a properly encoded utf-8 txt file, and it refuses to recognize the german ss. And (consequently) the edited file was not saved properly as well.

have you tried to set the codepage to utf-8 (General Settings->Display->Default Codpage->Unicode (UTF-8)?

Quote

2. The ipod scrolling is backward ;-) very non-intuitive. I guess a quick keymap change will solve this, but I'm just trying it out so haven't compile my own yet.

Can you tell me what is backward:
a) volume srolling
b) up/down scrolling in the editor
c) both (a and b)
I've got this problem reported by someone else, but somehow I didn't understand him correctly and I thought it was alright.

Quote

3. It "froze" on the yes-no "save change?" screen after a track change (if I changed something). It actually is not a freeze, though; a button press will unfreeze it, but the screen seems unresponsive (can't scroll to the "no" item, for example) that I at first thought it is a freeze.

I assume you only have this problem if you use rewind or forward at the end of the song?
I sporadically got the problem using audio_ff_rew at the end of a song and I don't know how to fix it.

Quote

4. Settings is not saved. I load translation files always, but I'll have to change the setting every time. Would be nice if settings are saved whenever it access the disk (when retrieving files, etc.)

I will change it. I didn't expect someone else will ever use the loading of a translation file :).

Quote

5. I much rather see a blank screen than the peakmeter when there is no lyric ;-)

I will add this to the setting, where you can turn it off.

Quote

6. I can't get album art to work. Is there a limit on the size?

yes, the buffer for the image is 65536 Bytes (~ 147 x 147 Pixel bmp color image).
If your image is larger it won't load the image.

Quote

Also it would be nice to read USLT from mp3 files. The other patch in flyspray is way out of date and I don't feel like fixing it (the patch contains a lots of nonsense, i.e. removing a empty lline, etc., and I'm not sure that I like the way it is implemented). Since this plugin already reads the synchronized lyric, it would be nice to extract the unsynchronized one and put that to the edit mode (save a temp txt file somewhere?).

I don't use that patch and somehow I don't have the motivation to extend the plugin to read USLT.
Title: Re: sncviewer plugin
Post by: mikeage on September 15, 2007, 12:07:42 PM

Quote

2. The ipod scrolling is backward ;-) very non-intuitive. I guess a quick keymap change will solve this, but I'm just trying it out so haven't compile my own yet.

Can you tell me what is backward:
a) volume srolling
b) up/down scrolling in the editor
c) both (a and b)
I've got this problem reported by someone else, but somehow I didn't understand him correctly and I thought it was alright.


It was from me. Both are backwards.

Thanks!
Title: Re: sncviewer plugin
Post by: polygonal on September 15, 2007, 12:15:22 PM
have you tried to set the codepage to utf-8 (General Settings->Display->Default Codpage->Unicode (UTF-8)?

I did, but that's after I already opened the txt file in the sncviewer and edited it (and corrupted it ;P). So maybe that's why it's not working. I'll try again with a proper file.

Quote
Can you tell me what is backward:
a) volume srolling
b) up/down scrolling in the editor
c) both (a and b)
I've got this problem reported by someone else, but somehow I didn't understand him correctly and I thought it was alright.

Both.

Quote
I assume you only have this problem if you use rewind or forward at the end of the song?
I sporadically got the problem using audio_ff_rew at the end of a song and I don't know how to fix it.
There is (I believe) a problem in the rockbox core with ff/rew at the end of a song. I guess that's part of the problem... But I got this behavior without forwarding - with a txt file, not a lrs file though.

Quote
I will change it. I didn't expect someone else will ever use the loading of a translation file :).
The translation is a very handy functionality! I listen to a lots of lieder/operas and really don't know a word in German/Italian ;-)

On another note, would you consider the possibility to synchronize between the lyric and the translation file? There are some problems when editing when loading translation is on (I think mostly with blank lines - the highlight/scrolling is off in the edit mode, and some line got eaten when setting new time). Also when I start with a plain txt file, I can't synchronize the translation (beside manually adding the time stamp). Maybe when you save the txt file, check whether there is a .tr file with the same name and mark the corresponding lines?

Quote
I will add this to the setting, where you can turn it off.
Sounds great! Thanks.


Quote
yes, the buffer for the image is 65536 Bytes (~ 147 x 147 Pixel bmp color image).
If your image is larger it won't load the image.
Yup, I resized my image and now it works. Also - I haven't test it out, but I'm guessing that it will work like such - if album name contains illegal character like :, one of the scheme (path/<album>.bmp) for retrieving the image won't work. Can sncviewer replace the illegal character with something like _ so that I can name my image accordingly?

Quote
I don't use that patch and somehow I don't have the motivation to extend the plugin to read USLT.
That's alright. Maybe I'll look at your source and add it myself someday ;-)

While I'm playing around with it, I have some more suggestions:
1. Can you update the UI before doing the operation? For some reason the ipod has some button problems that sometime eats up button presses. For example, if I press rew once, I'll expect to go to the beginning of the song. But since the progress bar is not immediately updated while the track is seeking backward (only updated when the seeking is done), I really have no feedback to know whether my button press is received or not. The same with skipping tracks.

2. Can sncviewer functions as a viewer for txt, lrc, and snc files so that I can browse the filetree to find the appropriate file for the currently playing file? It's quite a pain the copy/paste/rename the lyric files on the player since the on screen keyboard is slow to use.

3. Properly capitalized and named (i.e. Time offset" instead of "time offset", "Repeat 1 On/Off" instead of "@1" ) menu item will be much more professional looking ;-)

4. Add scrolling to title/next?

5. The ipod keymap probably needs some rework to be more intuitive and be more in a line with other plugins. For example, the long press menu or select+menu should be used to exit the plugin instead of the rather obscure long press play/pause. I'll probably look into this more.


EDIT: for 1) As I understand, the plugins have the UI thread, and playback is handled by a separate thread, so I don't understand the UI lag... When a song finishes and the next one starts, the progress bar stops at 3 sec before the end and starts again at 3 sec after the next song begins. So is that 6 sec delay time used to find/retrieve lyric? I wonder if a plugin can use a background thread.
Title: Re: sncviewer plugin
Post by: (:@) on September 16, 2007, 11:37:34 AM
fixed problems 2,4,5

Quote

On another note, would you consider the possibility to synchronize between the lyric and the translation file? There are some problems when editing when loading translation is on (I think mostly with blank lines - the highlight/scrolling is off in the edit mode, and some line got eaten when setting new time). Also when I start with a plain txt file, I can't synchronize the translation (beside manually adding the time stamp). Maybe when you save the txt file, check whether there is a .tr file with the same name and mark the corresponding lines?

fixed (don't have much time to test it, maybe it's still buggy)

Quote

I haven't test it out, but I'm guessing that it will work like such - if album name contains illegal character like :, one of the scheme (path/.bmp) for retrieving the image won't work. Can sncviewer replace the illegal character with something like _ so that I can name my image accordingly?

fixed: replace /,\,?,: with _

Quote

1. Can you update the UI before doing the operation? For some reason the ipod has some button problems that sometime eats up button presses. For example, if I press rew once, I'll expect to go to the beginning of the song. But since the progress bar is not immediately updated while the track is seeking backward (only updated when the seeking is done), I really have no feedback to know whether my button press is received or not. The same with skipping tracks.

go to the beginning of the song: update the time and the timebar
previous/next track: ?

Quote

2. Can sncviewer functions as a viewer for txt, lrc, and snc files so that I can browse the filetree to find the appropriate file for the currently playing file? It's quite a pain the copy/paste/rename the lyric files on the player since the on screen keyboard is slow to use.

I don't like the idea of implementing a filebrowser in the plugin and I also don't think anyone would want to search through the filetree for the lyrics everytime.

Quote

3. Properly capitalized and named (i.e. Time offset" instead of "time offset", "Repeat 1 On/Off" instead of "@1" ) menu item will be much more professional looking ;-)

You can changed it if you like.

Quote

4. Add scrolling to title/next?

It's not possible for the current implementation to use the scrolling function from the api.
I don't think it's worth the time to change the implementation.

Quote

5. The ipod keymap probably needs some rework to be more intuitive and be more in a line with other plugins. For example, the long press menu or select+menu should be used to exit the plugin instead of the rather obscure long press play/pause. I'll probably look into this more.

I don't own a ipod. I just assign the functions to the available buttons. It's always better if an owner of the target assigns the buttons.
I have disabled the a-b function on targets, which don't have enough buttons (e.g. ipod). Maybe you good solution to enable it.
Title: Re: sncviewer plugin
Post by: polygonal on September 16, 2007, 01:14:31 PM
fixed: replace /,\,?,: with _
How about " | < > and * ? Those are also illegal in FAT32.

Quote
go to the beginning of the song: update the time and the timebar
previous/next track: ?
For previous/next, the screen is not updated until the track change is completed - and there is even a small gap (on my ipod at least) between the tracke is changed and updating of the UI.

Quote
I don't like the idea of implementing a filebrowser in the plugin and I also don't think anyone would want to search through the filetree for the lyrics everytime.
My idea is to have the plugin listed in the "open with..." list when you do context menu in filetree on txt files, etc. The plugin can then check the parameter passed to it and copy that file and rename that file to the directory and the name of the now-playing file. Implementing a filebrowser inside the plugin is of course unnecessary and redundant. I played around the source yesterday for a bit and implemented what I wanted (partly shamelessly stealing a copying function from onplay.c ;-). I'm not sure if you will be interested in it, but I found it helpful because I have a folder of lyrics/translations that are common to all my music (i.e. I can have two different sopranos singing the same lieder, which of course have the same text).

Quote
You can changed it if you like.
I did capitalize them as I wanted ;-). I'm just suggesting the idea to you (and secretly for my benefit of not having to sync with your source everytime you changes it). It's probably really an issue of personal preference, but I like consistency when the rest of rockbox is properly capitalized.

Quote
It's not possible for the current implementation to use the scrolling function from the api.
I don't think it's worth the time to change the implementation.
I'm not familiar with the plugin LCD api, so I'll trust you on this ;P Though this would be nice feature for super-long titles.

Quote
I don't own a ipod. I just assign the functions to the available buttons. It's always better if an owner of the target assigns the buttons.
I have disabled the a-b function on targets, which don't have enough buttons (e.g. ipod). Maybe you good solution to enable it.
I'll look into it next week when I have my physics and math problem sets done. The plugin keymap looks quite different from the core, so I'll have to look at it a bit more.

On another note, the backlight does not seem to behave as expected when there is power from USB. Instead of staying on when I ask it to, it turns off after the timeout defined in setting.

I have to say again that this is a wonderful plugin!
Title: Re: sncviewer plugin
Post by: (:@) on September 17, 2007, 12:17:10 PM
Quote

How about " | < > and * ? Those are also illegal in FAT32.

added

Quote

For previous/next, the screen is not updated until the track change is completed - and there is even a small gap (on my ipod at least) between the tracke is changed and updating of the UI.

Yes, I know. With "previous/next track: ?" I meant: I don't know a good solution to update the UI.

Quote

... I'm not sure if you will be interested in it, but I found it helpful because I have a folder of lyrics/translations that are common to all my music (i.e. I can have two different sopranos singing the same lieder, which of course have the same text).

any improvements are welcome. I think I won't ever use it, but someone else may find it useful too.

Quote

I did capitalize them as I wanted ;-). I'm just suggesting the idea to you (and secretly for my benefit of not having to sync with your source everytime you changes it). It's probably really an issue of personal preference, but I like consistency when the rest of rockbox is properly capitalized.

There is a point in consistency. I hope I have all of them capitalized.

Quote

I'll look into it next week when I have my physics and math problem sets done. The plugin keymap looks quite different from the core, so I'll have to look at it a bit more.

no hurry

Quote

On another note, the backlight does not seem to behave as expected when there is power from USB. Instead of staying on when I ask it to, it turns off after the timeout defined in setting.

fixed (use functions in helper.c)
Title: Re: sncviewer plugin
Post by: rangi_chip on November 05, 2007, 11:56:00 PM
I am very interested in this plugin... awesome work so far!

Um... just a question, most of my mp3s have the lyrics embeded in the 'USLT' tag field (UNSYNCEDLYRICS).
Is there any chance of adding support for this field?? I have over 1100 with lyrics in them.
Also, is there a limit to the amount of characters that can be displayed total?
Title: Re: sncviewer plugin
Post by: (:@) on November 06, 2007, 07:07:37 AM
Quote from: rangi_chip

I am very interested in this plugin... awesome work so far!

Um... just a question, most of my mp3s have the lyrics embeded in the 'USLT' tag field (UNSYNCEDLYRICS).
Is there any chance of adding support for this field?? I have over 1100 with lyrics in them.

There's a patch for this (#2999). It seems like it is out of date and the programmer is waiting for Metadata On Buffer. Now that MOB is in svn, but I don't know if he is still interested in doing it.

Edit:
USLT support added. It's maybe not the best way to view USLT with the sncviewer.

Quote from: rangi_chip

Also, is there a limit to the amount of characters that can be displayed total?

There is a limit, but I can not tell you the exact maximum amount of characters. It depends on some factors (encoding, screen width, font).
The maximum characters per line is 511, but it also depends on your screen width. A line will be wrapped if it exceeds the screen width. The maximum of wrapped lines are 7. You can have at most 299 lines of lyrics.
 
Title: Re: sncviewer plugin
Post by: rangi_chip on November 09, 2007, 01:17:51 AM
Thank you very much.
I am keen to try this patch out, but I don't know how to:

Install it into RB. Could you please tell me what to do? When I click the .patch link, it's just a whole heap of text. What do I do with this.

And how do I activate the viewer? Just back up to the plugins menu and select it from there?

Sorry, I'm new to RB.
Title: Re: sncviewer plugin
Post by: AlexP on November 09, 2007, 03:14:37 AM
This is off topic for this thread, but briefly:

The patch alters the source code for rockbox.  You need to set up a build environment, download the source code, patch the source with the patch, then compile the source code to get the build you put on the player.

Have a look at the SimpleGuideToCompiling wiki page.
Title: Re: new plugin: sncviewer
Post by: yueonyrl on November 15, 2007, 09:32:32 PM

the plugin should display:
statusbar, timebar, next : system font
artist/title and lyrics: same font as wps


I made a Gigabeat build and test the plugin with a Chinese song with a lyc8 file.  My WPS uses the nimbus+uming-14.fnt font, but the lyric shows Rockbox's default font and does not use the WPS font. Am I missing something?

Thanks.
Title: Re: new plugin: sncviewer
Post by: cpchan on November 15, 2007, 09:47:17 PM
My WPS uses the nimbus+uming-14.fnt font, but the lyric show Rockbox's default font and does not use the WPS font. Am I missing something?


Yes. the plugin is hardcoded to use the UI font (FONT_UI). You will need to edit the source to use a different font. In my own personal version I use the browser font (FONT_BROWSER) defined in the "Multifont" patch.

Charles
Title: DOES IT WORKS WITH IRIVER H320
Post by: kaptandeath on December 30, 2007, 07:07:59 AM
Hi,

I am new to this thread and would like to know if 'sncviewer' supports H320 or no then when can we expect it?

Thanks in advance
Title: Re: sncviewer plugin
Post by: (:@) on December 30, 2007, 11:20:34 AM
It should work on a IRiver H320.
Title: Re: sncviewer plugin
Post by: sundolo on January 22, 2008, 11:33:14 AM
Hi,

I am new here too.
How come there are no binaries available for the Sansa E2x0 series? :'(
Do I have to compile anything myself?
And if so, where can I get the source?

Thank you!

Sundolo
Title: Re: sncviewer plugin
Post by: GodEater on January 22, 2008, 01:17:57 PM
You'll have to compile your own build with this, since it's not in the official rockbox build.

Source for rockbox is here : svn://svn.rockbox.org/trunk/rockbox

Source for the patch is here : http://www.rockbox.org/tracker/task/7432
Title: Re: sncviewer plugin
Post by: bashee on December 24, 2009, 10:05:16 PM
Hi,
I am just curious - maybe not proper here. Will Rockbox consider to add lyric function in future version? Thanks.
Title: Re: sncviewer plugin
Post by: Chronon on December 26, 2009, 03:48:54 PM
New features in the core binary need to be well thought out and considered, since increase in binary size can negatively impact (or break) functionality on some players.  It's not on any kind of no-do list that I'm aware of, but I also think this functionality would stand a better chance of inclusion as a plugin.
Title: Re: sncviewer plugin
Post by: gulak on January 12, 2010, 03:37:08 PM
Hi,
I am just curious - maybe not proper here. Will Rockbox consider to add lyric function in future version? Thanks.
Maybe you can ask teru. He made a good lyrics plugin and he also has commit right.