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.


Messages - zorexx

Pages: 12 3
1
Good to know it still works!

May I ask what made you use window msgs instead of sockets? Didn't actually thought about juggling hWnds around.

Couple of reasons, albeit not very good ones:
1. This library was primarily influenced by the ability to control Winamp via Window Messages.
2. Window Messages are easier to work with, to some extent

In hindsight, especially after porting it to so many other languages, I agree it wasn't a great choice. :-\

For that exact reason, I've been thinking of writing the next version from scratch, this time using, probably using protobuf via REST or gRPC or both.
I'm thinking of making something more universal and generalized, so that it works cross-platform.

The only thing driving me nuts are the return values of

Code
Library_GetArtworkUrl  // which leaves me with a path to a *.tmp file
and

Code
Library_GetArtwork // (which, I know, is deprecated) drops a base64 encoded image (at least looks like a base64 string)

Probably because all the covers are embedded into my music files? idk  :o
Somebody got a clue on how to obtain something image-ish?

I can't remember what it returns, but looking at the source code, all it does on the IPC side is call Library_GetArtworkUrl from the MusicBee plugin API.
Looking at the latest plugin API, there is a function called Library_GetArtworkEx (since api version 47):
Code
bool Library_GetArtworkExDelegate(string sourceFileUrl, int index, bool retrievePictureData, ref PictureLocations pictureLocations, ref string pictureUrl, ref byte[] imageData);

This should do what you want, but unfortunately MusicBeeIPC is not updated for some time and doesn't support that function. (At the date of this writing, MusicBeeIPC only supports up to api version 33 :( )

I will take a look again soon at MusicBeeIPC's source code and see if I could update MusicBeeIPC to catch up with the latest plugin API. (Or if I should just get started working on the next revamped version)

2
Let me know if it doesn't work and I'll try to fix it. :)

3
Sorry for the late reply.

I haven't been working on MusicBeeIPC because I haven't been using MusicBee for some time now since I've moved to Linux. Too bad MusicBee isn't available on Linux :( , it's still the best player I've used.

Anyway, I've uploaded the files to my new website and fixed the links on the first post to point there.
However, the last time I tested them was when MusicBee was still on v2, so I can't be sure if it will still work on v3.
Try and see if it works.

4
MusicBee API / Re: MusicBee API
« on: December 23, 2015, 01:54:56 PM »
I see, ok, I'll just use the API from this thread then. Thanks.

5
MusicBee API / Re: MusicBee API
« on: December 23, 2015, 11:19:25 AM »
Steven, may I know when will you release the MusicBee API for v3?
I am thinking that since v3 is just around the corner, I will target v3 for the next version of my plugin MusicBeeIPC, but I can't do so until I have the API for v3.

6
Seems like there's a typo in Pack.java as well, on line 403, change
bytes_2 = string_1...
To
bytes_2 = string_2...

Sorry for the inconvenience.

Edit: Didn't notice the last reply, glad to see you got it working. Good luck on whatever you're working on.  ;)

Edit: Fix applied.

7
Ahh, yes. My bad, it seems like I left out the 3rd parameter for that function in the java version. I'll get it fixed asap.

Meanwhile, if you don't mind recompiling it, try applying this simple fix:
In MusicBeeIPC.java, change:
Code
    public MBError library_setFileTag(String fileUrl, MetaData field)
    {
        return MBError.fromRepr(sendMessage(WM_COPYDATA, Command.Librapry_SetFileTag, pack(fileUrl, field.getRepr())));
    }

To:
Code
    public MBError library_setFileTag(String fileUrl, MetaData field, String value)
    {
        return MBError.fromRepr(sendMessage(WM_COPYDATA, Command.Librapry_SetFileTag, pack(fileUrl, field.getRepr(), value)));
    }

Note: I haven't tested this.

8
May I know which language are you using?

9
You can do that by
f = GetFileUrl()
Library_SetFileTag(f, tag, value)
Library_CommitTagsToFile(f)

Maybe I'll throw in a helper function in the next release ;)

10
MusicBeeIPC SDK for Perl is finally completed.

