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 Try the site in https mode Site News

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

  

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

0 Members and 1 Guest are viewing this topic.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #40 on: January 06, 2008, 09:06:04 am »
Quote
MultiJuke example I use GENRE_LOCK instead of PARTY_LOCK. Freebox if I remember correct use CAUSAL for the same feature.

Based on my recommendation you would simply add the following to the string values:

JUKE_PLAY
JUKE_VOLUME_UP
JUKE_VOLUME_DOWN
JUKE_PARTY_LOCK_ON
JUKE_PARTY_LOCK_OFF
JUKE_GENRE_LOCK_ON
JUKE_GENRE_LOCK_OFF
JUKE_CASUAL_ON
JUKE_CASUAL_OFF

JUKE_MUTE_ON
JUKE_MUTE_OFF


The author of the plugin would then group similiar strings together like the following to make it work with all jukebox software:

Quote
int Juke_Command(String cmdName, String cmdValue)
{
   switch(Name)
   {
      case "JUKE_SONG_BEGIN":
      break;

      case "JUKE_SONG_END":
      break;

      case "JUKE_PLAY":
      break;

      case "JUKE_VOLUME_UP":
      break;

      case "JUKE_VOLUME_DOWN":
      break;

      case "JUKE_PARTY_LOCK_ON":
       case "JUKE_GENRE_LOCK_ON":
       case "JUKE_CASUAL_ON":

      break;

      case "JUKE_PARTY_LOCK_OFF":
       case "JUKE_GENRE_LOCK_OFF":
       case "JUKE_CASUAL_OFF":

      break;

      case "JUKE_MUTE_ON":
      break;

      case "JUKE_MUTE_OFF":
      break;
   }

   return 1;
}


Like loadman mentioned previously, the author of the plugin should really make sure their plugin works with all jukebox software themselves.  This way the final "plugin" can be used with "any" jukebox still.


EXTRA
I also think it might be nice to inform the plugin of certain values such as "VOLUME_MIN" and "VOLUME_MAX" values.   This will allow plugin developers to know  what the range of volume can be (ie: in my software it is 0 to 100) in case they wish to make some neat LCD lighting to indicate how high the volume is.  If they never knew the min and max values they would not be able to do this.   now, there are probably other values which should be sent as well, but the VolumeMin and VolumeMax are justa couple examples.   however, all this means is that we add a couple more set values as follows:

JUKE_VOLUME_MIN
JUKE_VOLUME_MAX

These values will most likely only needed to be sent once (on bringup of the jukebox).
« Last Edit: January 06, 2008, 09:15:09 am by unclet »

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #41 on: January 06, 2008, 09:23:51 am »
I can't see why that is needed which would been very code overhead, due to a few diffecent from software to software?

It's matter to create a good configuration in theplugin to suit all commands in all software.

Look in the Sound Effect example I gave, not all use a CoinInsert command. Since your software does not have a CoinInsert command, the plugin would never listed that in thier configuration part, because they never got the command when you sent all commands used by your software using Juke_CommandList(). Hence you send a commandlist after a init().

I cant see I can do more universal?

That I trying to say, it a list of commands the jukebox software actuelly use and no more. Otherwice the user would been very confuction with unused commands in the plugin.


If a new command is developmented with a update, simply add that one to the juke_commandlist() as well. Plugin would simply automatic update its command list with the new command, because it got a new one when listed to juke_commandlist(), and the new command would been configurable by the user in its plugin config.

Due to that, no need to document new commands by a jukebox author.

Hence it expandande for future use with new commands.

_____

Volume: Done, I just added 2 extra arguments to the volume command. No need to create 2 own commands for that.

« Last Edit: January 06, 2008, 09:54:51 am by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #42 on: January 06, 2008, 10:00:14 am »
JUKE_VOLUME_MIN
JUKE_VOLUME_MAX

I don't see the point of these values. Just have the range from 0 to 100. Then if the Jukebox software has a different range (Eg. 0 to 1024) then a simple calculation will convert it to the accepted range for the plugin.

Eg. int Volume = 512;

JukeVolume((Volume / 1024) * 100);

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #43 on: January 06, 2008, 11:06:39 am »
Space Fractal

Quote
It's matter to create a good configuration in the plugin to suit all commands in all software.


I have my doubts as to whether this will be possible since each software does not plan on using the full set of routines anyway.

Also, I still do not understand why a plugin has to create a command list of it's own. 

I plan on having my jukebox software simply call a main routine like the following when an event occurs:

Quote
Juke_Command(String cmdName, String cmdValue)

headkaze
Imagine if loadman wants to make an LCD lighting plugin which increases/decreases lights do to volume.   When the volume is at the max, then "all" lights will be on.  When the volume is at the min, then "one" light is on only.    In order to do this correctly I thought the plugin author should know what the max/min values of the volume are set to in the software.

Now if you are proposing the JukeVolume() routine only ever return a value between 0 and 100, then you do not need my new proposed values.   I was just not sure we wanted to restrict the JukeVolume() limits to be 0-100 only.   Introducing my new values allow the plugins to know the exact volume setting of the software.  Seems like a better idea in my opinion instead of rounding the volume level to be between 0 and 100.

 :dunno
« Last Edit: January 06, 2008, 07:16:26 pm by unclet »

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #44 on: January 06, 2008, 11:46:16 am »
If you as Jukebox Author do not need to send a full list to the plug-in, You do not need to that. Its up to you.

The plug-in need to known which commands that is available to use, otherwise the user can not configurere what commands that would do that in the plugin configuration. Example to play a sound when the plugin got a "CoinInsert" command.

The commandList() is ONLY meant for the plugin configuration part have any use of available commands, show to user.

Any swtich commands like party_on of party_off is sendt via same string to commandlist(), so the plug is aware that command have a on/off stwich.

Because of above, Juke_Command() have only one argument, that is the command you want to sendt, you known that is on the commandlist().

