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: foo_vis_text (Text Visualizer) (Read 6336 times) previous topic - next topic
IP974 (+ 1 Hidden) and 2 Guests are viewing this topic.

Re: foo_vis_text (Text Visualizer)

Reply #25
Maybe another dev can explain what the preferred design is for such a scenario? Should the component do its own bookkeeping of the different instances or is this supported by the SDK? @case, maybe?
You could save per instance data like your spectrum analyser. Rather than use external html files, save it as a string using stream_writer/stream_reader.
edit: I can't try this (no Edge) but I'm slightly bemused by a web view being "lighter" than my heavy component. :P
I knew this comment was going to come back to me... ;-)

'Lighter' in the sense that I have no intention of writing a jscript-panel clone. I just need the functionality to display some formatted text and didn't want to bother with any other dependencies that jscript-panel may have. And Edge/WebView is installed on a lot/most Windows installations, even when you don't use Edge for daily browsing. The fact that WebView brings along the complete browser technology may be a plus for some users.

The same goes for editing the HTML file. VS Code is my preferred editor so why bother adding an embedded editor?

As for the original question, I was hoping the configuration variables provided some way to tie them to a specific instance of the component. I guess I'll have to take the long way.

On a selfish note: I've been looking for an opportunity to experiment with EdgeView after having gone through the Internet Explorer COM nightmare years ago.

Re: foo_vis_text (Text Visualizer)

Reply #26
Yes, that's the screen. I tried it on several PCs and several foobar, but I couldn't get to that screen (Layout Editing Mode).
Ah, you're using a Tab control. Apparently the Tab control forces a component window to become visible again even if it has been hidden before. Let me see how I can work around that...
I think I fixed it in v0.1.3.1.

Re: foo_vis_text (Text Visualizer)

Reply #27
I just need the functionality to display some formatted text and didn't want to bother with any other dependencies that jscript-panel may have.

I have zero dependencies except a font which windows 10 users need to download. Windows 11 peeps already have it.

Re: foo_vis_text (Text Visualizer)

Reply #28
Nothing has changed, the problem has not been solved.
As a test, temporarily simplify this context menu.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 PRO, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY WH-ULT900N (ULT WEAR) (made a Upgrade/Balanced Cable by myself)


Re: foo_vis_text (Text Visualizer)

Reply #30
Your image does not have any text displayed in the Text Visualizer panel.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 PRO, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY WH-ULT900N (ULT WEAR) (made a Upgrade/Balanced Cable by myself)

Re: foo_vis_text (Text Visualizer)

Reply #31
Your image does not have any text displayed in the Text Visualizer panel.
Exactly. It can't work. Either the WebView is active and its context menu takes precedence. Or I react to enabling "Layout Mode" and I temporarily hide the WebView (as is the suggested way in the foobar2000 SDK).

Re: foo_vis_text (Text Visualizer)

Reply #32
foo_vis_text v0.1.2.0

  • New: Added OnPlaybackDynamicInfo() and OnPlaybackDynamicTrackInfo() callback. Useful to display meta data from streamed audio.
  • Improved: A copy of the default template file is created when the component starts the first time.
  • Improved: The context menu contains a menu item to access the preferences page.

Available in the Components repository and on GitHub.

Hi @pqyt,
sorry for silly question but how do we use this plugin? It displays some predefined values/texts but I can't find any options to change it. I wanted to add other things to it but clicking on the only clickable button in the preferences gives me error. Is there a file to be changed/rewritten somewhere?
Is displaying art as a background planned?
The component uses WebView. So you have full control of what you want to display and from where. It only needs the location of the HTML file. I have tested only local HTML files but adding support for a web server hosted file should be easy.

You get an error because you don't have an editor associated with HTML files in Windows.

The component has a few callbacks to the HTML file for the common playback events: start, stop, etc... The HTML file can react to that with Javascript. As an extra the HTML file can ask the component to process fb2k title formatting to get information about the current or focused track in a playlist.

The Default-Template.html file contains an example of all implemented functionality.

Artwork needs to come from an external source. Embedded artwork is not (yet?) supported.

I want to keep things lean.
Can i provide the plugin with a HTML file on-the-fly, a relative path, or just ".\vis-text-display\template.html".

This is absolutely an awesome component to interact with HTML and JavaScript. If the component can handle callbacks, it may trigger a lot of FB skin.

Thank @pqyt very much.

Re: foo_vis_text (Text Visualizer)

Reply #33
Can i provide the plugin with a HTML file on-the-fly, a relative path, or just ".\vis-text-display\template.html".
Define: on-the-fly. It currently has been tested with absolute URL's. There's no API for passing HTML text yet.

If the component can handle callbacks, it may trigger a lot of FB skin.
There are a couple of predefined callbacks from the component to the HTML page but nothing dynamic. If you need complete flexibility you should look at jscript-panel.

Re: foo_vis_text (Text Visualizer)

Reply #34
Interesting component 🙄
Is it possible to transform formatted text to clickable urls?
eg For tags that refer to websites..

Re: foo_vis_text (Text Visualizer)

