Support and General Use > Plugins/Viewers
sncviewer plugin
(:@):
--- Quote from: roolku on February 06, 2006, 09:57:16 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.
--- End quote ---
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.
--- Quote from: roolku on February 06, 2006, 09:57:16 AM ---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.
--- End quote ---
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?
roolku:
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.
--- Quote from: (:@) on February 07, 2006, 03:12:40 AM ---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.
--- End quote ---
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 ---
--- Quote from: roolku on February 06, 2006, 09:57:16 AM ---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.
--- End quote ---
I also thought about that. But I didn't implement it, because I thought it will delay the init process without much benefit.
--- End quote ---
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?
--- End quote ---
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]
roolku:
--- Quote from: roolku on February 07, 2006, 03:43:38 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.
--- End quote ---
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.
(:@):
--- Quote ---- Why did you take out the light-switch?
--- End quote ---
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
--- End quote ---
??? (it's possible for me)
--- Quote ---- saveing an anfinished snc file will put all the unsynced lines into the last block.
--- End quote ---
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.
--- End quote ---
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.
roolku:
--- Quote from: (:@) on February 09, 2006, 03:22:53 AM ---
--- Quote ---- Why did you take out the light-switch?
--- End quote ---
I already implemented it outside the plugin. I don't need it twice.
--- End quote ---
Fair enough. Maybe I should do this as well.
--- Quote ---
--- Quote ---- you can't mark a block that includes the last line
--- End quote ---
??? (it's possible for me)
--- End quote ---
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.
--- End quote ---
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.
--- End quote ---
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.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version