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 181606 times)

0 Members and 2 Guests 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: A Command List using by Jukebox Plugins (!! V1.0b3 Update !!)
« Reply #200 on: January 11, 2008, 01:17:53 pm »
Quote
JUKE_FEATURE_RANDOM_MODE, why not JUKE_FEATURE_AUTOPLAY to been more generic?

Sound good to me


Quote
I wont not want to change JUKE_SONG_START.

 :banghead:   :banghead:

A one sentence response to my very long detailed description of why exactly my software needs to send this information in the "JUKE_SONG_START" command is really not a good reply.

You even failed to mention "why" you do not want the "JUKE_SONG_START" command to be updated ......... so perhaps you can provide some details as to "why" instead of simply stating "you do not want to change it" and thats it.    I spend a lot of time explaining myself so when you read what I wrote you will understand exactly what I am saying.  You do not tend to do this.   You seem like you prefer quick repsonses which means I often have to guess what you are referring to and never really have a true understanding of how your software functions at all.   It is as if I am trying to solve a very difficult puzzle ..... I have to keep asking you the same question (or present my view) in many different ways over and over in order to try to get an more detailed explanation from you.   I am spending a lot of time typing all of this stuff and I am getting a bit sick of typing so much.

I really do not think you understand when I tell you my software does NOT keep songs in the queue when they are currently playing.   As a result, when a song starts it has NOTHING to do with a QUEUE at all.   As a result, NONE of the the "JUKE_SONGLIST_xxxx" commands have anything to do with this discussion at all.   I believe there is no need to bring up "JUKE_SONGLIST_xxxxxx" commands for this discussion at all since in my software all "JUKE_SONGLIST_xxxx" commands are only related to updating songs in the QUEUE, not for the song which is currently playing.   Again, the word "SONGLIST" means "SONG QUEUE" in my software and the currently playnig song IS NOT in the queue.

I went to a "lot" of trouble a couple of times trying to explain exactly why I "need" the "JUKE_SONG_START" command updated with the song information.   I gave exact descriptions of how my software functions and examples of exactly why this update is "required" for me.  I even saw a previous post by Barcrest who agreed with me on this point immediately.  I really do not think you understand how my song "QUEUE" works, so that is why I spent a "lot" of time typing all this out for you to try to get my point across.

Your response was simply one sentence stating "I wont not want to change JUKE_SONG_START." which simply makes me believe you did not even read my "long" explanation above.   I explicitly provided all the details in my description above to explain how my software is different than yours and justified why this change is required.  Please reread my description fully and then please respond telling me more information other than "I wont not want to change JUKE_SONG_START".

If you do not want to supply the plugin with song information in the "JUKE_SONG_START" command then you do not have to, simply send NULL information for each text string, but I am going to send this information in the "JUKE_SONG_START" command to all the plugins since I "need" to.


Quote
But I just got a idea to a new command after invoked JUKE_SONGSTART:

Numberofsongs$=Juke_Command("CHECK_SONGLIST_QUEUE")

The plugin would send to the JukeboxSoftware, that does not mainstream queue, but they want resumbit total number of songs based on that limit and use ADD_SONGS just after that to get these info.

This mean a plugin can use a PLAYNOW and PLAYNEXT informations without using queue.
This is unneeded and I do not want to use anything like this.

I do not expect a plugin to have to query the jukebox software to get the song information.  My software will be supplying this information directly to the plugin when the song starts.  It makes perfect sense to me.

I am not even sure that is what you are proposing.  It is very hard to figure out what you mean.  I have no idea why the plugin would be requesting the jukebox software to "resubmit" a bunch of songs in order to get song information for one song.    :dunno


Quote
Juke_Command("JUKE_APP_OPENED","")
Juke_Command("JUKE_APP_CLOSED","")


yes, they does the same thing, and renamed to focus instead (for windowred based softtware).

I thought headkaze was indicating the "JUKE_APP_OPENED" should be replaced with calling the "Juke_Initialize()" function and the "JUKE_APP_CLOSED" command be replaced with calling the "Juke_Shudown()" function.   When I looked at your updated command list I saw they were removed (which I thought was fine), but then I noticed that "JUKE_APP_GAINFOCUS" and "JUKE_APP_LOSTFOCUS" were added but still have no idea why they are defined.  I am now very confused by your statement indicating "they do the same thing".

Now, are you saying that the "JUKE_APP_OPENED" command is the same as the "JUKE_APP_GAINFOCUS" command and the "JUKE_APP_CLOSED" command is the same as the "JUKE_APP_LOSTFOCUS" command?

If so, then I am very confused.

Just to make sure, GAINFOCUS means to me that the jukebox software window is the current working window in which the user has currently active.   LOSTFOCUS is when the indow no longer is the active window in the user's environment.   Is this correct?

Before you made this change, the "JUKE_APP_OPENED" command would be sent one time only when the jukebox started up and the "JUKE_APP_CLOSED" command would be sent one time only when the jukebox software shutdown.   

With these new commands, it seems like you want the jukebox software to send a "JUKE_APP_GAINFOCUS" everytime the jukebox window becomes the main active window in the user's environment and the "JUKE_APP_LOSTFOCUS" when the jukebox window is not the main active window in the user's environment ....is this correct?   if so, why is this important?

These commands suddenly showed up without discussing this with anyone ..... at least I id not see any discussion on this point.



Quote
MultiJuke does NOT use Playlist, but a user can select any songs from a PlayList to been played in WinAmp and jump both ways and some software might start from beginning again. Hence some might use that command.

What are you referring to here

« Last Edit: January 11, 2008, 02:29:27 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 Command List using by Jukebox Plugins (!! V1.0b3 Update !!)
« Reply #201 on: January 11, 2008, 02:14:30 pm »
I got edited a post to answar the last one in the above post (sorry), hence not comment here.

I think we have 2 very different how to handle the queue (but I do have Added a Juke_Song_Info command to suit you need):

In MultiJuke, The first song in the queue is the current song. But its only the technical part i do did that. For me it was much easier to just delete the current played song when skipped or finished, and the next song is ready to play (I use a Linked List).

But to the user, it still show "NOW", "NEXT", 2 and so on.... Its that way it works In MultiJuke.

Even with the 1 song queue limit, The user still Add the song to the queue technical, because MultiJuke want to play the first song in the queue,  but the user do never notice that...



I do finally added that, but to the new command (but its the very the same), marked in red in the SDK:
"Juke_Song_Info"

It should suit your need, and have another twist to that: I also want to have Song Info for the first song in the queue. That why for the new command. If you dont need to the last one (Next Song), just skip that one.

 I also add that as new commands because I guess some might just listen to song commands without using queue or song info at all !!





maxAlbumNumDigitsRequired, etc... Could I not just add a new argument to these 2 digit commands to tell the max digit instead of a new command?

« Last Edit: January 11, 2008, 02: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 Command List using by Jukebox Plugins (!! V1.0b3 Update !!)
« Reply #202 on: January 11, 2008, 03:42:51 pm »
Quote
I got edited a post to answar the last one in the above post (sorry), hence not comment here.
Yes, I saw you have already responded so I then deleted it to move it to a new post I made.   Anyway, I moved my questions back into the original post now  :)


Quote
Juke_Command("JUKE_KEY_EVENT_CREATE","KEY_EVENT_NAME") {saw that before removed that}

It is totally up to the user to tell the plugin, what they should do with the commands, and what they are named to be of real use. That is why plugin configuration is absolutely required here.

I have wrote a test plugin to been using 2 of these command. It got all key_event trouch these commands and show them in the pulldown list. I save the list into a file, so they can reused next time.

When they some commands back, it allways one of them you created using JUKE_KEY_EVENT_CREATE before CONFIG. Can never been something other.

But again it up to the user to tell the plugin which commands that should been used.

Lets say the plugin application has some feature in it to control when the current playing song is to be paused (and resumed).   How would the plugin inform the jukebox software to pause (or resume) the currently playing song?

Based on what you are saying ....... the commands which the plugin can send to the jukebox software are "only" those commands created with the "JUKE_KEY_EVENT_CREATE" command when the jukebox first started.  If there were 50 commands created using the "JUKE_KEY_EVENT_CREATE" command, how would the plugin know which of these 50 commands to use to pause (or resume) a song?

You mentioned "it up to the user to tell the plugin which commands that should been used" ...... but I have no idea how this would be done unless I list all of the commands (in my own jukebox's SDK documentation) which will be created by my jukebox software using the "JUKE_KEY_EVENT_CREATE" command.   

If I need to list all of these commands in some sort of SDK documentation which is specific to my jukebox software, then I do not see the need to have the "JUKE_KEY_EVENT_CREATE" command at all since the plugin author can get the full command set from the SDK documentation and decide what to do with each command themselves.


Quote
JUST SOMETHING I WANT TO MENTION
Each plugin stores it's own configuration so everytime the jukebox software starts up from scratch there would be no reason to configure the plugin everytime, however, the "JUKE_KEY_EVENT_CREATE" commands will be sent to the plugin everytime the jukebox software starts up from scratch.   

I think this is fine, but I want to make sure you know it is possible the  "JUKE_KEY_EVENT_CREATE" commands will be sent to the plugin but a "Configure()" would not be called after the commands are sent.

Just wanted to let you know.



Quote
I think we have 2 very different how to handle the queue (but I do have Added a Juke_Song_Info command to suit you need):

In MultiJuke, The first song in the queue is the current song. But its only the technical part i do did that. For me it was much easier to just delete the current played song when skipped or finished, and the next song is ready to play (I use a Linked List).

But to the user, it still show "NOW", "NEXT", 2 and so on.... Its that way it works In MultiJuke.

Even with the 1 song queue limit, The user still Add the song to the queue technical, because MultiJuke want to play the first song in the queue,  but the user do never notice that...

Thank you for explaining how your song queue work. 

I still do not understand why you can not send a "JUKE_SONG_START" command with song information in it though.   

Why can't you add the song to the start of your linked list (position 1) and then immediately inform the plugin the song has been removed from the queue (even though it remains in your linked list), then inform the plugin the song has started.   

The following three events would be sent one after the other very quickly at the same point within your code.  You can send them all even though the song remains in your linked list.

1) JukeCommand("JUKE_SONGLIST_ADD_SONG", "1|1|etc|etc|etc|etc..")
     (inform plugin the song has been added to the queue at position 1)