Reply #35
Interesting component 🙄
Is it possible to transform formatted text to clickable urls?
eg For tags that refer to websites..
If I understand your question correctly then storing the output of the callback in an <a></a> element will do the trick. It remains a fully functional web page.

Re: foo_vis_text (Text Visualizer)

Reply #36
U
Interesting component 🙄
Is it possible to transform formatted text to clickable urls?
eg For tags that refer to websites..
If I understand your question correctly then storing the output of the callback in an <a></a> element will do the trick. It remains a fully functional web page.
Yes correctly understood.
Could you please provide a sample of the code needed in the template?

Re: foo_vis_text (Text Visualizer)

Reply #37
U
Interesting component 🙄
Is it possible to transform formatted text to clickable urls?
eg For tags that refer to websites..
If I understand your question correctly then storing the output of the callback in an <a></a> element will do the trick. It remains a fully functional web page.
Yes correctly understood.
Could you please provide a sample of the code needed in the template?
It's part of the component archive. You can open it with any Zip archiver. And it is stored as Default-Template.html in the directory where the component is installed. Upon installation your profile directory also gets a copy in a subdirectory called foo_vis_text.

Re: foo_vis_text (Text Visualizer)

Reply #38
Could you please provide a sample of the code needed in the template?

You could put something like this into the <div id="Info"> Section:
<span> <a href="https://last.fm/music/" onclick="location.href=this.href+albumartist;return false;" id="AlbumArtist"> </a></span><br/>

and belowe <script> you add the following line
albumartist = chrome.webview.hostObjects.sync.foo_vis_text.GetFormattedText("[%album artist%]");

This will give you a clickable album artist and forward you to the respective last.fm artist page.

Re: foo_vis_text (Text Visualizer)

Reply #39
Could you please provide a sample of the code needed in the template?

You could put something like this into the <div id="Info"> Section:
<span> <a href="https://last.fm/music/" onclick="location.href=this.href+albumartist;return false;" id="AlbumArtist"> </a></span><br/>

and belowe <script> you add the following line
albumartist = chrome.webview.hostObjects.sync.foo_vis_text.GetFormattedText("[%album artist%]");

This will give you a clickable album artist and forward you to the respective last.fm artist page.
@Major_Tom
Thanks !!

Re: foo_vis_text (Text Visualizer)

Reply #40
Hello pqyt and Others. Cans/mays add in window "Text Visualizer" streaks/strips with: slider playback and slider volume, add fadness/boldness to/for fonts .artist, .track; make window with frame "Text Visualizer" transparents, and add show via/through regular expressions what be (to) take .artist, .track from the filename? For example what be (to) take from file name (from “Artist - Title1”), Artist and title via/through regular expression "(.+) - (.+)".

 

Re: foo_vis_text (Text Visualizer)

Reply #41
Hello pqyt and Others. Cans/mays add in window "Text Visualizer" streaks/strips with: slider playback and slider volume, add fadness/boldness to/for fonts .artist, .track; make window with frame "Text Visualizer" transparents, and add show via/through regular expressions what be (to) take .artist, .track from the filename? For example what be (to) take from file name (from “Artist - Title1”), Artist and title via/through regular expression "(.+) - (.+)".
The plugin uses HTML and a Chromium-based engine. Any styling and visualization can be done with CSS and Javascript. The same goes for regex. Javascript is your friend. Maybe another user with better CSS/Javascript skills can help you. And for full control have a look at foo_jscript_panel3.

Re: foo_vis_text (Text Visualizer)

Reply #42
I'm not good (bad) figuring it out in CSS and Javascript. Can someone else implement the above suggestion? (How add in window "Text Visualizer" streaks/strips with: slider playback and slider volume, add fadness/boldness to/for fonts .artist, .track; make window with frame "Text Visualizer" transparents).

Re: foo_vis_text (Text Visualizer)

Reply #43
Hello. First of all, congratulations on this plugin for being so wonderful. The crazy things that can be done with html, css and JS.



But I have a problem. I have the plugin in a tab. When I open a different tab and close the program, when I reopen it and go to the tab where the Text Visualizer plugin is, it is blank and nothing can revive it. There is no way to make it work, the only way is to leave that tab open, close and reopen Foobar and it appears there.





It's like it stops rendering or something, or the plugin stops running. Even right clicking doesn't work. It goes completely blank.



It also gives the same error when you change the layout of the Columns UI interface.

Would this problem have a solution?



Re: foo_vis_text (Text Visualizer)

Reply #46
Sorry to disapoint you but I fail to reproduce this. The WebView continues to update no matter how many times I switch the tabs or how many times the track changes. I just even had a missing track error while switching and everything keeps working.

Are there any error messages in the fb2k console?

Re: foo_vis_text (Text Visualizer)

Reply #47
Sorry to disapoint you but I fail to reproduce this. The WebView continues to update no matter how many times I switch the tabs or how many times the track changes. I just even had a missing track error while switching and everything keeps working.

Are there any error messages in the fb2k console?

Try changing tabs, that is, to another tab other than the one with the plugin. Then close Foobar and reopen it to see if it fails for you at that time as well.

If you close Foobar with a tab other than the plugin, if you reopen it and go to the plugin tab it will show a blank window.


