Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Plugins: Document API for JukePlugSys  (Read 77117 times)

0 Members and 1 Guest are viewing this topic.

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4304
  • Last login:March 13, 2019, 03:09:17 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: v1.02 Document API for JukePlugSys (!! DONE, YES FINALLY DONE !!)
« Reply #320 on: February 10, 2008, 03:17:22 am »
2 software is released with this system. We still missing Freebox and maybe DWJukebox...


C'mon guys  ;D

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1887
  • Last login:April 10, 2013, 05:07:30 pm
  • Space Fractal
    • Space Fractal
Re: Plugins: v1.03 Document API for JukePlugSys (!! DONE, YES FINALLY DONE !!)
« Reply #321 on: February 10, 2008, 04:51:29 am »
Barcrest is linked to the JukePlugSys.com in his homepage, if you check the frontpage out. So I assume version 4 would support it.

So I Guess this would not been supported it in version 3, since he only want to bug fixes issues and doesn't add new feature anymore.

Instead He want to get version 4 finished, which is now in beta state for registered costumers. So I hope he got it added this system to version 4.

I do understand that.

Chris (Author of DWJukebox), any change you add this system to the Windows version? Should I send you the little "wrapper" i used in MultiJuke?


Currectly in work: Greedy Mouse || Previous Work: MultiFE Frontend, ArcadeMusicBox Jukebox || Music for various games (Tardis.dk + Greatflash.co.uk).

David_AVD

  • Guest
  • Trade Count: (0)
Hi there. Just joined this forum after lurking on and off for a while.

I've written a jukebox application and am interested in supporting the JPS.
My app is written with Delphi 7. I don't know what the rest of you use.

I'm new to dll's but have had a quick play and am learning fast!
Is anyone here willing to give me some pointers on the host code?

edit:
I've just worked out how to talk to a juke plugin in Delphi.
My main question is do I have to support more than one plugin at once?
If so, do you keep the references to them in an array?
« Last Edit: March 05, 2008, 08:38:59 pm by David_AVD »

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4304
  • Last login:March 13, 2019, 03:09:17 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Hi there. Just joined this forum after lurking on and off for a while.
Welcome

Quote
I've written a jukebox application and am interested in supporting the JPS.
My app is written with Delphi 7. I don't know what the rest of you use.
I write my Plug-in in Delphi but I think Unclet's Juke is in VB6


Quote
My main question is do I have to support more than one plugin at once?
Yes Please

Quote
If so, do you keep the references to them in an array?
:dunno  Pass


Ahhh pass

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3553
  • Last login:June 10, 2019, 04:34:36 pm
If you are going to write a plugin supporting the JPS then you are going to need to support the functions listed at the beginning of this post (page 1).

The main ones are:

Juke_GetPluginInfo
Juke_Initialize
Juke_Shutdown
Juke_Configure
Juke_Command

When my jukebox software (written in VB6) starts, it looks into my "plugin" directory to see if any plug files exist in there.  If there are files existing then I loop through each plugin file and determine whether the above routines exist or not.   IF they do not then I do not consider it a valid plugin file.   If the routines do exist, then I call the "Juke_Initialize" routine in the plugin so it can perform any init stuff it needs to and I also call the "Juke_GetPluginInfo" routine to get the plugin name, author, etc... information (which I display inside my software).

I store all of the "valid" plugins in an array.  Whenever I need to send a command to a plugin then I simply loop through my "valid" plugin array and send the command to each plugin by calling the "Juke_Command" routine in the plugin.

Hope this helps some ...... "headkaze" wrote most of the VB6 class module logic which I am using since I had no experience with plugins before implementing all of this JPS stuff.   He is the main guy who might be able to explain the lower level detail stuff if you have more specific questions.   Basically, "headkaze" figured out how a VB6 application can send stuff to a plugin DLL file and how the plugin could return stuff back to the jukebox application when desired.

I just kind of followed what headkaze wrote and that helped a lot.

David_AVD

  • Guest
  • Trade Count: (0)