Example after you have init() the plugin:
 Juke_CommandList(0, "*Mute On, Mute Off")
 Juke_CommandList(1, "Volume Up")
 Juke_CommandList(2, "Volume Down")
 Juke_CommandList(3, "Clear Queue")

I asume you write a function to do that, so you sendt the list to all used plugin at once.

In the plugin configuration, these 4 command would show to the user, what they want to due. It up to the plugin writer. Not by you.

When you so want to send a command, due this somewhere in your software needed:
 Juke_command("Volume Up")

Plugin would now find "Volume Up" in its lists, becaue you have send a commandlist() with that name after init() and would do something in the plugin seleceted by the user somewhere on its configuration. It allways the user that select, what it should do, NOT by the plugin author.

For switch commands it more for remote controlling when you want to listen to any commands, also respons from the plugin (here you might need to use the wrapper I gave in the other thread). Can also been used for other thing. But for sending it is still one string command, "Mute On", or "Mute Off".

The plugin save its list anytime and should check for any new commands.
« Last Edit: January 06, 2008, 11:57:06 am by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #45 on: January 06, 2008, 02:24:35 pm »
The plug-in need to known which commands that is available to use, otherwise the user can not configurere what commands that would do that in the plugin configuration. Example to play a sound when the plugin got a "CoinInsert" command.

The plugin doesn't need to know if the software has a command! It either sends the command or it doesn't.

So for example in my plugin I have the following

Code: [Select]
int Juke_Command(String Name, String Value)
{
switch(Name)
{
case "JUKE_COIN_INSERT":
PlaySound("CoinInsert.wav");
break;
}

return 1;
}

"Jukebox Software A" supports the JUKE_COIN_INSERT command and "Jukebox Software B" doesn't.

When a coin is inserted in "Jukebox Software A" it sends the command.

Code: [Select]
plugin[i].Juke_Command("JUKE_COIN_INSERT", null);
And the plugin plays the sound.

In "Jukebox Software B" there is no support for the command... So it does NOTHING. The Jukebox software never sends the command and the plugin never receives it.

There is no need for a command list. It's not necessary. Your just over complicating things.

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #46 on: January 06, 2008, 03:14:20 pm »
All Juke_Command* functions is removed !!!!

I can't agree, so its better to remove them. otherwise this debate would never end.

I through it was pretty easier for jukebox software writers to support these command, but take a some time for the plug-in writer to get the power of commandlist command for expanded use.

Otherwice it would been very confuction for jukebox authors to tell all comands they used. Suddently we all over 200 commands where under 50% would been used. That seen to hard to tried to tell about that. I wich I could see it was ONLY arvaiable commands that can been used. And here is so the main problem you would use:

The plugin would been out of date very fast when we expand the list, if you dosent update thier plugin with new commands.

That is what I throuch commandlist() could fix, so it was more controlable by Jukebox Software authors.

So, Sorry, but that it !!  I cant take about these commands any more, only if you have better idea how we can use these commands?

I simple dislike a default list, since it can been out of date very fast.


« Last Edit: January 06, 2008, 03:30:19 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #47 on: January 06, 2008, 03:28:56 pm »
All Juke_Command* functions is removed !!!!

You still need one Juke_Command(). Hey your entitled to disagree but I feel like you don't understand what I was saying. My thoughts were why add more functions when you don't need them? It will only confuse other coders. If it was necessary I would agree but they are not. One function should be enough.

You got to understand I don't even use Jukebox software so I am donating my time here to help because Loadman asked me to. Hey I understand that English is not your first language so I've repeated myself several times just to help get my point across. Sometimes it seems to take a few posts before you "get" what I mean.

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #48 on: January 06, 2008, 03:36:44 pm »

I have created few commands in the MultiJuke since version 1.00... If the plugin could not see these new commands, the user can never use these command in thier plugin to thier ledwiz device or such.

That is the main problem with a fixed list.

I do not like a fixed command list, which dosent have a future. I do like dynmaic list like the queue commands I made, wich require such a linked list anyway.

So we need doing something so we have a dynamic list with various commands... but NO fixed list, otherwice we cant expand and control it by the jukebox software.

any ideas and used arguments? I guess some plugins might need a commandlist to get it configurated by the user.



Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #49 on: January 06, 2008, 03:39:49 pm »

I have created few commands in the MultiJuke since version 1.00... If the plugin could not see these new commands, the user can never use these command in thier plugin to thier ledwiz device or such.

That is the main problem with a fixed list.

I do not like a fixed command list, which dosent have a future. I do like dynmaic list like the queue commands I made, wich require such a linked list anyway.

So we need doing something so we have a dynamic list with various commands... but NO fixed list, otherwice we cant expand and control it by the jukebox software.

any ideas and used arguments? I guess some plugins might need a commandlist to get it configurated by the user.

The thing is there are fixed commands and non-fixed commands. Because they are strings they can be anything.

You could have JUKE_DO_WHATEVER_YOU_WANT as a command!

There would need to be a plugin.txt for each Jukebox outlining the commands the software supports. It's up to the plugin coder what commands that want to add support for. Some commands might work in some Jukes some might not.

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #50 on: January 06, 2008, 03:45:49 pm »
originally it was a commands.txt that do that purchase, I later removed. UncleT could not see the logic of it.

But should I bring it back? Commands.txt was the best idea for fixed that problem instead of commandlist().

Personly I would wrote my plugin to support ALL commands in commands.txt and let user configuration it what they do. Otherwice it might not been combatible with all software.

And on the other way, if the plugin write only need few commands, let the user tell the plugin which command it really is from the list (etc a list form)...

I might even want to call some commands with other names than others.


« Last Edit: January 06, 2008, 03:47:53 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #51 on: January 06, 2008, 04:43:50 pm »
I try again.

I added a value to the commandsend value. Any ON and OFF commands should not been used, just set the proper value for that.

