Author Topic: 3DBee (Cover Flow) Plugin  (Read 47414 times)

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10268
I've updated the 2.0 link with the changes so hopefully no else has the issue. Thanks for that.
Thanks for putting all your time into this to get is working properly.

Following the download link in the start post brings me to v1.8, which I download, but haven't installed. Is it in fact 2.0? Both the downloaded file and the plugin's page state it's v1.8.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

boroda

  • Hero Member
  • *****
  • Posts: 5186
phred, no, there is still the version 1.8 on add-on's page, not 2.0. i think this is the link to latest 2.0 build.

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10268
Thanks boroda. Downloaded and will install/test tomorrow.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Following the download link in the start post brings me to v1.8, which I download, but haven't installed. Is it in fact 2.0? Both the downloaded file and the plugin's page state it's v1.8.

That one is still 1.8. Due to how much of the code I had to rewrite for this version, I thought it would be a good idea to leave that one up for a while in case the new version had issues and people wanted to roll back (and hadn't backed up their files). The link for version 2.0 is on the previous page of this thread. I'll wait a few more days and then update the main addon page link if no one else highlights any serious problems. I suppose what I should do is update the main link and then link to 1.8 here for anyone that wants to roll back.

I do test it out on 2 separate machines here but as with Boroda, sometimes there are problems that don't show up in my testing or I just miss things that never occur to me to test. Like running it when musicbee contains no songs.... (I still haven't fixed that issue yet).

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Ok, I've updated the link on the addon page.

1.8 is here if anyone needs it - 3DBee_1.8

boroda

  • Hero Member
  • *****
  • Posts: 5186
@BoringName, well, the version 2.0 is working very fast for me, no freezes or slowdowns.

Notebook: DELL Intel Core i7-7700HQ, 16GB RAM, Nvidia GTX 1050Ti, Samsung 970 EVO Plus

Library: 9210 tracks, 40.5 GB.

-------------------

i've found 1 minor issue. plugin settings window is always opened almost offscreen (when MB window is maximized) if i open it by right-clicking on cover flow. notice that cover flow is placed on the right MB panel:


BoringName

  • Sr. Member
  • ****
  • Posts: 916
i've found 1 minor issue. plugin settings window is always opened almost offscreen (when MB window is maximized) if i open it by right-clicking on cover flow. notice that cover flow is placed on the right MB panel:

I'm surprised it doesn't automatically shift it over to fit on the screen like it does with the right click menu. They are both set to appear where the mouse pointer is but you will notice if you click at the very edge of your screen, the context menu is moved over so it all fits on the screen. I guess it handles Forms differently to ToolStripMenus or the default behaviour is different and I've missed a setting somewhere. I will check it out.

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10268
Ok, I've updated the link on the addon page.
Thank you.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

BoringName

  • Sr. Member
  • ****
  • Posts: 916
New version 2.1 - 3DBee_2.1.zip

You need to be running Musicbee version - 3.6.8989

Older versions might work but it will most definitely crash when deleting an album on older versions.

Changes
- Configuration forms will not clip off the edge of the screen anymore.
- Complete rework of skins management with a Skin Config menu option added to the settings page. More info below
- 3DBee will indicate when it can't find any albums instead of crashing.
- Deleting/adding songs will hopefully not cause any crashes now. It will also not trigger a reload of buffers which should be good for people with large libraries, large buffered playlists or "load all songs into memory" checked. Note - Any new albums added will not be buffered until Musicbee is restarted or a refresh is triggered another way eg) changing the sort order.

Someone suggested an option to change the background to a blurred image of the current albums colours. I did attempt this but I couldn't get it to work satisfactorily with the current shaders I'm using. I'd have to write another fragment shader and all the FXAA stuff burnt me out on that for a while. It might happen one day....

Skin Management
Skins are now managed within Musicbee and are accessed from the settings form via the Skin Config button.
On first load of the 2.1 version, it will scan the existing Skin folder for any skins and load the settings from the Skin.ini files. If it can't find any it will create a default skin of "Coverflow" but it will not have any images set. If the fonts listed in these files are not installed on the system it will set them to Arial.