OK, a couple of hours of fiddling around and I now have the basic Delphi host code running. It finds all the JPS dll's in the App/Plugins directory and generates the list. It also sends a Juke_Initialize command to each plugin at startup and a Juke_Shutdown to each plugin when it terminates. So far, so good!

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4304
  • Last login:March 13, 2019, 03:09:17 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
OK, a couple of hours of fiddling around and I now have the basic Delphi host code running. It finds all the JPS dll's in the App/Plugins directory and generates the list. It also sends a Juke_Initialize command to each plugin at startup and a Juke_Shutdown to each plugin when it terminates. So far, so good!

Cool, It would be cool to post a simpleexample of a Delphi Host to add to the SDK if you could post one.

David_AVD

  • Guest
  • Trade Count: (0)
No problem. I'll post a host example when I'm sure it's working the way it should. Today was a big learning curve but I'm glad I stuck at it.  :)

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1887
  • Last login:April 10, 2013, 05:07:30 pm
  • Space Fractal
    • Space Fractal
personly you should use linked list, not array, so you dosent have a limit on number of plugins. Otherwice set a limit to 32 or something like that.

Otherwice I use BlitzMax for my jukebox app, and Pure Basic for the dll examples.

When you release your jukebox application, let us known, so we can add your application on the homepage.

welcome onboard.
Currectly in work: Greedy Mouse || Previous Work: MultiFE Frontend, ArcadeMusicBox Jukebox || Music for various games (Tardis.dk + Greatflash.co.uk).

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3553
  • Last login:June 10, 2019, 04:34:36 pm
I meant to tell you that my jukebox software allows each plugin to be "Enabled" or not via the "Plugin menu" page.   Basically, on the plugin page my application lists all of the plugins found by their name, author, description ,etc... and then allows the user to check which plugins they want to be enabled.   This allows the user to keep different versions of plugins in the "plugin" directory without having the software try to use them all.  When the user highlights a plugin from my list then they can also press a "Configure" button to configure the plugin.  Actually, when this button is pressed then my software simply calls the "Juke_Configure" function of that plugin.   The plugin itself will display a pop up window with all the configuration options it allows.

Good luck

David_AVD

  • Guest
  • Trade Count: (0)
Space Fractal:
I've coded it with classes & lists, not arrays so there's no real limit.
Aussie Juke (my program) was released a couple of weeks ago:
Aussie Juke page

unclet:
Good idea for the enable option. I'll add it to the Plugin class now.
I've added all the basic functions to my app now but will have use the event logger to check them.

Got so much done today! Next on the list will be a configuration window I guess.
« Last Edit: March 06, 2008, 07:22:28 am by David_AVD »

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1887
  • Last login:April 10, 2013, 05:07:30 pm
  • Space Fractal
    • Space Fractal
I have just added your software to http://wiki.arcadecontrols.com/wiki/Aussie_Juke, but please correct the info about your application and add a screenshot (I can done that for you). If you are not sure how to update the wiki, let me known, then I update it.

Even your app can show coverarts from albums, I have threated your software as singles, since your GUI look like it was suited for Singles. The only problem I actuelly found is the coverart is show in very low resolution on my high resoulution screen. Why not rescale it to the resolution used?
« Last Edit: March 06, 2008, 08:50:15 am by Space Fractal »
Currectly in work: Greedy Mouse || Previous Work: MultiFE Frontend, ArcadeMusicBox Jukebox || Music for various games (Tardis.dk + Greatflash.co.uk).

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3553
  • Last login:June 10, 2019, 04:34:36 pm
Any chance of putting a few screen shots of you jukebox application on your site?

David_AVD

  • Guest
  • Trade Count: (0)
Yes, it's singles format only at the moment. Still working on the albums part.

With the cover art, I'm just using an image control with the stretch mode on.
Maybe it's to do with the way I'm scaling the whole form?

I'll have to add those screen shots. It's on the list - honest!
The real reason is that the GUI is still in a state of flux at the moment.
I find that one of the more difficult things to get looking right.

David_AVD

  • Guest
  • Trade Count: (0)
