getmusicbee.com

Support => Developers' Area => MusicBee API => Topic started by: quick_wango on October 02, 2017, 06:13:29 PM

Title: Writing a plugin in Go
Post by: quick_wango on October 02, 2017, 06:13:29 PM
As I have rewritten my LyricsReloaded plugin into a Go commandline application, I'm thinking about wrapping that into a MusicBee plugin.

I see 2 paths for this:
1. Writing a C# plugin that invokes the lyrics2go.exe passing on the arguments from MusicBee
2. Writing the plugin in Go and directly calling into Lyrics2Go's functions

The latter seems more appealing, but I'm not entirely sure how to implement this.
My best bet is currently using the C++ plugin interface and implementing it with Go.

Has anyone tried this?
Title: Re: Writing a plugin in Go
Post by: Steven on October 02, 2017, 08:00:18 PM
I stopped development of the C++ interface at quite an early stage due to lack of interest, so its quite possible API functions you need dont exist.
Unless Go had some sort of .NET bridge option 1 might be the only way.
Title: Re: Writing a plugin in Go
Post by: psychoadept on October 02, 2017, 08:11:28 PM
What language is the current interface? I'm learning C++ at the moment, and hoping to start working on plugins eventually
Title: Re: Writing a plugin in Go
Post by: Steven on October 02, 2017, 08:25:43 PM
C# - once you know C++ you should find C# easy to pick up and nice to use
Title: Re: Writing a plugin in Go
Post by: quick_wango on October 03, 2017, 06:43:15 PM
I'm thinking about building a small IPC layer get language independent plugin support. Do you think that makes sense? How much interest is there in support for different language support in plugins?
Title: Re: Writing a plugin in Go
Post by: Steven on October 03, 2017, 07:51:45 PM
actually i think someone already created an IPC plugin
https://getmusicbee.com/forum/index.php?topic=11492.0
Title: Re: Writing a plugin in Go
Post by: quick_wango on October 08, 2017, 06:19:47 PM
Well it seems like this is more like a "Send commands from some program to MusicBee" kind of thing and not bidirectional as I would need it.
And it also seems like MusicBee is losing more plugin devs to Linux :D .

If I'll really implement something for MusicBee, I'd probably do some kind of rudimentary RPC protocol over WebSockets, but not sure if and when I have the time for that.
Title: Re: Writing a plugin in Go
Post by: quick_wango on October 08, 2017, 06:24:26 PM
Btw I think it would help MusicBee's plugin eco system if it's plugin interface would be language independent, as a lot more people know JavaScript or Python compared to C#/VB, especially those that are not professional software developers (I guess that's true for most of the users).

Given I get to implement this interface, would there be any chance to get it integrated into MusicBee?