It seen a commands.txt should been used (headkaze: instead of Plugin.txt), but I also wrote about a plugin might define a default set used, if the list is not found or not needed. I also wrote to been very clean when they write the commands.txt file.

So it up to plugin write the list would been used or not, but I recommered of course use the list.

Is that one better and cleaner? Depite of that, only 2 commands is now needed istead of 5.
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #52 on: January 06, 2008, 05:06:06 pm »
If you as Jukebox Author do not need to send a full list to the plug-in, You do not need to that. Its up to you.

The plug-in need to known which commands that is available to use, otherwise the user can not configure what commands that would do that in the plug in configuration. Example to play a sound when the plug in got a "CoinInsert" command.

I know of a expression: KISS

Keep It Simple Stupid  (No offence)  ;)

I'm with UncleT's/ HeakKaze thoughts on this command stuff.

I agree that 'Space Fractal' does not seem to understand the points made here. A language barrier at a guess.

The documentation with the SDK will tell you what the commands do. If you want to add more update the SDK

Keep the Plug-in Simple and let's get on with starting to build some.  :cheers:
« Last Edit: January 06, 2008, 05:11:10 pm by loadman »

Barry Barcrest

  • I'm only in it for the lack of money
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1620
  • Last login:November 09, 2021, 09:54:17 am
  • Simple Plan
    • E-Touch Jukebox
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #53 on: January 06, 2008, 05:12:35 pm »
I don't see why the list of things to send to the plugin is complicated. The plugin itself will do most of what it wants it only needs to know when to do it. So song start and end are good things to send across but why send across the maximum volume setting or page change? I can't possibly imagine a plugin will do anything based on that information. Like loadman says lets get some plugins working.

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: debating about functions needed by Jukebox Plugins
« Reply #54 on: January 06, 2008, 05:25:15 pm »
Hey, I think I do not update the first post in a while now (to avoid break any commands by now).

If I should add more commands I still want feedback. Otherwise Should I finalize the current version as version 1.0?

So I do NOT touch the current list from now off, and see what it bringing.

But I might add new commands if somebody have suggestions, but I do NOT change anything with current functions.

Later this I got MultiJuke supported most of these functions as long others.
« Last Edit: January 06, 2008, 05:32:01 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #55 on: January 06, 2008, 07:30:35 pm »
My thoughts regarding Max/MinVolume and PageFlipLeft/Right commands were simply to supply the plugin with what the software is doing at the particular moment.  I have no idea what a plugin would do with PageFlipLeft/Right or whether any plugin would like to know Max/MinVolume, but then I really do not care what a plugin author does .... I just wanted to supply the plugin author with as many routines as possible so their imagination can "run wild".   Basically, the very reason of me not knowing how a plugin author would ever use these commands is what makes me want to include them.  :)

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #56 on: January 06, 2008, 09:54:44 pm »
For an initial release ...... this is what I would like to do with my jukebox software for plugin support:

I will expect the plugin author to implement one routine called "Juke_PluginCommand()" with "command name" and "command value" strings as interface parameters.  The "command value" obviously holds information related to the "command name".

Here are the list of routines along with the values for each below:

The "cmdValue" is simply a text string in which all data is separated by an "@" character.


Quote
int Juke_PluginCommand(String cmdName, String cmdValue)


cmdName                                            cmdValue
-------------------------------------------------------------------------------
JUKE_APPLICATION_OPENED                   n/a
JUKE_APPLICATION_CLOSED                   n/a

JUKE_PLUGIN_CONFIGURE                      n/a

JUKE_SONG_STARTED                            name@artist@album@albumNum@trackNum@totalDurationSecs@
JUKE_SONG_FINISHED                            n/a
JUKE_SONG_RESTARTED                         n/a
JUKE_SONG_SKIPPED                              n/a
JUKE_SONG_PAUSED                              n/a
JUKE_SONG_RESUMED                            n/a
JUKE_SONG_FAST_FORWARD_POS           currentPositionSecs@totalDurationSecs@
JUKE_SONG_FAST_REVERSE_POS              currentPositionSecs@totalDurationSecs@
JUKE_SONG_PLAY_POS                           currentPositionSecs@totalDurationSecs@

JUKE_QUEUE_USER_ADD_SONG               queuePos@name@artist@album@
JUKE_QUEUE_SYSTEM_ADD_SONG            queuePos@name@artist@album@
JUKE_QUEUE_DELETE_SONG                    queuePos@
JUKE_QUEUE_MOVE_SONG                      oldQueuePos@newQueuePos@
JUKE_QUEUE_CLEARED                           n/a

JUKE_VOLUME_CHANGE                           up/down/set@volumeLevel@
JUKE_VOLUME_MUTE_STATUS                  on/off@
JUKE_VOLUME_RANGE                             minVolumeLevel@maxVolumeLevel@

JUKE_ENTER_ALBUM_NUM_DIGIT              digit(0-9)@
JUKE_ENTER_TRACK_NUM_DIGIT              digit(0-9)@

JUKE_ATTRACT_MODE                            onActive/onNotActive/off@
JUKE_PARTY_LOCK                                 on/off@


I would like to add a plugin page to my software.  On this page I would have a button which can be clicked to display the plugin routines I support along with an explanation for each.

I was also thinking of adding a "Configure" button which could be clicked when a plugin has been selected from the list to allow the plugin author to configure their own plugin.   Loadman mentioned this might be nice to have during the testing phase of the plugin.  If this would be nice to have, then one more plugin routine would need to be created by the plugin author (ie: JukeConfigure() routine). 

« Last Edit: January 07, 2008, 01:58:49 pm by unclet »

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #57 on: January 06, 2008, 10:38:04 pm »
I was also thinking of adding a "Configure" button which could be clicked when a plugin has been selected from the list to allow the plugin author to configure their own plugin.   Loadman mentioned this might be nice to have during the testing phase of the plugin.  If this would be nice to have, then one more plugin routine would need to be created by the plugin author (ie: JukeConfigure() routine). 