From this form you can change the position of the flow and the Album/Artist text on the screen. It also has options for background colours and fonts including styles (italic, bold etc..) which were not previously available. When you click "Save" you should see the effects of the changes you made immediately in the flow.

The file selector fields handle the following
Scroll Left Image, Scroll Right Image - These specify the image file for the scroll bar arrows.
Scrollbar image - This specifies the image file for the scroll bar selector (the thing you drag with the mouse to move the flow.)
Scroll background Image - This specifies the background image of the scroll bar. The width of this image dictates how wide the scrollbar will be although it will auto adjust to not be less than 200 and not be wider than the current window.
No Cover Image - This specifies the image file that will be used if an album has no cover art. Has no use if "Use Musicbee no image artwork" or "Disable no arwork image" in main settings are checked. Musicbee will need to be restarted to apply this change.... I think.
Background Image - This specifies the image file that will be used for the background of the flow. If this field is empty the background color 1 and background color 2 settings will be used instead. If you don't want to use a background image anymore, just delete all the text out of this field.

It will pretty much accept any image for the fields above but the sizes can't be too extreme for the scrollbar stuff or it will just distort and make the scrollbar unusable. If you want to make your own, just look at images in the current skin folders and make them similar sizes. If you leave all these fields blank, the scrollbar will not appear or be usable.

The setting "Use Musicbee default Font" now only applies to the context menu and settings forms. The font for artist/album info now needs to be set for your particular skin on the skin config panel. If "Use Musicbee default Font" is unchecked, the context menu and settings forms will use the Main Font settings for the current skin. Changing the Main Font size will alter how big the context menu and settings forms appear. I would suggest not setting this too high, 14 and up gets a bit ridiculous and I haven't put any checks in to maintain the form layout so elements start overlapping. You've been warned.

All these settings are stored in mb_3DBee.SkinSettings.xml in case you need to change something manually.

You can add and delete skins but it won't let you delete the last one as there needs to be at least one to function. Clicking the reset defaults button only effects the current skin and will clear out all the file selection fields.  Clicking Save only saves the current skin. If you change a skin's settings then select another skin from the dropdown without clicking save, the changes to the first skin will be lost.

Tooltips have been set for all the fields so hopefully there is enough info there.

I've also realised I forgot to widen the fields with decimal places. I'll fix that up in the next version.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Hopefully no news is good news with the last version. I didn't really convey in the change notes how much code had been changed. It was a pretty big update behind the scene, not just for adding the skin management. Lots of refactored code.

I have fixed up the layout of the skin management form so the fields with decimals are a bit larger and right justified them all.  I had planned on doing that before releasing the last version but forgot.... those changes will be in the next version.

I'm at the point where there probably isn't much more I'm going to do with it. Even all the skin management stuff was probably overkill, I'd be surprised if 99.5% of users are not just running the coverflow skin with a black background and "Cover" as the flow type. That said I did get a kick out of getting it all up and running.

One other idea I was toying with was an album info panel. Either something that could be set to display all the time or displayed from a context menu option. Just a list of all the songs on the currently displayed album that can be interacted with if you wanted to queue specific songs on the album rather than the whole thing. Or if you just wanted to see what the album contains.

I feel like it would be duplicating functionality somewhat with other parts of Musicbee but personally I can see where it might be useful for users. I don't think I'm able to alter what's listed in the Musicbee files panel from a plugin, and even if I could I think that might cause conflicts with other things the user might be doing. If you're performing a search on the library, you don't want your results replaced with whatever album just started playing. I don't think the functionality is there for plugins to cater for such scenarios which is why I'm considering a separate panel/window.

Anyway, if people are interested I'll have a crack at it, otherwise the next version (with the form layout improvements) will probably be the last for a while unless some bugs need fixing.

Jorus_E

  • Newbie
  • *
  • Posts: 19
Nice work Boringname.