Here is what the console shows when you open Foobar and reproduce the error.

It seems that there is nothing strange in the console, right?

I am using the Columns UI as a user interface.


Components loaded in: 0:00.013684
Configuration read in: 0:00.122459
foobar2000 v2.1 x64 [standard]
Playlist #0 loaded in 0:00.014745
Watching: \\192.168.1.37\musica
JScript Panel 3.3.28 (Text Display by marc2003): initialised in 109 ms
foo_vis_text is using WebView 125.0.2535.92.
JScript Panel 3.3.28 (Text Display by marc2003): initialised in 18 ms
Playlist view initialised in: 0.029 s
Playlist #1 loaded in 0:00.000495
Playlist #2 loaded in 0:00.003712
Playlist #3 loaded in 0:00.001499
Playlist #4 loaded in 0:00.000951
Playlist #5 loaded in 0:00.000184
Playlist #6 loaded in 0:00.000414
Playlist #7 loaded in 0:00.000145
Playlist #8 loaded in 0:00.000425
Playlist #9 loaded in 0:00.000777
Playlist #10 loaded in 0:00.000423
Playlist #11 loaded in 0:00.000115
Playlist #12 loaded in 0:00.000098
Playlist #13 loaded in 0:00.000707
Playlist #14 loaded in 0:00.000101
Playlist #15 loaded in 0:00.000616
Playlist #16 loaded in 0:00.001225
Playlist #17 loaded in 0:00.017184
Playlist #18 loaded in 0:00.000661
Playlist #19 loaded in 0:00.000382
Playlist #20 loaded in 0:00.000295
Playlist #21 loaded in 0:00.000345
Playlist #22 loaded in 0:00.000285
Playlist #23 loaded in 0:00.000168
Playlist #24 loaded in 0:00.000186
Playlist #25 loaded in 0:00.000362
Playlist #26 loaded in 0:00.000140
Playlist #27 loaded in 0:00.000078
Playlist #28 loaded in 0:00.000097
Playlist #29 loaded in 0:00.000481
Playlist #30 loaded in 0:00.000143
Playlist #31 loaded in 0:00.000428
Playlist #32 loaded in 0:00.000267
Playlist #33 loaded in 0:00.000272
Playlist #34 loaded in 0:00.000100
Playlist #35 loaded in 0:00.000304
Playlist #36 loaded in 0:00.000433
Playlist #37 loaded in 0:00.000726
Playlist #38 loaded in 0:00.023068
Playlist #39 loaded in 0:00.000101
Playlist #40 loaded in 0:00.000487
Playlist #41 loaded in 0:00.000371
Playlist #42 loaded in 0:00.000288
Playlist #43 loaded in 0:00.000208
Playlist #44 loaded in 0:00.000247
Playlist #45 loaded in 0:00.000145
Playlist #46 loaded in 0:00.000191
Playlist #47 loaded in 0:00.000173
Playlist #48 loaded in 0:00.000126
Playlist #49 loaded in 0:00.003365
JScript Panel 3.3.28 (Text Display by marc2003): initialised in 22 ms
JScript Panel 3.3.28 (Text Display by marc2003): initialised in 21 ms
Playlist view initialised in: 0.023 s
User Interface initialized in: 0:01.054426
FFmpeg version: 6.0
Startup time : 0:01.259669
Library initialized after 0:02.243819
Opening track for playback: "\\192.168.1.37\musica\_CLASICA\_BACH\_BACH_333\168 - Orchestral Suites 2-4 (Goebel / Hogwood)\20 - Orchestral Suite no. 3 in D major, BWV 1068 3. Gavotte I alternativement - 4. [Gavotte] II.flac"
Using decoder shim instead of DSP: Skip Track
Automatic resampling: using Resampler (dBpoweramp/SSRC): 96000 Hz, Resampler (RetroArch): 96000 Hz
Device: Auriculares (Sharkoon Mobile DAC PD)
Mix format: 96000 Hz / 32-bit float / 2 channels (0x3)
Sending stream: 96000 Hz / 32-bit float / 2 channels (0x3)

Re: foo_vis_text (Text Visualizer)

Reply #48
Sorry to disapoint you but I fail to reproduce this. The WebView continues to update no matter how many times I switch the tabs or how many times the track changes. I just even had a missing track error while switching and everything keeps working.

Are there any error messages in the fb2k console?
If you close Foobar with a tab other than the plugin
I missed that and can reproduce it now. But stepping through the code never generates any error. The WebView initializes correctly. Must be something internal to the WebView. I'll see if I can work around it.

Re: foo_vis_text (Text Visualizer)

Reply #49
Sorry to disapoint you but I fail to reproduce this. The WebView continues to update no matter how many times I switch the tabs or how many times the track changes. I just even had a missing track error while switching and everything keeps working.

Are there any error messages in the fb2k console?
If you close Foobar with a tab other than the plugin
I missed that and can reproduce it now. But stepping through the code never generates any error. The WebView initializes correctly. Must be something internal to the WebView. I'll see if I can work around it.
Please try the work-around from GitHub and let me know if it fixes the problem before I release it to the component repository.