Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: JScript Panel (Read 297385 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: JScript Panel

Reply #1175
Thanks Marc for the bold option in the menu.
quick question : what fb.CheckComponent is supposed to do ?
Thanks

Re: JScript Panel

Reply #1176
You use it to check for other components by name. I've added an example...

https://jscript-panel.github.io/docs/namespaces/fb/#fbcheckcomponentname

You might need to hard refresh the page if you've been there recently.

Re: JScript Panel

Reply #1177
Currently, script "Spectrogram Seekbar" cannot display spectrogram for separate tracks from image+cue.
Here is example of how to use title formatting to generate spectrogram for separate tracks from image+cue (also for images with embedded cue)  when running ffmpeg from foo_run:
Code: [Select]
$if($stricmp($ext(%path%),cue),cmd.exe /d /c ffmpeg.exe -v 0 -drc_scale 0 -ss $add($mul($ifequal($strchr(%__referenced_offset%,:),3,$cut(%__referenced_offset%,2),$cut(%__referenced_offset%,3)),60),$cut($right(%__referenced_offset%,5),2)).$pad_right($muldiv($muldiv($right(%__referenced_offset%,2),%samplerate%,75),1000000,%samplerate%),6,0) -i "$directory_path(%path%)\%__referenced_file%" -t %length_ex% -f sox -|ffmpeg.exe -y -i - -lavfi showspectrumpic=s=1600x1200:mode=separate:legend=enabled "%path%.png",$if($stricmp(%__cue_embedded%,yes),cmd.exe /d /c ffmpeg.exe -v 0 -drc_scale 0 -ss $add($mul($ifequal($strchr(%__referenced_offset%,:),3,$cut(%__referenced_offset%,2),$cut(%__referenced_offset%,3)),60),$cut($right(%__referenced_offset%,5),2)).$pad_right($muldiv($muldiv($right(%__referenced_offset%,2),%samplerate%,75),1000000,%samplerate%),6,0) -i "%path%" -t %length_ex% -f sox -|ffmpeg.exe -y -i - -lavfi showspectrumpic=s=1600x1200:mode=separate:legend=enabled "%path%.png",ffmpeg.exe -y -v 0 -drc_scale 0 -i "%path%" -map_metadata -1 -lavfi showspectrumpic=s=1600x1200:mode=separate:legend=enabled "%path%.png"))
"sox" here is just format to transfer audio data between ffmpeg instances, not sox command line tool.

Can someone integrate this into script "Spectrogram Seekbar" for it to be able to generate spectrograms for separate tracks from image+cue?

Re: JScript Panel

Reply #1178
Hello marc2k3, is it possible for JSPlaylist to follow the now-playing track? hard to navigate through my playlist when it's enormous and I need to find that one song out of many...

Re: JScript Panel

Reply #1179
Azuriye  - standard fb2k behaviour is:

-Enable Cursor follows playback from the Playback menu if you want it on every track change
-Double clicking the status bar always take you to the playing track. If you don't have one visible, bind a button/shortcut to "View/Show now playing in playlist".

I'm totally ignoring the cue sheet/spectrogram for now. I'll a need a few weeks to digest that.  ;D

Re: JScript Panel

Reply #1180
Azuriye  - standard fb2k behaviour is:

-Enable Cursor follows playback from the Playback menu if you want it on every track change
-Double clicking the status bar always take you to the playing track. If you don't have one visible, bind a button/shortcut to "View/Show now playing in playlist".

I'm totally ignoring the cue sheet/spectrogram for now. I'll a need a few weeks to digest that.  ;D

My bad, I got so used to SimPlaylist scrolling downwards to the current playing track I haven't even bothered searching that such a thing existed even... Thanks a lot!



Re: JScript Panel

Reply #1183
window.Width / window.Height is always zero when fb2k starts so it's why most buttons are created from the on_size function.

@Marc2k3

Hi, as a result of your tip I was able to create scale independent buttons. Thx!


I do have a question about Mute within jscript3 ...

I created a rightclick Mute function on your Volumeslider.

Apparently fooBar knows when it is muted and also the previous volume.
How can I read the status whether fooBar is muted/not-muted and the non-muted volume within Jscript3 (something like fb.IsPaused / fb.IsPlaying for instance)?
I solved it by some ugly code, but would prefer to make use of a proper status variable.

I also noticed that if you exit fooBar while muted and then restart fooBar it is still muted but does not know the previous volume anymore. Is that correct behavior or a bug?

 

Re: JScript Panel

Reply #1184
The various fb.VolumeXXX commands are just shortcuts to main menu commands. You have to hold Shift when clicking the main playback menu to see them...



There is a C++ function in the SDK called is_muted but it's no different to this...

Code: [Select]
function is_muted() {
    return fb.Volume == -100;
}

And if your previous volume before muting is not remembered after restarting, I suppose you could save it with window.SetProperty before muting and then restoring it with window.GetProperty.

https://jscript-panel.github.io/docs/namespaces/window/#windowgetpropertyname-default_value



Re: JScript Panel

Reply #1187
(Not sure this is the right forum topic)

@Falstaff

I migrated my skin to use Smooth Playlist Manager and Smooth Browser on my main system (scale 100%). Looks great.

When I ported the skin to one of my other systems with scale 250% I noticed some anomalies after adjusting SMOOTH.EXTRA.FONT.SIZE to make SPM and SB look good.

1) In SPM if you need to input some stuff the inputfield is not (down)scaled according to the settings of SMOOTH.EXTRA.FONT.
2) In SB the Filterbox and the displays ALL ITEMS and NO COVER which are displayed in the cover area are not (down)scaled.