That idea is growing on me (to use in MaLa too is Swindus will do it).  Instead of having to load a seperate executable to configure Plug-ins it would also be cool to do this via the host software (triggering it)  ;D

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #58 on: January 07, 2008, 02:49:59 am »
It pretty a nice idea to use one command, but there is now various commands to fit all you need. You can do this all functions with various functions, so they are all covered in the SDK:

Code: [Select]
JUKE_APPLICATION_OPENED
Juke_Initialize()

JUKE_APPLICATION_CLOSED
Juke_Shutdown(0)

JUKE_SONG_STARTED
Juke_SongBegin()
; do not need to send song info again, since the plugin allready know it using add2queue().

JUKE_SONG_FINISHED
Juke_SongEnd(0)
; EDIT, just corrected a error.

JUKE_SONG_RESTARTED
Juke_SongBegin()
; The plugin did not delete the song from its queue, because Juke_SongEnd(0) was not used.
; can also use the same if you use some thing as song loop and something elsewice.

JUKE_SONG_SKIPPED
Juke_SongEnd(1)
; When a song skipped, the song is also ended. Let the plugin know with setting value to 1.

JUKE_SONG_PAUSED
Juke_SongStatus("PAUSE")
; Plugin can also detect that when listen to Juke_SongPlayed(secs), because seconds diddent count.

JUKE_SONG_RESUMED
 Juke_SongStatus("PLAY")

JUKE_SONG_FAST_FORWARD_POS
 Juke_SongStatus("FAST RESERVE")
 Juke_CommandSend("FAST_RESERVE") ; if it can been used as a keypress command.

JUKE_SONG_PLAY_POS
;no need, the plugin can detect it while listing to Juke_SongPlayed(secs), since the secs change.

JUKE_QUEUE_USER_ADD_SONG
Juke_Add2Queue(File$, totalDurationSecs, 0, CoverArt$="", "+tracknr+" "+name, artist, album, "", "")
; tracknr is not supported, but use it as part of the title name. A plugin might check about it.

JUKE_QUEUE_SYSTEM_ADD_SONG
Juke_Add2Queue(File$, totalDurationSecs, 1, CoverArt$="", "+tracknr+" "+name, artist, album, "", "")
; tracknr is not supported, but use it as part of the title name. A plugin might check about it.


JUKE_QUEUE_DELETE_SONG
Juke_QueueClear(1)
; then resubmit all songs agom you have in your queue using Juke_Add2Queue()

JUKE_QUEUE_MOVE_SONG
Juke_QueueClear(1)
; then resubmit all songs you have in your queue using Juke_Add2Queue()

JUKE_QUEUE_CLEARED
Juke_QueueClear(0)


JUKE_VOLUME_CHANGE
Juke_Volume(volumelevel, minVolumeLevel, maxVolumeLevel)

JUKE_VOLUME_MUTE_STATUS
Juke_CommandSend("MUTE", 0); on
Juke_CommandSend("MUTE", 1); off

JUKE_VOLUME_RANGE
Juke_Volume(volumelevel, minVolumeLevel, maxVolumeLevel)

JUKE_ENTER_ALBUM_NUM_DIGIT
Juke_CommandSend(digit, 0) <- just a a string digit, You might need to use LCDString if you want full LCD control using this function.

JUKE_ENTER_TRACK_NUM_DIGIT
Juke_CommandSend(digit, 0) <- just a a string digit, You might need to use LCDString if you want full LCD control using this function.

in plugindir/Commands.txt you should set these for above example:

Code: [Select]
FAST_RESERVE,0
MUTE, 0
0, 0
1, 0
2, 0
3, 0
4, 0
5, 0
6, 0
7, 0
8, 0
9, 0


About the config:

The main problem is I wont have my software locked while a plugin is on configuration. This because BlitzMax dosent support threads.

Instead the exe file can use the same name as the dll itself, so they can been called from the application. I add such a function in next version on my SDK when I went home. plugin authors dosnet need to do anything, just make sure the config exe is the same as dll name itself.

Adding this function soon to my wrapper to invoke a exe file to its config.
« Last Edit: January 07, 2008, 06:14:00 am by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

Barry Barcrest

  • I'm only in it for the lack of money
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1620
  • Last login:November 09, 2021, 09:54:17 am
  • Simple Plan
    • E-Touch Jukebox
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #59 on: January 07, 2008, 06:01:12 am »
So what are the commands we need to support? Do we have a final list now... I assume for the config we just call something like juke_config in the dll and it displays it's config screen?

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #60 on: January 07, 2008, 06:19:01 am »
The current list is now locked, but I can still add new commands.

I diddent add a Juke_Config(), because it might lock the whole software, if some software use OpenGL or DirectX as graphics or such that. But I recommered lugin writes to use the same exe file names as dll itself, so they can been invoked from the software it self that way.

EDIT: Updated the SDK how the plugin writers should place exe file, so they can been found by jukebox software. Hope this method is ok, Barcrest?
« Last Edit: January 07, 2008, 06:52:55 am by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #61 on: January 07, 2008, 07:10:42 am »
Quote
in plugindir/Commands.txt you should set these for above example:

I am just not that crazy about using a commands.txt file at all ......

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #62 on: January 07, 2008, 07:22:09 am »
It just to make sure the plugin known the command when the user want to configuere it when config is invoked. I'm pretty sure many plugin writers would take advance of the commands.txt in thier config screens...

Otherwice it would up to the plugin writer to control which default command sets that would been used, and hope it exists in JB software.....

Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

Barry Barcrest

  • I'm only in it for the lack of money
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1620
  • Last login:November 09, 2021, 09:54:17 am
  • Simple Plan
    • E-Touch Jukebox
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #63 on: January 07, 2008, 08:42:46 am »
If there is no config that can be called from the DLL it seems a bit pointless to me. When you call the config why would it lock the software? It will just display it's config screen on a windows forum wouldn't it. The jukesofware needs to nothing other than pass the call to display the config.

I also don't like the command.txt idea it's all too messy, just like the config being a seperate exe. To be honest i think all i will add support for is song start and end, attract mode start and end and config. I don't see ANY need for anything else as that will allow most things to be handled for plugin authors unless they specifically ask for anything. I think the song start i will just pass the filename across. The plugin authors can then calculate track legnth and read the tag info should they want to.

If that isn't the way you guys are going thats fine you don't have to go with my method. Asi have sadi before i watch what happens here but that is all i see myself implimenting.

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #64 on: January 07, 2008, 12:11:03 pm »
about commands.txt:

EDITED THIS TEXT AWAY, wich can been more confuction, I really sorry.

Here is the list that would constain in my commands.txt (which is not even pretty big) which can been remotly tracked by a plugin (status numbers like MOVE_UP, 0 is not really needed):

Code: [Select]
MOVE_UP
MOVE_DOWN
MOVE_LEFT
MOVE_RIGHT
PAGE_UP
PAGE_DOWN
LETTER_UP
LETTER_DOWN

ACTION_BUTTON_1
ACTION_BUTTON_2
ACTION_BUTTON_3
ACTION_BUTTON_4

LOOP
HOME
PAUSE_PLAY
STOP
SKIP
QUIT

LIBRARY_1
LIBRARY_2
LIBRARY_3
LIBRARY_4

COIN_INSERT
COIN_PAID

SCREEN_SAVER_BLANK
SCREEN_SAVER_NORMAL

OK
PARENT
CLEAR
DELETE
0
1
2
3
4
5
6
7
8
9

which commands do other use?

I have planning to create a Network Virtual Remote Controller as plugin to been working with all software and with full command list. Hence I need the full commmand list. You known I might write a plugin or two. Hmm? status ain the command lines is not needed, hence I remove them. Now just a command list would suit my plugin I have in a planning.

Otherwice only ACTION_BUTTON commands need some value feedback to the plugin suit a ledwiz plugin.



attract mode start can been used as a command (ATRRACT_MODE).



I dont think the plugin writers would want to read tags from 10 defficent of file formats, since that is is just a double work, if it just for use with LCD output. A Jukebox Software normally allready have tagged them, and sending song info is also MUCH faster than reading the tags again (and not all software actuelly use tagging).

I only added the tag reponse command to suit your idea, if you want to move all tagging to a plugin (can also been good for UncleT as well, if a tag plugin was wrote, so he can add tag support). The tag plugin is only for database init, not in normal use.

If you need to resumbit a large queue due to PlayNow and PlayNext, it would take quite a while for the plugin reading tags again.....


« Last Edit: January 07, 2008, 02:08:59 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #65 on: January 07, 2008, 12:12:28 pm »
if a plugin authors ask for more spefics commands, let me known. We can allways create a v1.1 of the command list.

Btw do any use the coin commands (can also been detected as a juke command)?

If nobody need this, I grant to remove them..... Then I dont add that in MultiJuke.


Juke_config() is now finnaly added with a WindowID argument (that can been set to 0). I so need to if I can make a workaround, so the dosent break the OpenGL output, but that is now mine problem to fix. I asume it not a problem in VB6 with a seperate configs....
« Last Edit: January 07, 2008, 01:33:37 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #66 on: January 07, 2008, 02:16:17 pm »
1) I decided there is no need for a new JukeConfigure() routine to handle a plugin configuration request.   Instead I just added a new command called "JUKE_PLUGIN_CONFIGURE", which has no values associated with it.

2) I changed all "@" separator characters to ">" characters since a "@" character is a valid filename character and this would interfere with the parsing of course .... thanks SpaceFractal!

