KeyEvent Status: You are right here.
I am right about what? Perhaps you please explain this statement a bit more?
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.
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"
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.
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 exampleOn 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,"For SONG_REPEAT, onOnce is not needed?
Correct, you can remove "onOnce" ....
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.