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

kaivsdoom

  • Jr. Member
  • **
  • Posts: 20
hello. I had no error log so far.
Only after I set up the music bee again out of desperation did an error occur at the start...

MusicBee v3.5.8402.19544D  (Win10.0), 28 Jan 2023 16:11:

System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei SharpGL.OpenGL.DrawText(Int32 x, Int32 y, Single r, Single g, Single b, String faceName, Single fontSize, String text)
   bei MusicBeePlugin._3DBee.drawInfo()
   bei MusicBeePlugin._3DBee.OpenGLControl_OpenGLDraw(Object sender, OpenGLRoutedEventArgs args)
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   bei System.Delegate.DynamicInvokeImpl(Object[] args)
   bei System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   bei SharpGL.WPF.OpenGLControl.DoRender()
   bei MusicBeePlugin._3DBee.RenderEventProcessor(Object myObject, EventArgs myEventArgs)
   bei System.Windows.Forms.Timer.OnTick(EventArgs e)
   bei System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9307
Buffering the queue list should be possible.
Keeping track of the last displayed cover is on the list for the next startup.
Handling various artist albums better is on the list. I think I will just revert to using album artist, I believe if that field is blank Musicbee will return the artist by default anyway. That seems to be the case when you add the "album artist" column to the files element.
Yes, when there is no <album artist> tag MB assumes <album artist> equals <artist>. So if you change 3DBee to show <album artist> if a user didn't use that tag, MB would show <artist>. I can only assume 3DBee would see it also.

Looking forward to the upcoming changes/improvements.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

boroda

  • Sr. Member
  • ****
  • Posts: 4595
Yes, when there is no <album artist> tag MB assumes <album artist> equals <artist>. So if you change 3DBee to show <album artist> if a user didn't use that tag, MB would show <artist>. I can only assume 3DBee would see it also.
more exactly, there are TWO programmatically available tags in MusicBeeInterface.cs:

Code
        public enum MetaDataType
        {
             ...
              AlbumArtist = 31,        // displayed album artist
              AlbumArtistRaw = 34,     // stored album artist
              ...
         }
pluign just should always use tag AlbumArtist = 31.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
plugin successfully writes file "MusicBee\AppData\3DBee\mb_3DBee.Settings.xml". folder "MusicBee\AppData\3DBee\skin" is in place. all 4 skins are located in this folder. i've updated plugin to version 1.1, removed plugin panel, restarted mb, and added plugin panel again. nothing helps.

interesting that plugin floating panel title shows currently playing track name (and this track name in panel title is changed on playing another track). but panel content is always empty.

It's a strange one. Is there anything in the error log?

...but it still could be a conflicting plugin so it's worth checking that out.
nothing in error log. i'll try to turn off installed plugins one by one to see if it helps.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
i've noticed a small bug: floating panel is shown on windows taskbar. there is a form property "show on taskbar" in VS form editor.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
...but it still could be a conflicting plugin so it's worth checking that out.
i'll try to turn off installed plugins one by one to see if it helps.
i have turned off all plugins except for 3DBee, but nothing changed.

BoringName

  • Full Member
  • ***
  • Posts: 201
Version 1.2 available to download
- 3DBee will attempt to navigate to the last selected album on startup.
- 3DBee now uses the album artist field for sorting and the artist name.
- New setting: Animation Threshold. If the selected album minus the current album is greater than this threshold, it will immediately jump to within that threshold and continue scrolling to the selected album. It reduces scrolling considerably on large libraries. If you don't want to use it, just set it to a value higher than the number of albums in your library and it won't have any effect.

I have altered some of the code that may help some people currently having issues. I don't like the chances though....

That's probably the last update for a while. I'm looking at the playlist/now playing caching and that's going to be a bit of work.

If I can find anything that might be causing issues like Boroda has I will get that out straight away though.

BoringName

  • Full Member
  • ***
  • Posts: 201
i have turned off all plugins except for 3DBee, but nothing changed.