Just uploaded version 1.6.0.0 which has support for a lot of the JPS functions. I tested it with loadman's event logger. About the only major thing missing in my JPS implementation if the configure command. That's simply because I don't have a configuration window for the GIU yet.

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1887
  • Last login:April 10, 2013, 05:07:30 pm
  • Space Fractal
    • Space Fractal
You need to doing something to add the configure command, elsewice the plugins can't been configure by the user, like the sound plugin I have in the SDK.

I have same problem in MultiJuke, so I dedicated to just hide the main window, and then create a another config window just for configure plugin JST. I could nothing do other thing....

You could even create a new exe for config plugins if you need that.

I think you should do for the same.


Currectly in work: Greedy Mouse || Previous Work: MultiFE Frontend, ArcadeMusicBox Jukebox || Music for various games (Tardis.dk + Greatflash.co.uk).

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4304
  • Last login:March 13, 2019, 03:09:17 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
simply because I don't have a configuration window for the GIU yet.

But isn't the Plug-in the bit that creates the Configure window (for the Plug-in) and the Jukebox just calls it?

David_AVD

  • Guest
  • Trade Count: (0)
Sorry, should have made that clearer. My app doesn't have anywhere to show the button that you need to press to call up the plugin window. Make sense?

I could map it to a hot key, but if there's more than one plugin, how would you specify the one you want to configure? As unclet said, I need a way of viewing the various plugins and individually enabling / disabling them, as well as sending them a config command.

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4304
  • Last login:March 13, 2019, 03:09:17 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Sorrry for being dumb   :banghead:

Here is a screen shot of UncleT's Plug-in configure window


David_AVD

  • Guest
  • Trade Count: (0)
Thanks. I'll look at doing some more on this over the weekend.
Almost all of the host plugin code is in one Delphi class.
It worked out rather nicely even if I do say so myself.  ;D

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1887
  • Last login:April 10, 2013, 05:07:30 pm
  • Space Fractal
    • Space Fractal
Either you can create a standalone application to the config (which could been included in the SDK as well) or as you wrote, use a speciel hot key for that... Then it can bring up the config window for JST.

In MultiJuke I dedicated to look some thing like that in the screenshot. Since I disabled the pulldown, where you select your plugins, is just because I only have one plugin installed when I created that screenshot.....

If you want to design your diffecent, fell free to do.
Currectly in work: Greedy Mouse || Previous Work: MultiFE Frontend, ArcadeMusicBox Jukebox || Music for various games (Tardis.dk + Greatflash.co.uk).

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4304
  • Last login:March 13, 2019, 03:09:17 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
I'm now a fan of having the configure for Plug-in within the app.

MaLa does not have that yet. You currently have to make a stand alone .exe for configure

David_AVD

  • Guest
  • Trade Count: (0)
Gee, and I just wrote one!
I've also integrated it into Aussie Juke and it seems to work nicely.

Thanks for your help guys.
When I've finished testing the Delphi host code, who shall I send it to for inclusion in the SDK?
« Last Edit: March 07, 2008, 08:19:31 pm by David_AVD »

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4304
  • Last login:March 13, 2019, 03:09:17 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Gee, and I just wrote one!
I've also integrated it into Aussie Juke and it seems to work nicely.

Thanks for your help guys.
Looks and feels nice

Thanks that works well.  It also highlights my coding error in my plug-in not finding the logfile saved from that last use . I will fix that

I noticed that your config does not have an enable checkbox......yet

As UncleT said that is very useful.

http://forum.arcadecontrols.com/index.php?topic=75083.msg807733#msg807733
When testing and using multi versions it is handy to be able to enable and disable plug-ins on the fly.

But up to you really

Quote
When I've finished testing the Delphi host code, who shall I send it to for inclusion in the SDK?
You can send to Headkaze or just post it here (zipped) for him to collect.

I will PM him now so he knows to expect it
« Last Edit: March 07, 2008, 09:04:36 pm by loadman »

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1887
  • Last login:April 10, 2013, 05:07:30 pm
  • Space Fractal
    • Space Fractal
