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

BoringName

  • Full Member
  • ***
  • Posts: 219
New Version 1.6 - 3DBee_1.6

- Updated SharpGL DLLs. I haven't changed any code in relation to the new library versions so you can probably just stick with the old ones. There might be some benefits behind the scenes. So if you are feeling adventurous just copy all the DLL's from the zip file. (back them up first just in case) Note for Boroda - the code was slightly different but I altered the source code again to handle some unicode characters before compiling. Hopefully it doesn't mess anything up in that regard.
- Changed font name to use the name and not path from skin.ini files. Just make sure any font you specify is installed in windows. Font names in the skin.ini file no longer need the TTF extension. eg)Arial.ttf can be listed as Arial. If you have 3DBee set to use the default Musicbee font you don't have to worry about it.
- Updated code for Queue Next and Queue Last context menu options to be more accurate.
- Added "Play Album Now" button to the context menu. You may find some albums do not queue in track number order. I have a fix for it I just haven't implemented it yet. It seems to be a rare occurrence but my testing library is a bit small. I don't want to mess around with the now playing list on my partners computer.
- Fixed another bug with mouse scrolling. It actually works properly now.
- Fixed a bug when changing flows that caused it to ignore some settings in Skin.ini files.
- Fixed a bad memory leak that could occur when constantly scrolling through covers. This should significantly improve memory usage on large libraries. The level of usage will depend on the quality of your images and fluctuate a bit as you scroll but it shouldn't continually creep up anymore.
- Improved draw speed so you should see less no cover images when scrolling fast through non buffered covers. They are still there but not as bad. Not sure I will ever be able to eliminate them completely, it's a trade off for not having VRAM filled with buffered covers.