3) I also added ">" characters to the end of all my command values so parsing each value will be easier since each supplied value will now have a trailing ">" character.

** Keep in mind if some jukebox software does not have all command value information then they do not need to be supplied with the command, but the command value format should remain constant (ie: the same number of ">" separator characters should always be used)

Example1 (album number "1135" and track number "002" is known when song starts):
Quote
Juke_PluginCommand("JUKE_SONG_STARTED", "Dirty Pool>Stevie Ray Vaughn>Texas Flood>1135>002>Rock>200>

Example2 (album number "1135" and track number "002" is NOT known when song starts):
Quote
Juke_PluginCommand("JUKE_SONG_STARTED", "Dirty Pool>Stevie Ray Vaughn>Texas Flood>>>Rock>200>

Basically, as long as the correct number of ">" separator characters are used then the plugin can parse the text the same exact way and then determine which data has been provided

4) I added "Party Lock" and "Attract Mode" commands


See my updated commands/values list below:

Quote
int Juke_PluginCommand(String cmdName, String cmdValue)


cmdName                                            cmdValue
-------------------------------------------------------------------------------
JUKE_APPLICATION_OPENED                   n/a
JUKE_APPLICATION_CLOSED                   n/a

JUKE_PLUGIN_CONFIGURE                      n/a

JUKE_SONG_STARTED                            name>artist>album>albumNum>trackNum>genre>totalDurationSecs>
JUKE_SONG_FINISHED                            n/a
JUKE_SONG_RESTARTED                         n/a
JUKE_SONG_SKIPPED                              n/a
JUKE_SONG_PAUSED                              n/a
JUKE_SONG_RESUMED                            n/a
JUKE_SONG_FAST_FWD_STARTED            currentPositionSecs>totalDurationSecs>
JUKE_SONG_FAST_FWD_FINISHED           currentPositionSecs>totalDurationSecs>
JUKE_SONG_FAST_REV_STARTED             currentPositionSecs>totalDurationSecs>
JUKE_SONG_FAST_REV_FINISHED            currentPositionSecs>totalDurationSecs>
JUKE_SONG_PLAY_POSITION                  currentPositionSecs>totalDurationSecs>

JUKE_QUEUE_USER_ADD_SONG               queuePos>name>artist>album>albumNum>trackNum>genre>totalDurationSecs>
JUKE_QUEUE_SYSTEM_ADD_SONG            queuePos>name>artist>album>albumNum>trackNum>genre>totalDurationSecs>
JUKE_QUEUE_DELETE_SONG                    queuePos>
JUKE_QUEUE_MOVE_SONG                      oldQueuePos>newQueuePos>
JUKE_QUEUE_CLEARED                           n/a

JUKE_VOLUME_CHANGE                           up/down/set>volumeLevel>
JUKE_VOLUME_MUTE_STATUS                  on/off>
JUKE_VOLUME_RANGE                             minVolumeLevel>maxVolumeLevel>

JUKE_ENTER_ALBUM_NUM_DIGIT              digit(0-9)>
JUKE_ENTER_TRACK_NUM_DIGIT              digit(0-9)>

JUKE_ATTRACT_MODE                            onActive/onNotActive/off>
JUKE_PARTY_LOCK                                 on/off>

In my mind, the "standardization" which should occur is coming up with command name/value strings which all jukebox software should adhere to "if" they wish to implement the command at all.

For example, Barcrest prefers to only implement the song start, song finish, configure and attract mode commands only.   No problem at all .... however, if he agreed to use my approach then he would at least use the "standardized" command names/values:


Quote
JUKE_PLUGIN_CONFIGURE                      n/a
JUKE_SONG_STARTED                            name>artist>album>albumNum>trackNum>totalDurationSecs>
JUKE_SONG_FINISHED                            n/a
JUKE_ATTRACT_MODE                            onActive/onNotActive/off>

Again, I would not expect anyone to implement every command name/value, but it would be nice to use one from a standard defining list if you were going to use one ..... instead of coming up with a different one on your own.


« Last Edit: January 07, 2008, 04:15:32 pm by unclet »

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #67 on: January 07, 2008, 02:37:37 pm »
you going to create you own standard? Or is is just a internal parser before sent to the Jukebox functions?

If it the last one, remember to backslash any titles or such that contain @, or your parse would break.

I think you can use that parser as internal, but plugin writers can not use any of them, since it would been very compliced for the pluginwriter to support that. The problem is they never known wich command that is used by a JB software....





« Last Edit: January 07, 2008, 02:54:07 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #68 on: January 07, 2008, 02:50:48 pm »
I like to keep it very simple and like my approach best so I might stick with it.  There is one routine (ie: Juke_PluginCommand() routine) which takes two parameters (command name and command value) and that is it.   It is very easy to add new command names/values, it is easy to expand existing command names/values and it is easy to understand and implement. 

I like "easy" since I do not plan on spending a lot of time on this.  I would like to use something that any plugin author can understand and implement easily thus not having a need for me to constantly explain how to use certain commands and such.  Basically, I would like to implement this plugin stuff and then have people be able to figure out how to use it on their own.

As for what a plugin author would create ..... I really have no idea and really do not care, but I would like to provide them with as many events as possible to let their imagination run wild.  If they would like to recreate their own personal software display instead of looking at my jukebox display screen .... then that is fine with me ..... no problem.   With the commands I supply they should be able to replicate the song queue as well as the currently playing song information along with certain song controls (play, skip, mute, etc...).

I will not be supplying commands for "everything" my software can do since I think that would be overkill, but things I think might be incorporated into a plugin I will provide events.


Good point about "@" character being able to be the text ...... I changed the separator character to ">" instead .... thanks.

« Last Edit: January 07, 2008, 02:57:49 pm by unclet »

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #69 on: January 07, 2008, 02:57:04 pm »
sorry to edit my last post (did you read that, if that, forgot it).

The only problem is painfully for the plugin writer to known all commands used, since they never known which command is used, and then can come very fast out of date.

Hence I used real functions with no parser for the plugin. That is much easier for Plugin Writer to use.

Easy for Jukebox Author, but really hard for plugin writers, or did I misforstood something...

______


Plugins is NOT intended to create a new software based on a existing software with same functions...

They are just small feedback things.
« Last Edit: January 07, 2008, 03:01:33 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #70 on: January 07, 2008, 03:06:38 pm »
This projects seen to been dead since we now have diffecent standards?

I seen UncleT have moved into his own system, so a standard can not been created.

I really hope you write a wrapper as well to sync to the main SDK listed in the first post.

Ny now I wont comment any longer before I hear others what now.

« Last Edit: January 07, 2008, 03:14:33 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #71 on: January 07, 2008, 03:20:50 pm »
Seems pretty easy to me if I was a plugin writer. 

Create the Juke_PluginCommand() routine (see below).  When the routine is called, then determine which command name is provided, parse the value string appropriately (only if required) and then perform your plugin function.


Quote
int Juke_PluginCommand(String cmdName, String cmdValue)
{
   switch(cmdName)
   {
      case "JUKE_APPLICATION_OPENED":
         //execute plugin code
      break;

      case "JUKE_APPLICATION_CLOSED":
         //execute plugin code
      break;

      case "JUKE_PLUGIN_CONFIGURE":
         //execute plugin code
      break;

      case "JUKE_SONG_STARTED":
         //parse 6 values from cmdValue string

         //execute plugin code
      break;

      case "JUKE_SONG_FINISHED":
         //execute plugin code
      break;

      case "JUKE_SONG_RESTARTED":
         //execute plugin code
      break;

      case "JUKE_SONG_SKIPPED":
         //execute plugin code
      break;

      case "JUKE_SONG_PAUSED":
         //execute plugin code
      break;

      case "JUKE_SONG_RESUMED":
         //execute plugin code
      break;

      case "JUKE_SONG_FAST_FWD_STARTED":
         //parse 2 values from cmdValue string
         //execute plugin code
      break;

      case "JUKE_SONG_FAST_FWD_FINISHED":
         //parse 2 values from cmdValue string
         //execute plugin code
      break;

      case "JUKE_SONG_FAST_REV_STARTED":
         //parse 2 values from cmdValue string
         //execute plugin code
      break;

      case "JUKE_SONG_FAST_REV_FINISHED":
         //parse 2 values from cmdValue string
         //execute plugin code
      break;

      case "JUKE_SONG_PLAY_POSITION":
         //parse 2 values from cmdValue string
         //execute plugin code
      break;

      case "JUKE_QUEUE_USER_ADD_SONG":
         //parse 7 values from cmdValue string
         //execute plugin code
      break;

      case "JUKE_QUEUE_SYSTEM_ADD_SONG":
         //parse 7 values from cmdValue string
         //execute plugin code
      break;

      case "JUKE_QUEUE_DELETE_SONG":
         //parse 1 value from cmdValue string
         //execute plugin code
      break;

      case "JUKE_QUEUE_MOVE_SONG":
         //parse 2 values from cmdValue string
         //execute plugin code
      break;

      case "JUKE_QUEUE_CLEARED":
      break;

      case "JUKE_VOLUME_CHANGE":
         //parse 2 values from cmdValue string
         //execute plugin code
      break;

      case "JUKE_VOLUME_MUTE_STATUS":
         //parse 1 value from cmdValue string
         //execute plugin code
      break;

      case "JUKE_VOLUME_RANGE":
         //parse 2 values from cmdValue string
         //execute plugin code
      break;

      case "JUKE_ENTER_ALBUM_NUM_DIGIT":
         //parse 1 value from cmdValue string
         //execute plugin code
      break;

      case "JUKE_ENTER_TRACK_NUM_DIGIT":
         //parse 1 value from cmdValue string
         //execute plugin code
      break;

      case "JUKE_ATTRACT_MODE":
         //parse 1 value from cmdValue string
         //execute plugin code
      break;

      case "JUKE_PARTY_LOCK":
         //parse 1 value from cmdValue string
         //execute plugin code
      break;
   }

   return 1;
}

Why do you think these commands will be obsolete and that the plugin author will be constantly trying to keep up with newer versions of these commands? 

I understand some new commands might be created/added and even some existing commands might be updated to have more "command value" text associated with them in the future,  but that should not cause that many problems.

In fact, this is what I am going to do.  All my "command names" are going to have a "version" number associated with them (see my next post).

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #72 on: January 07, 2008, 03:22:10 pm »
There is a possibility a "command name" might be updated to include additional "command value" text with it in the future an that plugins which have been released might not have been updated to reflect this change.   As a result, a version number could be added to each command string.   Once a particular command name version has been implemented in the software then it should never be removed or changed.  If the command is updated in the future to add additional data then a new command name (with increased version) would be created and implemented in the code.  This way, both versions of the command will constantly be supported by the software.   

For example
Lets say the current JUKE_SONG_START command did not have "totalDuration" value but it was added in the future.  This would result in 2 versions of the command:
Quote
JUKE_SONG_STARTED_1.0                      name>artist>album>albumNum>trackNum>genre>
JUKE_SONG_STARTED_1.1                      name>artist>album>albumNum>trackNum>genre>totalDuration>

Note1: I do not see this happening a lot, so maintaining multiple versions of the same command in the software should not a real problem.   Just means two calls are made to the "Juke_PluginCommand()" routine in a row instead of only one.

Note2: I really do not need to add versions to each defined command as long as the plugin only parses the correct number of text values from the "command value" string by only parsing each value up to the next trailing ">" separator character only.   Basically, any additional values which have been added to the end of the command value text string in the future should simply be ignored and cause no real problem.

Now, should I consider all plugins to parse corrcetly, or should I actually use the version numbering commands shown below?  Hmmm .....

Quote
int Juke_PluginCommand(String cmdName, String cmdValue)


cmdName                                            cmdValue
-------------------------------------------------------------------------------
JUKE_APPLICATION_OPENED_1.0             n/a
JUKE_APPLICATION_CLOSED_1.0             n/a

JUKE_PLUGIN_CONFIGURE_1.0                n/a

JUKE_SONG_STARTED_1.0                       name>artist>album>albumNum>trackNum>genre>totalDuration>
JUKE_SONG_FINISHED_1.0                      n/a
JUKE_SONG_RESTARTED_1.0                   n/a
JUKE_SONG_SKIPPED_1.0                        n/a
JUKE_SONG_PAUSED_1.0                        n/a
JUKE_SONG_RESUMED_1.0                      n/a
JUKE_SONG_FASTFWD_STARTED_1.0       currentPositionSecs>totalDuration>
JUKE_SONG_FASTFWD_FINISHED_1.0      currentPositionSecs>totalDuration>
JUKE_SONG_FASTREV_STARTED_1.0        currentPositionSecs>totalDuration>
JUKE_SONG_FASTREV_FINISHED_1.0       currentPositionSecs>totalDuration>
JUKE_SONG_PLAY_POSITION_1.0            currentPositionSecs>totalDuration>

JUKE_QUEUE_USER_ADD_SONG_1.0        queuePos>name>artist>album>albumNum>trackNum>genre>totalDuration>
JUKE_QUEUE_SYSTEM_ADD_SONG_1.0     queuePos>name>artist>album>albumNum>trackNum>genre>totalDuration>
JUKE_QUEUE_DELETE_SONG_1.0              queuePos>
JUKE_QUEUE_MOVE_SONG_1.0                oldQueuePos>newQueuePos>
JUKE_QUEUE_CLEARED_1.0                     n/a

JUKE_VOLUME_CHANGE_1.0                     up/down/set>volumeLevel>
JUKE_VOLUME_MUTE_STATUS_1.0            on/off>
JUKE_VOLUME_RANGE_1.0                       minVolumeLevel>maxVolumeLevel>

JUKE_ENTER_ALBUM_NUM_DIGIT_1.0        digit(0-9)>
JUKE_ENTER_TRACK_NUM_DIGIT_1.0        digit(0-9)>

JUKE_ATTRACT_MODE_1.0                      onActive/onNotActive/off>
JUKE_PARTY_LOCK_1.0                           on/off>

« Last Edit: January 07, 2008, 04:39:06 pm by unclet »

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #73 on: January 07, 2008, 03:32:06 pm »
The only problem can a plugin writers want to known which commands that would been used in ALL software?

Example I have not a ATTRACT mode but I have a SCREENSAVER, but would the plugin writer ever known about it (example if they are fan of a other application)?

Otherwice, I have just contacted LoadMan and HeadKaze what we do now, since none of us can agree a standard, It just because they before have wrote plugins (MALA example) and have lots of knownable about it.

____

seen your edited text:
Let see what LoadMan mean about it, and see what he thinks as a commen plugin writer (I also wanted to write a few). I through I finalized SDK from the very first post (as I changed over the time)....
« Last Edit: January 07, 2008, 04:36:13 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #74 on: January 07, 2008, 04:35:35 pm »
Quote
The only problem can a plugin writers want to known which commands that would been used in ALL software?

On my "plugin" page, the user can click a button to display all plugin commands my software supports along with an explanation of each.   Now, as I mentioned before, in a more centrally located place (ie: Jukebox Wiki, PlugMyJuke website, etc..) ALL of the plugin commands should be listed and for each command, a description should be provided along with which jukebox software supports it.

Quote
Example I have not a ATTRACT mode but I have a SCREENSAVER, but would the plugin writer ever known about it (example if they are fan of a other application)?

The word "attract" is used to simply indicate that the jukebox has some sort of way to try to "attract" a user to the jukebox machine when no songs are playing (ie: page flipping automatically, having sounds heard, lights flash, etc...)   It does not mean your software actually has an option called "AttractMode" in it.    (Same thing relates to "PartyMode" .... does not mean a jukebox has an option called "PartyMode" in it ..... it just means the jukebox software offers a way of locking party guests out of your configuration screens or from doing other stuff you do not want beer drinking hackers to try to do   :P)

Based on my format, your software would still use the "JUKE_ATTRACT_MODE" command.  The documented description of the "JUKE_ATTRACT_MODE" command would simply inform the plugin author that this command relates to "MultiJuke's screensaver function", "UncleT's Jukebox page flipping attract mode function",  etc...., etc....

Basically, the plugin author will understand what each command does based on their reading of the each command description which should definitely occur before they start coding their plugin.


« Last Edit: January 07, 2008, 04:50:45 pm by unclet »

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #75 on: January 07, 2008, 04:51:11 pm »
BTW I think I ask saint to lock this thread I have created to the hell.

I dedicated to pull off. No more points to debate this anymore .

Thanks very much for the debate.

We start from the beginnig with a completly new format.

« Last Edit: January 07, 2008, 05:10:36 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #76 on: January 07, 2008, 05:12:00 pm »
BTW I think I ask saint to lock this thread I have created to the hell.
I dedicated to pull off. No more points to debate this anymore .
Thanks very much for the debate.
We start from the beginnig with a completly new format.

You don't have to agree, That's fine.  :)

