Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Elberet

Pages: 12
MusicBee API / NowPlaying vs. Library
« on: August 04, 2011, 12:06:56 AM »
I'm trying to update tags in a file in the now playing list that wasn't added to the library. Library_SetFileTag returns true (I'm assuming this means that the tag value was parsed ok), but Library_CommitTagsToFile -- which I'm only calling because a NowPlaying_CommitTagsToFile isn't available -- returns false and the tags aren't updated.
Is it at all possible to change the tags of a file that isn't in the library?

MusicBee API / MultiArtist and MultiComposer
« on: August 03, 2011, 11:26:03 PM »
I can't find the original post right now, but I believe Steven said the MultiArtist tag contains the list of artists separated by 0-bytes. I'm getting an additional \0 at the end of the string, i.e. "Ray Charles\0\"Joliet\" Jake Blues\0". Is that by design for better compatibility with C/C++ where you read up to the next \0, or should I assume that the list contains three artists where the third is the empty string? Right now I tend to just ignore any trailing \0's before splitting the tag because MB returns the empty string (no \0's at all) when the tag is unset.

MusicBee API / Impact of plugin callback methods on playback
« on: July 24, 2011, 05:42:44 AM »
I've noticed that the debug version of my WiP plugin causes MusicBee's audio playback to slightly stutter whenever I'm doing something that could take longer then a couple microseconds, such as doing blocking file or network I/O on the thread where MusicBee delivers notifications. With the release build and no debugger attached to the process, there are no stutters. Those jitters could be a side-effect of the debugger, but I'm not conviced.

Is it okay for a plugin, in general, to use MusicBee's notification delivery thread for performing potentially costly tasks, or would that collide with other plugins or MusicBee's internals?

MusicBee API / Stop after current
« on: July 05, 2011, 11:19:11 AM »
Hm, I'm writing documentation for my wrapper, and these little things crop up...

Anyways, StopAfterCurrent is incomplete, or rather it's missing a corresponding API call to cancel the stop-after-current request (result: MB keeps playing after the current file, as if StopAfterCurrent had never been called), a notification that the stop-after-current trigger is set and a getter call to find out if stop-after-current is scheduled - alternatively, a new PlayState flag.

I'm sure some desktop gadget might be able to use this productively... :)

MusicBee API / Auto-Dj
« on: July 05, 2011, 10:09:03 AM »
Another one of these minor things.

One can derive the state of Auto-Dj from the two notifications, but there's no guarantee that the Auto-Dj is in a certain state when the plugin is started. So Until the first time one of these messages is received, it's impossible for a plugin to determine if the Auto-Dj is running or not.
Suggestion for v1.3: bring Auto-Dj in line with Volume, i.e. a delegate to get the Auto-Dj's state (bool, false = stopped, true = running) and a single notification when it's state is changed.

MusicBee API / QueueNext bugged?
« on: June 29, 2011, 12:12:01 PM »
Copy & paste bug? ;D

string file = mbApiInterface.NowPlaying_GetFileUrl();

MusicBee ignores the given file and adds the plugin DLL as the next song instead...

P.S., I'll post any other bugs relating to the API here instead of the general bug reports forum, if that's okay with you, Steven.

MusicBee API / Ouch, threading...
« on: June 22, 2011, 03:17:48 PM »
I'm going to post this hoping that it'll help others avoid my stupid blunders... and hoping that Steven might have a bright idea how plugins can be shielded from this complexity.

What I did:
- For debugging, print each received notificatio to a small window.
- The window runs on MusicBee's main thread.
- Messages are printed by Invoke'ing the textbox control (owned by the main thread).
- I prevented the plugin from running entry points (PluginClosed, NotificationReceived, etc.) concurrently.
Sounds innocent enough, right?

