Author Topic: VerBeeliser Track Information Announcer Plugin  (Read 5715 times)

karbock

  • Sr. Member
  • ****
  • Posts: 548

Image posted by aktor:


@aktor: the image is invisible in your post.
This BBcode works:
[img]https://i.imgur.com/47H4Zzm.png[/img]
but this not:
[img]https://imgur.com/a/Bpxk7hH[/img]

To get the correct URL:
- from within ImgUr, right-click in the picture -> Open picture in new tab
- copy new URL

... or upload the picture with ShareX, and get the BBcode from its menus.


boroda

  • Hero Member
  • *****
  • Posts: 5171
Prefix/ suffix: If a key is used as hotkey the letter doesn't type in.

I'm not sure what you mean. The code is exactly the same whether triggered by a hotkey or track transition.

i think aktor means that if you assign e.g. button 'd' as MB hotkey, then you won't be able to type letter 'd' in any standard .net control. (text box, combo box, etc.) such a button will work as hotkey instead. Steven has addressed this issue ages ago. here is the exempt from AT&RT's source code:

c# designer file of some command
Code
            ...
            this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();

            //MusicBee
            this.templateNameTextBox = ControlsTools.NewMusicBeeTextBox();
            //~MusicBee            

            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
            this.splitContainer1.Panel1.SuspendLayout();
            this.splitContainer1.Panel2.SuspendLayout();
            this.splitContainer1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.templateTable)).BeginInit();
            ...

insert such code right after the last 'new' operator. be aware that you must insert this code every time after using VS form editor.

here is helper ControlsTools.NewMusicBeeTextBox() method
Code
    internal static class ControlsTools
    {
        ...
        internal static TextBox NewMusicBeeTextBox()
        {
            return (TextBox)Plugin.MbApiInterface.MB_AddPanel(null, Plugin.PluginPanelDock.TextBox);
        }
        ...
    }
Last Edit: January 15, 2025, 03:25:46 PM by boroda


BoringName

  • Sr. Member
  • ****
  • Posts: 916

i think aktor means that if you assign e.g. button 'd' as MB hotkey, then you won't be able to type letter 'd' in any standard .net control. (text box, combo box, etc.) such a button will work as hotkey instead. Steven has addressed this issue ages ago. here is the exempt from AT&RT's source code:

Righto, thanks. I had mine set to ALT+Z for testing so it's not an issue I encountered. That shouldn't be too hard to fix up.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
New version - mb_VerBeeliser_1.2.zip

Changes
- Changed some elements to hopefully fix scaling problems.
- Single or shifted hotkey characters will no longer trigger when editing tags. Other modified hotkeys will still trigger eg) ALT+Z

I want to get this stupid layout issue sorted first before I start adding more elements to handle different audio devices.

boroda

  • Hero Member
  • *****
  • Posts: 5171
btw, what is the issue with high dpi scaling on win11? i don't have win11, so can't test it myself. just curious if AT&RT has the same scaling issue on win11 because i never did any workarounds for this.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
btw, what is the issue with high dpi scaling on win11? i don't have win11, so can't test it myself. just curious if AT&RT has the same scaling issue on win11 because i never did any workarounds for this.

Windows 11 scales differently to windows 10 when scaling is set to more than 100%. It's only an issue with Winforms and not WPF.

When I first setup the config page I used ListBoxes but when I considered adding the prefix/suffix settings, I realised it wasn't going to work so I changed the right one to a ListView instead. I didn't change the left one because it worked for what I needed and it was easier than having to change over all the mouse/dragdrop events.

But as you can see from Aktor's screenshot, the listBox element hasn't scaled correctly vertically. The ListView column widths are not correct either. In the latest version I changed the remaining ListBox to a ListView and added some code that hopefully sets the column widths correctly as well.

I should probably setup a virtualBox for windows 11 so I can test it properly.

edit: It might also just be an issue with the net version it's targeting. Currently its 4.8, from some of the google results I think 6.0 might fix up a lot of the issues. But I don't think plugins will initialise in MusicBee with 6.0 yet.
Last Edit: January 16, 2025, 07:54:47 AM by BoringName

aktor

  • Sr. Member
  • ****
  • Posts: 336

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Scaling is fixed.

Thanks for confirming. So it seems the main culprit was the ListBox element. I found a few references on the dotnet github to do with ListBoxes and things not scaling properly with hi DPI. I'd recommend using a ListView or a DataGrid instead.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
New version - mb_VerBeeliser_1.3.zip

Changes
- New option to select the output device for VerBeeliser.

I'm using CSCore audio library as some users had issues with NAudio when I was playing around with that for VUMeter. Hopefully this one doesn't have the same problems.

It's currently set for WASAPI shared mode.

It will only list devices that were active when the plugin starts up so if you plug in a new device you will need to restart Musicbee for it to show up in the list. If it can't find the current saved device on startup it will default to the default audio device on the system.

I have limited ability to test this thing so keep that in mind. I was able to have VerBeeliser come out of my monitor speakers (That I only found out existed today) via an Nvidia graphics card while the music was coming out of my PC speakers.


sveakul

  • Hero Member
  • *****
  • Posts: 3260
I don't use this personally, but I have to compliment you on creating this, quite a piece of work to implement and I'm sure many will be glad to have this available.  Thank you for your effort!  I'm glad you didn't let your plugin development work stop after VUMeter.  Got any more in ya??  As I mentioned before a stable VSTHost/Bridge would be nice but you said there was something that provided an obstacle there.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
I don't use this personally, but I have to compliment you on creating this, quite a piece of work to implement and I'm sure many will be glad to have this available.  Thank you for your effort!  I'm glad you didn't let your plugin development work stop after VUMeter.  Got any more in ya??  As I mentioned before a stable VSTHost/Bridge would be nice but you said there was something that provided an obstacle there.

Well, after Hiccup went AWOL for a month I had no-one giving me ideas/work for VUMeter :)

I saw an old post about this and when I found how easy it was to implement text to speech in windows it was a no brainer, I slapped it all together in a few hours. It helps to have an existing plugin to modify instead of starting from scratch. What took a long time was getting Musicbee to play nice with pausing/resuming but that was my own fault for not running it in a separate thread from the beginning like I should have done. And the windows 11 UI nonsense.

Pretty much no chance of the VST stuff. Its something Steven would have to implement.

I'm open to other ideas....


BoringName

  • Sr. Member
  • ****
  • Posts: 916
A plugin for airplay 2?

Aside from my complete disdain for apple, it's already been done.

http://emilles.dyndns.org/software/out_apx.html

It comes with an installer and supports Foobar2000, MediaMonkey, MusicBee, Winamp, or XMPlay

Yeah, it's not free but if you're already buying apple products I doubt $10 is going to hurt your wallet. Plus they deserve it.