2) JukeCommand("JUKE_SONGLIST_REMOVE_SONG", "1|1|etc|etc|etc|etc..")
     (inform plugin song has been removed from position 1 from the queue, even though it remains in your linked list internally)

3) JukeCommand("JUKE_SONG_START", "1|etc|etc|etc|etc...")
     (inform plugin the song has started.  This command represents the "NOW" song)

I would then recommend you define another command called "JUKE_SONG_NEXT" which can be sent as well to inform the plugin what song will be "NEXT"

For example:  JukeCommand("JUKE_SONG_NEXT", (song info))

My software has no concept of "telling" the user what song is NEXT since the user sees the complete song queue all the time, so my software would simply not send the "JUKE_SONG_NEXT" command at all, but your software would. 

So .......  the complete set of commands you would send to the plugin when a song is selected by the user and it is going to be played immediately would be:

   JUKE_SONGLIST_ADD_SONG  (added a song into your linked list at position 1)
   JUKE_SONGLIST_REMOVE_SONG (removed song from linked list from position 1)
   JUKE_SONG_START (indicate "NOW" song has started)
   JUKE_SONG_NEXT (indicate what "NEXT" song would be)

The complete set of commands you would send to the plugin when a song is selected by the user and it is going to be stored in the queue (linked list) and not played right away (since another song is currently playing) would be:

   JUKE_SONGLIST_ADD_SONG  (added a song into your linked list at a certain position)
 
The complete set of commands you would send to the plugin when the current song finishes playing and there is another song in the queue would be:

   JUKE_SONG_FINISH (indicate "NOW" song has finished)
   JUKE_SONGLIST_REMOVE_SONG  (remove "NEXT" song from queue
   JUKE_SONG_START (indicate "NOW" song has started)
   JUKE_SONG_NEXT (indicate what "NEXT" song would be)

So, using the "JUKE_SONG_START" command to represent the "NOW" song and defining the new "JUKE_SONG_NEXT" command to represent the "NEXT" song should work for you and me.    Do you agree?  If not, please explain why your software can not use this?



Quote
I do finally added that, but to the new command (but its the very the same), marked in red in the SDK:
"Juke_Song_Info"

It should suit your need, and have another twist to that: I also want to have Song Info for the first song in the queue. That why for the new command. If you dont need to the last one (Next Song), just skip that one.

 I also add that as new commands because I guess some might just listen to song commands without using queue or song info at all !!

Instead of defining the "JUKE_SONG_INFORMATION" command I would prefer to simply use the "JUKE_SONG_START" command (with song information) as the "NOW" song and use the "JUKE_SONG_NEXT" command (with song information) as the "NEXT" song.

(see my above example as to why I believe this should work for you in your software)


Quote
maxAlbumNumDigitsRequired, etc... Could I not just add a new argument to these 2 digit commands to tell the max digit instead of a new command?

No because the command "JUKE_ENTER_ALBUM_VALUE" only gets sent when the user enters a digit using my software directly.   If the user enters a digit by using the plugin application (instead of my jukebox software directly) and then the plugin sends my jukebox software a command informing it which "digit" was entered, then the "JUKE_ENTER_ALBUM_VALUE" was never sent "to" the plugin ever.  As a result, the plugin would never understand how many digits can be entered for the album number at all.   

Some plugins might send digits to the jukebox software one at a time, and then the jukebox software would be able to ignore any extra digits it receives.  However, other plugins might send all the entered digits to the jukebox software at one time, so those plugins would need to know the min/max number of digits allowed to be entered in which the jukebox would consider "valid". 

This is why I believe a command like the following would be needed and could be sent to the plugin one time when the jukeboxs first is started:

Juke_Command("JUKE_FIXED_VALUES",
"minVolumeLevel|maxVolumeLevel|minAlbumNumDigitsRequired|maxAlbumNumDigitsRequired| minTrackNumDigitsRequired|maxTrackNumDigitsRequired")






« Last Edit: January 11, 2008, 03:58:28 pm by unclet »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b3 Update !!)
« Reply #203 on: January 11, 2008, 04:32:21 pm »
headkaze

Where did your "first JPS SDK v1.0b!: code go?  I do not see the file and I do not see a new thread started by you which has the code.....

Okay I will create a new thread for the file.


« Last Edit: January 11, 2008, 05:02:27 pm by headkaze »

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 Command List using by Jukebox Plugins (!! V1.0b4 Update !!)
« Reply #204 on: January 11, 2008, 04:42:10 pm »
KEY_EVENT (EDITED MUCH UNEEDED TEXT AWAY):

I actually found a issue with JUKE_KEY_EVENT_GET while developing to the document only. It missing KeyDown, KeyUp and KeyChar to the returned string. Some plugins might only send KeyChar yet with no keyrepeat.

I hope it make sense these KEY_EVENT should act in your PollEvent commands. I hope you used commandnames as events and not hardcoded with Key Numbers. Hence you can use these commands in main rutine.



how would the plugin know which of these 50 commands to use to pause (or resume) a song?

The user tell it that using configuration. I Think only COIN_INSERT and other speciel stuff that ever need that. So No big deal.

If you still want a default set, I recommered to use the same key evenets a MCE (Microsoft Media Center Edition) remote controller normally use. These remote controls is allready been popular, so they can been used as default set (can find the api list, but it someware on MSDN).



Plugin is only typical only need them to show to a LCD or such, but normally never sent back again (unless you sent 10 digit EVENT to the CREATE commands), hence maxTrackNumDigitsRequired and maxAlbumNumDigitsRequired is only required throuch these 2 exiting commands to get a nice show on these device.

Othewice we can add that command if a Plug-In Writer ask about it and add them to v1.1, if they also ask. Most commands in the future should been defined by them, not by us. They might ask special things.

NB: I think I starting add these commands now to my software.
Commands cant been removed (brown commands unless), only add stuff.

So to other, it safe to add these allready shown commands, even we might add a few



In MultiJuke this code is all I need to feed that CREATE command:

Code: [Select]
For Local S:TControllers = EachIn Keys
TPlugins.Command("JUKE_KEY_EVENT_CREATE","KEY_EVENT_"+Upper$(s.sAction$))
Next

When sending and get events I plan to do directly after when the user pressed that key (PollEvent). So is might it pretty easy for me to use Key_Event without hardcodning....






____

HeadKaze: Please create a new thread, due to this long thread. I cant get the sound plugin I created to work with the host api. Mightbe you have few commands wrong? I do got it working throuvh the new wrapper I created to BlitzMax. I hope you can get it to work.

« Last Edit: January 11, 2008, 06:31:49 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 Command List using by Jukebox Plugins (!! V1.0b5 Update !!)
« Reply #205 on: January 11, 2008, 08:45:57 pm »
Quote
Juke_Command("JUKE_SONG_START","system|NOW or NEXT|title|artist|album|genre|totalDuration|TrackNr|AlbumNr")
New song is just started.

Juke_Command("JUKE_SONG_NEXT","system|NOW or NEXT|title|artist|album|genre|totalDuration|TrackNr|AlbumNr")
Same as above, but just info about next song (1 song in queue).

Thank you for adding the song information in the JUKE_SONG_START and adding the JUKE_SONG_NEXT command.    :applaud:

Does this mean your jukebox can send the commands in the order I recommended?  I want to make sure we are both using the "JUKE_SONGLIST_xxxx" and "JUKE_SONG_xxxx" commands in the same way now.  Would you agree that we are using them in the same way?

A couple of things:

1) Why does the "JUKE_SONG_START" command have a "NOW" and "NEXT" indication.   I assumed the "JUKE_SONG_START" always represented the "NOW" song.  Why would the "JUKE_SONG_START" command ever be sent with a "NEXT" indication?

2) Why does the "JUKE_SONG_NEXT" command have a "NOW" and "NEXT" indication.   I assumed the "JUKE_SONG_NEXT" always represented the "NEXT" song.  Why would the "JUKE_SONG_NEXT" command ever be sent with a "NOW" indication?



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 Command List using by Jukebox Plugins (!! V1.0b5 Update !!)
« Reply #206 on: January 11, 2008, 08:57:08 pm »
I haven't have any problems around JUKE_SONG_START, JUKE_SONG_NEXT. I just submit the first 2 songs, I have in my technical queue. First song is the currently play and second song is the first song in queue.

But I do recommered you to use Juke_Command("JUKE_SONGLIST_CURRENTPOSITION", "1|0") to make sure song number 0 is the current played song, not number 1 (like I use in MultiJuke), so the plugin use JUKE_SONG_START to checking its info. I tell that in the document in red.


I can then use Juke_Command("JUKE_SONGLIST_CURRENTPOSITION", "1|1") for my and other PLAYLIST like systems.

« Last Edit: January 11, 2008, 09:28:26 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 Command List using by Jukebox Plugins (!! V1.0b6 Update !!)
« Reply #207 on: January 11, 2008, 09:13:36 pm »
---- opps ---- trhouch I updated the first post ---
« Last Edit: January 11, 2008, 09:19:22 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 Command List using by Jukebox Plugins (!! V1.0b7 Update !!)
« Reply #208 on: January 12, 2008, 08:38:16 am »
Quote
Event$=Juke_Command("JUKE_KEY_EVENT_GET", "")
Send a KEY_EVENT string back to the Jukebox software. The string would just get the KEY_EVENT command with a KeyDown, KeyUp or KeyChar arguments. Example: MOVE_DOWN|KeyDown

The "JUKE_KEY_EVENT_GET" shows the commandValue string to be NULL ("") above.

Will you please explain what the KeyDown, KeyUp and KeyChar arguments do and how they are delivered to the plugin?  Also are these extra commands from a standard defined set or does the jukebox software make them up?

Would you need KeyLeft and KeyRight defined as well for flipping through pages of album covers perhaps?

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 Command List using by Jukebox Plugins (!! V1.0b7 Update !!)
« Reply #209 on: January 12, 2008, 08:49:11 am »
should only return strings.... Just act like a keyboard, so no need to send a argument... The whole point.

KeyDown = When the user pressed a KEY_EVENT (user hold the button down)
KeyUp  = When the user released a Key (user hold the button down)
KeyChar = This string sendt only one and is (user invoked the button, pretty much KeyDown)

It just like most PollEvent() event generally works in Windows when you poll a key on your keyboard... Here it just send a command back when the user polled the command in its plugin.

So KeyLeft and KeyRight: No. All commands sent back to the software just like a keyboard.

