Rockbox Technical Forums

Rockbox Development => Feature Ideas => Topic started by: Biont on March 17, 2010, 01:44:24 PM

Title: New tag to turn true on track change
Post by: Biont on March 17, 2010, 01:44:24 PM
In the past few hours, I've been trying to get a song info popup to work. It should work like the small popup windows known from media player programs like foobar2000: For some seconds after a new songs starts playing, a small popup comes up with all relevant song info.

I want to make the album art as big as possible (240*240), so there's no room to have the song info on screen permanently. That's why I'd like to realize that popup window on top of the album art.

Now the only tag that seemed to be suitable is the %px tag which returns the percentage played in the current song.
Sadly, it turned out that the tag does not really want to be used for this task.
Not only do I need a huuuge conditional consisting of 100 different states, I also need this conditional for every bit of song info I want to display. I don't know why, but it seems constant updating is needed in order to keep the AA from drawing over my popup viewport.

You can imagine this doesn't look very elegant. And it doesn't even work properly :)

So I think something like the %mv would come in handy here (%mv turns true on volume change and can be used with a timeout).

If the song's at 00:00 the new tag would turn true. After the timer runs out, it goes false again.

Example:

%?pC1.5<:D| :'(>

At track change, the tag is happy for 1.5 seconds and then gets sad again.

Maybe there are better ways to do it, and %pC is nothing more than an example name, but I think such a tag would be nice to have.
Title: Re: New tag to turn true on track change
Post by: JdGordon on March 18, 2010, 01:40:53 AM
should be pretty simple to add... and anyone that wants to do it, allow the timeout to be negative which would mean <time> before track changes :)

actually, screw it, I'm bored...
Title: Re: New tag to turn true on track change
Post by: JdGordon on March 18, 2010, 02:15:05 AM
%pS %pE.... go nuts :)
Title: Re: New tag to turn true on track change
Post by: Biont on March 18, 2010, 04:56:13 AM
Wow! Thank you very much :D


EDIT: It looks like AA needs to be displayed before &pS turns true. Otherwise it won't display until the timer runs out.

At least I haven't been able to find a configuration that works. (->display AA and popup AND getting rid of the popup again [->drawing AA over it])
Title: Re: New tag to turn true on track change
Post by: Chronon on March 19, 2010, 06:39:58 PM
 Is the popup in its own viewport?
Title: Re: New tag to turn true on track change
Post by: Biont on March 19, 2010, 06:48:18 PM
Yep. It either doesn't display AA until the timer runs out r the opup doesn't disappear after the tier ran out ....depending on how I set the viewports up.


The same thing works great with the %mv tag and I think it's due to the AA already displayed.

I can post my code when I come back to my place end of weekend. Maybe theres a way to get it to work with wps code.