Author Topic: Controlling MusicBee externally  (Read 7396 times)

zorexx

  • Jr. Member
  • **
  • Posts: 36
I've been searching around for this but can't seem to find anything close, so I decided to just ask on the forums.

Is there anyway you can communicate with MusicBee from an external program? For example by using Windows Messages (SendMessage/PostMessage), or Dll Calls?

The closest thing to this I can find now would be MusicBee Remote. Although it is possible to make use of that, I'm wondering if there's any other way I can control MusicBee externally? (At least being able to Play/Pause, Stop, etc, and if possible retrieve the current Playing Status)

Thanks in advance.  :)

Kaelri

  • Jr. Member
  • **
  • Posts: 95
MusicBee includes the "CD Art Display" plugin. Once you activate it (under Settings -> Plugins), you can send and receive a good deal of information from a CAD-enabled client, such as a Rainmeter skin.

There may be other way that I'm not aware of; I happen to have some experience with Rainmeter, though. :) If you can tell me a little more about what you're trying to accomplish, I might be able to give you some guidance.

zorexx

  • Jr. Member
  • **
  • Posts: 36
But doesn't CD Art Display plugin requires CD Art Display to be installed?
I'm looking for a more lightweight solution, it would be best if MusicBee provides this feature natively, but if it doesn't, is there any plugin that does so?

Basically, I want to control MusicBee with AutoHotkey.
It's possible to simulate hotkeys to do basic stuffs with MusicBee, but this doesn't work when the windows session is locked, and you also won't be able to get the current playing status, or any info from MusicBee.

Winamp has this natively, so I'm wondering if MusicBee has anything similar.
http://wiki.winamp.com/wiki/SendMessage_API
http://forums.winamp.com/showthread.php?threadid=180297

I believe this will be very helpful, because then we do not have to create a plugin for every program we want to control MusicBee with.

Pako

  • Full Member
  • ***
  • Posts: 132
MusicBee can be controlled externally via MusicBee API, which means that you need a plugin to cooperation with other software (such as AutoHotkey).
EventGhost plugin does not meet your needs?

Pako

zorexx

  • Jr. Member
  • **
  • Posts: 36
EventGhost plugin seems very close to what I need. Can I send events to it without using EventGhost? (with just the plugin acting as an event listener).

Pako

  • Full Member
  • ***
  • Posts: 132
I've not tried it, but it would probably be possible.
You can send window messages to a (hidden) window, which is called "Eg2MbMessages".

However, I do not intend to write some documentation for it.
You can find the needed information in the source code on the project website.
I can not guarantee that any future changes will ensure backward compatibility.

Pako

zorexx

  • Jr. Member
  • **
  • Posts: 36
Ok, I guess if there is no proper solution I'll just have to write my own plugin for it.
Thanks for all the info.  :)

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
But doesn't CD Art Display plugin requires CD Art Display to be installed?
no - activating the plugin simply exposes that API to external applications and doesnt require CAD to do that

zorexx

  • Jr. Member
  • **
  • Posts: 36
Thanks for clearing that up.

I still can't seem to get it working with SendMessage/PostMessage, is the source for the CAD Plugin available? Or is it closed-source?

zorexx

  • Jr. Member
  • **
  • Posts: 36
I decided to write a plugin for this purpose.

I'm naming it MusicBee IPC.

Currently it's working pretty well, I'm able to play, pause, stop, previous track, next track, and get the current playing state through window messages (by using SendMessage/PostMessage).

I'm currently working on getting as many functions provided by the plugin API onto the IPC interface, and will publish it when I'm done with that.

e-motiv

  • Full Member
  • ***
  • Posts: 188
I am currently fiddling a bit with AutoHotkey too, writing a volume OSD.  I would als like to include the current volume from MB.
I thought SendMessage could be used to get the volume, but which parameters do I send?
I have something like this, which gives an error:
Code: ahk
SendMessage 0x400,-666,122,,WindowsForms10.Window.8.app.0.2bf8098_r17_ad1

I think 0x400 is WM_USER and ok, but the next 2 parameters (wParam, lParam) ??

Zorexx, or anyone else, any idea?
  Developing @ e-motiv.net       --       Musicbee plugins: Speak Back - Ghost Tracks - Radio Dig

zorexx

  • Jr. Member
  • **
  • Posts: 36
Apparently, MusicBee doesn't accept Window Messages by default, which is why I'm writing a plugin for it.  :)

e-motiv

  • Full Member
  • ***
  • Posts: 188
I see and understand now.
I thought it was something all windows programs could do by default.
Eagerly waiting then.
  Developing @ e-motiv.net       --       Musicbee plugins: Speak Back - Ghost Tracks - Radio Dig

e-motiv

  • Full Member
  • ***
  • Posts: 188