headkazeWhere 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.....
Space FractalPlease try to provide answers to my comments in the same order as they are dislpayed below so I can easily figure out what your comments are related to. When you supply comments you do not use the "Quote boxes" so it is very hard sometimes to figure out what you are commenting on exactly.
"JUKE_FEATURE_RANDOM_MODE" command
I would recommend renaming this command to "JUKE_FEATURE_IDLE_SYSTEM_PLAY_MODE" (which means, when the system is idle, then a song will play automatically).
I have a feature like this, but it does not always play a "random" song when this occurs. The user can select songs from the Top10,25,50,100 lists to play and has the "option" of playing them in order or at random. As a result, this commands name should not have the word "random" in it since my feature is not always play the songs "randomly"
I would also recommend the parameters be "ON" or "OFF" instead of "TRUE" or "FALSE"
Juke_Command("JUKE_SONGLIST_REMOVE_SONG", "System|position")
Song removed from the queue by user or system or a song is played finished (using queuePosNum=1 as value)
What does "
(using queuePosNum=1 as value)" mean?
(Note: There is not "queuePosNum" parameter in the interface ... it is called "position".)
Are you indicating that the "position" value text always be set to "1". If this is the case, then you are wrong. The "JUKE_SONGLIST_REMOVE_SONG" command will indicate when a song has been removed from the song queue. A user of my software can remove any song (from "any" position) from the song queue whenever they want.
For example: When the user removes song located at queue position 45, then the following command will be sent:
JukeCommand("JUKE_SONGLIST_REMOVE_SONG", "0|45") -- remove song from position 45
So please remove your "
(using queuePosNum=1 as value)" statement please since it does not make sense for my software.
I should let you know the FIRST song from the SONGLIST would always be the currently playing song for a queue based jukebox
This is not how my jukebox works and I am not going to try to make my software work like this.
The first song in my song queue represents the "next" song which will be played. I am "not" going to use the "
JUKE_SONGLIST_ADD_SONG" command to indicate the currently playing song since this is not what it was designed to represent.
I will send the "
JUKE_SONG_START" command whenever a new song starts.
Here are the definitions of the commands:
"JUKE_SONGLIST_ADD_SONG" =
Add a song into the queue"JUKE_SONGLIST_REMOVE_SONG" =
Remove a song from the queue"JUKE_SONG_START" =
a new song has started to playJukebox software which is PLAYLIST based and DOES NOT remove songs from the song list but instead cycles through all the songs, can still call the "JUKE_SONG_START" when a new song is started. Jukebox software which is NOT PLAYLIST based (ie: mine) and DOES remove songs from the song list can still call the "JUKE_SONG_START" when a new song is started. Basically, the "JUKE_SONG_START" command is NOT related to queue functions at all.
In my software, when a song is currently playing and the user selects a new song, then this new song gets placed in the song queue. When ever a song gets placed into the song queue I send a "
JUKE_SONGLIST_ADD_SONG" command with all of the song information (ie: value string information) to the plugin.
When the currently playing song ends, then these are the sequence of commands I will send to the plugin:
JukeCommand("JUKE_SONG_FINISH", null) <-- current playing song has finished
JukeCommand("JUKE_SONGLIST_REMOVE_SONG", "1|1") <-- Remove next song from queue position 1
JukeCommand("JUKE_SONG_START", null) <-- next song starts
IMPORTANT: If the plugin does not maintain the song queue (does not support the "JUKE_SONGLIST_ADD_SONG" command at all) then there is no way the plugni will get the currently playing song information at all. This is why the "JUKE_SONG_START" command must have song information in it I would imagine a lot of plugin are not going to take the time to maintain the complete song queue so this is really needed. I would think most plugin might only be interested in the currently playing song only.
Please update the "JUKE_SONG_START" command to have the cmdValue string as follows:"system|title|artist|album|genre|totalDuration|TrackNr|AlbumNr"
SpaceFractal .... please read and let me know if you agree:
Just thought I would mention this point......
I know your software is "PLAYLIST" based, so I would imagine when a playlist of songs are loaded and your software is simply cycling through each song to play it, then I would imagine your software would only ever send the following commands:
JUKE_SONG_START <-- new song started
JUKE_SONG_FINISH <-- new song finished
I would not expect your software to send any "JUKE_SONGLIST_xxxxx" commands at all when the songs are simply being cycled through one by one. If this is not the case, then plugin authors are going to get pretty confused with how my software and your software use the "JUKE_SONGLIST_xxxx" and "JUKE_SONG_xxxx" commands.
Basically, this could be a real problem in the SDK if we are using these commands differently.
When they got a SONG_FINISH command, you might simply remove the song from the queue using REMOVE command. I guess that command is not actuelly needed, but leave it as it are !!
For my software the SONG_FINISH command is sent when the currently playing song is finished playing. The SONG_FINISH command has nothing to do with a song queue. Again, my "currently playing song" has already been removed from the song queue, so when it finishes playing I need to send "JUKE_SONG_FINISH"
Please DO NOT remove the "JUKE_SONG_FINISH" command.
Juke_Command("JUKE_APP_OPENED","")
Juke_Command("JUKE_APP_CLOSED","")
I am assuming thee commands were removed since these are now being sent internally when the Initialize and Shutdown routines are being called for the plugin?
Juke_Command("JUKE_APP_GAINFOCUS","")
When the user just switched to this software to activate the WIndow.
Juke_Command("JUKE_APP_LOSTFOCUS","")
If the jukebox application lost focus.
I wish you would ask before you change the SDK around by adding new commands.
Anyway, I do not plan on supporting these commands and do not know why they are required. I have a lot of child windows which can pop up which can then lose focus (or gain focus) if the user switches to another window to do something before returning back to my Jukebox software window. Maintaining GAINFOCUS and LOSTFOCUS commands is something I am not interested in doing.
If you really think these are necessary, please explain in detail why you need them.
Juke_Command("JUKE_SONGLIST_ADD_SONG",
"system|postition|title|artist|album|genre|totalDuration|TrackNr|AlbumNr|more")
Add a song into that position in the queue.
Some Jukebox Software might add a song directly as a first song, so it play directly. Here set a value to 0.
If a positionis to big, it would just added next to the queue.
Info about arguments:
* Auto means if it was added by the "USER", "RANDOM" or by "SYSTEM".
* TrackNr and AlbumNr is the same values gave by DIGIT COMMANDS.
* Some songinfo "tags" might been empty if not used.
* Some songs might not even contain TotalDuration if it is unknown.
* If more songs is going to submit at once, the more vaule is set to 1. The last submitted song would have a value set to 0.
I would recommend "removing" everything in
RED because:
1) There are no DIGIT_COMMANDS
2) I have decided not to use the "more" value text after all, so probably no longer needed. If you want to keep it in case you think someone might want this functionality in the future, then this is fine. Just thought I would tell you I decided not to use it for myself.
TOTAL SONG DURATION
I was looking at my code yesterday and it is not feasible for me to provide totalDuration values in the
JUKE_SONG_START or
JUKE_SONGLIST_ADD_SONG commands. The media player does not tell me this information until after the player has started processing a bit (long story). Anyway, I really need you to add this information back into the followin command:
Juke_Command("JUKE_SONG_PLAY_POSITION", curPosSecs
|totalDuration)
This really should not be a problem for any jukebox software. If other software do not want to provide this information, then just leave it as a NULL string, however, I do need it since this will be the only way to get the song's totalDuration to the plugin.
PLEASE CONFIRM SOMETHING FOR ME
All the
Juke_Command("JUKE_KEY_EVENT_CREATE","KEY_EVENT_NAME") commands which are sent to the plugin will define events used by the specific jukebox software only. The plugin will remember these events so it can populate a listbox in it's configuration window to allow the user to map things to these commands such as "sounds". When the key event occurs in the jukebox software, then the
Juke_Command("JUKE_KEY_EVENT_SEND", "KEYEVENT") command is sent to the plugin and then plugin can then look the event up in it's list and play the "sound" file.
If this how it works, then the plugin will never know what each KEY_EVENT really does or what each KEY_EVENT value is related to within the jukebox software. Basically, the plugin never sends these KEY_EVENT events back to the jukebox ever, since they have no idea what they mean so it would be impossible for the plugin to send them back.
Are all of these statements correct?If all of my comments are correct, then when the plugin wants to send a command to the jukebox software (ie: pause the song, skip the song, etc....) then the plugin must be using the standard set of commands (ie: "JUKE_SONG_PAUSE", "JUKE_SONG_SKIP", etc..).
Is this correct?If this is correct ...... then how will the plugin inform the jukebox software that specific digits have been entered? Will the plugin use the standard "JUKE_ENTER_ALBUM_VALUE" and "JUKE_ENTER_TRACK_VALUE" commands?
If so, then how will the plugin know how many digits make up an album number or track number. My jukebox software always requires 5 digits for the album number and 3 digits for the track number no matter how many albums or tracks are loaded.
For example: If only one album with one track was loaded in my software, and the user wants to request the track to be played by entering the digits manually, then the suser would need to enter the following 8 digits:
albumNum = 00001 and trackNum = 001
Now, some software might not require the user to enter the leading zeroes so entering the same album and track number on other software might only require the following:
albumNum = 1 and trackNum = 1
My whole point is .......
I think the plugin must know how many digits are required for albumNum and trackNum values if the plugin is going to send the "JUKE_ENTER_ALBUM_VALUE" and "JUKE_ENTER_TRACK_VALUE" commands back to the jukebox software.
I know this was a long explanation, but I think it was needed so people would understand what I am saying better.
I think a new command might need to be created to inform the plugin of all max/min values which it will need to know ...... something like this (we can even have the volume min/max values moved into this command):
Juke_Command("JUKE_FIXED_VALUES",
"minVolumeLevel|maxVolumeLevel|minAlbumNumDigitsRequired|maxAlbumNumDigitsRequired| minTrackNumDigitsRequired|maxTrackNumDigitsRequired")Keep in mind some jukebox software might allow the user to enter "0003", "003", "003" or "3" to indicate an album or track since it will simply trim off the leading zeroes automatically. My software does not do this since it is smart enough to realize that after 5 digits have been entered for the album number then the next digits being entered must be for the track number. Anyway, this is why we need the "min" and"max" values for each albumNumDigitsRequired and trackNumDigitsRequired data.