Etc Plugin would return this when user pressed and hold the button:
   "KEY_EVENT_MOVELEFT|KeyDown"
   "KEY_EVENT_MOVELEFT|KeyChar"

When user release the button:
 "KEY_EVENT_MOVELEFT|KeyUp"

Many commans in the Jukebox Software might only require a KeyChar (Player commands example).

I need KeyDown and KeyUp due to Smooth Scrolling like a platform game in Jukebox GUI and many other things....



I have coded most commands to MultiJuke. But was doing system is in Juke_Command("JUKE_SONGLIST_REMOVE_SONG", "System|position")? It have no use, so i might remove that.

* Juke_Command("JUKE_SONG_LOOP","off|once|allways") is also missing.... (I guess you have that too, due to restart command).


« Last Edit: January 12, 2008, 04:43:12 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 Command List using by Jukebox Plugins (!! V1.0b7 Update !!)
« Reply #210 on: January 12, 2008, 06:52:55 pm »
1) Well I still have no idea how the plugin can determine which commands are for key presses, which commands should be used just to map sounds to, which commands should be mapped LED light actions, etc .....

Do not know how the plugin to determine what commands are what purpose ....... :dunno

I am missing something obviously  :banghead:

I can define 50 events using the "KEY_EVENT_CREATE" commands.  If 20 of those commands should be used by the plugin to map sounds to and 20 of those commands are required by the plugin to map to keyboard presses and the last 10 commands are used by LED light actions, then how in the world can the plugin tell which commands are to be used for these purposes.   All the plugin get in the "KEY_EVENT_CREATE" commands is a key event string value name ... that is it.  There are no instructions telling the plugin how to use these commands


2) Some Juke_Command() cmdValue strings have the "system" text included.  I remember you wanted a "0" to indicate the "user" and a "1" to indicate the "system".  Is this still correct, because it is not listed anywhere I can see (unless I missed it).

I do see you state that value being "USER", "RANDOM" or "SYSTEM" instead.  Is it true you want the "system" text to be one of these three text strings?  If so, then I do not understand the "RANDOM" string meaning.   I would think either the "user" or "system" can enter commands ..... nothing else .... so I am confused.

... so what does "system" 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: A Command List using by Jukebox Plugins (!! V1.0b7 Update !!)
« Reply #211 on: January 12, 2008, 07:39:03 pm »
I updated to beta 8, that should suit all you need.

I added a new command, since you diddent response to v7. I guess you have SONG LOOP too, since you have a SONG_RESTART command...

____

The rest I wrote here (which is deleted) is actulley now in the document and fixed (random status was a error). Also I used KEY_STATUS instead a new argument to tell which is status and which one is keypresses.

STATUS is just enable and disable status a EVENT can get.

Also KEY_EVENT and KEY_STATUS is now required to the name at beginning.

Please Note: it dosent bother me if status marked in brown is NOT being removed.



« Last Edit: January 12, 2008, 08:25:39 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 Command List using by Jukebox Plugins (!! V1.0b7 Update !!)
« Reply #212 on: January 12, 2008, 08:59:45 pm »

Quote
I added a new command, since you diddent response to v7. I guess you have SONG LOOP too, since you have a SONG_RESTART command...

In my software, when a song is currently playing, the user can click the "PLAY" button and the song will start over (ie: restart) from the beginning.  This is what I am using the "SONG_RESTART" command to indicate ..... when the song has restarted.

In my software, the user can activate the "REPEAT" option.  This means when the song has finished playing then the song gets placed back at the bottom of the queue so it will eventually play again.  My software does not allow a song to repeat continueously over and over again.   Anyway, I do not think I need to use the "SONG_LOOP" command, however, if you need it then thats fine with me.


Quote
Is it true you want the "system" text to be one of these text strings?


Ok, so "RANDOM" was removed ... fine.    However, do you expect the "system" variable to be a "USER" or "SYSTEM" text string ..... or do you expect them to be a "0" or "1" string?

If you want me to use "USER" or "SYSTEM" text strings, then I would suggest you change the "system" variable name to something else.   IF you want me to use "0" or "1" text strings, then the current "system" variable name is fine.


Quote
The rest I wrote here (which is deleted) is actulley now in the document and fixed (random status was a error). Also I used KEY_STATUS instead a new argument to tell which is status and which one is keypresses.

STATUS is just enable and disable status a EVENT can get.

Also KEY_EVENT and KEY_STATUS is now required to the name at beginning.
I agree the keyEvents which were create via the "JUKE_KEY_EVENT_CREATE" commands should have standard prefixes.   However, I still do not understand exactly how a plugin should tell the jukebox software to PAUSE the current playing song.  Will you please show me the command sequence which will be sent from the jukebox software and the plugin to do this?


Quote
Please Note: it dosent bother me if status marked in brown is NOT being removed.

It is fine with me if you want to remove the "system" variable form "SONGLIST_REMOVE_SONG", "SONGLIST_MOVE_SONG", "SONGLIST_CLEAR" and "SONGLIST_CURRENTPOSITION" commands.


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 Command List using by Jukebox Plugins (!! V1.0b8 !!)
« Reply #213 on: January 12, 2008, 09:25:55 pm »
REPEAT: Added some text to the command, since it can been misforstod like a loop command. I have no repeat command in my software, but I might add that. Elsewice good idea, also for MultiJuke as well.

PAUSE:  The user configure the plug-in about that, same as COIN_INSERT. Plugins can also try searching using Instr() or such to trying the guess in a part of the string like PAUSE. If it can't find it, it require the user tell which command it is on the configuration screen.

KEY_EVENT: I tried to explain returned string better with JUKE_KEY_EVENT_GET, and why it dosent have a argument.

If you want, I could add a argument for polling the currecnt event and send back a 0 and 1. but that might lost some perfectment if the plugin need to parce all event commands in every loop when you doing that. But I can add that anyway, so both methods can been used?



The acttract mode should been better explain what it really does.

For the system: 0 and 1



« Last Edit: January 12, 2008, 09:47:35 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 Command List using by Jukebox Plugins (!! V1.0b8 !!)
« Reply #214 on: January 12, 2008, 11:41:57 pm »
Quote
REPEAT: Added some text to the command, since it can been misforstod like a loop command. I have no repeat command in my software, but I might add that. Elsewice good idea, also for MultiJuke as well.

What command did you add text to?  I do not know what you mean since I see no change when I looked in any command.


Quote
PAUSE:  The user configure the plug-in about that, same as COIN_INSERT. Plugins can also try searching using Instr() or such to trying the guess in a part of the string like PAUSE. If it can't find it, it require the user tell which command it is on the configuration screen.

Ok, I might understand ..... please confirm.   

If I send the following command to the plugin....

Juke_Command("JUKE_KEY_EVENT_CREATE", "KEY_EVENT_PAUSE_SONG")

.... then I can go into the plugin's configuration window and indicate the "KEY_EVENT_PAUSE_SONG" event should be the event the plugin sends back to the jukebox software to inform the jukebox software the song has been paused.  In order to get this event sent from the plugin I would use the "KEY_EVENT_GET" routine (which I am sending every 200ms).   Once I have the "KEY_EVENT_PAUSE_SONG" event from the plugin then I can pause the song as requested.

Is this correct?


Quote
Juke_Command("JUKE_KEY_EVENT_CREATE","KEY_EVENT_NAME or KEY_STATUS_NAME")

Juke_Command("JUKE_KEY_EVENT_SEND", "KEY_EVENT or KEY_STATUS|ENABLE or DISABLE")

Event$=Juke_Command("JUKE_KEY_EVENT_GET", "")


Since we have KEY events and STATUS events I do not think these commands should have "KEY" in them.  I propose to renaming these three commands to the following:

Juke_Command("JUKE_PLUGIN_EVENT_CREATE", "KEY_EVENT_(name) OR STATUS_EVENT_(name)")
create an event which can be sent by the plugin to the jukebox application

"KEY_EVENT_(name)" events refer to actual keyboard event actions the plugin can send to the jukebox software (ex: "KEY_EVENT_MOUSEDOWN")

"STATUS_EVENT_(name)" events refer to any status update the plugin can send to the jukebox software. (ex: STATUS_EVENT_PAUSE_SONG)

The plugin can look for the prefix "KEY_EVENT" or "STATUS_EVENT" to determine how to categorize these events correctly in it's configuration routine.


Juke_Command("JUKE_PLUGIN_EVENT_SEND", "KEY_EVENT_(name) OR STATUS_EVENT_(name)|ENABLE or DISABLE")
send a previously created(defined) key event or status event to the plugin


Event$=Juke_Command("JUKE_PLUGIN_EVENT_GET", "")
get a previously created(defined) key event or status event from the plugin


Quote
The attract mode should been better explain what it really does.

Juke_Command("JUKE_FEATURE_ATTRACT_MODE", "onActive/onNotActive/Off")
Instead of having a quiet/idle jukebox with no songs playing, some jukebox applications will try to attract users to the jukebox machine hoping for them to request a song to start playing.  Attract modes could include LED light displays, automatic page flipping of available artists/albums, generating sounds to lure users closer to the machine, etc...    This command will indicate the state of the attract mode feature offer by the jukebox.

onActive =  attract mode has been activated by the user and is currently running
onNotActive = attract mode has been activated by the user and is NOT currently running
off = attract mode has NOT been activated by the user (or does not exist)


Quote
For the system: 0 and 1
Excellent .... I will use 0 and 1 .

Also, I see you removed the "system" text from the "SONGLIST_MOVE_SONG" command, but you did NOT remove it from the "SONGLIST_REMOVE_SONG", "SONGLIST_CLEAR" and "SONGLIST_CURRENTPOSITION" commands.  I guess this means you want to keep the "system" text for those commands?
« Last Edit: January 12, 2008, 11:47:48 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 Command List using by Jukebox Plugins (!! V1.0b9 !!)
« Reply #215 on: January 13, 2008, 12:14:51 am »
Space Fractal :

A question in simple terms:

As a plug-in creator I want to send a message to the JukeBox
1) Pause
2) Play or Un pause
2) Vol Up
3) Vol Down

Call me stupid but I just not understand what is required???

Is it Event$=Juke_Command("JUKE_KEY_EVENT_GET", "")