If you install the new version try deleting the XML file before you load it up.

One other thing that I've had happen, if I stuff up the code and cause an error. The plugin will be disabled at startup by Musicbee but the panel it was in will still display with a blank window. It's not until I go into edit preferences-> plugin and hit enable that it gives me an error. And the blank panel will stay there until I fix the issue and enable the plugin or go into arrange panels and click apply.

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9307
Version 1.2 available to download
The plugin download page is still showing v1.1, but v1.2 is downloaded.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

BoringName

  • Full Member
  • ***
  • Posts: 201
The plugin download page is still showing v1.1, but v1.2 is downloaded.

Fixed. Thanks.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
i've discovered that plugin (at least 1.2) is working fine for me, but only if i delete/rename "skins" folder in "AppData\3DBee" folder. i get error message "Skin Coverflow is not valid! Attempting to recover..." on plugin initialization in this case, but plugin works. what may be the cause?

edit:
i see 2 possible reasons, why coverflow skin (and maybe other skins) doesn't work. skin.ini is not UTF-8 encoded, but contains unicode characters (not only Latin-1 characters). included fonts don't contain cyrillic letters. i.e. the problem is my windows regional settings.

maybe, it's some other problem.
Last Edit: January 29, 2023, 05:36:13 AM by boroda

BoringName

  • Full Member
  • ***
  • Posts: 201
Patched version of musicbee that allows the panel to be resized when it's placed above the files element in the main panel - https://getmusicbee.com/patches/MusicBee35_Patched.zip

i've discovered that plugin (at least 1.2) is working fine for me, but only if i delete/rename "skins" folder in "AppData\3DBee" folder. i get error message "Skin Coverflow is not valid! Attempting to recover..." on plugin initialization in this case, but plugin works. what may be the cause?

The plot thickens...

If you put the skins folder back and restart music bee, what happens?

That's a strange one. It must have the right path because it knows when the folder is missing. Maybe something got corrupted in there somewhere. Try getting the skin folder out of the current version zip file and see if that one works. There is not much in them, it's just an ini file and some images. I don't know why it wouldn't be working.

edit: Actually just try putting the Coverflow skin folder first and see if that works. appdata\3DBee\skin\Coverflow
Last Edit: January 29, 2023, 05:39:01 AM by BoringName

boroda

  • Sr. Member
  • ****
  • Posts: 4595
it's not the problem of mb path. i've just copied mb to "D:\MusicBee", and still have the same behavior.

read my previous post. i was typing it, when you've answered.

BoringName

  • Full Member
  • ***
  • Posts: 201

edit:
i see 2 possible reasons, why coverflow skin (and maybe other skins) doesn't work. skin.ini is not UTF-8 encoded, but contains unicode characters (not only Latin-1 characters). included fonts don't contain cyrillic letters. i.e. the problem is my windows regional settings.

maybe, it's some other problem.

That's probably going to be it. Most of those ini files are from the original author of coverjuke, I've edited them a bit but yeah.

If fonts are the issue, you can list whatever fonts you want in the ini files. You just have to put the applicable TTF font files in the font folder of that skin. If you edit the 3DBee xml file and change useMbDefaultFont to true it won't use those fonts for drawing but it will try to load them in the plugin initially so it probably won't bypass the problem.

I do have a plan to change how fonts are handled but it's going to be a while.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
well, fonts don't arise the issues. i'm not sure which fonts are actually used by plugin for cyrillic letters, but replacing provided fonts, by windows unicode fonts doesn't change anything. i'm still thinking that skin.ini files should use utf-8 encoding instead of ansi, but it's also, not my problem at the moment.

the real problem is last 3 lines in skin.ini (at least for coverflow skin). i've commented them:

Code
#movehorizscene = 0.000000
#movevertiscene = 0.200000
#zoomscene = 0.000000

and plugin is working now fine and without any error messages. if i uncomment any of these 3 lines, the plugin (silently, without error messages, and without writing anything to mb error log) displays an empty panel.