One little thing. Can you make de text (artist and album) as an option in the settings?

In advance, thanks.
_|°~

boroda

  • Hero Member
  • *****
  • Posts: 5186
One other idea I was toying with was an album info panel. Either something that could be set to display all the time or displayed from a context menu option. Just a list of all the songs on the currently displayed album that can be interacted with if you wanted to queue specific songs on the album rather than the whole thing. Or if you just wanted to see what the album contains.

i like this idea.

--------------

two issues:

1. plugin settings window (and, i guess, all plugin floating widows) are not children of MB main window, and are not shown on taskbar. this means that they became "invisible" (actually, go behind MB main window) if you click on the MB window when any of them is open. to make them "attached" to MB window you can use somePluginWindow.Show(mbForm), where mbForm is set to:

MbForm = Control.FromHandle(MbApiInterface.MB_GetWindowHandle()) as Form;

2. antialiased text is very thin for font sizes below 20pt:

"artist" text size is 20pt (all is good):



"artist" text size is 16pt (here is the issue):


BoringName

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

two issues:

1. plugin settings window (and, i guess, all plugin floating widows) are not children of MB main window, and are not shown on taskbar. this means that they became "invisible" (actually, go behind MB main window) if you click on the MB window when any of them is open. to make them "attached" to MB window you can use somePluginWindow.Show(mbForm), where mbForm is set to:

MbForm = Control.FromHandle(MbApiInterface.MB_GetWindowHandle()) as Form;

Thanks for this, that is so much better. I changed them from dialog windows so the user could change settings and see the effects of those changes without needing to close the form. I had considered setting them to appear in the taskbar again. I didn't know you had to specifically set them to be children of the window they are called from. It's currently setup to bring the form to the front if you try and open it again.

2. antialiased text is very thin for font sizes below 20pt:

I don't think there is much I can do about this. I'm just using the Graphics.Drawstring method. The drawtext function that comes with SharpGL was a lot worse.

The antialiasing is very inconsistent between font types and sizes. I spent a lot of time trialing different things and nothing improved the situation. I spent weeks on it....

It's currently set to use TextRenderingHint.AntiAliasGridFit if the font size is greater than 13 otherwise it uses TextRenderingHint.AntiAlias.

OpenGL probably plays a factor also as the text is drawn over a transparent rectangle, this rectangle is then drawn over the top of the flow window. OpenGL blends both images together based on the alpha of each pixel in both images and the chosen blending method. There are are a few different blending methods available in OpenGL and I tried them all.

Happy to try any ideas you have on this, I've exhausted every avenue I could find on it.

boroda

  • Hero Member
  • *****
  • Posts: 5186
The antialiasing is very inconsistent between font types and sizes...

hmm. the problem solved. i've just chosen another font  ;D  (Arial Nova Bold) instead of default one (Arial Regular).

BoringName

  • Sr. Member
  • ****
  • Posts: 916
The antialiasing is very inconsistent between font types and sizes...

hmm. the problem solved. i've just chosen another font  ;D  (Arial Nova Bold) instead of default one (Arial Regular).

Well I did just find something that could possibly help if you want to give it a try. No idea how I hadn't come across this earlier. But it changes the sizes of the font. In the screen shot below. The top one has font sizes of 20 and 16. The bottom one has 20 and 22. You can see how the artist is smaller and I've had to increase the font size of the album to get it to a similar size it was previously when set to 16. But it seems to work better, the brackets are less distorted.


Here's a link to 2.2 3DBee_2.2.zip

It's got the skin config format changes as well as making them children of the main window. The downside is anyone installing it will have to change the font sizes of all their skins to make them the size they used to be.... but it does look better as far as I can tell although I haven't done a lot of testing.

If it works out alright for you I'll update the addon page with the new version (after I do a bit more testing.).

GraphicsUnit.Pixel was the solution.... it usually defaults to GraphicsUnit.Point

I'm really over anything font related. It's been way harder than it should be to get a decent result. I've spent more time on fonts than anything else with this project.