Please give an example of how I would do to achieve Items 1-4.  Thank You. ;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 Command List using by Jukebox Plugins (!! V1.0b9 !!)
« Reply #216 on: January 13, 2008, 12:24:09 am »
Space Fractal :

A question in simple terms:

As a plug-in creator I want to send a message to the JukeBox
1) Pause
2) Play or Un pause
2) Vol Up
3) Vol Down

Call me stupid but I just not understand what is required???

Is it Event$=Juke_Command("JUKE_KEY_EVENT_GET", "")

Please give an example of how I would do to achieve Items 1-4.  Thank You. ;D

AFAIK

1) JUKE_SONG_PAUSE
2) JUKE_SONG_START / JUKE_SONG_RESUME
3) JUKE_VOLUME_SET
4) JUKE_VOLUME_SET

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 Command List using by Jukebox Plugins (!! V1.0b9 !!)
« Reply #217 on: January 13, 2008, 01:51:46 am »
Space Fractal :

A question in simple terms:

As a plug-in creator I want to send a message to the JukeBox
1) Pause
2) Play or Un pause
2) Vol Up
3) Vol Down

Call me stupid but I just not understand what is required???

Is it Event$=Juke_Command("JUKE_KEY_EVENT_GET", "")

Please give an example of how I would do to achieve Items 1-4.  Thank You. ;D

AFAIK

1) JUKE_SONG_PAUSE
2) JUKE_SONG_START / JUKE_SONG_RESUME
3) JUKE_VOLUME_SET
4) JUKE_VOLUME_SET


Thanks.

The reason I directed the question at Space was I wondered if it was true that only commands which could be sent back were the ones originally defined by the Juke_Command("JUKE_KEY_EVENT_CREATE", xxxxx) command  ????  I hope Not  ???

Please advise

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b9 !!)
« Reply #218 on: January 13, 2008, 03:16:16 am »
Space Fractal :

A question in simple terms:

As a plug-in creator I want to send a message to the JukeBox
1) Pause
2) Play or Un pause
2) Vol Up
3) Vol Down

Call me stupid but I just not understand what is required???

Is it Event$=Juke_Command("JUKE_KEY_EVENT_GET", "")

Please give an example of how I would do to achieve Items 1-4.  Thank You. ;D

AFAIK

1) JUKE_SONG_PAUSE
2) JUKE_SONG_START / JUKE_SONG_RESUME
3) JUKE_VOLUME_SET
4) JUKE_VOLUME_SET


Thanks.

The reason I directed the question at Space was I wondered if it was true that only commands which could be sent back were the ones originally defined by the Juke_Command("JUKE_KEY_EVENT_CREATE", xxxxx) command  ????  I hope Not  ???

Please advise

Why would a plugin want to do things like turn up/down the volume, start, stop or pause a song? Those are the things a plugin can respond to why would it need to control that?

In any case to cover this problem the JUKE_KEY_EVENT_CREATE should IMHO be a more generic command like JUKE_PLUGIN_EVENT where you can send back any command. That way if there ever was a need to do that then the one command that is in a Timer to check for arbituary commands from the plugin can be processed.

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 Command List using by Jukebox Plugins (!! V1.0b9 !!)
« Reply #219 on: January 13, 2008, 04:21:43 am »

Why would a plugin want to do things like turn up/down the volume, start, stop or pause a song? Those are the things a plugin can respond to why would it need to control that?


When the phone rings,
When you launch game on MaLa,
When the bad neighbour get home :-)

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 Command List using by Jukebox Plugins (!! V1.0b10 !!)
« Reply #220 on: January 13, 2008, 05:52:33 am »
LoadMan:
Just updated the document to suit your need under returned commands around VOLUME (you right). Can also been a value now for the volume event (either through VOLUME_UP, VOLUME_DOWN or similar).

UncleT:
I prefer KEY_EVENT_(name) OR STATUS_EVENT_(name) as prefix. Not using the word JUKE here, that should only used by commands strings it self.


Juke_Command("JUKE_SONG_RESTART",""):
Current song has been restarted and moved back to the queue. I forget to mark that red.

PARTY_LOOP:
This should been explained better to the document..... The same goes for GENRE_LOCK (I do that soon).

SONG LOOP:
Otherwise I have added a Repeat to the SONG_LOOP command, if the user have enabled the REPEAT function. So you should use SONG_LOOP command as well (but only for the REPEAT argument, not ONCE or ALLWAYS).

JUKE_SONGLIST_CURRENTPOSITION:
I changed the text a bit so both queue methods can been used. I hope you understand that, so both queue methods can been used.

I just updated it to v1b10 suitable for these comment I got. My Sound Plugin is updated to these change

« Last Edit: January 13, 2008, 07:25:42 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 Command List using by Jukebox Plugins (!! V1.0b10 !!)
« Reply #221 on: January 13, 2008, 08:56:09 am »
Quote
LoadMan:
A question in simple terms:

As a plug-in creator I want to send a message to the JukeBox
1) Pause
2) Play or Un pause
2) Vol Up
3) Vol Down

Call me stupid but I just not understand what is required???

Is it Event$=Juke_Command("JUKE_KEY_EVENT_GET", "")

Please give an example of how I would do to achieve Items 1-4.

I think I figured this out ..... here is the sequence of commands which should be required (please note the keyEvent commands have been renamed):

1) My jukebox software creates(defines) the following commands when it starts:

Juke_Command("JUKE_PLUGIN_EVENT_CREATE", "STATUS_EVENT_SONG_PAUSE")
Juke_Command("JUKE_PLUGIN_EVENT_CREATE", "STATUS_EVENT_SONG_RESUME")
Juke_Command("JUKE_PLUGIN_EVENT_CREATE", "STATUS_EVENT_SONG_VOLUME_CHANGE|number")

2) My jukebox software would then keep sending the following command until I get a valid non-null string value returned (which was created using the "JUKE_PLUGIN_EVENT_CREATE" commands originally):

Event$ = Juke_Command("JUKE_PLUGIN_EVENT_GET", "")

3) The user would open your configuration plugin screen where they can associate (ie: map) certain functions to certain events.   For example, the user would map the "STATUS_EVENT_SONG_PAUSE" event to the "Pause song" function.

4) When your application decides it wants to pause the song, then your plugin would look up the "Pause soing" function to determine which event is mapped to it.  Your plugin would then return the "STATUS_EVENT_SONG_PAUSE" event string to my software by sending it as the return value of the next occuring "JUKE_PLUGIN_EVENT_GET" command request.

5) My software will then determine which STATUS_EVENT_(name) event was returned by the plugin and take appropriate action


Note: Based on the current standard, the STATUS_EVENT_(name) events can have a number value associated with them if some events need one (ex: "STATUS_EVENT_VOLUME_CHANGE|45")


Quote

Space Fractal requests.....
1) Can we rename "JUKE_VOLUME_SET" to "JUKE_VOLUME_CHANGE" please?

2) Under the "JUKE_PLUGIN_EVENT_SEND" event "examples":

a) I would explain what MOVEDOWN means by adding some more text to the event.  For example .... change "KEY_EVENT_MOVEDOWN" to "KEY_EVENT_SONGLISTBOX_MOVEDOWN"

b)  please change  "KEY_STATUS_LIGHTACTION|ENABLE" to "STATUS_EVENT_LIGHTACTION|ENABLE"


Quote
Juke_Command("JUKE_SONG_RESTART",""):
Current song has been restarted and moved back to the queue. I forget to mark that red.
The "moved back to the queue" text does not apply to my jukebox.   The currently playing song (which has already been removed from the queue so it can be played) is simply started over from the beginning so the song can start again.   It ha nothing to do with a queue for my software.   

I would recommend removing the "moved back to the queue" text.


Quote
PARTY_LOCK:
This should been explained better to the document.....
Juke_Command("JUKE_FEATURE_PARTY_LOCK", TRUE or FALSE)
Jukebox applications offer many unique configuration options and feature to allow the owner of the jukebox software to set up the application exactly how they prefer.   When party guests (ie: or customers) use the owner's jukebox, the owner would like to ensure none of their configuration options are altered by the party guests.  As a result some jukebox applications offer a "Party Lock" feature which allows the jukebox owner to password protect their configuration from changing.  This command will indicate whether the party lock feature offer by the jukebox is enabled/disabled.

Quote
The same goes for GENRE_LOCK.
Yes, you can supply a description for this one since I do not use this command

Quote
SONG LOOP:
Otherwise I have added a Repeat to the SONG_LOOP command, if the user have enabled the REPEAT function. So you should use SONG_LOOP command as well (but only for the REPEAT argument, not ONCE or ALWAYS).

Are you saying the "JUKE_SONG_LOOP" command is to indicate the "repeat" option offer by the jukebox is enabled or disabled?  If so then I would recommend renaming the "JUKE_SONG_LOOP" command to be "JUKE_SONG_REPEAT" like the following:

Juke_Command("JUKE_SONG_REPEAT","onOnce/onAlways/off")

Quote
JUKE_SONGLIST_CURRENTPOSITION:
I changed the text a bit so both queue methods can been used. I hope you understand that, so both queue methods can been used.

Well I still do not understand why I should use this command. 

When a song is selected in my software and placed in the queue, the following commands will be sent:

JUKE_SONGLIST_ADD_SONG <-- This will indicate the position in the queue

When the current song finishes and the next song is going to play, the following commands will be sent:

JUKE_SONG_FINISH
JUKE_SONGLIST_REMOVE_SONG
JUKE_SONG_START


Since my software uses a "song queue", then I use the "SONGLIST_ADD_SONG" commands to inform the plugin what position the song has been inserted into the queue.

Where do you think I should use the "SONGLIST_CURRENTPOSITION" command?





« Last Edit: January 13, 2008, 09:11: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: A Command List using by Jukebox Plugins (!! V1.0b10 !!)
« Reply #222 on: January 13, 2008, 10:42:13 am »
sorry for another edit:

Volume: Why not just JUKE_VOLUME? Personly I can leave at is are, because it fine destripted as it are, even it used SET or CHANGE....


Juke_Command("JUKE_SONG_RESTART",""):
This command is no use anymore, because I just added JUKE_SONG_REPEAT as you recommered. When the song is restarted, you can simply change a new status to the REPEAT instead.

I throuch the played song is pulled back to the last in the queue? If it still does, this command is still in place on the SDK. Hence I not removed it, but it need a better explain.

