Author Topic: MusicBeeIPC - Control MusicBee with Autohotkey, Python, Java, etc  (Read 76028 times)

zorexx

  • Jr. Member
  • **
  • Posts: 36
It requires MB v2.3, or API revision 33 to be precise, because some of the implemented functions/enums are only available in that version. It should work just fine in future versions.

Maybe Steven was referring to the GetMusicBeeVersion function of my plugin? Since the current API only have enum up to v2.3, which means when the new MB v2.4 comes out, my plugin will detect it as v2.3.


zorexx

  • Jr. Member
  • **
  • Posts: 36
Ok, if that's the case, I will wait until the next API update so that I can do any other necessary updates in one go.
Thanks for the suggestion.

nosaj72

  • Newbie
  • *
  • Posts: 5
Great plugin. I'm using this to write a quick app to copy my ratings and playcounts between MB and iTunes.

Quick question: I can read the play counts with Library_GetFileProperty, but I can't figure out if there is a function to update them with. I see Library_SetFileTag, but no Library_SetFileProperty. Is there something I'm missing, or is this just not possible?

zorexx

  • Jr. Member
  • **
  • Posts: 36
Thanks for the feedback.

As far as I am aware of, the values returned by GetFileProperty are read-only values so you cannot modify them.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
Rating isnt a property - you should be able to read and set it using the ...FileTag() functions
it should be scaled on a "0".."100" scale but "0".."5" is also supported and automatically scaled to 0..100, or blank to unrate


Diedrict

  • Guest
hello

1) is a way to enumerate DSP enabled (MB_GetDspEnabled() and MB_SetDspEnabled() are boolean only)
ex. "mono"

2) does exist a API call for "balance" state
ex. -100 to +100

greetings

zorexx

  • Jr. Member
  • **
  • Posts: 36
Quote
1) is a way to enumerate DSP enabled (MB_GetDspEnabled() and MB_SetDspEnabled() are boolean only)
ex. "mono"

I don't think there is a way to do that since the only dsp-related functions I can find in the plugin api are MB_GetDspEnabled() and MB_SetDspEnabled().
Maybe someone who is familiar with dsp in MusicBee might be able to help you, or Steven.

Quote
2) does exist a API call for "balance" state
ex. -100 to +100

As far as I am aware of, there is no api call for that.
(Can you actually adjust the balance from MusicBee? I can't seem to find the slider for that, I was actually looking for it some time ago)

Sorry that I couldn't be much of help.  :(

Diedrict

  • Guest
ok, then the only way to get result is --

Code
if exists mb_process 
   store MB_GetPlayState()
   close mb app
endif
load_file appdata/MusicBeeSettings.ini to buffer
change xml node <PlayerStereoBalance>0</PlayerStereoBalance> (this is a eq window setting)
change xml node <PlayerDspState></PlayerDspState> (DSP states)
change xml node <PlayerManualEqualiser></PlayerManualEqualiser> (the eq preset name and freq settings)
save_file appdata/MusicBeeSettings.ini
load mb app
if exist last PlayState
   restore PlayState
endif

is a solution until core improvement exist

i wonder if way exist to reload setting file while mb loaded

greetings
Last Edit: April 25, 2014, 03:52:09 PM by Diedrict

zorexx

  • Jr. Member
  • **
  • Posts: 36
Oh, I see the balance slider now.
And I get what you mean now, about enabling the DSP.
The SetDspEnabled works exactly like the Controls > DSP Effects menu item, and I can't seem to find a function to enable individual effects in the plugin interface either. :(

As for reloading the settings file while mb is running, you might have to ask Steven about this. He might read this topic and hopefully give you an answer, but I'm afraid I am not aware of any ways to reload the settings file while mb is running.

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
Please be sure to add your plugin to the wiki.  I imagine it will be helpful to many people.

http://musicbee.wikia.com/wiki/Plugins
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

zorexx

  • Jr. Member
  • **
  • Posts: 36
Please be sure to add your plugin to the wiki.  I imagine it will be helpful to many people.

http://musicbee.wikia.com/wiki/Plugins

Thanks, but I'm pretty sure it's already on the wiki, as stated on the first post.  :)

http://musicbee.wikia.com/wiki/MusicBeeIPC
Last Edit: May 03, 2014, 05:35:11 PM by zorexx

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
Thanks, but I'm pretty sure it's already on the wiki, as stated on the first post.  :)

You're right, sorry!  I did a quick search for it on the wiki but I didn't read your original post closely.  Thanks for taking care of it!
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

zorexx

  • Jr. Member
  • **
  • Posts: 36
Thanks, but I'm pretty sure it's already on the wiki, as stated on the first post.  :)

You're right, sorry!  I did a quick search for it on the wiki but I didn't read your original post closely.  Thanks for taking care of it!

No problem.  ;)