Note:
Sorry but, there is no CPAN or PPM distributions because after trying to package them for CPAN (or PPM), I came to a conclusion that it is too much of a hassle for such a small project. Hence, I've wrote my own install script, all you have to do is run (in the downloaded SDK directory):
Code
perl install.pl
and you're good to go.

Note for Python and Ruby SDK:
I found a minor spelling mistake in the Python and Ruby SDKs, change Equalizer to Equaliser if you run into any relevant problems.

Some news:
I am planning on a new version of MusicBeeIPC (v3.0?). It will use sockets instead of memory-mapped files and window messages. This should increase the portability and versatility of the SDKs, and also make porting to other languages much easier.
Aside from making things easier, using sockets allow me to easily add remote support, which I plan to. With this, you will be able to control MusicBee from a remote device or location such as your smartphone.
Since I'm adding remote support anyway, I am also thinking of adding a web interface and if possible a mobile interface, but I cannot promise these as I have no experience in these fields yet.
Needless to say, I will also add support for more languages (e.g. Visual Basic).
With that said, in the next version, MusicBeeIPC will be more than just IPC, so I am considering renaming the plugin as well.
Any feature requests or name suggestions are very welcome as this might be the biggest update for MusicBeeIPC since its first release. 8)

11
Thanks for your feedback. I'm glad you find it useful.
What you're doing there looks great too, very similar to what I'm doing with AutoHotkey and MusicBeeIPC. Except without that beautiful interface. ;)

Regarding the documentation, I have thought of making one as well. In fact, I have included the documentation inside the source code of few of the languages to be generated by some document generators. (e.g. Python).

The reason why MusicBeeIPC still doesn't have a proper documentation is because:
1. MusicBeeIPC is coded in many languages, so keeping the documentation uniform and easy to maintain is difficult.
2. MusicBeeIPC is basically just the MusicBee plugin API brought available to external programs, and unfortunately, the MusicBee plugin API doesn't have a proper documentation as well (as far as I know, if there is one that I am not aware of, please enlighten me). Hence, there are some functions that I am not too sure what does it do or how does it work, but I have ported them anyway. Writing documentation for these functions either need a lot clarification from Steven or providing assumptions.

With that said, I will try to find a way to produce a good documentation for this.
What I have in mind is:
1. Do not use document generators, and create a single documentation containing codes for all languages but with the same explanation. (something like what's being done in MSDN)

Either way, I will have to find the time to do that, and even when I have time, porting it to Perl comes first. ;)

12
Yes, I am still supporting this.

I just tried the library_get_file_property and it seems to work for me.
You have to call
Code
library_get_file_property(file_url, file_property)

where
file_url is the full path to the file and
file property is one of the following constants (found in enums.py under # MBFileProperty):
Code
MBFP_Url
MBFP_Kind
MBFP_Format
MBFP_Size
MBFP_Channels
MBFP_SampleRate
MBFP_Bitrate
MBFP_DateModified
MBFP_DateAdded
MBFP_LastPlayed
MBFP_PlayCount
MBFP_SkipCount
MBFP_Duration
MBFP_NowPlayingListIndex
MBFP_ReplayGainTrack
MBFP_ReplayGainAlbum

If it still doesn't work, please show me the line where you called this function.


p/s: A little update on the Perl version:
Unfortunately, I hadn't got much time to work on it so there isn't a lot of progress so far, but I will start working on it again soon, hopefully releasing it within March.

13
Thanks for the suggestion.
I can do that, but I don't have the time for it this month, so you might have to wait until end of December before you can use it

14
If the function doesn't exist in the MusicBee API then I can't implement it in this plugin.
I've checked the API I have but I don't seem to see such function, unless there's a later version that I'm not aware of.
I guess we'll have to wait until Steven includes this in the API.

The closest I can get to is to:
1. Close MusicBee

2. Edit the %APPDATA%\MusicBee\MusicBeeSettings.ini file:
Change the value of PlayerUpmixChannelCount to 6 to enable upmixing and 0 to disable upmixing.

3. Rerun MusicBee

This can be done with just python, albeit a little hacky.

15
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.  ;)

Pages: 12 3