But don't get upset about it.  ;D

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #77 on: January 07, 2008, 05:15:39 pm »
Based on my format, your software would still use the "JUKE_ATTRACT_MODE" command.  The documented description of the "JUKE_ATTRACT_MODE" command would simply inform the plugin author that this command relates to "MultiJuke's screensaver function", "UncleT's Jukebox page flipping attract mode function",  etc...., etc....

Basically, the plugin author will understand what each command does based on their reading of the each command description which should definitely occur before they start coding their plugin.

This is what I was saying all along too (and was starting to repeat myself over and over). It's simple and it works in any scenario. Any Jukebox programmer can add or remove the commands they want, and they can share common commands. If people can't agree on something as simple as this it's best to create your own plugin systems.

It's a shame but hey these things happen  :dunno

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #78 on: January 07, 2008, 05:18:17 pm »
Based on my format, your software would still use the "JUKE_ATTRACT_MODE" command.  The documented description of the "JUKE_ATTRACT_MODE" command would simply inform the plugin author that this command relates to "MultiJuke's screensaver function", "UncleT's Jukebox page flipping attract mode function",  etc...., etc....

Basically, the plugin author will understand what each command does based on their reading of the each command description which should definitely occur before they start coding their plugin.

This is what I was saying all along too (and was starting to repeat myself over and over). It's simple and it works in any scenario. Any Jukebox programmer can add or remove the commands they want, and they can share common commands. If people can't agree on something as simple as this it's best to create your own plugin systems.

It's a shame but hey these things happen  :dunno


I gotta go to work now :-(     

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Function List using by Jukebox Plugins
« Reply #79 on: January 07, 2008, 05:19:56 pm »
sorry about it, but I still prefer start from beginning with a new thread started by you.

we other can then see we can agree or disagree.

Also sorry to UncleT as well.

I think we scrash both SDK and trying to make a comprimest in a new thread using my and Uncle't ideas.

Let plugin writes think first and let us jukebox writes came after. Use both of ideas by mine and UncleT.

I was just scare about all these new commands that never would been used, if a plug worked best for one contain software.

BTW we could make few functions. One for sending commands and one for sending a command list as well or something like that.

EDIT: Since this came out of controls where many us was upset (sorry again), I created a new thread with no listed command and my vision). I dont want have more posts into this thread.

PLEASE LOCK THIS THREAD


« Last Edit: January 07, 2008, 05:52:35 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.