Here's what happens:
- MusicBee gets quit, which gets handled on the main thread.
- MB stops the auto Dj which results in a notification on a separate thread.
- On the worker thread, plugin tries to Invoke a control on the main thread, and Invoke locks.
- Back on the main thread, MB tries to run PluginClosed on the plugin, which conflicts with the blocking Invoke above and deadlocks.
- Alternatively, without the explicit locks, MB finishes shutting down; but when the main thread is free to handle the still waiting Invoke, the control that was originally invoked is now disposed and the invoking thread is thrown an exception.

So, what to do, what to do. In my case, I'll use an asynchronous BeginInvoke and catch the exception, but plugins that want to do some legitimate GUI work might run into problems here. How about if disposing the main window is delayed until plugins have finished closing on their worker thread? That way, the GUI thread could be freed up for plugins to do some last-minute user interaction.

MusicBee API / Bug in MB_GetWindowHandle
« on: May 28, 2011, 09:25:13 PM »
Man, it's been ages since I posted in this forum... ^^

Anyhow, I've been toying with the plugin API and I think I found a bug in MB_GetWindowHandle. When this delegate is called e.g. in response to the PluginStartup notification, the call is running on a background thread where MusicBee can't query the main Form's handle:
       bei System.Windows.Forms.Control.get_Handle()
       bei #=qzjQScvhaxDGgseRKuAhV_kELbKEcrC_gcOcNkdsp1mc=.#=qrVSCRWSBIFxMCO4aVHPWuKX_K15AMOs2Pj2p4C4EKR0=()
       bei MusicBeePlugin.MusicBeeAPI.get_MainWindow()
       bei TestPlugin.TestPlugin.OnPluginStartup()

Ah, isn't .NET lovely... ;)

MusicBee Wishlist / Rating options in player context menu
« on: July 06, 2010, 12:33:02 PM »
A quick suggestion: When right-clicking the currently playing song's rating stars in the player pane, show the ratings menu (as seen in the library) instead of the player context menu (with "locate playing track", "shuffle settings" and so on). :)

MusicBee Wishlist / Remote controlled MusicBee
« on: June 24, 2010, 03:52:07 AM »
As I mentioned in another thread, I'm using EventGhost, a fantastic little application to react to all kinds of events - most importantly the input events generated by an infrared receiver - with macros ranging in complexity from selecting a predefined action from a plugin, up to scripting something in Python, using Python's Win32 API bindings.

MusicBee has given me a bit trouble in this regard. Focus management within musicbee seems to be a bit off at times (for example, input focus is "lost" when the alt key is pressed twice. try it: select a track, use up/down to select another; press alt to active the menu, press alt again to deactivate the menu; up/down no longer do anything, input focus was not returned), some elements aren't reachable via keyboard (e.g. the Now Playing list), and tabbing through elements isn't terribly safe in either case, since the UI - and thus tab order - can change easily. Now, my primary concern here is not using MusicBee with a keyboard; I'm perfectly happy with my mouse plus a few select hotkeys, but when controlling MB with a remote - or rather, feeding it simulated keystrokes -, the mouse centric UI means I can't even tell MusicBee to 1) clear Now Playing, 2) open the Auto-DJ and 3) start playing.

Hence, my wish is a facility that lets me control MusicBee's playback functions and a few select other things programmatically. This could be a TCP socket (ZoomPlayer does this, for instance), plain old DDE, some form of RPC or RMI... you name it (but K.I.S., please :P). Through this interface, MusicBee may be given simple commands: stop, pause, play, play/pause, stop after current, restart current track, next, previous, skip, rewind,exit. Additionally, commands necessary to change what and how will be played: clear now playing, queue all listed tracks [last] (or start the Auto-DJ if it is shown), show Nth playlist, show library, set repeat on/off, set shuffle on/off, set shuffle settings. Finally, limited information may be queried through the interface: list available playlists.

This would make it relatively simple to make MusicBee start playing the Auto-DJ now with a single keystroke or button on a remote. Smart devices (WLAN-enabled phones) could even list the available playlists and let the user choose what music he wants to listen to (assuming he has set up appropriate playlists beforehand).