JUKE_FEATURE_PARTY_LOCK:
Completly wrong named command, if you ask me and can been easy misforstood by other authors. That one should been renamed to JUKE_FEATURE_CONFIG_LOCK to make more general use.

SONGLIST_CURRENTPOSITION[0]:
This make sure First song in the SONGLIST and SONG_START dosen't show the same songinfo. You can define that in your startup.

LOG:
Do you have some command logging feature to commands sendt to a log file? Please create that feature. Might been useful for Plugin Writers.... Or create a plugin for logging commands.




I are naerly finish to add Plugin Support to MultiJuke using Beta 11 document.

I just missing one command (JUKE_PLUGIN_EVENT_GET) and get 16 bit unicode strings converted to UTF8 (I have the other way allready) for ADD_SONG, SONG_START and SONG_NEXT commands (unicode have no use on all other). I might not support all commands.

I also JUKE_FEATURE_CONFIG_LOCK instead of JUKE_FEATURE_PARTY_LOCK for the same feature. I fell CONFIG is better to use that?


Hence I might wont change the SDK so often, so I dosent need to find the changed commands again (so I leave VOLUME_SET, since I allready used as it are).

« Last Edit: January 13, 2008, 12:50:29 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 Command List using by Jukebox Plugins (!! V1.0b10 !!)
« Reply #223 on: January 13, 2008, 12:43:42 pm »
Quote
STATUS_EVENT_SONG_PAUSE on your startup...... Should you not rename that as KEY_EVENT_SONG_PAUSE, since it not a light action?

I do not consider "STATUS_EVENT_(name)" events to be specific to just light actions.  I do not know why you are assuming that.   The difference between "KEY_EVENT_(name)" and "STATUS_EVENT_(name)" are the following (which is exactly stated in your first post in the thread):

"KEY_EVENT_(name)" events  = refer to actual keyboard event actions the plugin can send to the jukebox software (ex: "KEY_EVENT_MOUSEDOWN")

"STATUS_EVENT_(name)" events = refer to any status update the plugin can send to the jukebox software. (ex: STATUS_EVENT_PAUSE_SONG)

The way loadman would like to use the pause event is not be pressing a pause key on the keyboard but instead when he decides to start a Mame video game (while the jukebox is running) then his application will send a PAUSE event to my jukebox to pause the song.   It has nothing to do with keyboard input at all.

If you want specific events to be used for especially for LIGHTs then I suggest you add one more event called "LIGHT_EVENT_(name)".

Now, a problem with this naming convention is if we need to define these two commands:

KEY_EVENT_PAUSE = this event is sent because the pause key on the keyboard was pressed

STATUS_EVENT_PAUSE = this event is sent because an application decided to pause the jukebox by itself, without the user pressing a pause key of any kind.

Not sure we should be defining both of these commands, but if we want to have standard prefix text for each command, then they both should be defined.

I think my problem is that I do not fully understand exactly what all your "MOVEDOWN" and "MOUSEUP" event stuff is doing.   I thought you originally wanted a way for the plugin to be able to determine which events were for sounds, which events were for llights, etc.... so the plugin could populate their drop-down combo box (or listbox) with the appropriate commands.


Why not simply define the following (with one event name standard only):

Juke_Command("JUKE_PLUGIN_EVENT_CREATE", "PLUGIN_EVENT_(name)")

Then the plugin can simply list ALL created events in one BIG list and the user (during plugin configuration) can simply indicate which event shoulkd be used for what purpose.  Basically, the user can assign sounds to certain events, light handling to certain events, map certain events to functions (like loadman wants), etc....

It would now also be possible to assign multiple functions to the same event.  Lets say loadman wants to send the PAUSE event to the jukebox software when someone presses a pause key in his application but he also wants to send a PAUSE event to the jukebox software when his Arcade FrontEnd starts a video game (ie: no keyboard or button press occurring).   I can define one command called "PLUGIN_EVENT_PAUSE" and in loadman's plugin configuration screen I can assign the "PLUGIN_EVENT_PAUSE" to "two" separate functions (ie: "pressing pause key" and "starting a Mame video game").

I would prefer to simply have all events created as "PLUGIN_EVENT_(name)" only.

This seems like a better approach and also a lot easier.  Again, I like the idea of the plugin ONLY being able to send commands back to the jukebox software which were previously created by the "JUKE_PLUGIN_EVENT_CREATE" command only.


Quote
You dosent need to tell status about PAUSE and RESUME, since there already is commands about it: JUKE_SONG_PAUSE and JUKE_SONG_RESUME.

I believe you have been telling me that the ONLY commands a plugin can send to the jukebox software were the ones created by "JUKE_PLUGIN_EVENT_CREATE".   Since the "JUKE_SONG_PAUSE" and "JUKE_SONG_RESUME" commands are NOT created by the "JUKE_PLUGIN_EVENT_CREATE" command then they can not be sent by the plugin. 

I kind of like this rule since it separates exactly what a plugin can send to the software.  All of the events which start with "JUKE_xxxx" are sent from the jukebox.   All other events created by the "JUKE_PLUGIN_EVENT_CREATE" commands are sent by the plugin.


Quote
Volume, you should use this on your init:
Juke_Command("JUKE_PLUGIN_EVENT_CREATE", "STATUS_EVENT_SONG_VOLUME_CHANGE")
JUKE_VOLUME_SET(system|number|minvolume|maxvolume)

I agree ... no big deal.


Quote
That is why I used the term SET. I dosen't like the word CHANGE to the VOLUME_SET, but good as a STATUS EVENT (added to the document to use numbers as well). Now the VOLUME_SET is now normally only need once and cant see why I should rename that.

I do not know why you think "JUKE_VOLUME_SET" is only called one time.   I call it everytime the volume changes on my jukebox.  This is why I wanted the name to be called "JUKE_VOLUME_CHANGE" since is represents the event sent everytime the volume has "changed". 

The volume level does not only change as a result of the plugin telling the jukebox to change the volume level ..... the jukebox can change the volume level itself and must tell the plugin about the change.   

As a result, I still think you should change the "JUKE_VOLUME_SET" to "JUKE_VOLUME_CHANGE".


Quote
Juke_Command("JUKE_SONG_RESTART",""):
This command is no use anymore, because I just added JUKE_SONG_REPEAT as you recommered. When the song is restarted, you can simply change a new status to the REPEAT instead.
I recommended you should add a "JUKE_SONG_REPEAT" command if you wanted to be able to tell the plugin when the "repeat" feature was turned on or off in the jukebox.  When my "repeat feature" is on, then after the current playing song finishes it will be placed at the end of the song queue automatically.  This is what "repeat" means to me.  It does not mean the song has "restarted" playing again.

I never recommended removing the "JUKE_SONG_RESTART" command.  DO NOT remove the "JUKE_SONG_RESTART" command.

Here is how I am using these commands:

JUKE_SONG_RESTART = when there is a currently playing song and the user requests the song to restart from the beginning immediately.  Basically, the user will hear the song start over right away.

JUKE_SONG_REPEAT =  when the "repeat" feature is turned on, then when the current playing song finishes it will be placed at the end of the song queue automatically.  Basically, the user will hear the song play again once all other songs already in the song queue are played first.

Quote
I throuch the played song is pulled back to the last in the queue? If it still does, this command is still in place on the SDK. Hence I not removed it, but it need a better explain.
yes .... so please do not remove this command.  Please see my above explanation as to how I am going to use the "JUKE_SONG_RESTART" and "JUKE_SONG_REPEAT" commands.

Quote
JUKE_FEATURE_PARTY_LOCK:
Completly wrong named command, if you ask me and can been easy misforstood by other authors. That one should been renamed to JUKE_FEATURE_CONFIG_LOCK to make more general use.
Renaming this command to the following is fine with me .....

Juke_Command("JUKE_FEATURE_CONFIG_LOCK", "TRUE or FALSE")
All COnfiguration is locked or hidden, so the user only can select songs.

.... but the description should be changed to the following:

Juke_Command("JUKE_FEATURE_CONFIG_LOCK", "TRUE or FALSE")
The jukebox owner can set aspects of the software to be hidden/disabled from the jukebox user.  When the jukebox owner activates their configuration lock feature, then these setting become enabled, thus "locking out" the jukebox user from using certain functions.


Quote
SONGLIST_CURRENTPOSITION[0]:
This make sure First song in the SONGLIST and SONG_START dosen't show the same songinfo. You can define that in your startup.
This is exactly why I think this command is NOT needed at all.

The SONG_START command has song information in it to inform the plugin about the "NOW" song (ie: the song which is currently playing).   The "SONG_NEXT" commands has song information in it to inform the plugin about the "NEXT" song (next song from the songlist which will play).

In your software I think you would be sending a "SONG_START" for the "NOW" song (even though it is still in your queue at the first position) since it is the currently playing song.    Then you would send a "SONG_NEXT" command for the "NEXT" song to indicate the "next" song in your linked list.  As aresult, I have no idea why you are adding this "SONGLIST_CURRENTPOSITION" command. 

I have no plans on using this command since all current and next song information can be sent to the plugin using "SONG_START" and "SONG_NEXT" only.

Quote
LOG:
Do you have some command logging feature to commands sendt to a log file? Please create that feature. Might been useful for Plugin Writers.
Yes, there is a logging feature internal to my application.  I do not really use it alot since my jukebox never crashed or has problems  :P
« Last Edit: January 13, 2008, 01:18: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 Command List using by Jukebox Plugins (!! V1.0b11 !!)
« Reply #224 on: January 13, 2008, 01:22:40 pm »
KeyEvent Status:

I think the plugin could sent back a KEY_EVENT, even it did that automatic by the plugin or by user Keypresses. How the Keypress is sendt back to Jukebox by the plugin dosen't care me, since the Jukebox Software never can see why the plugin want it..... It something like the AutoHotKey application, if you have hear that....

It just doing that anyway, regaardles it auto or by user.

But if you which to use both STATUS and KEYEVENT with Pause, that is of course fine. It's possible, and the plugin can send a VOLUME back with a number now using STATUS as well (as LoadMan requsted).




 :banghead:

JUKE_SONG_RESTART = when there is a currently playing song and the user requests the song to restart from the beginning immediately.  Basically, the user will hear the song start over right away.

That was the JUKE_SONG_LOOP command I removed, but the command name using RESTART is fine, but I also added onOnce and onAllways here (Restart once), and should been marked by the user, not when song end (only from ONCE to OFF). Hence I added these arguments.

