IPB

Welcome Guest ( Log In | Register )

120 Pages V  « < 62 63 64 65 66 > »   
Reply to this topicStart new topic
WSH Panel Mod script discussion/help.
Falstaff
post May 5 2012, 08:39
Post #1576





Group: Members
Posts: 2797
Joined: 12-November 06
Member No.: 37463



to make it work you have to eval the TF with true, just by testing if a track is playing... here is the fix (note: bitrate wasn't declared as global ==> added too)

CODE
function RGB(r, g, b) {
return (0xff000000 | (r << 16) | (g << 8) | (b));
}

var bitrateTF = fb.TitleFormat("%bitrate%' kbit/s'");
var bitrate;

var textFont = gdi.Font("Tahoma", 10, 1);
var textColour = RGB(255, 255, 255);

if (fb.IsPlaying){
update();
}

function on_size() {
ww = window.Width;
wh = window.Height;
}

function update() {
if (fb.IsPlaying) bitrate = bitrateTF.Eval(true);
window.Repaint();
}

function on_paint(gr) {
gr.FillSolidRect(0, 0, ww, wh, RGB(0,0,0));
gr.GdiDrawText(bitrate, textFont, textColour, 0, 0, ww, wh);
}

function on_playback_dynamic_info() {
update();
}
function on_playback_dynamic_info_track() {
update();
}


--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post
amalone
post May 5 2012, 10:18
Post #1577





Group: Members
Posts: 29
Joined: 22-February 10
Member No.: 78388



Using WSH Playlist Viewer Beta 9. I have the playlist, album list and album art viewer all visible. Start playing a FLAC file and correct cover art is visible in album art viewer. Highlight a different FLAC file in album list and the cover art for that file is now visible. Click back on FLAC that is playing and cover art does not change back. With ES Playlist cover art changes back to the playing FLAC cover art. It is like a disconnect with WSH Playlist Viewer after highlighting a file in album list. Not sure if that is how it has to work.
Go to the top of the page
+Quote Post
Falstaff
post May 5 2012, 10:47
Post #1578





Group: Members
Posts: 2797
Joined: 12-November 06
Member No.: 37463



QUOTE (amalone @ May 5 2012, 11:18) *
Using WSH Playlist Viewer Beta 9. I have the playlist, album list and album art viewer all visible. Start playing a FLAC file and correct cover art is visible in album art viewer. Highlight a different FLAC file in album list and the cover art for that file is now visible. Click back on FLAC that is playing and cover art does not change back. With ES Playlist cover art changes back to the playing FLAC cover art. It is like a disconnect with WSH Playlist Viewer after highlighting a file in album list. Not sure if that is how it has to work.

sorry but it's not really clear ...

QUOTE (amalone @ May 5 2012, 11:18) *
Start playing a FLAC file and correct cover art is visible in album art viewer

ok, art viewer, so not my wsh playlist... let's go next

QUOTE (amalone @ May 5 2012, 11:18) *
Highlight a different FLAC file in album list and the cover art for that file is now visible.

why you say "now" wasn't ok before in playlist? "visible", where ? in art viewer or playlist or both ?

QUOTE (amalone @ May 5 2012, 11:18) *
Click back on FLAC that is playing and cover art does not change back.

what do you mean by "Click back on" ? could you explain on what you click please, and when you said "cover art does not change back, yu mean in playlist or art viewer ?


*waits for details and answers*

thanks by advance

This post has been edited by Falstaff: May 5 2012, 10:47


--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post
rawny
post May 5 2012, 12:40
Post #1579





Group: Members
Posts: 30
Joined: 27-January 09
Member No.: 66042



QUOTE (Falstaff @ May 5 2012, 07:39) *
to make it work you have to eval the TF with true, just by testing if a track is playing... here is the fix (note: bitrate wasn't declared as global ==> added too)


Sweet that fixed it and I missed bitrate being a global when I converted it to a simpler example rolleyes.gif

It may be worth mentioning that I had to change the on_paint function to the following:
CODE
function on_paint(gr) {
     gr.FillSolidRect(0, 0, ww, wh, RGB(0,0,0));
     if (fb.IsPlaying) {
         gr.GdiDrawText(bitrate, textFont, textColour, 0, 0, ww, wh);
     }
}

And I also had to add a call to the update function from an on_playback_stop handler.

Cheers for the help smile.gif
Go to the top of the page
+Quote Post
Falstaff
post May 5 2012, 12:41
Post #1580





Group: Members
Posts: 2797
Joined: 12-November 06
Member No.: 37463



WSH CoverFlow v1.2: http://pastebin.com/u/Br3tt

- cover placement enhanced by adding a toolbar (like my in my WSH playlist viewer)
- tweaks




--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post
rawny
post May 5 2012, 16:07
Post #1581





Group: Members
Posts: 30
Joined: 27-January 09
Member No.: 66042



QUOTE (Falstaff @ May 5 2012, 11:41) *
WSH CoverFlow v1.2: http://pastebin.com/u/Br3tt

- cover placement enhanced by adding a toolbar (like my in my WSH playlist viewer)
- tweaks


I would love to be able to use this, but it massively lags foobar when I try and scroll through the album art (even if I just scroll one cover either direction). I reduced the size of the panel which helped but it's still laggy enough to disrupt the audio as the cover changes sad.gif

It may well just be a side-effect of the fact I'm running foobar under WINE, but I was wondering if anyone might have any ideas on reducing the lag in any way. No worries if not.
Go to the top of the page
+Quote Post
Falstaff
post May 5 2012, 16:22
Post #1582





Group: Members
Posts: 2797
Joined: 12-November 06
Member No.: 37463



@rawny:

running it under linux is for sure not a benefit for performances... you can still try to disable all effects like glass effect, scroll transition ...

but i don't think it's made for the use you make, try it under windows and you'll see the difference wink.gif

EDIT: ...my script may lag too under Android with a virtualized windows partition biggrin.gif

This post has been edited by Falstaff: May 5 2012, 16:25


--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post
rawny
post May 5 2012, 16:32
Post #1583





Group: Members
Posts: 30
Joined: 27-January 09
Member No.: 66042



@Falstaff:

Hehe well I'm not running Linux (Ubuntu specifically) to try and get good performance from your coverflow, I'm just trying to see if I can achieve better performance in the Ubuntu that I was already running tongue.gif

(And I know that this will inevitably have a bottleneck and I'll probably not be able to use it. I wanted to try and push it anyway just in case it is usable - 'cause I would love to have a coverflow if possible smile.gif )

How do I disable said effects? Should I just look for them in the code and comment them out?

Edit: I found the window.getProperty part in the code and changed all the graphics related-ones (reflection, focus rectangle, glass, scroll animation) to return false straight off (and I changed flat style to true) and it's reduced the lag a fair bit. It still lags a tad but it's nowhere near as bad as it was.

This post has been edited by rawny: May 5 2012, 16:54
Go to the top of the page
+Quote Post
amalone
post May 5 2012, 19:36
Post #1584





Group: Members
Posts: 29
Joined: 22-February 10
Member No.: 78388



WSH Playlist 9. Sorry, that was clear as mud. I have the cover art turned off in WSH Playlist. I strictly view cover art in the Album Art Viewer as I like to view it a little larger. On the left top is the album list, left bottom is the album art viewer, and on the right is WSH playlist. It looks really nice thanks to you.

If I start a FLAC file playing, the details are in the WSH playlist (right), and the correct cover art is in the foobar2000 art viewer (lower left). If I click, without actually starting playback, on another FLAC file in the album list (upper left), the album art changes to that file in album art viewer. Nothing changes in WSH playlist as cover art is turned off. Then I click back on a track actually playing in WSH playlist, and the cover art does not change to the playing FLAC cover. In ES playlist it does as I used that set up for a while. Thank you.
Go to the top of the page
+Quote Post
godrick
post May 6 2012, 21:22
Post #1585





Group: Members
Posts: 304
Joined: 31-December 10
Member No.: 86948



@marc2003, thanks very much for your "similar artists" WSH script and others. Concerning the "similar artists" script, I'd like to suggest a tweak or enhancement that is beyond my ability to code. Context: I use the "artist" tag to include all of the performers for a given song. Most of the time, it just contains a band name or the name of the person I consider the primary artist for the song, and everything integrates perfectly with your script. But for some songs I have multiple persons or bands in a single "artist" tag to reflect featured performers, ad-hoc ensembles, etc. In these cases, the "similar artist" script correctly searches for the string of the entire content of the "artist" tag and returns nothing.

To handle the cases where I have multiple artists in the "artist" tag, I'd like a way to manually enter which artist to search for in the "similar artist" script, perhaps from a context menu prepopulated with the current "artist" content so I can delete all but one artist for a search. I think a method of manual entry and override of the default action would be the most efficient way to meet this need, instead of trying to identify, parse, select, and search for multiple artists, but I certainly defer to you if there is an easier way to do it.

I think many others use the "artist" tag in a simlar manner and thus this tweak would be of use to many others as well, but if that assumption is incorrect then please let me know. Thanks again for your efforts!
Go to the top of the page
+Quote Post
marc2003
post May 6 2012, 23:38
Post #1586





Group: Members
Posts: 4330
Joined: 27-January 05
From: England
Member No.: 19379



you could replace %artist% on line95 with $meta(artist,0) and that would use the first artist.

changing the setting per artist isn't really feasible.
Go to the top of the page
+Quote Post
godrick
post May 7 2012, 01:05
Post #1587





Group: Members
Posts: 304
Joined: 31-December 10
Member No.: 86948



That will work well enough, and I can just change the zero to another number to select another artist. Thanks!
Go to the top of the page
+Quote Post
marc2003
post May 7 2012, 01:13
Post #1588





Group: Members
Posts: 4330
Joined: 27-January 05
From: England
Member No.: 19379



if you are going to tinker with that value for different artists, you might want to comment out line 123 as that will try to fetch updated info from last.fm if the stored data is more than 1 day old. obviously it would use the current setting and not whatever was used to fetch the original data.
Go to the top of the page
+Quote Post
pIv
post May 7 2012, 08:12
Post #1589





Group: Members
Posts: 286
Joined: 9-July 03
Member No.: 7668



2 Falstaff

If I want use coverflow panel for my media library now - I must create seperate playlist and load in it all song from media library.

It is possible in future use coverflow with media library without playlist with media library content?

This post has been edited by pIv: May 7 2012, 08:13
Go to the top of the page
+Quote Post
Falstaff
post May 7 2012, 08:51
Post #1590





Group: Members
Posts: 2797
Joined: 12-November 06
Member No.: 37463



QUOTE (pIv @ May 7 2012, 09:12) *
2 Falstaff

If I want use coverflow panel for my media library now - I must create seperate playlist and load in it all song from media library.

It is possible in future use coverflow with media library without playlist with media library content?


actually not.


--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post
ExtremeHunter
post May 7 2012, 11:02
Post #1591





Group: Members
Posts: 131
Joined: 5-October 08
From: Estonia
Member No.: 59398



Maybe if T.P. Wang is kind enough to give us a new feature like GetLibraryItems then it would be possible. cool.gif
Go to the top of the page
+Quote Post
Falstaff
post May 8 2012, 11:47
Post #1592





Group: Members
Posts: 2797
Joined: 12-November 06
Member No.: 37463



updates!

WSH Playlist Viewer v2.0 (final)
WSH CoverFlow v1.4

* Scripts available at http://pastebin.com/u/Br3tt

* I have included them in a simple DefaultUI config (just a .fth to import), for those who are interested, get it at http://fav.me/d4z1j0w


--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post
marc2003
post May 8 2012, 14:15
Post #1593





Group: Members
Posts: 4330
Joined: 27-January 05
From: England
Member No.: 19379



samples updated: http://dl.dropbox.com/u/22801321/samples.zip

changes to news / reviews / blogs, now playing, thumbs and similar artists scripts only.

added artist field remapping option to context menu.



(simple biography already has this feature)

edit: added feature to news / reviews / blogs as well.


This post has been edited by marc2003: May 8 2012, 14:31
Go to the top of the page
+Quote Post
derty2
post May 8 2012, 14:48
Post #1594





Group: Members
Posts: 560
Joined: 5-June 11
Member No.: 91257



I have added mouse hover-seek popup info to my 'WSH volume control', but it has a small problem;

This is correct:
When I mouse click-drag-seek, the text display range in the 'WSH volume control' main window goes from -100dB at left end to 0dB at right end.

This is NOT correct:
When I mouse hover-seek, the text display range in the 'WSH volume control' hover popup goes from -287dB at left end to 0dB at right end.

Is anybody here familiar with the mathematics of the volume display?
Could you please review my code for the hover info function and tell me what is wrong.
Here is the relevant function (the problem lines are in red):
QUOTE
function on_mouse_move(x,y) {
      window.SetCursor(32649);
      if(g_drag) {
           var v = x / window.Width;
           v = (v<0) ? 0 : (v<1) ? v : 1;
           v = 25 * Math.log(v+0.00001);
           if(fb.Volume != v)
                fb.Volume = v;
      }
      g_hover_seek = null;
           g_hover_seek = x / window.Width;
           g_hover_seek = (g_hover_seek<0) ? 0 : (g_hover_seek<1) ? g_hover_seek : 1;
           g_hover_seek = 25 * Math.log(g_hover_seek+0.00001);
           g_hover_seek = (Math.ceil(g_hover_seek)) + "dB";

   g_hover = x + 4;
   window.Repaint();
}


This post has been edited by derty2: May 8 2012, 14:49
Go to the top of the page
+Quote Post
marc2003
post May 8 2012, 15:10
Post #1595





Group: Members
Posts: 4330
Joined: 27-January 05
From: England
Member No.: 19379



i'm not really sure what you're doing there???

i took the sample Volbar with GdiDrawText.txt and added hover tooltip support here....

http://pastebin.com/j2JNZHBA
Go to the top of the page
+Quote Post
derty2
post May 8 2012, 16:14
Post #1596





Group: Members
Posts: 560
Joined: 5-June 11
Member No.: 91257



I tried out your code there marc.
As soon as my mouse entered hover coordinates, WSH Panel Mod crashed with error: Line 39, Column 9, Object doesn't support property or method.
So I commented out line 39 and tried again.
As soon as my mouse entered hover coordinates, WSH Panel Mod crashed with error: Line 47, Column 9, Object doesn't support property or method.

I am using WSH Panel Mod version 1.4.3 .
I refuse to upgrade to newer versions because my WSH auto-cycling Artwork Viewer doesn't work perfectly with newer versions .

The function code I posted before works perfectly except for the mathematical calculation of the decibel range for the tooltip.
The mathematics of 25 * Math.log(g_hover_seek+0.00001) gives the same scaling as the built-in foobar2000 volume slider (logarithmic).

Here is the full code posted online (it works perfect except for the tooltip info calculation error): http://textsnip.com/my/wsh_volume_control/jscript
Go to the top of the page
+Quote Post
marc2003
post May 8 2012, 20:54
Post #1597





Group: Members
Posts: 4330
Joined: 27-January 05
From: England
Member No.: 19379



heh, i was using the linear example and it also uses new tooltip functions only found in 1.5.0+. yours doesn't use tooltips so your description is a bit misleading....

i'm not editing your whole script because it makes my head hurt but the main change is here....

CODE
function on_mouse_move(x,y) {  
    window.SetCursor(32649);  
    v = x / window.Width;  
    v = (v<0) ? 0 : (v<1) ? v : 1;  
    v = 25 * Math.log(v+0.00001);  
    if(g_drag && fb.Volume != v) fb.Volume = v;    
    window.Repaint();  
}


i've removed "var v=..." because it needs to be global. v needs to be used as the hover text in on_paint.
Go to the top of the page
+Quote Post
derty2
post May 8 2012, 23:19
Post #1598





Group: Members
Posts: 560
Joined: 5-June 11
Member No.: 91257



Thanks for the help marc, but...

you've just cleaned up a subroutine which was already working (notwithsatnding the removal of "var v=...").
In fact, the "g_hover_seek" section –which you removed– was working too except for one small problem:

When moving the hovered mouse cursor to the extreme left position, the tooltip display should stop at -100dB; but it doesn't, it stops at -287dB.
Nothing else is wrong with my code; the dB display in the WSH window and the tooltip are syncing correctly when I hover seek all through '0db to -100dB';
except the dB display in the the tooltip continues to increase as I go left beyond -100dB.

The mathematics of "window width vs tooltip dB display" are wrong somewhere in my code; my code fully works.

Your final comment "v needs to be used as the hover text in on_paint." seems to be resolving the issue.
How exactly do I use v in on_paint? Do I have to declare "v" as a variable again at "on_paint(gr)", or is it called from your new "on_mouse_move(x,y)" subroutine.

This post has been edited by derty2: May 8 2012, 23:39
Go to the top of the page
+Quote Post
marc2003
post May 8 2012, 23:53
Post #1599





Group: Members
Posts: 4330
Joined: 27-January 05
From: England
Member No.: 19379



well the maths is too much for my poor brain. but i did find some different code by fbuser. you could try it instead....

on_paint
CODE
pos = window.Width * Math.pow((100+fb.Volume)/100,2);


on_mouse_move
CODE
v = x / window.Width;
v = (v < 0) ? 0 : (v < 1) ? v : 1;
v = 100 * (Math.pow(v,1/2) - 1);
if (g_drag) fb.Volume = v;


v is the text string you want to use in on_paint

CODE
gr.GdiDrawText(v + "dB", g_font, RGB(255,255,255).....


Go to the top of the page
+Quote Post
derty2
post May 9 2012, 01:06
Post #1600





Group: Members
Posts: 560
Joined: 5-June 11
Member No.: 91257



This is too much for my poor brain too marc; I'm giving up.
For all intents and purposes the code works; one has to try very hard to actually notice the tooltip problem, it is that minor.
Thanks for the help +++
Go to the top of the page
+Quote Post

120 Pages V  « < 62 63 64 65 66 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st April 2014 - 09:33