Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  sncviewer plugin
« previous next »
  • Print
Pages: 1 ... 3 4 [5] 6 7 ... 13

Author Topic: sncviewer plugin  (Read 114217 times)

Offline Assimalyst

  • Artist
  • Member
  • *
  • Posts: 355
  • Cluck
Re: new plugin: sncviewer
« Reply #60 on: February 21, 2006, 12:03:06 PM »
Quote from: 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?

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
Logged
Smack ma goblin!

Offline PAL

  • Member
  • *
  • Posts: 12
Re: new plugin: sncviewer
« Reply #61 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!
Logged

Offline R-power

  • Member
  • *
  • Posts: 10
  • iRiver Fanatic - H340
Re: new plugin: sncviewer
« Reply #62 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
Logged
iRiver Fanatic - H340

(:@)

  • Guest
Re: new plugin: sncviewer
« Reply #63 on: February 24, 2006, 04:16:37 AM »
Quote from: 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.
a small documentation is now included (first page: sncviewer.txt)

Quote from: R-power on February 23, 2006, 09:42:46 PM
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.
Logged

Offline carmenm

  • Member
  • *
  • Posts: 50
Re: new plugin: sncviewer
« Reply #64 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???
Logged

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: new plugin: sncviewer
« Reply #65 on: March 01, 2006, 06:12:03 AM »
Quote from: 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) ...

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).

Logged

Offline carmenm

  • Member
  • *
  • Posts: 50
Re: new plugin: sncviewer
« Reply #66 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]
Logged

(:@)

  • Guest
Re: new plugin: sncviewer
« Reply #67 on: March 01, 2006, 09:46:32 AM »
the plugin is updated again
Logged

Offline carmenm

  • Member
  • *
  • Posts: 50
Re: new plugin: sncviewer
« Reply #68 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???
Logged

(:@)

  • Guest
Re: new plugin: sncviewer
« Reply #69 on: March 06, 2006, 05:09:11 AM »
Quote from: 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???
yes, they have to be in the right order. you have to sort them according to the time.
Logged

Offline carmenm

  • Member
  • *
  • Posts: 50
Re: new plugin: sncviewer
« Reply #70 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 body
So 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]
Logged

(:@)

  • Guest
Re: new plugin: sncviewer
« Reply #71 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?
Logged

Offline carmenm

  • Member
  • *
  • Posts: 50
Re: new plugin: sncviewer
« Reply #72 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
« Last Edit: March 08, 2006, 10:13:39 AM by carmenm »
Logged

(:@)

  • Guest
Re: new plugin: sncviewer
« Reply #73 on: March 08, 2006, 10:47:13 AM »
Quote from: carmenm on March 08, 2006, 10:06:46 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().
« Last Edit: March 08, 2006, 10:49:35 AM by (:@) »
Logged

Offline carmenm

  • Member
  • *
  • Posts: 50
Re: new plugin: sncviewer
« Reply #74 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???
« Last Edit: March 08, 2006, 11:06:36 AM by carmenm »
Logged

  • Print
Pages: 1 ... 3 4 [5] 6 7 ... 13
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  sncviewer plugin
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.099 seconds with 14 queries.