WSHtpc04 Version 0.4.1 – theme support and bugfixes

Changes to last version (WSHtpc04 version 0.3):

  • Basic theme support: dark and light included.
  • Redrawing interval (old: 40ms fixed) is now a parameter.
  • Uses relative timestamps by default. Get them here.
  • 0.4.1 is a hotfix release for various artifacts introduced by the rushed 0.4 release.

Download and instructions


Posted

in

by

Tags:

Comments

13 responses to “WSHtpc04 Version 0.4.1 – theme support and bugfixes”

  1. fb2klover

    A great update! One problem I noticed that I haven’t figured out how to fix yet: with glob = true, when one left doubleclicks in empty space with large art displayed to return display to tag grid and small art, the timer races. I suspect that one or more timers need to be reset upon this event. This may not be a new problem – I didn’t check to see if this occurred with version 0.3 yet.

    Thanks again for fantastically tasteful and useful displays!

  2. fb2klover

    Just tested it – this problem does not occur with version 0.3. I couldn’t find the cause after a quick review of the code changes between 0.3 and 0.4, so tihs is a sneaky problem that will take more time to find, or more expertise than I have. Trying to watch Olympics at the same time, so tough to concentrate!

  3. fb2klover

    Regarding the racing timer: it goes away if I replace the new SetInterval command and put back the old CreateTimerInterval. That of course triggers the console error message. There must be something additional necessary to implement the new WAS Panel Mod 1.5.0 procedure, but fixing this exceeds my knowledge. For a reference to an another script that had the same problem ans was fixed (but I can’t follow exactly how to learn to apply to your script), please see post 1274 http://www.hydrogenaudio.org/forums/index.php?showtopic=77883&view=findpost&p=775818

  4. fb2klover

    sorry – I meant “WSH” not “WAS”

  5. fb2klover

    One last observation: the race condition remains, but some other timer instabilities seem diminished when I ensured the user-entered timer inverval was an integer using pref[“timer_multiplier”] = Math.round(1000/pref[“timer_interval”])

    and then I replaced timer_interval references with timer_multiplier as appropriate. This allowed going back to the two == uses on the function on_timer instead of the two new > intorduced in 0.4.

    Some timer instability still remains when the user interval begins to get rather large (around 200 ms or longer) because of rounding, but the use of the round command prevents invalid entries. hope that helps.

  6. Sorry for the rushed version 0.4 – I should have known better to release it without at least some days of testing. I just released the hotfix 0.4.1 that in principle does what you proposed: ensure integers, so that equalities can be used. Another if reduces CPU load during pause. Link

  7. fb2klover

    You solved the race condition, which is great! The timer will work even better if you change line 183 to what I think you intended:
    var timer_frequency = Math.round(1000/pref[“timer_interval”]);

    (you forgot the 1000/ part of the frequency calculation)

    With this change, the restrictions of lines 154 and 155 are longer necessary.

    I also had other troubles that went away when I deleted the reference to timer_interval in the comment section of line 184. No idea why that mattered, but my panel was confused by the variable reference in the comment area.

    Thank you very, very much for doing all the hard work on these displays!

  8. As these changes are not critical, they can wait until the next “regular” update. Thanks very much for helping to debug the scripts. (And better let’s thank the developers of all the underlying software, without which these scripts were pretty useless.)

  9. fb2klover

    Sounds good. A few suggestions for next release: consider using the properties popup for all of the user-chosen variables. For example, replace:
    pref[“theme”] = “dark”
    with
    pref[“theme”] = window.GetProperty(“light or dark theme”, “dark”);
    I did so for all such variables and this works great, including background pic selection, as long as I advance to the next song to reset the script. There is I’m sure a more robust way to reset the script when user-entered variables change during playback, but the current script works very well by just restarting playback.

    I also liked the appearance of “Dark” better with the “black noise” bckgnd pic when I skipped over the following line under the dark theme only when “black noise” was chosen:
    col[“bg”] = RGB(000,000,000);

    Perhaps make this a choice too if you like it. I kept the original “diagonal stripes” pic in the script because that’s very tasetful as well, and I use the properties popup to toggle between the these two “dark” backgnd pics.

    One last suggestion: for those of us with relatively fewer tags but lots of text in the few tags we have, much longer tag fields are attractive: I’ve manually changed the grid to a single column of very long fields instead of the default two columns with smaller fields. Perhaps make this an option, too, if you think it’s worth it. I never figured out how to “wrap” a long field, but an additional choice of wrapping versus truncating long fields in addition to one or two columns would be slick.

    Outstanding artistic and tech work – Thanks again!

  10. fb2klover

    FYI: 0.4.1 occassionally crashes upon fb2k startup. I tried to figure it out but can’t. Console indicates it’s line 703. Since I have a big display, I commented out lines 702-704 and crash does not reoccur. A very minor issue since resetting properties always reset the script properly, but maybe something to look at if you have a reason any future version. Thanks!

  11. fb2klover

    FYI – Also a very small issue, but I tracked down an occassional script starup up crash issue with WSHpc02_0.3 – it was fixed by setting all variables to zero in lines 63 and 64, and replacing 0*g_artist.Height in line 83 with just zero.

  12. Thanks for reporting those bugs. Will be fixed (at least for WSHtpc04) in upcoming versions. WSHtpc02 won’t be continued. But I plan to release a look-a-like based on the current code base in the future.

  13. fb2klover

    Great! One last thought: I (and no doubt many others) use your scripts for display ona big plasma TV – they look great. I looked into trying to use a (tasteful) animated gif as a background image on V2 (I’m a bit paranoid about burn-in), but it appears either foobar2000 can’t handle animated gif’s, or WSH panels can’t, or I was just too dumb to figure it out. I use V4 most of the time on my plasma because it changes its display quite often. I’m sure you’d get even more interest in V2 or its successor if you found a way to enable some kind of animation as a background image or cycling background images, if even possible. There is always milkdrop, of course, but I’m an adult now…. Many thanks again for your efforts!