I took the chance and installed it on my partners computer (if I break something on there I'd be as popular as asbestos) with over 2000 albums and it seemed pretty good. No playlists are buffered. Album buffer set to 50 and animation threshold set to 50. Previously if I zoomed back and forth through her collection it would eventually get to over 1gb and crash. Now it just sits around 200-300mb of ram usage. The no cover images appear a little bit but nothing too bad.

I'm testing on a Ryzen 5 7600 system with an RTX 3060 TI and music library stored on NVME drives. Your experience may differ on mechanical drives and/or slower processor.

boroda

  • Sr. Member
  • ****
  • Posts: 4653
just tested new version, 2 remarks:

1. plugin settings window is still showing on taskbar. @BoringName, VS form editor has the setting on the right side among form properties "show on taskbar", please set it to false.
2. exception "index is out of range" on saving settings, but actually settings are saved, anyway. since it's "release" version i can't say the line of code where this exception arises. but i'm ready to run "debug" version if provided.
3. @BoringName, could you make "play album" action on DOUBLE or SINGLE-LEFT click also (not only in context menu)?



edit: typos
Last Edit: January 25, 2024, 06:34:53 PM by boroda

BoringName

  • Full Member
  • ***
  • Posts: 219
just tested new version, 2 remarks:

1. Done.
2. Was the 3Dbee panel loaded (covers visible in the Musicbee window) when you clicked save? I can see where there might be a problem with that so I will have to look into it. Does it happen every time you try and save settings or was it a one off?
3. I've made it double left click for now.


boroda

  • Sr. Member
  • ****
  • Posts: 4653
1 & 3: thanks a lot.
2: i can't reproduce this bug anymore. probably because of MB restart. also, i've copied all files (including "3DBee" folder to AppData) over previous files (i.e. "upgraded" plugin) if this matters.

anyway, this bug doesn't bother me anymore.
Last Edit: January 25, 2024, 06:33:49 PM by boroda

BoringName

  • Full Member
  • ***
  • Posts: 219
New Version 1.7 - 3DBee_1.7

- Config panel no longer shows on taskbar.
- Double left click on the 3DBee window will "Play Album Now".
- Refactored the display of album and artist names to use the Graphics class instead of SharpGL. It's much less pixelated now. Long names that will not fit in the display window get truncated.
- The graphics class seems to handle special and cyrillic character encoding better. On my machine anyway, hopefully it applies to other locales.
- Editing song tags will update the album and artist name in the flow if they have changed. But the sort order will not change until restarting musicbee or changing libraries. I'll probably leave it that way until I've refactored all the OpenGL stuff.
- Fixed a regression bug that would occur if the 3DBee panel was removed in Arrange Panels and added again.
- Fixed a possible bug saving settings when the 3DBee panel is not loaded.
- Fixed a bug that prevented the last album cover from loading when Load All Covers Into Memory is selected.
- Fixed a bug that caused incorrect covers to display on program start if any playlists are selected to keep buffered.
- Improved handling of setting changes.

Edit: Gah, forgot to set the playlist config panel to also not show on the taskbar, that will be fixed in the next version.
Last Edit: January 31, 2024, 02:43:11 AM by BoringName

BoringName

  • Full Member
  • ***
  • Posts: 219
New Version 1.8 - 3DBee_1.8

- Playlist config panel no longer shows on the taskbar
- Fixed a bug that caused index errors when adding multiple songs to the library.

Sorry about that second one, I should have found that a long time ago.....

purplebee

  • Jr. Member
  • **
  • Posts: 75
Hey,
Thank you very much for this plugin!! This brings back memories of getting my first iPod 20 years ago.

I've got a couple suggestions for it, but I completely understand if they're not feasible to implement.

*Adding an option to sort by Album Artist/Year instead of defaulting to Album Artist.
*Adding an option to only display covers for albums in a specific playlist, instead of displaying the whole library.

BoringName

  • Full Member
  • ***
  • Posts: 219
*Adding an option to sort by Album Artist/Year instead of defaulting to Album Artist.
*Adding an option to only display covers for albums in a specific playlist, instead of displaying the whole library.

Adding the functionality is easy enough but due to how everything is coded, it has implications I need to work through, particularly with buffered playlists.

I was going to work on re-coding all the OpenGL stuff but it's such a massive job I've been putting it off and making other improvements instead. But I really should nut it out so I can get rid of the buffer settings as they are just a workaround for the old inefficient OpenGL code.

But here is the to-do list I currently have. No promises what will and won't happen. Just a list I have of possible improvements.
- Re-code to use Modern OpenGL instead of immediate mode.
- Adding sort functionality.
- Limiting the flow display to playlist/files element/search etc...
- Add an option to change the flow to be vertical. Up and down instead of left and right.
- Migrate all the Skin.ini file settings to be configurable within Musicbee and allow skins to be created/deleted within Musicbee.
- Move the save settings confirmation message box to appear under the mouse instead of center screen. Apparently the only way is creating your own message box....

BoringName

  • Full Member
  • ***
  • Posts: 219
I've got all the OpenGL code updated to modern methods. Stay in school kids, the maths involved with all this stuff is no joke.

So while I have how all this works fresh in my mind, is there any kind of flow someone wants that isn't included yet? If you can describe it in detail or better yet link to images/videos I should be able to implement it. I suspect most people are just using the basic cover flow but variety is always good. I did play around with a vertical flow but it didn't look that great and it reduces the space for the artist/album info.

I also considered maybe a side by side flow where it has the front of the cover on the left and the back of the cover on the right but I doubt too many people would have back cover images?

I've also fixed it so double clicking on the scrollbar doesn't start playing the album. A problem I introduced with the last version.

lolguy8321

  • Newbie
  • *
  • Posts: 3
I've got all the OpenGL code updated to modern methods. Stay in school kids, the maths involved with all this stuff is no joke.

So while I have how all this works fresh in my mind, is there any kind of flow someone wants that isn't included yet? If you can describe it in detail or better yet link to images/videos I should be able to implement it. I suspect most people are just using the basic cover flow but variety is always good. I did play around with a vertical flow but it didn't look that great and it reduces the space for the artist/album info.

I also considered maybe a side by side flow where it has the front of the cover on the left and the back of the cover on the right but I doubt too many people would have back cover images?

I've also fixed it so double clicking on the scrollbar doesn't start playing the album. A problem I introduced with the last version.

yoo man i rlly would like to use this plugin but i am not enjoying how it looks as in the quality theres no setting as well to change that specifically..
pardon my ignorance if u have said something about it in the earlier pages of this topic bascially i have tried foobar's version of coverflow and its rlllllly smooth and looks awesome when i scroll around in ur version the album art looks hella strange and its like im looking at a 144pixel image the og album art im using is 640 so it should look better no?
hopefully i explained properly only reason im using foobar rn is that this coverflow looks epic but i wanna use musicbee as it has proper discord presence support and the themes r good as well oh and u said about ppl giving ideas for how they want the coverflow to show that foobar coverflow plugin has sum like spiral and temple which look noice so maybe u can take inspiration from those?
thanks btw :)