Ok, last one for today, I promise. ;D

In Album & Tracks view, if you have tracks without artwork and without an album tag, they will be listed under Unknown Album -- except that they won't be grouped together:

Could these files be shows grouped together in a "Singles" pseudo-album?

MusicBee Wishlist / Mobile device sync: Parallelize encoding/copying
« on: June 14, 2010, 06:34:47 PM »
This suggestion results from my attempts at syncing music to my phone. Failed attempts, but the suggestion might benefit anyone else who is lucky enough to own a phone that actually works. Anyways:

When copying many tracks which require recoding, the process of recoding and copying is serialized, i.e. while a track is encoded, nothing is copied, and vice versa. Considering the slow write speed of typical mobile device memories, parallelizing encoding and copying should speed up synchronisation significantly. Given that just about any computer sold in the last years has at least two CPU cores, you could most likely even run two encodings in parallel with the copying, in case a device exhibits very fast write speeds or MusicBee runs on a first generation Athlon X2 or similar hardware.

Portable Devices / T715 bugged?
« on: June 14, 2010, 04:44:19 AM »
Well, at least it does that in my dreams, shortly before I HULKZILLA-SMASH the little piece o'.... oh well.

I have a peculiar problem with this phone, and Google is abuzz with so much marketing cruft, 20-minute-reviews and outright junk that any solid information, if it exists out there, is so well hidden under that pile of electronic dung that I can't find it - so yeah, this forum isn't the best place to ask this, but I'm desperate.

When I have the phone attached to my computer over an USB cable and try to perform any kind of file management, including syncing music to the phone, regardless of the mode (USB mass storage device, MTP device), program or USB port, at some point the phone will just stop accepting new files, or responding to IO in general. At that point, any attempt to access the phone's memory (actually, an 8GB Micro SD card) results in the application (on the PC) hanging until I unplug the USB cable. I have:
- rebootet, PC and phone.
- updated the phone's software (well, tried to. It claims to be up to date).
- formatted the memory card, several times.
- tried all available USB connection modes.
- tried different USB ports.
- killed a chicken, painted my face with its blood, performed the rituals and called upon the arcane forces of the seventh hell of computer trickery (i.e. installed Win XP SP2 in a virtual machine, routed the USB port there and tried all the other crap - why? because I was too lazy fetching my laptop; I only did that after the XP VM failed as well - that is, the phone appeared fine, but would lock up as per the description above -, as did the laptop).

So, yeah. Help? Anyone? Pleeeeeeaaaase? ???

MusicBee Wishlist / Matrix Mixer
« on: May 30, 2010, 11:59:47 PM »
I only own a cheap Logitech surround speaker set (which doesn't mean it's bad, mind you). To get the most out of stereo music (save for classical pieces), I've found that a matrix mixer is ideally suited to achieve a well defined and voluminous music experience. Unfortunately, Google failed me and I've not found a compatible DSP plugin for MusicBee, so I'd like to put this on the wishlist instead:
~ If it's not already possible, support multi-channel audio files, such as 5.1 AC3 audio recordings, and multi-channel audio output.
~ Please build a matrix mixer into MusicBee. It should automatically select a suitable user-defined matrix depending on criteria such as source audio chanels and file type (or disable itself when the source has more then 2 channels).

I'm sure this is unnecessary, but here's a screenshot of ffdshow's matrix mixer to illustrate what I'm looking for:

MusicBee Wishlist / Albums & Tracks View
« on: May 30, 2010, 09:22:44 PM »
As requested:
And finally, a suggestion: the Album and Tracks view layout configuration is a bit restrictive. I could really use a fourth line and optional linebreaking for long lines might be useful as well. (And when a field is empty, the line should be skipped/removed rather than result in a vertical space. ;))

Pages: 12