For repeart, onOnce is not neeed?



SONGLIST_CURRENTPOSITION[0]:
On the winamp screenshot I marked the song at number 12 in its playlists and now playing. Hence this argument is number 12.

In your software I assume you have the first song it its winamp queue would act like SONG_NEXT (Mine would been SONG_NOW)?

If yes, SONGLIST_CURRENTPOSITION[0] just make sure the Plugin does NOT checking the SONG LIST like wimap for the SONG_START command (ETC song number 0 is the SONG_START info).

This command is only in use by the plugin if the plugin do manage the queue.

This make sure plugins can use both queue and playlist systems.
« Last Edit: January 13, 2008, 02:20:34 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 Command List using by Jukebox Plugins (!! V1.0b11 !!)
« Reply #225 on: January 13, 2008, 03:12:46 pm »
Quote
KeyEvent Status: You are right here.
I am right about what?  Perhaps you please explain this statement a bit more?


Quote
I do added the possible to use numbers to all commands (like you would do when sending the volume as a STATUS event), like you did in the previous post.
I am getting to really dislike the fact that I do not fully understand the use the JUKE_PLUGIN_EVENT commands and I am getting tired of not getting a full example of "exactly" what should happen.  By the term example, I mean it would be nice if you simply presented a step by step description of exactly how a plugin should be updated with commands.   I am tired of writing multiple posts in this thread to discuss this topic I fully do not understand.  I am sorry, but no one has presented a true example of how all of these commands should work together.

Unless someone can provide "exactly" a step by step description of how I should use the existing defined commands, by providing a true example then I will just use the following definitions for my software and be done with it since I am spending way too much time writing text in this post.  :dunno

This is how I prefer to do this (perhaps you will use this format instead):

Define the following commands:

Juke_Command("JUKE_PLUGIN_EVENT_CREATE",
                               "PLUGIN_EVENT_(name)|ENABLE/DISABLE|NUMBER|numOfKeyEvents|keyEvent1|keyEvent2|...|keyEventX")

This command will create(define) a jukebox-specific event (which is only applicable in my jukebox software) which is allowed to be "sent from the jukebox to the plugin" OR "sent from the plugin to the jukebox".

This command will also create(define) the type of data which the "jukebox can send to the plugin" OR which the "plugin may return to the jukebox".

where:

ENABLE/DISABLE = When the "ENABLE" or "DISABLE" string values are supplied, we are telling the plugin that it can return the ENABLE or DISABLE text strings back to the jukebox software.  This way the jukebox software can enable or disable something related to the event the plugin has sent (ex: GUI setting, feature setting, etc..).

NUMBER =  When the "NUMBER" string value is upplied, we are telling the plugin that it can return an integer number value back to the jukebox software.  Thsi way the jukebox software can set a value to the number provided (ex: setting a value like volume level, etc..).

numOfKeyEvents = how many keyEvents will be supplied.  This is required in case this the CREATE command is ever expanded, then extra parameters can be appended to the end.

keyEvent = one of the following text values to describe the state of a keyboard key:

KEYDOWN
KEYUP
KEYCLICK



Juke_Command("JUKE_PLUGIN_EVENT_SEND",
                              "eventName|ENABLE/DISABLE|(number)|keyEvent")

Sends a previously defined jukebox-specific command to the plugin

where:

eventName = Event defined by "JUKE_PLUGIN_EVENT_CREATE" command ONLY

ENABLE/DISABLE = When the jukebox wants to inform the plugin to ENABLE/DISABLE something

number =  When the jukebox wants to provide a specific number to the plugin for something.

keyEvent = one of the following text values to describe the state of a keyboard key:

KEYDOWN
KEYUP
KEYCLICK


retValStr = Juke_Command("JUKE_PLUGIN_EVENT_GET", "")
Receives a previously defined jukebox-specific command from the plugin

where:   retValStr = a String in the following format

               "PLUGIN_EVENT_(name)|ENABLE/DISABLE|number|KeyEvent"



EXAMPLES:

Allowing the plugin to change the volume level to 50:

1) Juke_Command("JUKE_PLUGIN_EVENT_CREATE", "PLUGIN_EVENT_VOLUME|||3|KEYDOWN|KEYUP|KEYCLICK")

2) retValStr = Juke_Command("JUKE_PLUGIN_EVENT_GET", "")

where retValStr = "PLUGIN_EVENT_VOLUME||50|0"


Allowing the plugin to indicate the volume button is pressed down:

1) Juke_Command("JUKE_PLUGIN_EVENT_CREATE", "PLUGIN_EVENT_VOLUME|||3|KEYDOWN|KEYUP|KEYCLICK")

2) retValStr = Juke_Command("JUKE_PLUGIN_EVENT_GET", "")

where retValStr = "PLUGIN_EVENT_VOLUME|||1|KEYDOWN"


Allowing the plugin to indicate the volume button is no longer pressed:

1) Juke_Command("JUKE_PLUGIN_EVENT_CREATE", "PLUGIN_EVENT_VOLUME|||3|KEYDOWN|KEYUP|KEYCLICK")

2) retValStr = Juke_Command("JUKE_PLUGIN_EVENT_GET", "")

where retValStr = "PLUGIN_EVENT_VOLUME|||1|KEYUP"


Quote
In MultiJuke it seen, I diddent need to sendt ACTIONBUTTONS as KEY_EVENTS since it was not required, but is instead using these commands as STATUS_EVENT.
I have concluded I simply do not "fully" understand how you are using these events so I have decided to define my own set of commands which I will support (see above).   They have similiar information to the previous commands you defined, but I understand by format much better. 

Quote
JUKE_SONG_RESTART = when there is a currently playing song and the user requests the song to restart from the beginning immediately.  Basically, the user will hear the song start over right away.

That was the JUKE_SONG_LOOP command I removed, but the command name using RESTART is fine, but I also added onOnce and onAllways here (Restart once), and should been marked by the user, not when song end (only from ONCE to OFF). Hence I added these arguments.

Based on your description of the SONG_RESTART command I am not sure you understand how I use the SONG_RESTART command.

Juke_Command("JUKE_SONG_RESTART","onOnce OR onAlways OR off")
When the song is played finished, and is marked by the user, the song would restart from the beginning immediately.

I can restart a song without it finishing first and it does not have to be "marked" by the user in any way.. 

For example
On my software I have "PLAY",  "PAUSE", "FASTFWD", "FASTREV" and "SKIP" buttons. 

Lets say the user selects a song and that song starts to play.   Lets say this currently playing song is 120 seconds long.   After the song has been playing for 50 seconds only the user can click the "PLAY" button which will RESTART the same song from the beginning again.  If the user does not enter anything else, then the song will complete and finish and the next song from the queue will then be retrieved and played.

In my example, the song was restarted before the song has finished and also the user did not have to "mark" the song for any reason to indicate it should be restarted ,they simply pressed the "PLAY" key again.

Basically, I would send the following command all the time:

   Juke_Command("JUKE_SONG_RESTART","")

I do not understand why you need to inform the plugin about "onOnce, onAlways or off" values at all. 

As a result, I really do not like the following description text you use since my software does not have to wait for the song to finish before it can be restarted also the song does not have to be "marked" in order for it to restart:

   "When the song is played finished, and is marked by the user,"



Quote
For SONG_REPEAT, onOnce is not needed?
Correct, you can remove "onOnce" ....   :)


Quote
SONGLIST_CURRENTPOSITION[0]:
On the winamp screenshot I marked the song at number 12 in its playlists and now playing. Hence this argument is number 12.

In your software I assume you have the first song it its winamp queue would act like SONG_NEXT (Mine would been SONG_NOW)?

If yes, SONGLIST_CURRENTPOSITION[0] just make sure the Plugin does NOT checking the SONG LIST like wimap for the SONG_START command (ETC song number 0 is the SONG_START info).

This command is only in use by the plugin if the plugin do manage the queue.

This make sure plugins can use both queue and playlist systems.

You keep mentioning WinAmp .... which I have never used, so I simply do not understand why you need this command.  I tried to provide at least two separate examples of why I think the "SONGLIST_CURRENTPOSITION" commands is not needed but I guess you think it is still needed.  Keep it if you want, but I do not see a need for it at all so I will not be using it at all.  I am just going to use the "SONG_START" command to indicate the currently playing song and the "SONG_NEXT" command to indicate which song is going to play next.

The "SONG_START" command simply indicates the current playing song no matter if that song is currently located in a playlist, song queue or linked list  ..... it just does not matter.  It simply tells the plugin about the song "which is currently playing" ....  thats it.

The "SONG_NEXT" command simply indicates the next song which will be played no matter if that song is currently located in a playlist, song queue or linked list  ..... it just does not matter.  It simply tells the plugin about the song "which is going to play next" ....  thats it.

Anyway, keep the "SONGLIST_CURRENTPOSITION" command if you want, but I do not see a need for it at all so I will not be using it at all.
« Last Edit: January 13, 2008, 03:56:08 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 Command List using by Jukebox Plugins (!! V1.0b12 !!)
« Reply #226 on: January 13, 2008, 04:12:17 pm »
There are various software out here and work diffecent.

Winamp:
IT seen it hard to explain when never use a comon software like this to test out.... The command is really suited to this type of software, if they want to add plugin support where the user can jump throuch songlist back and front, even the song is not played finished.

SONGLIST_CURRENTPOSITION have No real use Jukebox software like your and mine. I only wrote that due to the little difference about your and mine queue system. That all, but let see what happens.

The only problem might accour, but I guess we should wait it happens when a real developed plugin use the SONGLIST system.... More can I not say about it. THEN we can correct some issues.



Juke_Command("JUKE_PLUGIN_EVENT_CREATE",
                               "PLUGIN_EVENT_(name)|boolean ENABLE/DISABLE|boolean NUMBER |numOfKeyEvents|keyEvent1|keyEvent2|...|keyEventX")

only require to set these boolean text to been TRUE and FALSE. Otherwice it fully accepeted, so I copy the whole text in at it are and good idea.



That can been a very much problem when we have functions that might varierer from software to software. RESTART is one of them.

A Plugin can detect when a song restarted middle from the current song without SONG_RESTART: It just checking the song position (currentSecs have been resetted).

Only real use is some output text to the user about RESTART have ben accour.... I do leave this command as original state now.


The repeat and loop is the major problem, because mine is song based, your is queue based.