BoringName

  • Full Member
  • ***
  • Posts: 219
ur version the album art looks hella strange and its like im looking at a 144pixel image the og album art im using is 640 so it should look better no?

I installed foobar and the coverflow plugin, it took me a way longer than it should to figure that one out......

I have some pretty terrible low quality album covers in my collection and they look just as bad in foobar as they do in 3DBee, likewise at the other end of the scale. The higher res covers look just as good in 3DBee as Foobar in the coverflow.

So I assume your issue is the jaggies that appear on the edges of the album covers when it moves around. Foobar moves quite quickly and stops abruptly whereas 3DBee slows to a crawl before stopping which really highlights the jaggies. I initially thought it was just the crappy album covers I have in my collection but it also happens with high res covers.

Looking at foobar's coverflow, they seem to have some decent antialiasing going on which I haven't really researched yet, I've tried a few simple options but they've done nothing so I've just worked on other things in the meantime. I'll take a closer look. Those jaggies have bothered me for a while, I've added an antialiasing option for the album/artist info in the next version but that wasn't as hard to implement as it will be for the covers.

Those other flow options are interesting but I'll probably put implementing them on a low priority unless someone specifically wants to use one of them.

lolguy8321

  • Newbie
  • *
  • Posts: 3
ur version the album art looks hella strange and its like im looking at a 144pixel image the og album art im using is 640 so it should look better no?

I installed foobar and the coverflow plugin, it took me a way longer than it should to figure that one out......

I have some pretty terrible low quality album covers in my collection and they look just as bad in foobar as they do in 3DBee, likewise at the other end of the scale. The higher res covers look just as good in 3DBee as Foobar in the coverflow.

So I assume your issue is the jaggies that appear on the edges of the album covers when it moves around. Foobar moves quite quickly and stops abruptly whereas 3DBee slows to a crawl before stopping which really highlights the jaggies. I initially thought it was just the crappy album covers I have in my collection but it also happens with high res covers.

Looking at foobar's coverflow, they seem to have some decent antialiasing going on which I haven't really researched yet, I've tried a few simple options but they've done nothing so I've just worked on other things in the meantime. I'll take a closer look. Those jaggies have bothered me for a while, I've added an antialiasing option for the album/artist info in the next version but that wasn't as hard to implement as it will be for the covers.

Those other flow options are interesting but I'll probably put implementing them on a low priority unless someone specifically wants to use one of them.

the jaggies might be it but i more so notice the jaggies on the album art itself but yeah antialiasing i think shall fix it there is an option on the foobar equivalent called multisampling passes
2 other things could u maybe have the default foobar flow display thing as a flow option in musicbee? and an option to change how far the album art's are as in like maybe we could zoom in or sumthin rather than resizing the window itself?
thanks a bunch once again

BoringName

  • Full Member
  • ***
  • Posts: 219

the jaggies might be it but i more so notice the jaggies on the album art itself but yeah antialiasing i think shall fix it there is an option on the foobar equivalent called multisampling passes
2 other things could u maybe have the default foobar flow display thing as a flow option in musicbee? and an option to change how far the album art's are as in like maybe we could zoom in or sumthin rather than resizing the window itself?
thanks a bunch once again

Multisampling is what I need to research.... it adds a bit of complexity to the code so it might take me a while to nut that one out.

