Volume display

Jul 18, 2011 at 6:39 PM

One more thing...

Is it possible, with LCD smartie, to enable a screen for a given time then disable it ? I would use such function to have a volume level screen overtaking the "regular" screens for, let's say, 5 seconds once I raise, lower or mute the sound level, then go on with the regular sequence.

Jul 18, 2011 at 10:40 PM

Yep, I liked this idea a lot so you'll find it in change set 7367.

I've modified Function 1 to do this for Play/Pause etc. and also things like Mute, Eject etc. etc. I've updated the doc file to describe this. I particularly liked the Volume one so as well as displaying Volume on line 1 if it's active I put the volume leve e.g. 25/50 on the second line or a moving bar if the VolumeCharacter tag is set to a character code for the bar in the cfg file.

I've made the tags available:

  • StatusCount  (default value 10) can be set in the cfg file (e.g. StatusCount=15) is the time to display the temporary 'modes' etc. on screen in units of 300ms
  • StatusCounter is the current value of the count (counting down to 0) so you could check if this value is >0 as an action to display a different screen

I haven't tried the action approach though.

Let me know of any issues.



Jul 19, 2011 at 5:44 AM

You got it right with Function 1. Works as I saw it

However the StatusCounter does not seem to count without F1 running. 

Jul 19, 2011 at 7:19 PM
Edited Jul 19, 2011 at 7:22 PM

Further testing....

I can set the F1 function in my volume theme screens so the StatusCounter counts actually counts down when triggered. Since I don't want to see F1 at that place, I put it out of the visible range and disable scrolling. I set an action that switches to the Volume theme if StatusCounter>0 and another one that switches back to my "default" theme once StatusCounter=0. My volume theme has two screens showing the volume or the absence of it, triggered by the Mute tag value.

This works like I want but for two things. If MC is not running, I get locked into the volume theme. I could work around this with more actions, yet it would be easier if StatusCounter=0 when MC is not running.

A similar issue occurs when the volume theme gets activated with a Mode change. I would have to use two conditions to trigger the action, which, while achievable, would be much easier to set if there was a separate counter (or no counter at all) for Mode changes.

Jul 19, 2011 at 8:21 PM

You were right about the status counter only running if using F1. I've changed the way it works now (in 7441 - v0.9.17.4). Status counter should always count down to 0 if any mce_dll function is called so even if MC is not running it should be zero.

Could you use an action like $dll(if,1,$dll(mce_dll,4,StatusCounter,)#0,NotVolume#$dll(mce_dll,4,DisplayMode,))  = Volume  to activate the volume screen and $dll(mce_dll,4,StatusCounter,)=0 to go elsewhere? I haven't tried this so if there are eroneous characters my appologies.

Jul 20, 2011 at 4:34 AM
Edited Jul 20, 2011 at 8:25 PM

The latest changes you have made to the way StatusCounter behaves and this action line using the if.dll plugin are quite clever. Now I can trigger a screen on everything. For now I have set a similar action using Mute as the condition value to trigger my volume screen, which also uses if.dll to determine whether to show the volume level or that it is muted. Very nice. It gives lots of flexibility to your plugin.

Jul 21, 2011 at 6:53 AM

Greetings Dave !

A small bug report : StatusCounter does not work if LCD Smartie is run before MC.

Jul 21, 2011 at 10:02 AM

Good spot,  Only happens if you dont call function 1 but I've found the bug and it'll be fixed in the next release. Thanks.

Jul 21, 2011 at 10:27 AM

As a temporary fix you could add an action which says $dll(mce_dll,1,,) = 0 Backlight(1) ?

Jul 21, 2011 at 5:04 PM
Edited Jul 21, 2011 at 5:09 PM

The temporary fix work. Thanks.

Now I'm running into more problems setting up my volume screen. Here is the line I use:

$dll(if,1,$dll(mce_dll,4,Mute,)#True,Volume $dll(MCE_dll,4,Volume,) $Fill(10) * $Flash(MUTE$)$ * #Volume $dll(MCE_dll,4,Volume,) $Fill(10)$Bar($dll(MCE_dll,4,Volume,),50,10))

The line being formatted to a 20 character long display, you may want to cut the length of the bar so it fits a 16 character line.

If I use the two possible outcomes of this line in two separate screens, it works perfect. But as it is, the $Bar display block characters are replaced by chinese symbols. I suspect if.dll does not handle special characters properly. I can always work around this with the two separate screens, but I'd like to use only one to save on the screens, as I plan to use many more of them along the crafting of my Smartie config. I also fear this will limit further screen ideas as a good share of my media has accented characters in their tags, which will obviously give the same problem. Most probably not in MC, as the special characters get replaced with "?" (which is a slight problem as well, quickly overcome with sandr.dll), but other players do send the characters.

I'm aware if.dll is not your work and this post is going off topic, however you may have an idea for a workaround ??


Jul 21, 2011 at 5:53 PM

I found an entry in one of the forums recently (pretty sure it was an LCD Smartie Forum) about if not handling special characters: I had been looking around since I was suspicious that the if dll has a memory leak (still am). I'm afraid there's no easy way around this other than to write a new if function. It's a pretty trivial piece of code so I may be tempted to include something in the next version. I should have some time tomorrow.


Jul 21, 2011 at 6:57 PM

That sure would be great if you're able to include a new function. In the while, I'll take some time to draw a flowchart of the LCD sequence to find out how many screens I really need. I think, if the count goes beyond twenty screens, it would be possible to add actions that would call a batch file to kill LCD Smartie and reload it with a different config.ini and a new 20-screen set.

Jul 22, 2011 at 2:36 PM

Change set 7578 has a new function 19 with this functionality - enjoy! and a fix for the problem of not starting correctly if MCE is not active.