The config is really nice. Even it based on a external file, the plugins still see it as it was included in the jukebox application.

Nice job.

I do found a really small minor error, since the window width is about few pixels to small in the default Vista skin. Please large it by about 10 pixels. The height seen to been fine.

Then please update the wiki about your application (that link I gave for some posts ago).

(This post is edited a bit to sync for the loadman post, that came before me)
« Last Edit: March 07, 2008, 08:57:48 pm by Space Fractal »
Currectly in work: Greedy Mouse || Previous Work: MultiFE Frontend, ArcadeMusicBox Jukebox || Music for various games (Tardis.dk + Greatflash.co.uk).

David_AVD

  • Guest
  • Trade Count: (0)
loadman:
The version built into Aussie Juke does have the enable check boxes. I didn't see any need for them in the external tool as all it does it is activate the config function on the selected plugin.

Space Fractal:
I'll check out the size issue. Can you post a screenshot of the effect you're seeing please?

With regard to the wiki page. it says I don't have a valid username.
Do I need to sign up for that section separately?
« Last Edit: March 07, 2008, 09:43:03 pm by David_AVD »

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4304
  • Last login:March 13, 2019, 03:09:17 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
With regard to the wiki page. it says I don't have a valid username.
Do I need to sign up for that section separately?

Just use your BYOAC forum login and password

David_AVD

  • Guest
  • Trade Count: (0)
Nope. Still won't log me in. Who knows.  :dunno

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4304
  • Last login:March 13, 2019, 03:09:17 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Nope. Still won't log me in. Who knows.  :dunno

Ahh You may be screwed because you have an underscore in your name. I seem to recal another user had an issue once

Post something in the Wiki Discussion for help

David_AVD

  • Guest
  • Trade Count: (0)
I've updated the host tool and also made an event viewer.
They can be found here.
There's nothing wrong with what you guys have made.
I just wanted to write one to prove the plugin dll code I wrote.
« Last Edit: March 08, 2008, 04:23:31 am by David_AVD »

David_AVD

  • Guest
  • Trade Count: (0)
Nope. Still won't log me in. Who knows.  :dunno

Ahh You may be screwed because you have an underscore in your name. I seem to recal another user had an issue once

Post something in the Wiki Discussion for help
All too hard. Tried all the suggestions. No luck. Maybe I should just delete my account.

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4304
  • Last login:March 13, 2019, 03:09:17 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
I've updated the host tool and also made an event viewer.
They can be found here.
There's nothing wrong with what you guys have made.
I just wanted to write one to prove the plugin dll code I wrote.

Nice work :-)

Cool, You probably want to start a new thread about new plugins rather than  thsi SDK one.

Minor point.  Your app only seems to fire commands to the highlighted plug-in rather than all of them I assume that's not how your Juke will handle plug-ins

David_AVD

  • Guest
  • Trade Count: (0)
Minor point.  Your app only seems to fire commands to the highlighted plug-in rather than all of them I assume that's not how your Juke will handle plug-ins
Yes, that's so you can test them one at a time. The juke app does them all at once. (you can disable them too)

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4304
  • Last login:March 13, 2019, 03:09:17 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Minor point.  Your app only seems to fire commands to the highlighted plug-in rather than all of them I assume that's not how your Juke will handle plug-ins
Yes, that's so you can test them one at a time. The juke app does them all at once. (you can disable them too)


Well Done.  :-)  You are all over this  ;D

I hope to see future posts in this section of the forum about future releases.

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1887
  • Last login:April 10, 2013, 05:07:30 pm
  • Space Fractal
    • Space Fractal
you could ask saint to remove the underscore and replace it with space, so it works with wiki too. Otherwice just let us known here, and one of use would update the wiki. I add your software very soon to jukeplugsys.com (if LoadMan not allready have done that, not checked out).

Here is the screenshot of the problem.

If you wish, you can start a new tread about releases of your software, so we can seperate this thread to JST and your software.

I have just added your software on this link:
http://www.jukeplugsys.com/?page_id=7