Mightbe remove JUKE_SONG_REPEAT COMMAND, and the AUTOPLAY at all?

Then Instead use JUKE_SONG_MODE(mode) to cover both?

Here it can tell what it happens to this song and just show the text to the user. It can example been "Radio mode", "Random Mode", "Loop mode", "Repeat Mode" or any other mode that is suitable to the software?


« Last Edit: January 13, 2008, 05:09:05 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: A Command List using by Jukebox Plugins (!! V1.0b12 !!)
« Reply #227 on: January 13, 2008, 05:17:54 pm »
I got an idea, how about UncleT list all the commands he wants to have in the plugin system, then we match the common ones with Space Fractals list and then make one final list of commands.

I think the commands are confusing. I think the descriptions of the commands are confusing. How the hell is a plugin author supposed to understand them?

I think Space Fractal is designing the system around his Jukebox software too much. And I think things are being overcomplicated. Space Fractal is the only one who understands half of what is being written. I didn't even realise until I started reading some of UncleT's threads.

The best way to make a plugin system is to start SMALL with a few commands. Let loadman write his plugin and ADD commands that he needs as he needs them. There is no point in putting every conceivable command in there just so it supports everything. And you have to think more like a plugin author.

The SDK is becoming overcomplicated and that is DANGER! No plugin author will want to write software for an SDK they DO NOT UNDERSTAND. If UncleT doesn't understand the commands HOW WILL A PLUGIN coder?

A) Are the commands simple and easy to understand?
B) Will a plugin author likely want to use this command?
C) Don't add commands for the sake of it

Remember KISS? Keep it Simple Stupid ;)

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b12 !!)
« Reply #228 on: January 13, 2008, 05:27:16 pm »
Quote
Winamp:
IT seen it hard to explain when never use a comon software like this to test out.... The command is really suited to this type of software, if they want to add plugin support where the user can jump through songlist back and front, even the song is not played finished."

Not so much in a Jukebox software like your and mine.

The only problem might accour, but I guess we should wait it happens when a real developed plugin use the SONGLIST system.... More can I not say about it. THEN we can correct some issues.

Ok, so in your software, the user can cycle through all available songs in the list while another song is playing.  So you are using the "SONGLIST_CURRENTPOSITION" command to inform the plugin what song the user has currently highlighted. 

Your songlist contains all available songs which the user can select to play if they want to ... ccrrect?

This is similiar to my page flipping and viewing of album tracks.  When a song is playing the user can still flip through the pages of album covers, select an album to see the song tracks associated with the album and then highlight a song track to see information about it.    The user does not need to select a track to play, but can look through all available songs just for fun.

Anyway, I do not plan on telling the plugin what song the user is just "looking" at so I think the "SONGLIST_CURRENTPOSITION" will not be used by my software.  At least I understand how you are using it though  :applaud:


Quote
Juke_Command("JUKE_PLUGIN_EVENT_CREATE",  "PLUGIN_EVENT_(name)|ENABLE/DISABLE|number|KeyEvent")

should been then something like

Juke_Command("JUKE_PLUGIN_EVENT_CREATE", "PLUGIN_EVENT_(name)|TOGGLE or NUMBER")

A KeyEvent is not required need to just define a key. It just need to known its a toggle (ENABLE/DISABLE) or a number (VOLUME).

Rest is fine as it are and is accepted.

I put the "keyEvent" stuff into the CREATE command for you since I thought you wanted to know whether a key was UP or DOWN or simply CLICKED.   If you do not need that, then the keyEvent stuff can be removed since my software will not care about KEYDOWN/KEY UP stuff .....

As for the "TOGGLE" text ..... I would like to define this so there is no misunderstanding.  If the plugin ever gets out of sync with the jukebox software I would like the plugin to be able to "reset" the jukebox software back to a specific setting instead of just using toggle.   Basically, I want the plugin to be able to state they want to "ENABLE" or "DISABLE" something instead of just use toggle.

For example, lets say the plugin is using toggle to manipulate the states of features and settings in the jukebox.  Now lets say the plugin has a button to all all values to be reset back to their default values.  The plugin should be able to state exactly what state a function or setting should be in my indicating "ENABLE" or "DISABLE" explicitly instead of just have to toggle the values back and forth.

The values allowed could be "ENABLE" and "DISABLE" for now, but could be expanded to include other choices in the future as well.   

Quote
That can been a very much problem when we have functions that might varierer from software to software. RESTART is one of them.

A Plugin can detect when a song restarted middle from the current song without SONG_RESTART: It just checking the song position (currentSecs have been resetted).

No real need to force the plugin have to keep track of song position in order for it to know when a song has restarted though, so please keep the "SONG_RESTART" command.

definitions:
When something starts again before it has a chance to finish, then it has "restarted"

When something starts again after it has finished then it has "repeated"


Quote
The repeat and loop is the major problem, because mine is song based, your is queue based.

I am thinking my problem was that I was trying to use the SONG_REPEAT command to indicate the song has been added to the bottom of the queue, when really this is not important information at all.    It might be nice to know that a feature in my software has been turned on to allow songs which have finished playing to be placed on the bottom of the queue, however I can add a new commands for this.

Perhaps we can agree on using the commands this way:

JukeCommand(JUKE_SONG_RESTART, "")
this is sent when a song HAS NOT finished playing and is requested to start playing from the beginning again

JukeCommand(JUKE_SONG_REPEAT, "")
this is sent when a song HAS finished playing and the song will immediately be played again.

JukeCommand(JUKE_FEATURE_REPEAT_MODE, "TRUE or FALSE")
this is sent when the user turns on/off arepeat feature which places a song which has finished playing at the bottom of the song queue so it will eventually be played again.


Quote
Mightbe remove JUKE_SONG_REPEAT COMMAND, and the AUTOPLAY.

Please read my comments above and see if we can agree to use the JUKE_SONG_REPEAT" command the way that I describe.

I would like to keep AUTOPLAY, since this has nothing to do with repeat or restarting songs.  I described earlier the AUTOPLAY feature is a feature (when turned on) which will automatically play a song when no other songs are playing and no other songs are located in the queue to play.


Quote
Instead use JUKE_SONG_MODE(mode)?

Here it can tell what it happens to this song and just show the text to the user. It can example been "Radio mode", "Random Mode", "Loop mode", "Repeat Mode" or any mode that suitable to the software?
Since software can have many modes ... I would suggest not adding a "JUKE_SONG_MODE" command.   

If you need a new feature mode I would suggest adding a new command such as "JUKE_FEATURE_xxxxxx_MODE".

« Last Edit: January 13, 2008, 05:37:45 pm by unclet »

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b12 !!)
« Reply #229 on: January 13, 2008, 05:32:25 pm »
I got an idea, how about UncleT list all the commands he wants to have in the plugin system, then we match the common ones with Space Fractals list and then make one final list of commands.

I think the commands are confusing. I think the descriptions of the commands are confusing. How the hell is a plugin author supposed to understand them?

I think Space Fractal is designing the system around his Jukebox software too much. And I think things are being overcomplicated. Space Fractal is the only one who understands half of what is being written. I didn't even realise until I started reading some of UncleT's threads.

The best way to make a plugin system is to start SMALL with a few commands. Let loadman write his plugin and ADD commands that he needs as he needs them. There is no point in putting every conceivable command in there just so it supports everything. And you have to think more like a plugin author.

The SDK is becoming overcomplicated and that is DANGER! No plugin author will want to write software for an SDK they DO NOT UNDERSTAND. If UncleT doesn't understand the commands HOW WILL A PLUGIN coder?

A) Are the commands simple and easy to understand?
B) Will a plugin author likely want to use this command?
C) Don't add commands for the sake of it

Remember KISS? Keep it Simple Stupid ;)

I pretty much agree to use most of the commands defined so far, so getting rid of that list and starting over is something I do not want to do.   I am spending hours and hours writing these comments and I think we are again near the end.

I think Space Fractal has accepted my "PLUGIN_CREATE/SEND/GET" changes so I think this might help.   And I just proposed a nice way to use the REPEAT and RESTART commands.  If Space Fractal accepts this then I believe the commands are going to be pretty straightforward.

Lets hear what Space Fractal thinks about my current comments.  I am trying to think in general terms of what commands should logically be sent to the plugin.  Trying to keep stuff easy as well.

I do agree with you though ..... I was getting way to confused with all the MOVEUP and MOUSEDOWN and KeyEvent stuff SpaceFractal was trying to utilize.  In the end, I believe these commands can be used by Space Fractal and myself.  Lets wait and see. 


« Last Edit: January 13, 2008, 05:34:25 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 Command List using by Jukebox Plugins (!! V1.0b12 !!)
« Reply #230 on: January 13, 2008, 05:54:01 pm »
My software use a JOYSTICK and 4 buttons, that is all it need to control my software. Rest is just shortcuts to various functions.

That is why I want have the KEY_EVENTS simply as possible. Even UncleT is a good destription, can this to been over complicered for PlugInWrites to use, just for returning a VOLUME command? All GUI settings is also NOT been used by a Plugin.

Mightbe VOLUMES should NOT been used around KEY_EVENT commands, but instead just add a new command return command VOLUME command? Volume is actuelly the only one that actuelly require a number to been sent back.

Then keep the KEY_EVENT commands as KEYBOARD and STATUS actions ONLY. Not to been using numbers.

So, I think HeadKaze is correct here. It begin to been very complised for plugin writers if I changes these. Might been it good for jukebox authors, but for plugin writes? No I think,

All I really need to remote controlling the software OUTSIDE the software itself (using website), automatic things  and also for light actions. Because of that, KEY_EVENT should not been so complicered to send and use. Just see my Sound Plugin.

If other commands require it we would hear that sooner or later. Any request should been hear from PluginWriter allways, not by us.

Due to HeadKAze comment I have NOT updated the first thread, before I head the comment.


......

The commands around REPEAT etc sound fine. Only problem is there is no text feedback for various speciel commands (my LOOP commands example). I have no "JUKE_FEATURE_REPEAT_MODE" mode (it not the same as LOOP_MODE I have).

To been more general for all software which hae diffecent repeat/looping and any other features, it could been joined into one command: JUKE_FEATURE_SONG_MODE(AnyText).

