Streaming Audio File Player Controls - discussion and script

This is the script used for this gig file: [Gig] Streaming Audio File Player Controls

var //declare the needed variables (here widgets only)
btnPlayStop, btnRew10, btnPrevTrk, btnFfw10, btnNextTrk : widget
lblPlayStop, lblRew10, lblPrevTrk, lblFfw10, lblNextTrk : widget
lblPosition, fdrPosition : widget

const //declare some values as constants (easier to change if needed)
RGBcolPlay : integer = -13631744 //green
RGBcolStop : integer = -65536 //red
symPlay : string = "4" //PLAY arrow in "webdings" font
symStop : string = "<" //STOP square in "webdings" font

//user function to set the play/stop state of the play/stop button & label
function setPlayStop(playState : string)
    if playState == "STOP" then
        SetWidgetLabel(btnPlayStop,"PLAY") //set widget caption of underlying button
        SetLabelColor(lblPlayStop,RGBcolPlay) //set color of labe
        SetWidgetLabel(lblPlayStop,symPlay) //set symbol of label
    Elsif playState == "PLAY" then
        SetWidgetLabel(btnPlayStop,"STOP")
        SetLabelColor(lblPlayStop,RGBcolStop)
        SetWidgetLabel(lblPlayStop,symStop)
    end
End

//On fiirst start set the button to STOP
Initialization
    setPlayStop("STOP")
End

//set the button state according to its value
On WidgetValueChanged (bVal : double) from btnPlayStop
    if bVal >0.6 then //is pressed
        setPlayStop("PLAY")
    else //is not pressed
        setPlayStop("STOP")
    end
End


If you have any questions about the gig file of the script, ask here. :slight_smile:

3 Likes

This post is not about the script but about the display of widgets in GP.

Firstly, thank you @schamass for this very useful gig file. :+1:

Problem: The screenshot presented in the post is correct but the display in GP is not the same and I had to modify the widgets and fonts to obtain a correct display.

First image = display of the original gig file in GP
Second image = modified display in GP


Can anyone explain why this is? different display settings in the OS, or something?

(also small insignificant typo: "Local control of “Gloabal” Rackspace) :wink:

Did you install the fonts?

This is from my computer (Windows 11, 1920x1080), but I have the fonts installed.

Yes, I checked first but I know they were already installed (I have over 1000 fonts installed).
Maybe there is a difference between them though.
I will download and install them.

Ok, I downloaded and reinstalled the fonts (Windows asked me to replace the existing ones) but the problem remains the same.

What is your display resolution?

The Digital font is definitely not properly recognized (when I see images you posted in this thread).

W11 1920x1080

New picture with fonts installed

I tried again, all good. :thinking:
The same resolution.

Can you close Gig Performer and re-open the gig file?

My first guess was also the resolution… maybe a diffrent font scale factor in WIN?

Is it due to scaling of your desktop display in Windows? This can be different between monitors on the same system and some older fonts don’t scale so well.

EDIT: Sorry @schamass, I’ve just seen that’s the very same thing you have just suggested!

2 Likes

My scaling is also 100%

1 Like

I unplugged the external monitors, reset the default Windows display settings then restarted Windows.

… and? :slight_smile:
(did you check your scaling?)

it is not reset by the default Windows display settings? I have never touched this. Where is this setting?

Right click on your Desktop area - Display settings.

I have the same problem on my desktop PC and my other laptop Lenovo - reset windows display settings too.

Just thinking loudly… you just could have easily reduced the font size of the widgets, so it’s ok for your screen. :wink:

Here is a screenshot of the default and recommended settings on my 2 laptops.

Dell 15" :

dell-15p

Lenovo 13" :

lenovo-13p.

To test scaling as shown in the screenshot of @DaveBoulden, I changed the scaling from 125% to 100%.

dell-15p-100-scale

The display is a little better, but there are still a few poorly displayed parts.

The main problem is that now, in GP, the displays are modified in all gig files, as in other graphics applications, so I am going to stick with the recommended default Windows display so as not to spend days modifying all my files in the applications. :grimacing:

Yes, It was easier to modify this single file, which I have already done to demonstrate the problem as shown in my first screenshot of the modified gig file :wink:

And above all, the most important thing is to have a good gig file that works… which I have not yet tested :rofl:

1 Like

Just for the completeness → https://www.thewindowsclub.com/how-to-change-scaling-for-specific-apps-in-windows-11

2 Likes