The default foobar display is very similar to coverflow already..... I'll think about ti.

You can manipulate the flow with the skin.ini files. Depending on your install they should be located in your appdata folder. Eg) for Coverflow you should have the following file
C:\Users\lolguy8321\AppData\Roaming\MusicBee\3DBee\skin\Coverflow\skin.ini

Obviously change "lolguy8321" to your user name.

Backup the file before changing things because there is a chance you will completely break the flow. I don't have too much error handling going on when reading this file so if you key in silly values or change the format it might just stop working. I'm going to integrate them into 3DBee eventually which is why I haven't done much on the error side of things, they are a remnant of the original code I used to make the plugin.

So here are some values you can play around with.
nbleftalbum and nbrightAlbum - Determine how many covers will be displayed on each side of the flow. Some flow types ignore these settings. EG) Vista is hardcoded to set nbleftalbum to zero.
horizontalangle and verticalangle - Change the angle of the flow. This can do some crazy things. Start with low numbers.
movehorizscene and movevertiscene - Changes the position of the flow on the screen. Just start with low numbers (under 10)  and see what happens.
zoomscene - Self explanatory, adjusts how zoomed in the camera is, be careful as you may move the scene behind the camera which will make it disappear.

These are legacy options from the original code, they are still functional at the moment but I'm not sure how useful they, I played around with the angle options the other day and it just made a mess of things. I'll look at implementing them better when I integrate the ini files into the UI. I actually haven't enabled them since moving to modern GL in the recent version but I will.

You can adjust where the artist/album info is displayed with these settings.
albumfontoffsetX=0
albumfontoffsetY=0
artistfontoffsetX=0
artistfontoffsetY=0

I think the rest of the settings are self explanatory, fonts, colours etc.... Keep in mind changing fonts won't do anything if you have the "Use Musicbee default font" enabled.
The tablered, tableblue etc... colours refer to the bottom half of the background screen.

If the table colours are the same as the back colours, the flow will have a uniform background colour. If you make the table colours different to the back colours, the top half of the background will be the back colours, the bottom half of the background will be the table colours and there will be a gradient in between them to create a horizon effect.

Have fun, remember to back up the file so you can just copy it back after you break something :)

edit: Sorry I put "Local" in the appdata folder link when it should have been "Roaming". Fixed it.

edit2: I also forgot to mention you need to restart Musicbee for any changes you make to the Skin.ini files to take effect.
Last Edit: April 01, 2024, 11:54:39 PM by BoringName

BoringName

  • Full Member
  • ***
  • Posts: 219
I don't know why everything has to be so god damn hard all the time. I've had so much stupid crap not work properly lately across different things for stupid reasons, this just takes the cake.

The author of the Foobar plugin has written it in C++ and used the GFLW library for OpenGL. To enable multisampling it's literally one line of code
glfwWindowHint(GLFW_SAMPLES, 4) //4 is the number of samples.

Mine is written in C# and I've used SharpGL as an OpenGL library wrapper. For whatever stupid reason the author of this library hasn't provided a wrapper for the command - glTexImage2DMultisample.

It's a really strange omission so maybe I'm missing something but google tells me a few other people are having problems implementing multisampling with SharpGL.

They go years without updating the library so I either have to update it myself and compile my own version, find some other way/figure out what I'm missing or refactor all the code and change to a different wrapper like OpenTK.

I doubt any of it will be as easy as the one line of code above, I clearly made some bad choices before I began coding this thing....

/ End Rant.

There are some other antialiasing techniques that don't require multisampling, I'll see how they go before I dive head first into that other crap.

lolguy8321

  • Newbie
  • *
  • Posts: 3
bro im sure coding makes ur mind go poof sumtimes
umm another suggestion btw i got was that u could maybe make it so that the album and artist text take the album art colors?
and the background as well rn its jus a black screen right instead of that make it so that it blurs the album art and uses that as the background?
sorry if im jus piling stuff on ya rn :'(
if i could lend a hand i certainly would but idk anything bout coding oof
Last Edit: April 02, 2024, 03:59:53 PM by lolguy8321