Your link is a bit to long. I which http://www.audiovisualdevices.com.au/software/aussiejuke worked, but it wont. You might can add a index.php which just include the aussiejuke.php file.
« Last Edit: March 08, 2008, 12:23:56 pm by Space Fractal »
Currectly in work: Greedy Mouse || Previous Work: MultiFE Frontend, ArcadeMusicBox Jukebox || Music for various games (Tardis.dk + Greatflash.co.uk).

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1887
  • Last login:April 10, 2013, 05:07:30 pm
  • Space Fractal
    • Space Fractal
Re: Plugins: Document API for JukePlugSys
« Reply #355 on: March 09, 2008, 05:18:38 am »
Hey, I just noticed this thread got stickyed, even I have not asked about this  :D.

So I changed the topic to been more clear (removed version number and removed the DONE message, which is not needed any more). I also added the link to more information about this project.

Also I have added a note about " char with one of the plugin_event command, and is why I updated to v1.04. I know UncleT didden't like that char in that command, even it stated in the document. MultiJuke does not care about that char, since it just removed it before parsing.
Currectly in work: Greedy Mouse || Previous Work: MultiFE Frontend, ArcadeMusicBox Jukebox || Music for various games (Tardis.dk + Greatflash.co.uk).

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4304
  • Last login:March 13, 2019, 03:09:17 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: Document API for JukePlugSys
« Reply #356 on: March 09, 2008, 06:15:32 am »
Hey, I just noticed this thread got stickyed, even I have not asked about this  :D.
So I changed the topic to been more clear (removed version number and removed the DONE message, which is not needed any more). I also added the link to more information about this project.
Also I have added a note about " char with one of the plugin_event command, and is why I updated to v1.04. I know UncleT didden't like that char in that command, even it stated in the document. MultiJuke does not care about that char, since it just removed it before parsing.

Yeah I asked for this to be sticky ;D

Nice Work SpaceFractual !!!

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1887
  • Last login:April 10, 2013, 05:07:30 pm
  • Space Fractal
    • Space Fractal
Re: Plugins: Document API for JukePlugSys
« Reply #357 on: March 21, 2008, 05:50:53 am »
Loadman: I guess you should spell my name correct.... (I noticed in the post, but diddent bother write about it before now).

A idea to a addation to the SDK:

- I would like the possible to pass the  filename to all command that need that (JUKE_SONGLIST_ADD_SONG, JUKE_SONG_START etc) as the last argument. This mean it would not break the combatible on that change, even the software dosen't pass that file or not. In that way I can use it to find coverart in a Webstat plugin im Planning.

I hear about this idea before I add this argument.



Currectly in work: Greedy Mouse || Previous Work: MultiFE Frontend, ArcadeMusicBox Jukebox || Music for various games (Tardis.dk + Greatflash.co.uk).

AussieJuke

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 71
  • Last login:October 18, 2011, 02:22:10 am
Re: Plugins: Document API for JukePlugSys
« Reply #358 on: March 21, 2008, 06:00:16 am »
Sounds like a good idea to me. It would open up more possibilities for plugins.

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1887
  • Last login:April 10, 2013, 05:07:30 pm
  • Space Fractal
    • Space Fractal
Re: Plugins: Document API for JukePlugSys
« Reply #359 on: March 21, 2008, 06:09:21 am »
I PM Uncle'T about this. Since the  document is mostly made by me and uncle'T. He should agree first.

The filename addations about first addations to SDK could been great for a song preview for the songs that just have been added to the queue.

but the preview idea would not been possible if no songs is in queue and no songs is played, but that feature should been aksed directly to the author instead).

This idea came from the other thread about Idea:.
WaitTimeInMS=Juke_Command("JUKE_SONG_FINISH","")
A song is played finish and it wait this number of MS, before it start the next song.

This mean a Sound FX, ads or other can been played before the next song from a plugin.

« Last Edit: March 21, 2008, 06:20:58 am by Space Fractal »
Currectly in work: Greedy Mouse || Previous Work: MultiFE Frontend, ArcadeMusicBox Jukebox || Music for various games (Tardis.dk + Greatflash.co.uk).