« Last Edit: January 13, 2008, 06:05:42 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: A Command List using by Jukebox Plugins (!! V1.0b12 !!)
« Reply #231 on: January 13, 2008, 06:03:09 pm »
I pretty much agree to use most of the commands defined so far, so getting rid of that list and starting over is something I do not want to do.   I am spending hours and hours writing these comments and I think we are again near the end.

I think Space Fractal has accepted my "PLUGIN_CREATE/SEND/GET" changes so I think this might help.   And I just proposed a nice way to use the REPEAT and RESTART commands.  If Space Fractal accepts this then I believe the commands are going to be pretty straightforward.

Lets hear what Space Fractal thinks about my current comments.  I am trying to think in general terms of what commands should logically be sent to the plugin.  Trying to keep stuff easy as well.

I do agree with you though ..... I was getting way to confused with all the MOVEUP and MOUSEDOWN and KeyEvent stuff SpaceFractal was trying to utilize.  In the end, I believe these commands can be used by Space Fractal and myself.  Lets wait and see. 

Okay my apologies (especially to Space Fractal), browsing over the posts it looked like there was major disagreement, but if most of the API is agree'd upon that's great. So if it's just a few of the commands left over that you need to finalize I'm happy.

I just didn't want to see the SDK go the way of the Do Do. But I still think some of the descriptions need to be re-written by someone with more experience in English, and with some practical examples of how they work. Afterall it's going to be loadman (and possibly other coders) that has to understand what they mean not you guys.

Once you two get the two way communcation commands sorted (which I think should have more than just Key events) and I will add a simple Timer to the VB6 Host as an example of how to receive commands from the plugin.

Due to HeadKAze comment I have NOT updated the first thread, before I head the comment.

Hey it's best just to get it done and finish it off, then if loadman has problems then explain it to him as he goes. Please continue, sorry I interrupted.
« Last Edit: January 13, 2008, 06:05:42 pm by headkaze »

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 Command List using by Jukebox Plugins (!! V1.0b12 !!)
« Reply #232 on: January 13, 2008, 06:11:08 pm »
Yes it just pretty few commands left....

And yes, Im are danish, not english.

yes I guess LoadMan should go throuch the document now and feedback what it missing.

I think I change tke KEY_EVENT commands that was agreed. Please note, please wait to update SDK now before we fully agree. It really just few commands.

The only one think we are disagreement is around these repeat commands.
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 Command List using by Jukebox Plugins (!! V1.0b12 !!)
« Reply #233 on: January 13, 2008, 06:21:26 pm »
yes I guess LoadMan should go throuch the document now and feedback what it missing.

 ;D

No Problem.

I will go through the list and with a view to
* Making gramatical/spelling corrections
* Ask Questions of commands I don't understand.
* Make a draft PDF (so you can comment on the look/ layout)
« Last Edit: January 13, 2008, 06:23:57 pm by loadman »

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 Command List using by Jukebox Plugins (!! V1.0b12 !!)
« Reply #234 on: January 13, 2008, 06:28:28 pm »
UncleT: Just Updated (and yes we was/still only abit disagree on few commands ONLY, not the whole document). We need to make sure we adding them correct and behaiver very much the same.

Of course, Loop And Repeat is of course just a features and all user enable/disable features or simular like that should allways go under features command.

I agree.

I do still added the looping command I have to been used by a plugin, but it of course just a another feature.

Features commands is only the list of commands that might not constain on all software yet (along with few playing commands as well).


Loadman: That would been very granted, since Im are Danish, and there a lots of gramatical errors here and there (my work is got the all commands done and accepted with UncleT). I prefer html, since I can host the file on the website (I have just registred the domain).


« Last Edit: January 13, 2008, 06:32:42 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 Command List using by Jukebox Plugins (!! V1.0b12 !!)
« Reply #235 on: January 13, 2008, 06:33:12 pm »
(ADDED BEFORE THE PREVIOUS THREE POSTS WERE READ)
(I WILL LEAVE IT HERE SO EVERYONE CAN READ IF THEY WANT)

(I AGREE WE SHOULD FINISH OFF THE STANDARD AND THEN LET THE PLUGIN AUTHORS DETERMINE WHAT MAKES SENSE OR NOT)

Well my PLUGIN_EVENT_CREATE command has simplified this by getting rid of two separate naming "KEY_EVENT_(name)" and "STATUS_EVENT_(name)" ..... and now simply has one name "PLUGIN_EVENT_(name)" only

I still do not understand what the difference is between a KEY_EVENT and STATUS_EVENT events and I am getting too tired and spending way too much time typing stuff for this thread.  It is my opinion that Space Fractal is designing some really detailed stuff which he can use for his jukebox dealing with KeyEvents (mouseDown, moveUp, etc...) and remote control stuff.   This is good but I think the result is this I just do not understand the commands he needs, and never getting exact details command sequence of what he wants is not helping me undersatnd, so designing something we all can use is getting me to spend way too much time on this activity.

I provide tons of examples and reasoning to try to justify my points for changing or adding commands, however, Space Fractal really does not do the same so most of the time it is quite hard to interpret exactly what is being said.  Everyone in this thread uses the "(quote)/(/quote)" boxes when providing comments so it is easier for the person reading them to undersatnd the relationship.  However, Space Fractal never uses them so trying to figured out what his comments are relating to is also somewhat challenging.  Having a language barrier in the way as well does not help things, but that is not his fault so I do not blame anyone for that.  Also, I might not be the best explainer myself so I might be part of the problem.  However, I feel like I have to ask the same question multiple various ways until I can piece together all the various different answers to get to a solution I at best "think" might be right.  It has resulted in me spending too much time on this.

Now, I believe Space Fractal and I were about to find an agreement again, however, I guess he changed he mind on a few things.    :dunno

What I can do:
I can simply publish the commands which my jukebox software will use and then let people generate their own plugin if they wish to interact with my software. 

I really do not know of a lot of people that use my software at all so possibly only loadman will be writing a plugin for it anyway.  I can just make sure everything loadman wants is included and be done.

I never wanted to spend this much time on it anyway since I have no plans on using a plugin myself.  I was simply trying to help out other jukebox designers design some sort of standard.  Since this time Barcrest has left the discussion and I find myself talking with Space Fractal by myself.  It would have been nice to get some other input along the way instead of Space Fractal and I having to figure out "what would be best". 

It would have been nice to have headkaze and loadman comment along the way as to what "they" believe would be "easy" to do and what commands would be nice and what commands make no sense.

What I can not do:
I will NOT start this discussion over.  I have too much time invested and too much code written to do that at this point.  My fingers hurt from typing so much as well. 

If you want to get rid of all the work we agreed upon so far, then I will simply just post my own commands for my jukebox and let any plugin writers write a specific plugin using the commands I can understand.   


Space Fractal
I would ask that you review my last post and see if you agree with the stuff I propose in there.  If so, then we might be done.

headkaze
Instead of stating that you think a lot of this stuff is becoming overly complicated, perhaps you could provide exact comments as to which stuff is overly complicated so we can address it.   What do you think is complicated?  What way would you propose to approach the problem?  Hearing some comments like these would be nice.

loadman
being another plugin writer it would be nice to hear whether you think any of these commands are hard to understand as well.  If so, whicih commands, and what solution would you offer.


It would just be great if Space Fractal and I were not the only voices in this discussions.

One last point ..... I would like to appreciate Space Fractal's time and effort as well.  He probably feels like me and is spending the same amount of time on this project as well and probably gets frustrated at times as well.   :cheers:



 


 
« Last Edit: January 13, 2008, 06:43:27 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 Command List using by Jukebox Plugins (!! V1.0b12 !!)
« Reply #236 on: January 13, 2008, 06:39:30 pm »
Done for me, if you doesn't have other comments?

Of course we are all deficient, otherwise we have never made our own software of course.

I have also speed to much time to debate, but even it can been frustrated at time, but it still fun.

Otherwise I have never joined into this project.

Otherwise :cheers: (specific to UncleT), and yes I have same felling as you. Long debate, diddent trhouch the thread would been so big, but still fun.

Is Beta 12 the last (unless we find document errors, here it up to loadman I think)?

Should I change into v1.0 Final?

Rest might just been small document errors, loadman might find. (hence we just use v1.0.1, v1.0.2 in the future).





At last About KEY_EVENT and STATUS_EVENT (diddent notice that first):
AGREE, it no longer using these prefix, due to these change.
« Last Edit: January 13, 2008, 06:49: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: A Command List using by Jukebox Plugins (!! V1.0b12 !!)
« Reply #237 on: January 13, 2008, 06:49:22 pm »
headkaze
Instead of stating that you think a lot of this stuff is becoming overly complicated, perhaps you could provide exact comments as to which stuff is overly complicated so we can address it.   What do you think is complicated?  What way would you propose to approach the problem?  Hearing some comments like these would be nice.

Sorry I should have just kept my mouth shut lol I was just a bit worried there was disagreement again with the commands, but you guys seem to be sorting it out.

If I knew more about Jukebox software I could probably help simplify some things. I understand Space Fractal is Danish so he's doing the best he can at writing up the doc's which is great. I don't want to discourage him either because he's doing a great job. So I'll just go back to lurking in this thread and update the examples as you guys update the commands. There is no point in me entering the debate when I don't have any practical help to give.

Overall I think most of the commands are straight forward, some are a little tricky to understand like the two way communication. But once we get some practical plugin examples done I think it will make more sense.

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 Command List using by Jukebox Plugins (!! V1.0b12 !!)
« Reply #238 on: January 13, 2008, 07:00:56 pm »
loadman
being another plugin writer it would be nice to hear whether you think any of these commands are hard to understand as well.  If so, which commands, and what solution would you offer.

I was being careful not be to critical as that would make me seem ungrateful as it was my suggestion to add plug-ins.

I am happy with whatever system you guys are happy with. I stopped making too many comments as that seemed to be slowing things down. I think barcrest had a similar view.  Too Many Chefs!!!!

I was happy just to wait and see what you guys were happy with as what was there already was much more then I every expected anyway  ;D

I am going through the command list now and there will be questions of things that don't make sense to me (your average dumb dumb)  :banghead:

I will make the doc html not pdf  ;)

Thanks again guys  :cheers:

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
ok. I should not change anymore now before after v1.0 (or should I call it v1.02 since we was agree one time ago)?


I think i take a break in few days due to the long debate, but it seen finalize now?

I release my software with plugin support latest sunday with these commands.

But still: Godus to all.

And yes I hoped to get commands from Barcrest as well. One of the commands was from him.


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