Is there a setting I'm overseeing?

One other question:
Would it be possible to add the option to both SPM and SB to use pseudo-transparancy (could be an extra option in the wallpaper section, I guess) ?
If not, can you add the same option for wallpaper to SB as you currently have in SPM?

Thanks

Re: JScript Panel

Reply #1188
I've been maintaining Falstaff's scripts for years now. He's no longer around.

I've fixed some Smooth font size bugs for the next release.

Once upon a time, Smooth Browser did have a background wallpaper option but I nuked it because it was cluttered and looked crap. I have no intention of restoring it.

And if you really want transparency, you'll have to use the same trick I gave you for other scripts - comment out the line that fills the panel with a solid colour. Smooth Browser can be found here...

https://github.com/jscript-panel/component/blob/372b0e6bc701dd99b8547635fb5d4e90708dc9e2/samples/smooth/jssb.js#L130

Re: JScript Panel

Reply #1189
I've fixed some Smooth font size bugs for the next release.

Thanks for fixing the font bugs in the upcoming version.

Background trick for Smooth  Browser worked and I also applied it for Smooth Playlist Manager, so I don't use the album cover background option anymore. Works a lot better for me in case of streaming Radio.

Re: JScript Panel

Reply #1190
Hello again... I've been talking with the dev responsible for foo_discord_rich in hopes to see if he could implement some sort of compatibility with his plugins or at least listen for notifications sent by the JScript panel,

He mentioned that if I want to use a custom radio station which hosts its album art separately I could use the UpdateFileInfoFromJSON function which will write tags to an mTAG file and trigger the upload script for foo_discord_rich, while at first, it seems something plausible but soon enough I noticed an issue where when I update tags while a file is playing it'll stop and start entering into a cycle where it checks for all my conditions again from start... a whole refresh.
https://github.com/s0hv/foo_discord_rich/discussions/12#discussioncomment-6070967

I assume this cannot be the correct way of using the UpdateFileInfoFromJSON function to trick another component into that a metadata change has occurred.

Re: JScript Panel

Reply #1191
UpdateFileInfoFromJSON  is obviously not for updating radio streams. It's always going to fail on playlist entries that are streams as per the very first line in the docs...

Quote
This method is for writing tags to files.

I know less than nothing about components like mtags but I'd assume they handle tagging updates transparently from fb2k/3rd party taggers without playback being affected?? Any issues with them not behaving as you expect need to be reported to the relevant dev.

Re: JScript Panel

Reply #1192
UpdateFileInfoFromJSON  is obviously not for updating radio streams. It's always going to fail on playlist entries that are streams as per the very first line in the docs...

Quote
This method is for writing tags to files.

I know less than nothing about components like mtags but I'd assume they handle tagging updates transparently from fb2k/3rd party taggers without playback being affected?? Any issues with them not behaving as you expect need to be reported to the relevant dev.


Thanks, will follow up with the respective dev.


Re: JScript Panel

Reply #1194
3.2.24 for fb2k 2.0

- Fix various `Smooth` sample bugs when using the `Ctrl` key and mouse wheel to increase the font size.

Thx. I'll test it

Re: JScript Panel

Reply #1195
3.0.28 for fb2k 1.6.6 - 1.6.16
3.2.24 for fb2k 2.0

https://jscript-panel.github.io/docs/

- Fix various `Smooth` sample bugs when using the `Ctrl` key and mouse wheel to increase the font size.

Findings on a system with 250% windows scaling:

1) ALL ITEM and NO COVER text align just fine inside the image squares. Thx :-)

2) Scaling of font with CTRL works fine, but there is a minimum fontsize. This is still a bit too big (especially in SB).

3) With the scaling of the font with CTRL, the font in the inputboxes also scale. Problem is that the base size font of the inputbox in regard to the normal font used in SPM is way too big.

For reference I attached two screenshots with an ELP, ButtonBar and Current Track which has the appropiate font sizes for display on 250%.

Is there a setting in the panel properties I'm overseeing?


Re: JScript Panel

Reply #1197
225% seems to be the max I can set in windows 10. Zero problems using default settings. I've not touched a thing.

https://i.imgur.com/sdegfcD.png

Are these SB and SPM?
Also, I cannot see the inputbox in your screenshot (Rename Playlist Box in SPM and Top Filterbox in SB. Are they  looking OK?

In the meanwhile I'll port my current version to 225 as well (have to do that anyway) and check that scaling.

Re: JScript Panel

Reply #1198
225% seems to be the max I can set in windows 10. Zero problems using default settings. I've not touched a thing.

https://i.imgur.com/sdegfcD.png

It's a bit better in 225. However the skin must scale to 300, so it's going to be worse.

With 225 the minimum font size for standard text in SPM is ok. The inputbox (when renaming playlist) in very large font  is not ok.
In SB the standard font is too big and also the inputbox ("Filter" in very large font) is not ok.

In the attached screenshot I circled the problem areas in RED. In my opinion it just does not look good.

Where do SB and SPM get their initial fontsizes from and where does the inputbox get its font from?
I tried everything in Smooth Panel Properties and checked all settings in CUI fonts but nothing weird from my side. All either Segoe 10pt or 12pt.

If it can't be fixed, I'd appreciate a tip for an alternative for SB (as a graphical artistbrowser).

Re: JScript Panel

Reply #1199
So the edit font is too big but it's not as broken for me as it for you. I will improve it.

But your artist labels looking so borked doesn't seem to be something I have any control over.

You (and all 32bit users) should use this: https://github.com/Wil-B/Library-Tree