- Skip song (ie: skip currently playing song to go to the next song (if one exists))
- Mute On/Off
- Flipping through pages of album covers (pageLeft, pageRight)
- Fast forward active (ie: searching through video/audio forward quickly)
- Fast reverse active (ie: searching through video/audio backward quickly)
- Party Lock activated/deactivated
- Attract mode activated/deactivated
- Move song from one queue position (X) a new queue position (Y)
- Removed song from queue from position (X)
- Clear queue contents
- Enter digit 0,1,2,3,4,5,6,7,8,9
- Delete the last entered digit
IHMO It Shouldn't send how many seconds remain. It should send the current play position and the track duration so the plugin writter can display amount of time remaining or played and the total time or not they will have all that information to hand.
I have updated the list with ideas form your what I thinking.
Missing something?
About the playercontrols, all software have deficent controls, but I think I found a way to doing that. Look on the list what I added.
I again changed the list, and this list is still might not been finalized. Need more input from authors.
- Skip song (ie: skip currently playing song to go to the next song (if one exists))
- Mute On/Off
- Flipping through pages of album covers (pageLeft, pageRight)
- Fast forward active (ie: searching through video/audio forward quickly)
- Fast reverse active (ie: searching through video/audio backward quickly)
- Party Lock activated/deactivated
- Attract mode activated/deactivated
- Move song from one queue position (X) a new queue position (Y)
- Removed song from queue from position (X)
- Clear queue contents
- Enter digit 0,1,2,3,4,5,6,7,8,9
- Delete the last entered digit
Should we add my suggestions or not? If not, then no problem it will save me some time not to have to support them, but I think some plugins might find some of these handy.Quote- Skip song (ie: skip currently playing song to go to the next song (if one exists))
- Mute On/Off
- Flipping through pages of album covers (pageLeft, pageRight)
- Fast forward active (ie: searching through video/audio forward quickly)
- Fast reverse active (ie: searching through video/audio backward quickly)
- Party Lock activated/deactivated
- Attract mode activated/deactivated
- Move song from one queue position (X) a new queue position (Y)
- Removed song from queue from position (X)
- Clear queue contents
- Enter digit 0,1,2,3,4,5,6,7,8,9
- Delete the last entered digit
EDIT:
Actually I see you added the "Clear Queue" one .... but I do not see any other ones.
I again changed the list, and this list is still might not been finalized. Need more input from authors.
Suggestion: Can you remove the 'code quotes' from the list.
It's frikken hard to read (for me anyway). Can you use colors and/or bold to highlight the different functions?
Should we add my suggestions or not? If not, then no problem it will save me some time not to have to support them, but I think some plugins might find some of these handy.Quote- Skip song (ie: skip currently playing song to go to the next song (if one exists))
- Mute On/Off
- Flipping through pages of album covers (pageLeft, pageRight)
- Fast forward active (ie: searching through video/audio forward quickly)
- Fast reverse active (ie: searching through video/audio backward quickly)
- Party Lock activated/deactivated
- Attract mode activated/deactivated
- Move song from one queue position (X) a new queue position (Y)
- Removed song from queue from position (X)
- Clear queue contents
- Enter digit 0,1,2,3,4,5,6,7,8,9
- Delete the last entered digit
EDIT:
Actually I see you added the "Clear Queue" one .... but I do not see any other ones.
JukeGetPluginInfo(Title$[256], Album$[256], Title$[256], UTF8)
Cool LayoutQuoteJukeGetPluginInfo(Title$[256], Album$[256], Title$[256], UTF8)
Is this a mistake? Should it not be something like:
JukeGetPluginInfo(Name$[256], Aithor$[256], Version$[256], UTF8)
If we are adding routines that will not be supported we might as well be making our own plugins this is why we need to agree on a set standard that we would all implement so the plugin fits that standard and would work with all the software. There are other routines as well .....
the intent of Space Fractal's effort, then I do not think my software can support all of what is listed.
I think the effort the "standardize the routines" (and their parameters) which might be used by various jukebox software application is much more powerful.
I agreed 100% it would be nice to have one plugin work with many jukebox software without having to change the pluging at all ...... but come on .... do you really think that is feasible? Look how fast people write plugins and how fast they ask software developers to support more routines to allow them do what they want to do in their plugins. If someone asks me to support a new routine, should I first make sure whether all other jukebox software is going to support it, before I implement it myself? That does not make that much sense to me.
OK How about a compomise?
Change the list into two groups
Compulsary Options to met the format standard (just the basics):
Then some optionals: :dunno
This will sort of work, i thought this thread was to sort out the compulsory options only.... Anything else can then be added individually with any plugin using those will being jukebox specific.Cool ;D I still think the optionals have a place in this thread, we may as well start with them having the same type of format to make it easier for coders
EDIT: actually looking at it, what are we expecting these plugins to do? Most of the options listed here seem like they are pretty pointless for plugin authors to make use of. The song start and end are the real usefull ones. I don't see why plugin authors would need any of the others. Plugins to control lights or whatever would only need to know if music was playing or not. Why does it matter if a song is added to the queue or the queue is cleared? What plugin would do anything on those events?
EDIT2: Also did we find out how visual basic can read info back from the plugin? I didn't think that was working which would also make those command options pretty much useless.
This will sort of work, I thought this thread was to sort out the compulsary options only.... Anything else can then be added individually with any plugin using those will being jukebox specific
I think I will wait until you guys figure out everything you want and get it working and then I can have a look at it and try to implement what I can. I am not too crazy about using one common wrapper to interface and gather information for each plugin. If something needs to be changed, then I have no control over editting this wrapper function. Also, I am not sure how all ofthese routines should be used correctly so I might wait until people get all of this stuff working before I jump in.QuoteThis will sort of work, I thought this thread was to sort out the compulsary options only.... Anything else can then be added individually with any plugin using those will being jukebox specific
This is exactly my point ....... if we can standardize some of these "anything else" routines which are not yet common to all software applications then when the functionaility is added to the software at a later date, then the standardized routine interface can be used instead of having new routines added individually.
If a brand new routine is required which is not yet used by any other jukebox application then the jukebox software author can document the new routine interface in the Jukebox Wiki (for example). Then as other jukebox software adds this functionality, then they can use this new standardized routine instead of making one which is jukebox specific
Anyway, I think I might be slowing the progress down in this thread a bit, so I will sit back and watch for awhile to see how it goes. In the meantime I will work more on my own jukebox build ..... need to get that done now before I spend more time on this new activity.
Since they are just strings you can have unique commands for your juke and commands that are supported by most jukes.
The only problem is some commands is very diffecent for the nearly same feature.
MultiJuke example I use GENRE_LOCK instead of PARTY_LOCK. Freebox if I remember correct use CAUSAL for the same feature.
I could change the commands to only use the most used commands, but many unique command would not been controlled (ALL software have unique commands, that is why they wrote they own software)....
Now the commands.txt is gone, how could the external plugin known about the command used by the software?
Should the plugin writer just tell the user, you need to init the plugin once for first time, so the plugin can get the command list (because I asume the plugin writer would save the command list as well when it quit)? Not a problem for me.
We could even use a basic default list, that can been expandedable by the jukebox software with its unique commands?
int Juke_Command(String Name, String Value)
{
switch(Name)
{
case "JUKE_PLAY":
break;
case "JUKE_VOLUME_UP":
break;
case "JUKE_VOLUME_DOWN":
break;
case "JUKE_PARTY_LOCK_ON":
break;
case "JUKE_PARTY_LOCK_OFF":
break;
case "JUKE_MUTE_ON":
break;
case "JUKE_MUTE_OFF":
break;
}
return 1;
}
MultiJuke example I use GENRE_LOCK instead of PARTY_LOCK. Freebox if I remember correct use CAUSAL for the same feature.
int Juke_Command(String cmdName, String cmdValue)
{
switch(Name)
{
case "JUKE_SONG_BEGIN":
break;
case "JUKE_SONG_END":
break;
case "JUKE_PLAY":
break;
case "JUKE_VOLUME_UP":
break;
case "JUKE_VOLUME_DOWN":
break;
case "JUKE_PARTY_LOCK_ON":
case "JUKE_GENRE_LOCK_ON":
case "JUKE_CASUAL_ON":
break;
case "JUKE_PARTY_LOCK_OFF":
case "JUKE_GENRE_LOCK_OFF":
case "JUKE_CASUAL_OFF":
break;
case "JUKE_MUTE_ON":
break;
case "JUKE_MUTE_OFF":
break;
}
return 1;
}
JUKE_VOLUME_MIN
JUKE_VOLUME_MAX
It's matter to create a good configuration in the plugin to suit all commands in all software.
Juke_Command(String cmdName, String cmdValue)
The plug-in need to known which commands that is available to use, otherwise the user can not configurere what commands that would do that in the plugin configuration. Example to play a sound when the plugin got a "CoinInsert" command.
int Juke_Command(String Name, String Value)
{
switch(Name)
{
case "JUKE_COIN_INSERT":
PlaySound("CoinInsert.wav");
break;
}
return 1;
}
plugin[i].Juke_Command("JUKE_COIN_INSERT", null);
All Juke_Command* functions is removed !!!!
I have created few commands in the MultiJuke since version 1.00... If the plugin could not see these new commands, the user can never use these command in thier plugin to thier ledwiz device or such.
That is the main problem with a fixed list.
I do not like a fixed command list, which dosent have a future. I do like dynmaic list like the queue commands I made, wich require such a linked list anyway.
So we need doing something so we have a dynamic list with various commands... but NO fixed list, otherwice we cant expand and control it by the jukebox software.
any ideas and used arguments? I guess some plugins might need a commandlist to get it configurated by the user.
If you as Jukebox Author do not need to send a full list to the plug-in, You do not need to that. Its up to you.
The plug-in need to known which commands that is available to use, otherwise the user can not configure what commands that would do that in the plug in configuration. Example to play a sound when the plug in got a "CoinInsert" command.
int Juke_PluginCommand(String cmdName, String cmdValue)
cmdName cmdValue
-------------------------------------------------------------------------------
JUKE_APPLICATION_OPENED n/a
JUKE_APPLICATION_CLOSED n/a
JUKE_PLUGIN_CONFIGURE n/a
JUKE_SONG_STARTED name@artist@album@albumNum@trackNum@totalDurationSecs@
JUKE_SONG_FINISHED n/a
JUKE_SONG_RESTARTED n/a
JUKE_SONG_SKIPPED n/a
JUKE_SONG_PAUSED n/a
JUKE_SONG_RESUMED n/a
JUKE_SONG_FAST_FORWARD_POS currentPositionSecs@totalDurationSecs@
JUKE_SONG_FAST_REVERSE_POS currentPositionSecs@totalDurationSecs@
JUKE_SONG_PLAY_POS currentPositionSecs@totalDurationSecs@
JUKE_QUEUE_USER_ADD_SONG queuePos@name@artist@album@
JUKE_QUEUE_SYSTEM_ADD_SONG queuePos@name@artist@album@
JUKE_QUEUE_DELETE_SONG queuePos@
JUKE_QUEUE_MOVE_SONG oldQueuePos@newQueuePos@
JUKE_QUEUE_CLEARED n/a
JUKE_VOLUME_CHANGE up/down/set@volumeLevel@
JUKE_VOLUME_MUTE_STATUS on/off@
JUKE_VOLUME_RANGE minVolumeLevel@maxVolumeLevel@
JUKE_ENTER_ALBUM_NUM_DIGIT digit(0-9)@
JUKE_ENTER_TRACK_NUM_DIGIT digit(0-9)@
JUKE_ATTRACT_MODE onActive/onNotActive/off@
JUKE_PARTY_LOCK on/off@
I was also thinking of adding a "Configure" button which could be clicked when a plugin has been selected from the list to allow the plugin author to configure their own plugin. Loadman mentioned this might be nice to have during the testing phase of the plugin. If this would be nice to have, then one more plugin routine would need to be created by the plugin author (ie: JukeConfigure() routine).
JUKE_APPLICATION_OPENED
Juke_Initialize()
JUKE_APPLICATION_CLOSED
Juke_Shutdown(0)
JUKE_SONG_STARTED
Juke_SongBegin()
; do not need to send song info again, since the plugin allready know it using add2queue().
JUKE_SONG_FINISHED
Juke_SongEnd(0)
; EDIT, just corrected a error.
JUKE_SONG_RESTARTED
Juke_SongBegin()
; The plugin did not delete the song from its queue, because Juke_SongEnd(0) was not used.
; can also use the same if you use some thing as song loop and something elsewice.
JUKE_SONG_SKIPPED
Juke_SongEnd(1)
; When a song skipped, the song is also ended. Let the plugin know with setting value to 1.
JUKE_SONG_PAUSED
Juke_SongStatus("PAUSE")
; Plugin can also detect that when listen to Juke_SongPlayed(secs), because seconds diddent count.
JUKE_SONG_RESUMED
Juke_SongStatus("PLAY")
JUKE_SONG_FAST_FORWARD_POS
Juke_SongStatus("FAST RESERVE")
Juke_CommandSend("FAST_RESERVE") ; if it can been used as a keypress command.
JUKE_SONG_PLAY_POS
;no need, the plugin can detect it while listing to Juke_SongPlayed(secs), since the secs change.
JUKE_QUEUE_USER_ADD_SONG
Juke_Add2Queue(File$, totalDurationSecs, 0, CoverArt$="", "+tracknr+" "+name, artist, album, "", "")
; tracknr is not supported, but use it as part of the title name. A plugin might check about it.
JUKE_QUEUE_SYSTEM_ADD_SONG
Juke_Add2Queue(File$, totalDurationSecs, 1, CoverArt$="", "+tracknr+" "+name, artist, album, "", "")
; tracknr is not supported, but use it as part of the title name. A plugin might check about it.
JUKE_QUEUE_DELETE_SONG
Juke_QueueClear(1)
; then resubmit all songs agom you have in your queue using Juke_Add2Queue()
JUKE_QUEUE_MOVE_SONG
Juke_QueueClear(1)
; then resubmit all songs you have in your queue using Juke_Add2Queue()
JUKE_QUEUE_CLEARED
Juke_QueueClear(0)
JUKE_VOLUME_CHANGE
Juke_Volume(volumelevel, minVolumeLevel, maxVolumeLevel)
JUKE_VOLUME_MUTE_STATUS
Juke_CommandSend("MUTE", 0); on
Juke_CommandSend("MUTE", 1); off
JUKE_VOLUME_RANGE
Juke_Volume(volumelevel, minVolumeLevel, maxVolumeLevel)
JUKE_ENTER_ALBUM_NUM_DIGIT
Juke_CommandSend(digit, 0) <- just a a string digit, You might need to use LCDString if you want full LCD control using this function.
JUKE_ENTER_TRACK_NUM_DIGIT
Juke_CommandSend(digit, 0) <- just a a string digit, You might need to use LCDString if you want full LCD control using this function.
FAST_RESERVE,0
MUTE, 0
0, 0
1, 0
2, 0
3, 0
4, 0
5, 0
6, 0
7, 0
8, 0
9, 0
in plugindir/Commands.txt you should set these for above example:
MOVE_UP
MOVE_DOWN
MOVE_LEFT
MOVE_RIGHT
PAGE_UP
PAGE_DOWN
LETTER_UP
LETTER_DOWN
ACTION_BUTTON_1
ACTION_BUTTON_2
ACTION_BUTTON_3
ACTION_BUTTON_4
LOOP
HOME
PAUSE_PLAY
STOP
SKIP
QUIT
LIBRARY_1
LIBRARY_2
LIBRARY_3
LIBRARY_4
COIN_INSERT
COIN_PAID
SCREEN_SAVER_BLANK
SCREEN_SAVER_NORMAL
OK
PARENT
CLEAR
DELETE
0
1
2
3
4
5
6
7
8
9
Juke_PluginCommand("JUKE_SONG_STARTED", "Dirty Pool>Stevie Ray Vaughn>Texas Flood>1135>002>Rock>200>
Juke_PluginCommand("JUKE_SONG_STARTED", "Dirty Pool>Stevie Ray Vaughn>Texas Flood>>>Rock>200>
int Juke_PluginCommand(String cmdName, String cmdValue)
cmdName cmdValue
-------------------------------------------------------------------------------
JUKE_APPLICATION_OPENED n/a
JUKE_APPLICATION_CLOSED n/a
JUKE_PLUGIN_CONFIGURE n/a
JUKE_SONG_STARTED name>artist>album>albumNum>trackNum>genre>totalDurationSecs>
JUKE_SONG_FINISHED n/a
JUKE_SONG_RESTARTED n/a
JUKE_SONG_SKIPPED n/a
JUKE_SONG_PAUSED n/a
JUKE_SONG_RESUMED n/a
JUKE_SONG_FAST_FWD_STARTED currentPositionSecs>totalDurationSecs>
JUKE_SONG_FAST_FWD_FINISHED currentPositionSecs>totalDurationSecs>
JUKE_SONG_FAST_REV_STARTED currentPositionSecs>totalDurationSecs>
JUKE_SONG_FAST_REV_FINISHED currentPositionSecs>totalDurationSecs>
JUKE_SONG_PLAY_POSITION currentPositionSecs>totalDurationSecs>
JUKE_QUEUE_USER_ADD_SONG queuePos>name>artist>album>albumNum>trackNum>genre>totalDurationSecs>
JUKE_QUEUE_SYSTEM_ADD_SONG queuePos>name>artist>album>albumNum>trackNum>genre>totalDurationSecs>
JUKE_QUEUE_DELETE_SONG queuePos>
JUKE_QUEUE_MOVE_SONG oldQueuePos>newQueuePos>
JUKE_QUEUE_CLEARED n/a
JUKE_VOLUME_CHANGE up/down/set>volumeLevel>
JUKE_VOLUME_MUTE_STATUS on/off>
JUKE_VOLUME_RANGE minVolumeLevel>maxVolumeLevel>
JUKE_ENTER_ALBUM_NUM_DIGIT digit(0-9)>
JUKE_ENTER_TRACK_NUM_DIGIT digit(0-9)>
JUKE_ATTRACT_MODE onActive/onNotActive/off>
JUKE_PARTY_LOCK on/off>
JUKE_PLUGIN_CONFIGURE n/a
JUKE_SONG_STARTED name>artist>album>albumNum>trackNum>totalDurationSecs>
JUKE_SONG_FINISHED n/a
JUKE_ATTRACT_MODE onActive/onNotActive/off>
int Juke_PluginCommand(String cmdName, String cmdValue)
{
switch(cmdName)
{
case "JUKE_APPLICATION_OPENED":
//execute plugin code
break;
case "JUKE_APPLICATION_CLOSED":
//execute plugin code
break;
case "JUKE_PLUGIN_CONFIGURE":
//execute plugin code
break;
case "JUKE_SONG_STARTED":
//parse 6 values from cmdValue string
//execute plugin code
break;
case "JUKE_SONG_FINISHED":
//execute plugin code
break;
case "JUKE_SONG_RESTARTED":
//execute plugin code
break;
case "JUKE_SONG_SKIPPED":
//execute plugin code
break;
case "JUKE_SONG_PAUSED":
//execute plugin code
break;
case "JUKE_SONG_RESUMED":
//execute plugin code
break;
case "JUKE_SONG_FAST_FWD_STARTED":
//parse 2 values from cmdValue string
//execute plugin code
break;
case "JUKE_SONG_FAST_FWD_FINISHED":
//parse 2 values from cmdValue string
//execute plugin code
break;
case "JUKE_SONG_FAST_REV_STARTED":
//parse 2 values from cmdValue string
//execute plugin code
break;
case "JUKE_SONG_FAST_REV_FINISHED":
//parse 2 values from cmdValue string
//execute plugin code
break;
case "JUKE_SONG_PLAY_POSITION":
//parse 2 values from cmdValue string
//execute plugin code
break;
case "JUKE_QUEUE_USER_ADD_SONG":
//parse 7 values from cmdValue string
//execute plugin code
break;
case "JUKE_QUEUE_SYSTEM_ADD_SONG":
//parse 7 values from cmdValue string
//execute plugin code
break;
case "JUKE_QUEUE_DELETE_SONG":
//parse 1 value from cmdValue string
//execute plugin code
break;
case "JUKE_QUEUE_MOVE_SONG":
//parse 2 values from cmdValue string
//execute plugin code
break;
case "JUKE_QUEUE_CLEARED":
break;
case "JUKE_VOLUME_CHANGE":
//parse 2 values from cmdValue string
//execute plugin code
break;
case "JUKE_VOLUME_MUTE_STATUS":
//parse 1 value from cmdValue string
//execute plugin code
break;
case "JUKE_VOLUME_RANGE":
//parse 2 values from cmdValue string
//execute plugin code
break;
case "JUKE_ENTER_ALBUM_NUM_DIGIT":
//parse 1 value from cmdValue string
//execute plugin code
break;
case "JUKE_ENTER_TRACK_NUM_DIGIT":
//parse 1 value from cmdValue string
//execute plugin code
break;
case "JUKE_ATTRACT_MODE":
//parse 1 value from cmdValue string
//execute plugin code
break;
case "JUKE_PARTY_LOCK":
//parse 1 value from cmdValue string
//execute plugin code
break;
}
return 1;
}
JUKE_SONG_STARTED_1.0 name>artist>album>albumNum>trackNum>genre>
JUKE_SONG_STARTED_1.1 name>artist>album>albumNum>trackNum>genre>totalDuration>
int Juke_PluginCommand(String cmdName, String cmdValue)
cmdName cmdValue
-------------------------------------------------------------------------------
JUKE_APPLICATION_OPENED_1.0 n/a
JUKE_APPLICATION_CLOSED_1.0 n/a
JUKE_PLUGIN_CONFIGURE_1.0 n/a
JUKE_SONG_STARTED_1.0 name>artist>album>albumNum>trackNum>genre>totalDuration>
JUKE_SONG_FINISHED_1.0 n/a
JUKE_SONG_RESTARTED_1.0 n/a
JUKE_SONG_SKIPPED_1.0 n/a
JUKE_SONG_PAUSED_1.0 n/a
JUKE_SONG_RESUMED_1.0 n/a
JUKE_SONG_FASTFWD_STARTED_1.0 currentPositionSecs>totalDuration>
JUKE_SONG_FASTFWD_FINISHED_1.0 currentPositionSecs>totalDuration>
JUKE_SONG_FASTREV_STARTED_1.0 currentPositionSecs>totalDuration>
JUKE_SONG_FASTREV_FINISHED_1.0 currentPositionSecs>totalDuration>
JUKE_SONG_PLAY_POSITION_1.0 currentPositionSecs>totalDuration>
JUKE_QUEUE_USER_ADD_SONG_1.0 queuePos>name>artist>album>albumNum>trackNum>genre>totalDuration>
JUKE_QUEUE_SYSTEM_ADD_SONG_1.0 queuePos>name>artist>album>albumNum>trackNum>genre>totalDuration>
JUKE_QUEUE_DELETE_SONG_1.0 queuePos>
JUKE_QUEUE_MOVE_SONG_1.0 oldQueuePos>newQueuePos>
JUKE_QUEUE_CLEARED_1.0 n/a
JUKE_VOLUME_CHANGE_1.0 up/down/set>volumeLevel>
JUKE_VOLUME_MUTE_STATUS_1.0 on/off>
JUKE_VOLUME_RANGE_1.0 minVolumeLevel>maxVolumeLevel>
JUKE_ENTER_ALBUM_NUM_DIGIT_1.0 digit(0-9)>
JUKE_ENTER_TRACK_NUM_DIGIT_1.0 digit(0-9)>
JUKE_ATTRACT_MODE_1.0 onActive/onNotActive/off>
JUKE_PARTY_LOCK_1.0 on/off>
The only problem can a plugin writers want to known which commands that would been used in ALL software?
Example I have not a ATTRACT mode but I have a SCREENSAVER, but would the plugin writer ever known about it (example if they are fan of a other application)?
BTW I think I ask saint to lock this thread I have created to the hell.
I dedicated to pull off. No more points to debate this anymore .
Thanks very much for the debate.
We start from the beginnig with a completly new format.
Based on my format, your software would still use the "JUKE_ATTRACT_MODE" command. The documented description of the "JUKE_ATTRACT_MODE" command would simply inform the plugin author that this command relates to "MultiJuke's screensaver function", "UncleT's Jukebox page flipping attract mode function", etc...., etc....
Basically, the plugin author will understand what each command does based on their reading of the each command description which should definitely occur before they start coding their plugin.
Based on my format, your software would still use the "JUKE_ATTRACT_MODE" command. The documented description of the "JUKE_ATTRACT_MODE" command would simply inform the plugin author that this command relates to "MultiJuke's screensaver function", "UncleT's Jukebox page flipping attract mode function", etc...., etc....
Basically, the plugin author will understand what each command does based on their reading of the each command description which should definitely occur before they start coding their plugin.
This is what I was saying all along too (and was starting to repeat myself over and over). It's simple and it works in any scenario. Any Jukebox programmer can add or remove the commands they want, and they can share common commands. If people can't agree on something as simple as this it's best to create your own plugin systems.
It's a shame but hey these things happen :dunno
I could chose a plugin to listen for a COIN_INSERT command, so it can play that sample I want.
The plugin would then store COIN_INSERT command in its config settings to remember that command.
All the wrapper is really doing is redirecting the commands to the plugins. A another purpose about that wrapper is it did all the dynamic loading for you
If the command is not stored (saved), how would it know the command next time you start your jukebox Software up, and the user have already configuration the plug?
As with Jukebox software do not need to know how they have saved the config settings after a juke_config(). I don't care here. They simple save the settings they need to do.
The plugin is of course not need to listen to a command using a loop. They would get it sooner or later when you send it using Juke_CommandSend()...Good ... the plugin is not looping looking for a command. We agree we can simply call one main routine in the plugin to supply the plugin with the current command. Good!
....and find it on the stored command in its plugin
** Now ..... perhaps you wanted the plugin application to be "automatically" updated somehow when new "commands" are added to the SDK and somehow have the plugin application understand that a new command exists now without the plugin author having to update their plugin application manually everytime a new command was defined in the SDK? Is this what you were trying to do? I personally would not know how to do something like this but it might explain why you wanted the plugin application to know about all existing commands. Perhaps ..... this is just a guess obviously.
PS: Thanks headkaze for providing the Plugin Manager pics :applaud:
YES !!
StringPointer=TestString()
Local Name$=""
Repeat
Local char=PeekByte(StringPointer)
If char=0 Then Exit
StringPointer=StringPointer+1
Name$=Name$+Chr(char)
Forever
Print "NAME: "+Name$
Did you got the little dll working (before we using the text file idea)? I likelig to avoid the text file, if you can.
Declare Function TestString Lib "PeekMemory" () As Long
Declare Function SysAllocStringByteLen Lib "oleaut32" (ByVal lpString As Long, ByVal lLen As Long) As String
Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As Long) As Long
'Convert a string pointer to a VB string
Public Function PtrToVBString(ByVal lPointer As Long) As String
PtrToVBString = SysAllocStringByteLen(lPointer, lstrlen(lPointer))
End Function
Private Sub Form_Load()
' Outputs "WORKING"
MsgBox PtrToVBString(TestString)
End Sub
JUKEPLUGIN_API PCHAR __stdcall Juke_GetPluginInfo(int Value)
{
sprintf(m_buffer, "%s,%s,%s", PLUGIN_NAME, PLUGIN_AUTHOR, PLUGIN_VERSION);
return m_buffer;
}
Dim sPluginInfo As String
Dim sArray() As String
sPluginInfo = PtrToVBString(CallFuncPtr(pDC, pGetPluginInfo, vbNull))
sArray = Split(sPluginInfo, ",")
If UBound(sArray) + 1 = 3 Then
PluginInfo.Name = sArray(0)
PluginInfo.Author = sArray(1)
PluginInfo.Version = sArray(2)
End If
The most problem is with a default set, do other software out here use ACTION_BUTTON_1, ACTION_BUTTON_2, ACTION_BUTTON_3 and ACTION_BUTTON_4 using in MultiJuke, which is the most important commands in MultiJuke, they act like a arcade button?
How could I feedback a jukebox software, if I want to make a remote controlling plugin, but dont know all commands?All of the commands will be listed in the SDK, just read it and find what commands are allowed to be sent to the jukebox and then design your remote control plugin.
Would a Freebox plugin developer research for other software out here for other commands?A Freebox developer would not have to research what commands are for what software because he will just read the SDK to see what the generic commands exist and will then code a plugin around those commands only.
Juke_Init() is used for let plugin reading its config and init the hardware, if a hardware is used. Juke_shutdown does the other way.I would prefer to use the following commands to do this instead of introducing more routines:
int Juke_Initialize(int Value);
int Juke_Shutdown(int Value);
PCHAR Juke_GetPluginInfo(int Value);
PCHAR Juke_Command(PCHAR Name, PCHAR Value);
Dim RetVal() As String
RetVal = plugin.Command("PLUGIN_INSERT_COIN", "REPEAT|2")
MsgBox RetVal(0) & "," & RetVal(1), vbOKOnly, "Juke_Command"
2) How does the plugin send information back to the jukebox software? Does the jukebox software have to do anything special to check whether a the plugin has sent it information?
Dim mp3Tag() As String
mp3Tag = Juke_Command("JUKE_GET_MP3_TAG", "C:\Music\MySong.mp3")
MsgBox "SongName:" & mp3Tag(0) & "Album:" & mp3Tag(1)
3) Why do we need more than these two routines?
Juke_GetPluginInfo()
Juke_PluginCommand()
*snip*
4) I am thinking that having separate commands for each action is worth while now. It seems nice to have separate commands so the plugin can have one big case statement only and the JukePlugin class module can be less involved. Basically we use the "Juke_PluginCommand()" routine for everything and simply standard the cmdName and cmdValue string values which can be passed as parameters.
If you want to be able to receive data from the plugin at any time create a timer and put in a special command that is sent over every 2 seconds to check for data
Eg. Juke_Command("JUKE_DATA_CHECK_TIMER", "STATUS")
Then you can check for data from the plugin and the plugin can send it over whenever it wants to. But I don't really see a need for such a thing, do you?
Because it's just standard programming practice to do it that way.If those are standard plugin functions I can live with them ... no problem. I like how most all commands
Again, a few extra functions are ok. Most is done in Juke_Command() anyway. The JukePlugin class module is already VERY basic anyway.Yes, I wrote those questions before checking out your slimmed down JukePlugin class module. Lets get on with defining the cmdName and cmdValue strings now.
Yay! It works :)
Here is the dll codeCode: [Select]JUKEPLUGIN_API PCHAR __stdcall Juke_GetPluginInfo(int Value)
{
sprintf(m_buffer, "%s,%s,%s", PLUGIN_NAME, PLUGIN_AUTHOR, PLUGIN_VERSION);
return m_buffer;
}
And here is the code to get the info back...Code: [Select]Dim sPluginInfo As String
Attached is the complete code
Dim sArray() As String
sPluginInfo = PtrToVBString(CallFuncPtr(pDC, pGetPluginInfo, vbNull))
sArray = Split(sPluginInfo, ",")
If UBound(sArray) + 1 = 3 Then
PluginInfo.Name = sArray(0)
PluginInfo.Author = sArray(1)
PluginInfo.Version = sArray(2)
End If
library JukePlugin;
uses
Dialogs;
{*****************************************************************************}
var
PLUGIN_NAME : pChar = 'LCD Display';
PLUGIN_AUTHOR : pChar = 'Loadman';
PLUGIN_VERSION : pChar = 'Beta A';
{*****************************************************************************}
function Juke_GetPluginInfo(A:integer):Pchar ; stdcall;
begin
result := PChar(PLUGIN_NAME+','+ PLUGIN_AUTHOR+','+PLUGIN_VERSION);
end;
{*****************************************************************************}
procedure Juke_SongStart(A: Integer); stdcall;
begin
Showmessage('DLL has recieved Juke_SongStart message');
end;
{*****************************************************************************}
procedure Juke_Shutdown(A: Integer); stdcall;
begin
Showmessage('DLL has recieved Juke_Shutdown message');
end;
{*****************************************************************************}
exports
Juke_GetPluginInfo,
Juke_SongStart,
Juke_Shutdown;
{$R *.res}
begin
end.
I believe Space Fractal wants to be able to implement a remote control for his jukebox so he can press a button and have the jukebox do stuff. I guess I thought his remote control interface would need to go through some plugin interface and then to the jukebox. If so, then the plugin would need to send messages to the jukebox at anytime. Perhaps I am wrong?
Plug_Command("JUKE_READ_INPUT", "MCE_REMOTE");
If those are standard plugin functions I can live with them ... no problem. I like how most all commands
Yes, I wrote those questions before checking out your slimmed down JukePlugin class module. Lets get on with defining the cmdName and cmdValue strings now
I even got it a Dll made in Delphi to send the data back to the VB6 test app
Your latest code has a problem in my software. When the Form_Unload() routine is called, my project crashes when the ShutDown routine is being called. If I go into the JukePlugin class module and comment out the call to CallFuncPtr for the ShutDown call, then my project no longer crashes.
Public Function Shutdown() As Long
Dim RetVal As Long
If pShutdown <> 0 Then
RetVal = CallFuncPtr(pDC, pShutdown, vbNull)
End If
FreeLibrary hDll
pGetPluginInfo = 0
pInitialize = 0
pShutdown = 0
pCommand = 0
Shutdown = RetVal
End Function
library JukePlugin;
uses
Dialogs,
SysUtils,
Classes;
{$R *.res}
var
PLUGIN_NAME : PChar = 'LCD Display';
PLUGIN_AUTHOR : PChar = 'Loadman';
PLUGIN_VERSION : PChar = 'Beta A';
PLUGIN_DESCRIPTION : PChar = 'This is a plugin';
Buffer: array[0..8192] of Char;
function Juke_Initialize(Value: Integer):Integer; stdcall;
begin
// Showmessage('DLL has recieved Juke_Shutdown message');
Result := 1
end;
function Juke_Shutdown(Value: Integer):Integer; stdcall;
begin
// Showmessage('DLL has recieved Juke_Shutdown message');
Result := 1
end;
function Juke_GetPluginInfo(Value:integer):PChar; stdcall;
begin
Result := PChar(PLUGIN_NAME + '|' + PLUGIN_AUTHOR + '|' + PLUGIN_VERSION + '|' + PLUGIN_DESCRIPTION);
end;
function Juke_Command(Name:PChar; Value:PChar):PChar; stdcall;
begin
StrCopy(Buffer, Value);
Result := Buffer
end;
exports
Juke_GetPluginInfo,
Juke_Initialize,
Juke_Shutdown,
Juke_Command;
begin
end.
headkaze
That works ....thanks.
I came back to tell you the good news and noticed you posted yet another version of the JukePlugin ....... :) I guess I will upgrade again
I still think the command name and value formats need to be agreed on.
Hey, I really can not stand the "|" character since it is hard to read next to characters like "I", "L" and "1" so how about we use the ">" instead as a separator character like I previously recommended?
Unless the "|" character is some kind of standard.....
StrCopy(Buffer, "Value1|Value2|Value3|Value4");
Result := Buffer
function Juke_GetPluginInfo(Value:integer):PChar; stdcall;
begin
StrCopy(Buffer, PChar(PLUGIN_NAME + '|' + PLUGIN_AUTHOR + '|' + PLUGIN_VERSION + '|' + PLUGIN_DESCRIPTION));
Result := Buffer
end;
loadman: You are very close. I added a few extra bits and pieces so it's basically identical to the C++ dll now. Here is the latest plugin with both C++ and Delphi plugin examples.
headkazeI just wanted to add the corrected Delphi example for loadman. Now he's ready to code his plugin :)
That works ....thanks.
I came back to tell you the good news and noticed you posted yet another version of the JukePlugin ....... :) I guess I will upgrade again
These commands does not exists is mine software, instead they can been used to send as extra commands like I said above, using commandlist$:If these do not exist then simply do not send them. No need to remove them since these are general enough commands which could be used by anybody's software whch has this capability. It is not a bad thing to have commands defined which are not used by some software.
JUKE_QUEUE_USER_MOVE_SONG
JUKE_SONG_FASTFWD_START
JUKE_SONG_FASTFWD_FINISH
JUKE_SONG_FASTREV_START
JUKE_SONG_FASTREV_FINISH
JUKE_SONG_PLAY_POSITION
JUKE_SONG_START does not need any argument about songinfo.. allready got it using queue.txt or such that?I can not implement a "queue.txt" file since in my software the user can move songs around in the queue and after each "move" request I would need to rewrite the entire "queue.txt" file. So if the user wants to move a song from position 20 to position 1 in the queue, this occurs one queue position at a time, so that would mean the software would generate 20 "queue.txt" files in a row to always keep the queue file up to date. Not real interested in doing it this way.
QUEUE:If you are going to use the "queue.txt" file all the time then I agree, but I can not do this (see above).
JUKE_QUEUE_CHANGED
JUKE_QUEUE_CLEARED
these are all as needed for the plugin to know the queue is changed.. Extra commands should then removed and goes as extra unique commands intead.
JUKE_SYSTEM_VOLUME_CHANGE and JUKE_USER_VOLUME_CHANGE can been joined into one command:Yes then can be joined but I prefer individual commands for each action. It just seems cleaner instead of trying to crame everything together. We can make as many commands as we need!
JUKE_VOLUME_CHANGE?
Does the plug need that info, if it system or user that changed to volume?
ENTER DIGIT COMMANDS:My software offers the user the ability to manually enter album number and track number digits in order to select a song. Actually my kids have some album number and track numbers memorized so they go over to the juke and enter their favorite song all the time this way. Again, having commands defined which are not being used by some software is allowed. Your software will simply not send these commands, but at least we can define a standard for the software who wants to send them.
only used in MultiJuke in Jukebox GUI. I think it should been removed and use them as a extra unique commands?
FEATURE:Again, having commands defined which are not being used by some software is allowed. Your software will simply not send these commands, but at least we can define a standard for the software who wants to send them.
JUKE_FEATURE_PARTY_LOCK is not standard of all software. again, can use as sending to commandlist$ as extra commands to the plugin?
JUKE_QUEUE_CHANGED can also been used as a command as seen..Not sure what this means....
NAVIGATION:
I haven't have any of these commands.
These commands should been removede from the default sets, but istead using commandsend$ as extra unique commands?
Mate, It seemed to work but I will do it your way as you know better coding practice ;D
About the two way communication thing....... I assumed the plugin would be able to send a command to the jukebox software. For instance, if the plugin wanted to skip the current playing song then the plugin could send a "JUKE_SONG_SKIP" command to the jukebox software.
I am not sure how you recommendation of a timer would work. When the plugin wants to inform the jukebox to skip the current playing song, then what does the plugin need to do? Does the plugin have to somehow remember that a "skip request" should be sent, so when the jukebox's 200ms timer expires and it sends a "JUKE_READ_INPUT" command to the plugin then the plugin can then return the "skip text"? This sounds odd, so please explain how this would work from the plugin side please.
Timer_Elapsed()
{
Plugin_Command("JUKE_TIMER", null);
}
string Juke_Command(string Name, string Value)
{
switch(Name)
{
case "JUKE_TIMER":
if(bSkipCurrentSong == true)
{
bSkipCurrentSong = false;
return "JUKE_SKIP_SONG";
}
}
}
The main problem with your code is you were using "," instead of "|" to return arguments so all the Plugin Info was stored in the "Name" variable
Also you should definately use a global buffer when returning a string pointer (in fact don't forget the little snippet for changing Plug_GetPluginInfo() to use a buffer). Ie. Sending a PChar as a return value of a temporary variable is a no no.
I could get 'burnt' one day could I depending on what size and for the string was? So the Buffer it just to make sure what I return back is Legal?
only standard define set should been defined, that cover all software.I do not agree. We should be able to define a "generic" standard for something even if only one jukebox software requires it. Think about it..... standards are usually created before anyone uses the SDK at all. Lets take the Visual Basic SDK ..... when they were creating the SDK, then defined many routines before anyone used them at all. Perhaps no one would use the routines once released as well, but at least they defined a generic set of routines in the SDK.
otherwise we have many unused commands, that might only to been used in one single software. That is not a global standard.
A singles based Jukebox software have other set of commands to control response (LETTER and NUMBERS). Should we cover them too?If one of our jukebox software application uses this then yes, I think we should spend time defining a generic standard for it. This way whenever a new jukebox developer comes along and wants to support plugins they can use our standards which we defined now.
The main problem is NOT the queue and playing based commands, but its ONLY with CONTROLS based commands, that allways is defficent by various software.Well we should be able to add more cmdName and cmdValue strings to cover what you need but you are not really ever telling us exactly what your control button do so we can not help you out here. I keep asking what your ACTION button stuff really mean but you have not let me know that yet.so I really can not help you yet.
CONTROLS is the main reason for various software out here, so of course they are all diffecent. So we can't cover them all here.
I can also accept SCREENSAVER example can named something other and such that thing. they are not CONTROLS.Not real sure you need to group certain commands as "controls" or not. Just define the appropriate set of cmdName/cmdValue strings for what you need and then send the command to the plugin when the event occurs.
So I think these 3 is needed for CONTROL based plugins (to feed a sample plugin) before config:
JUKE_CONTROL_CREATE|ACTION_BUTTON_1
to use them:
JUKE_CONTROL_SEND|ACTION_BUTTON_1|ON) <- can been ON or OFF (LedWiz).
and
JUKE_CONTROL_GET <- If a user pressed a key on a remote control.
And then it would cover all controls used (also ONLY controls based commands, think as user with a remote control) and I would been fine.
There is no need for a trailing "|" at the end of the paramter list
JUKE_SONG_STARTED name|artist|album|albumNum|trackNum|genre
text1=name
text2=artist
text3=album
text4=albumNum
text5=trackNum
text6=genre
JUKE_SONG_STARTED name|artist|album|albumNum|trackNum|genre|totalDuration
text1=name
text2=artist
text3=album
text4=albumNum
text5=trackNum
text6=genre|totalDuration <-- problem
Juke_Command("JUKE_KEY_EVENT_CREATE","COMMAND_NAME")
This command is required before JUKE_PLUGIN_CONFIGURE is invoked. This make sure a plugin can "listen" to a KEY_EVENT command from the Jukebox Software and example effect a sound effect to a KEY_EVENT.
A Jukebox Software can create any KEY_EVENT commands that can been controlled by the user (also like a keybinding).
Only KEY_EVENT commands (keybindning) is needed for the plugin to known, so they can used for various things like LedWiz, Sound, Remote controlling and other things.
Juke_Command("JUKE_APP_HOST","SOFTWARE NAME", "UNICODE")
The Jukebox software name.
PLAYLIST COMMANDS:
either resumbt all songs again at once again using or just change the number of current song if the software is PLAYLIST based, using the JUKE_PLAYLIST_CURRENTSONG command.
Juke_Command("JUKE_PLAYLIST","place|auto|title|artist|album|trackNum|genre|totalDuration")
When a user have manipulated the playlist, or a new song is started, the jukebox software would resumbit all songs again. If A new songs is added to the playlist without manipulation, the software might just add that song using JUKE_PLAYLIST with the last PLACE number.
Info about arguments:
- Auto means if it was added by the "USER" or by "SYSTEM".
- Albumnumber or such should been part of the album name, like "01 Album".
- Some songinfo "tags" might been empty if not used.
- Some songs might not have a TotalDuration if it is unknown.
For Jukebox Authors: If the song contain a | char (I never seen that), remove that before send the string.
Juke_Command("JUKE_PLAYLIST_CLEAR", "")
Clear the PLAYLIST or QUEUE.
Juke_Command("JUKE_PLAYLIST_CURRENTSONG", NUMBER)
Which song number is curretly in playing from the PLAYLIST?
Queue based jukebox software might not use this command, due to resumbitting. So not all software might use this command, so the default value to this command is 1.
FILE=Juke_Command("JUKE_PLAYLIST_GET", "")
Get a playlist file from a plugin. This command can been used when the queue is empty or last song is played finish from the PlayList.
Juke_Command("JUKE_SONG_PAUSE","")
New song is just started.
Juke_Command("JUKE_SONG_START","")
Current song has been paused.
Juke_Command("JUKE_SONG_FASTFWD_START","")
Current song has started being fast forwarded.
(curPosSecs and totalDuration not needed due to JUKE_SONG_PLAY_POSITION and JUKE_PLAYLIST)
Juke_Command("JUKE_SONG_FASTFWD_FINISH","")
Current song has finished being fast forwarded
(curPosSecs and totalDuration not needed due to JUKE_SONG_PLAY_POSITION and JUKE_PLAYLIST)
Juke_Command("JUKE_SONG_FASTREV_START","")
Current song has started being fast reversed
(curPosSecs and totalDuration not needed due to JUKE_SONG_PLAY_POSITION and JUKE_PLAYLIST)
Juke_Command("JUKE_SONG_FASTREV_FINISH","")
Current song has finished being fast reversed
(curPosSecs and totalDuration not needed due to JUKE_SONG_PLAY_POSITION and JUKE_PLAYLIST)
Juke_Command("JUKE_VOLUME_SET", "curVolumeLevel|minVolumeLevel|maxVolumeLevel|system")
A new value volume have been set.
If system is set the volume, the last argument would set to one.
Juke_Command("JUKE_SELECTED_ALBUM_NUMBER", "NUMBER")
A Album number digit has been entered
Juke_Command("JUKE_SELECTED_TRACK_NUMBER", "NUMBER")
A Track number digit has been entered
Juke_Command("JUKE_SELECTED_SINGLES_NUMBER", "VALUE")
A Single have been selected. It can been both letters and number, like C2.
Juke_Command("JUKE_SELECTED_MARKED", "title|artist|album|trackNum|genre|totalDuration")
The user marked song, that is now currectly marked on the screen. TotalDuration might not been used here by a jukebox software.
Juke_Command("JUKE_KEY_EVENT_SEND", Status)No idea what this does .... please explain
Status can been value 1 for on and value 0 for off.
EVENT=Juke_Command("JUKE_KEY_EVENT_GET")No idea what this does .... please explain. There are no parameters defined for this command so what does the plugin do with it?
A KEY_EVENT is retrieved by the plugin and invoke that command (like a remote controller).
Juke_Command("JUKE_FEATURE_ATTRACT_MODE", TRUE|FALSE)
Attract mode feature is enabled (TRUE) or disabled (FALSE)
headkazeQuoteThere is no need for a trailing "|" at the end of the paramter list
Here is my concern .... let me know if this is a real concern or not .... :dunno
Lets say (just for an example) the current JUKE_SONG_START command is defined as follows (without a trailing "|" character):QuoteJUKE_SONG_STARTED name|artist|album|albumNum|trackNum|genre
The currently released plugin would parse the text cmdValue string like this:Quotetext1=name
text2=artist
text3=album
text4=albumNum
text5=trackNum
text6=genre
Now, some time in the future the "JUKE_SONG_START" command is updated to include the "totalDuration" value:QuoteJUKE_SONG_STARTED name|artist|album|albumNum|trackNum|genre|totalDuration
The currently released plugin (which does not support this new change) might parse the following way:
Quotetext1=name
text2=artist
text3=album
text4=albumNum
text5=trackNum
text6=genre|totalDuration <-- problem
It would be bad if the plugin determines the 6th text to be "genre|totalDuration" together.
I believe if we have a trailing "|" character at the end of every cmdValue text string, then
the plugin could simply parse the first 6 text strings (text1->text6) correctly everytime by
only parsing up to each successive trailing "|" character only. This means the plugin would only be parsing out the first 6 text string values only, by looking for 6 "|" separator characters only. If extra text exists beyond the 6th "|" separator character then this text will simply be ignored by the currently released plugin.
This makes updating the cmdValue text for a particular command much easier I would say.
text1=name
text2=artist
text3=album
text4=albumNum
text5=trackNum
text6=genre|totalDuration <-- problem
name|artist|album|albumNum|trackNum|genre
name|artist|album|albumNum|trackNum|genre|totalDuration
Dim Args() As String
Args = Split("name|artist|album|albumNum|trackNum|genre", "|")
If (UBound(Args) + 1 = 6) Then
MsgBox "First string doesn't contain totalDuration"
End If
Args = Split("name|artist|album|albumNum|trackNum|genre|totalDuration", "|")
If (UBound(Args) + 1 = 7) Then
MsgBox "Second string DOES contain totalDuration"
End If
Make sense now?
QuoteMake sense now?
::) Yes, I fully understand that if a plugin was written in VB and uses "Split()" then it would work fine all the time ...... however, since we can not guarantee what the plugin author is coded in (or perhaps the knowledge base of the plugin author) then I was more wondering whether a trailing "|" character would be better for those cases.
For example, what if a plugin author uses a software language which does not have a "Split()" command and has to parse the cmdValue text string one character at a time from left to right. They might only be expecting 6 text strings to exist so when they encounter the 5th "|" separator character then they might consider the "rest of the string" to be the 6th (final) text string which would be bad since extra text is stuck at the end now.
Just to let you know, this is not really a big deal to me at all, but I was just trying to save some grief if commands are ever expanded. Might never happen so no big deal .... but thought I would throw it out there to discuss. I do not know what the plugin authors are going to code with so not sure whether they have "Split()" commands to use to avoid this problem. If they all can parse using a Split() command then there is no problem at all I agree.
At least hopefully you can see my point .....
Should we say a deadline to Sunday 20 Januar to make sure all got the time to support these commands, and then send a new to Saint to been displayed on the frontpage to due a simulation release with plugin support?
That Even it mostly was Me and UncleT that defined the standard with help and input from LoadMan (that started that all) and HeadKaze? But I still say thanks for your input, Barcrest.
This standard is for all software, and it of course also for Freebox. Fell free to add it of course.
Glad to release the SDK soon, even it was a really hard work and used alots of time monitor this forum.
It just few issues left and until UncleT and I understand the all issues. But it small issues now, the major problems is now gone.
WOW Guys you have really made some advances since i last looked. I assume once you make the SDK availble i will be able to see what functions are possible for the jukebox plugins to use. I will hold off adding the latest code until i know what i can expect to be in the plugins and i will just bolt it all in at the same time.
Glad everyone got it sorted you have all put a lot of hard work into this. Me i've just been a pain LOL :applaud:
What is this SDK you keep speaking of? I thought JukePlugin.zip was the SDK :dizzy:
And there is still no PureBasic example in there, so how you say you defined the standard is beyond me.
The very first post of course I have changed over the past.
I waiting to create Pure Basic example when the "SDK" is finished with all defined commands.
The SDK is NOT the wrapper I wrote in the other thread, that is now completly "out of date" (hence removed).
the SDK is the FIRST post only where all defined commands is there. I have changed the orignal post over the time, because I think the post is the easier to find the commands used, because this thread is pretty big now (I never throuch it should been so big).
The most commands is now by UncleT and I changed some and added few others.
It is now heavy changed to only use 2 functions, the rest is just string commands and have a argument to been parsed by the plugins. In this way it easy to add commands to a v1.1 later time.
I do pretty sure I should use my time to add plugin Support to MultiJuke first, and then writing a real Pure Basic example how the parser can work with source.
I also of course want examples by other language, C++ and/or Visual Basic 6 of course. I can put them in a file in the first post to checking out.
I did not say I defined the SDK (sorry if I said that), most should go to UncleT now for his ideas and I finally accepted. Of course big credits should got to all of you in this thread: headkaze, LoadMan and also Barcrest.
Sorry if I misused SDK. Dont take the serious for a typo. I should of course wrote "The API document" instead. You know you might should guessed what I really would wrote :(.
SELECTED ALBUM:
Juke_Command("JUKE_MARKED_ALBUM", "NUMBER")
Juke_Command("JUKE_MARKED_TRACK", "NUMBER")
I have changed the command into marked album. The value can been anything, both letters and value. The user can configurere the plugin anyway, how it should been used.
When they begin to enter a new digit or letters, just send the command again with the new value. Something like this:
1
12
125
On this way, a plugin better can understand how many digits and or letters the user actuelly have inserted. What about if they deleted a digit again, just send the new value again with a digit fewer, like 12.
So JUKE_ENTERED_ALBUM_DIGIT and JUKE_ENTERED_TRACK_DIGIT is both KEY_EVENTS. So KEY_EVENTS like JUKE_DIGIT_0 and so on is a better idea?
PLAYLIST:This statement by itself has no meaning to me. Could you possibly explain yourself a bit more.
I should rename to CURRENT_PLAYLIST?
Freebox have PlayNow and PlayNext command. MultiJuke have only PlayNext and can auto submit a album to been played finished.
I dislike to have a command to every type of manipulation. Instead is much simply to just resubmit songs again at once after that arcour!!Well I need to have queue commands to inform the plugin how the queue is managed.
For your software, that is Queue Based, your have NO use of JUKE_CURRENT_PLAYLIST_CURRENTSONG, as I have no use for that command in MultiJuke. So skip that command. I just think the command can been used with software that using PLAYLIST instead of QUEUE based.
So, Simply resubmit the current queue list to CURRENT_PLAYLIST when some Queue Event have been invoked so the first song is allways os that is song in playing.
Juke_Command("JUKE_FEATURE_ATTRACT_MODE", TRUE|FALSE)
just send this command in your init rutine to your Jukebox Software to statement if its true of False.if its off, it false...
Personly as plugIn Writer I dosen't care how it was invoked. They can detect it other way (example checking if a song is playing using song playing commands), if they want to know that.
Juke_Command("JUKE_SELECTED_MARKED", "title|artist|album|trackNum|genre|totalDuration").
They can get it with checking the CURRENT_PLAYLIST commands.....
About the | char.
I have no problems with | at all!! In Pure basic I might just add a anoter | if there was no Split command. This make sure it find the last |.
QuoteAbout the | char.
I have no problems with | at all!! In Pure basic I might just add a anoter | if there was no Split command. This make sure it find the last |.
This was my whole point ..... if there is no Split() command available (or the plugin author does not use it for some reason) then parsing might be a problem. If you have no problem with it, then I would simply add a trailing "|" character to the end of each cmdValue string. It is easy to do and it might save us some grief.
Procedure.l SplitArray(array.s(1), text.s, separator.s = ",") ; String to Array
Protected index.l, size.l = CountString(text, separator)
ReDim array.s(size)
For index = 0 To size
array(index) = StringField(text, index + 1, separator)
Next
ProcedureReturn size
EndProcedure
Two seconds on Google later...
QuoteTwo seconds on Google later...
:laugh2: :laugh2: :laugh2: :laugh2:
Since you can not asssume a plugin author knows how to use Google, I think in the SDK documentation we dedicate the last trailing "|" to headkaze :applaud:
if(Value.Substring(Value.Length - 1) == "|")
{
MessageBox.Show("You bloody moron! You have a trailing '|' character. Headkaze HATES that. Program exiting...");
Application.Exit();
}
if(Value.Substring(Value.Length - 1) == "|")
{
MessageBox.Show("You bloody moron! You have a trailing '|' character. Headkaze HATES that. Program exiting...");
Application.Exit();
}
;D
Please, Let us all doing the documention work finished instead of these type of posts..
JUKE_QUEUE_CHANGED is not actually needed anymore. Just remove the current song from its queue.The reason why I wanted a command like this was to inform the plugin that a "queue.txt" file has been changed. The "queue.txt" file was going to list all of the song queue contents for the plugin. Now, normally I would use ADD_SONG, MOVE_SONG, REMOVE_SONG commands most of the time, however, when many songs are added to the queue very quickly (ex: adding 50 songs into the queue at one time) then instead of sending 50 separate "ADD_SONG" commands to the plugin, I would simply add all 50 songs, save the queue list into a "queue.txt" file and then send "one" "JUKE_QUEUE_CHANGED" command to the plugin only. Sending "one"command is much better then sending "50" commands.
Juke_Command("JUKE_SONGLIST_CLEAR", "")
Clear the SONGLIST.
Juke_Command("JUKE_SONGLIST_CLEAR", "System")
The song queue has been cleared by user or system.
Juke_Command("JUKE_SONGLIST_ADD_SONG",
"system|position|queuePosNum|title|artist|album|trackNum|genre|totalDuration")
Add a song into that position in the queue.
Please remove this statement since the "albumNum" value should be listed as a separate value and not as part of the "album" string value.
- Albumnumber or such should been part of the album name, like "01 Album".
Just to be clear here ..... if "any" of these values are unknown then they simply do not need to be provided, however, all of the required "|" characters must always be provided.
- Some songs might not have a TotalDuration if it is unknown.
Juke_Command("JUKE_SONG_PAUSE","")
New song is just started.
Juke_Command("JUKE_SONG_START","")
Current song has been paused.
Juke_Command("JUKE_VOLUME_MUTE", "TRUE|FALSE")
note: Visual Basic 6 can get returned strings using a little dll I made. Look to the bottom of the first thread.
Quotenote: Visual Basic 6 can get returned strings using a little dll I made. Look to the bottom of the first thread.
Is this applicable anymore?
[Later]
Ohh I see what you meant I think, A Static Library rather than DLL
sPluginInfo = PtrToVBString(CallFuncPtr(pDC, pGetPluginInfo, vbNull))
Submitting 50 songs at once to JUKE_SONGLIST_ADD_SONG is much much faster than using queue.txt (since there is no hd access), and I guess the plug-in easily can handle 50 songs without any issues.
To suit your need, I have added a another argument to JUKE_SONGLIST_ADD_SONG, that tell the plug-in, you want to add a another song under a for next loop....
Juke_Command("JUKE_APP_UNICODE","FALSE|TRUE")
Does the Jukebox support Unicode or not? Then the UTF8 formatted strings can been used.
Juke_Command("JUKE_SONGLIST_CLEAR", "")
Juke_Command("JUKE_SONGLIST_CLEAR", "System")
Juke_Command("JUKE_SONGLIST_MOVE_SONG", "System|position|newPosition")
Song has been moved in the queue by user or system.
Juke_Command("JUKE_FEATURE_ATTRACT_MODE", onActive or NotActive or Off)
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)
Juke_Command("JUKE_FEATURE_RANDOM_MODE", TRUE or FALSE)
Radio or Random mode is enabled(TRUE) or disabled(FALSE)
Juke_Command("JUKE_KEY_EVENT_CREATE","KEY_EVENT_NAME")
This command is required before JUKE_PLUGIN_CONFIGURE is invoked. This make sure a plugin can "listen" to a KEY_EVENT command from the Jukebox Software and example effect a sound effect to a KEY_EVENT.
A Jukebox Software can create any KEY_EVENT commands that can been controlled by the user (also like a keybinding).
Only KEY_EVENT commands (keybindning) is needed for the plugin to known, so they can used for various things like LedWiz, Sound, Remote controlling and other things.
Dim RetVal As Long, x
Form1.File1.path = App.path + "\plugins\"
For x = 0 To Form1.File1.ListCount
RetVal = plugin.Initialize(Me.hDC, App.path + "\plugins\" + Form1.File1.List(x))
temp = plugin.Name & "," & plugin.Author & "," & plugin.Version & "," & plugin.Description
Form1.List3.AddItem temp
RetVal = plugin.Shutdown
Next
Dim RetVal As Long
RetVal = plugin.Initialize(Me.hDC, App.path + "\plugins\" + File1.List(List3.ListIndex))
Dim RetVal2() As String
RetVal2 = plugin.Command("JUKE_PLUGIN_CONFIGURE", "WINDOW_HWND")
RetVal = plugin.Shutdown
For x = 0 to ListCount
JukePluginArray(x).Initialize Me.hDC, curPluginFilePath
'Plugin could NOT be initialized, skip to next plugin
If (JukePluginArray(x).IsPlugin = False) Then
GoTo nextplugin:
End If
pluginDescText = JukePluginArray(x).Name & " " & JukePluginArray(x).Author & " " & _
JukePluginArray(x).Version & " " & JukePluginArray(x).Description
nextplugin:
Next
pluginRetStr = JukePluginArray(selectedIndex).Command("JUKE_PLUGIN_CONFIGURE", vbNullString)
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.
Juke_Command("JUKE_SONG_START","")
New song is just started.
'free all plugins
SendPluginCommand(JUKE_APP_CLOSED, vbNullString)
For i = 1 To numOfPlugins
JukePluginArray(i).Shutdown
Next i
numOfPlugins = 0
And here it is the first JPS SDK v1.0b! ...
Excellent i will be playing with this over the weekend. Hopefully we will start to see some plugins become availble.
Juke_Initialize() was renamed to use JUKE_APP_OPENED command in the document, but how do get the JUKE_APP_CLOSED to been the same as Juke_configurere? Please explain.
This is the previous SHUTDOWN command and NOT the configurere command.
You need to update your SDK to include these commands before I release it to my first post. There are only TWO functions used at all (that actuelly could been just one command, but leave it as it are). There is no longer a direct Juke_Init() command, so rest of them is just commands.
And here it is the first JPS SDK v1.0b! ...
:notworthy:
Minor thing. The VB Code seems to send a Juke_Shutdown on start-up? :dunno
It seen, UncleT, we need these 3 functions to call things? I dosent have problems with that, so I udpate the document soon to include these 3 functions and I update my plugin soon.
So i need to get a new source? I'll wait then...
And here it is the first JPS SDK v1.0b! ...
:notworthy:
Minor thing. The VB Code seems to send a Juke_Shutdown on start-up? :dunno
No it doesn't! That was a typo in the MessageBox function ;)
Here is updated source..
It's two posts up. Maybe I should start a new thread? It's getting a little annoying having to post source every little update or change.
UncleT: I don't need to include a Timer example for the JUKE_KEY_EVENT_GET command do I? I think it's pretty straight forward if you know how to place a timer on your form and set the Interval to 200. Then start it when you want to get the key event from the plugin. Just place the JukePlugin.KeyEventGet() in the Timer_Elapsed event to check if it's recieved input.
"JUKE_FEATURE_RANDOM_MODE" commandI 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).
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)
I should let you know the FIRST song from the SONGLIST would always be the currently playing song for a queue based jukeboxThis is not how my jukebox works and I am not going to try to make my software work like this.
Just thought I would mention this point......
SpaceFractal .... please read and let me know if you agree:
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"
Juke_Command("JUKE_APP_OPENED","")
Juke_Command("JUKE_APP_CLOSED","")
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.
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.
TOTAL SONG DURATIONI 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:
PLEASE CONFIRM SOMETHING FOR ME
JUKE_FEATURE_RANDOM_MODE, why not JUKE_FEATURE_AUTOPLAY to been more generic?
I wont not want to change JUKE_SONG_START.
But I just got a idea to a new command after invoked JUKE_SONGSTART:This is unneeded and I do not want to use anything like this.
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.
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).
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.
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 :)
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.
JUST SOMETHING I WANT TO MENTIONEach 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 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?
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.....
For Local S:TControllers = EachIn Keys
TPlugins.Command("JUKE_KEY_EVENT_CREATE","KEY_EVENT_"+Upper$(s.sAction$))
Next
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).
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
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...
Is it true you want the "system" text to be one of these text strings?
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.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?
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.
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.
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", "")
The attract mode should been better explain what it really does.
For the system: 0 and 1Excellent .... I will use 0 and 1 .
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
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
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?
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.
1) Can we rename "JUKE_VOLUME_SET" to "JUKE_VOLUME_CHANGE" please?
Space Fractal requests.....
Juke_Command("JUKE_SONG_RESTART",""):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.
Current song has been restarted and moved back to the queue. I forget to mark that red.
PARTY_LOCK:Juke_Command("JUKE_FEATURE_PARTY_LOCK", TRUE or FALSE)
This should been explained better to the document.....
The same goes for GENRE_LOCK.Yes, you can supply a description for this one since I do not use this command
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).
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.
STATUS_EVENT_SONG_PAUSE on your startup...... Should you not rename that as KEY_EVENT_SONG_PAUSE, since it not a light action?
You dosent need to tell status about PAUSE and RESUME, since there already is commands about it: JUKE_SONG_PAUSE and JUKE_SONG_RESUME.
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)
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.
Juke_Command("JUKE_SONG_RESTART",""):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.
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.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.
JUKE_FEATURE_PARTY_LOCK:Renaming this command to the following is fine with me .....
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 is exactly why I think this command is NOT needed at all.
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: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
Do you have some command logging feature to commands sendt to a log file? Please create that feature. Might been useful for Plugin Writers.
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.
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.
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.
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.
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.
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).
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.
Instead use JUKE_SONG_MODE(mode)?Since software can have many modes ... I would suggest not adding a "JUKE_SONG_MODE" command.
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?
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.
Due to HeadKAze comment I have NOT updated the first thread, before I head the comment.
yes I guess LoadMan should go throuch the document now and feedback what it missing.
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, which commands, and what solution would you offer.
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.I agree
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 as well, thanks for defining these.
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).I agree .... simply send the FEATURE commands if you software supports that type of feature
Juke_Command("JUKE_VOLUME_CHANGE", "system|curVolumeLevel|minVolumeLevel|maxVolumeLevel")Thanks for changing the name of this command ... not really necessary but I thought it made more sense.
A new value volume have been changed or set....
Juke_Command("JUKE_PLUGIN_EVENT_CREATE",This command is not in BOLD in your first post .....like the other, so it looks hidden. Just letting you know.
"PLUGIN_EVENT_(name)|boolean ENABLE/DISABLE|boolean NUMBER|numOfKeyEvents|keyEvent1|keyEvent2|...|keyEventX")
MY FINAL THOUGHTS
This system is really need to been have a seperate Support forum,
so I asked Saint to create that using JukePlugSys as the new support forum...
This system is really need to been have a seperate Support forum,
so I asked Saint to create that using JukePlugSys as the new support forum...
:dunno I don't know about that?? I think once the format is set and understood (with good documentation) the posts will settle down a lot.
I have to agree with loadman on this one. No need for a new forum. Maybe a pinned topic eventually?Yeah, it will end up being just the odd new post for new Plug-ins
I wonder how many plugin's Space Fractal thinks will be made?
Maybe List
- A Pause/Volume based on external events
- Random sound wav's triggered on certain events (based on mala plug-in)
- SONG_REPEAT should roll the song back to the queue, but since it defined in the feature command set, does this command needed?
PLUGIN_EVENT_0|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_1|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_2|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_3|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_4|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_5|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_6|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_7|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_8|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_9|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_ACTIONBUTTON1|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_ACTIONBUTTON2|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_ACTIONBUTTON3|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_ACTIONBUTTON4|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_BACK|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_BLANK|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_CLEAR|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_CONFIG|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_CONTROL|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_CREDITS|FALSE|TRUE|0
PLUGIN_EVENT_GENRELOCK|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_INSERTCOIN1|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_INSERTCOIN2|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_LETTERDOWN|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_LETTERUP|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_LIBRARY 1|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_LIBRARY 2|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_LIBRARY 3|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_LIBRARY 4|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_LOOP|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_MOVEDOWN|FALSE|FALSE|2|KEYDOWN|KEYUP
PLUGIN_EVENT_MOVELEFT|FALSE|FALSE|2|KEYDOWN|KEYUP
PLUGIN_EVENT_MOVERIGHT|FALSE|FALSE|2|KEYDOWN|KEYUP
PLUGIN_EVENT_MOVEUP|FALSE|FALSE|2|KEYDOWN|KEYUP
PLUGIN_EVENT_OK|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_PAGEDOWN|FALSE|FALSE|2|KEYDOWN|KEYUP
PLUGIN_EVENT_PAGEUP|FALSE|FALSE|2|KEYDOWN|KEYUP
PLUGIN_EVENT_PAID|FALSE|TRUE|0
PLUGIN_EVENT_PARENT|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_PAUSE/RESUME|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_QUIT|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_SKIP|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_SONGMODE|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_STOP|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_VOLUMEDOWN|FALSE|FALSE|1|KEYCLICK
PLUGIN_EVENT_VOLUMEMUTE|TRUE|FALSE|1|KEYCLICK
PLUGIN_EVENT_VOLUMESET|FALSE|TRUE|1|KEYCLICK
PLUGIN_EVENT_VOLUMEUP|FALSE|FALSE|1|KEYCLICK
I do that using JUKE_FEATURE_LOOP command, can also do that with a defined PLUGIN_EVENT too....
All TRUE/FALSE features can actulle use a PLUGIN_EVENT too, but I leave them all as they are.
Can been renamed to JUKE_SONG_STOP, which the user have stoppet a song, but again I can send a SONG_PAUSE and SONG_RESTART instructions for the same.Yes, no need for a "SONG_STOP" commands since that would be true general. Indicating the song stopped since it "FINISHED" or has been "RESTARTED" or has been "SKIPPED" is much more helpful I think.
Just for fun, here is all PLUGIN_EVENTS I have planning to use in MultiJuke:
Juke_Command("JUKE_PLUGIN_EVENT_CREATE",
"PLUGIN_EVENT_(name)|boolean ENABLE/DISABLE|boolean NUMBER|numOfKeyEvents|keyEvent1|...|keyEventX")
Juke_Command("JUKE_PLUGIN_EVENT_CREATE",
"PLUGIN_EVENT_(name)|boolean ENABLE/DISABLE|boolean NUMBER|boolean LETTER|numOfKeyEvents| keyEvent1|...|keyEventX")
PLUGIN_EVENT_CONFIG|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_EXIT|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_MEDIA_TAB|FALSE|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ALBUM_TAB|FALSE|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_SEARCH_TAB|FALSE|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_PLAY|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_PAUSE|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_FASTREV|FALSE|FALSE|FALSE|1|KEYDOWN|KEYUP
PLUGIN_EVENT_FASTFWD|FALSE|FALSE|FALSE|1|KEYDOWN|KEYUP
PLUGIN_EVENT_SKIP|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_VOLUMEDOWN|FALSE|FALSE|FALSE|1|KEYDOWN|KEYUP
PLUGIN_EVENT_VOLUMESET|FALSE|TRUE|FALSE|0
PLUGIN_EVENT_VOLUMEUP|FALSE|FALSE|FALSE|2|KEYDOWN|KEYUP
PLUGIN_EVENT_VOLUMEMUTE|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_FULLVIDEO|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_PRIMARY_MONITOR_DISP_CYCLE|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_DUAL_MONITOR_DISP_CYCLE|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_FULLSCREEN|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_SONGQ_CLEAR|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_SONGQ_REPEAT|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_SONGQ_RANDOM|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_SONGQ_MOVE|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_SONGQ_UP|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_SONGQ_DOWN|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_IDLEPLAY_ACTIVATE|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_IDLEPLAY_RANDOM|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_IDLEPLAY_GENRE|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_IDLEPLAY_GENRE_CYCLE|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_IDLEPLAY_TOP10|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_IDLEPLAY_TOP25|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_IDLEPLAY_TOP50|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_IDLEPLAY_TOP100|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_ENTERSEL_DIGIT0|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ENTERSEL_DIGIT1|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ENTERSEL_DIGIT2|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ENTERSEL_DIGIT3|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ENTERSEL_DIGIT4|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ENTERSEL_DIGIT5|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ENTERSEL_DIGIT6|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ENTERSEL_DIGIT7|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ENTERSEL_DIGIT8|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ENTERSEL_DIGIT9|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ENTERSEL_CLEAR|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ENTERSEL_DELETE|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ENTERSEL_PLAY|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ALBUM_COVERS_NAV_UP|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ALBUM_COVERS_NAV_DOWN|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ALBUM_COVERS_NAV_LEFT|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ALBUM_COVERS_NAV_RIGHT|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ALBUM_COVERS_FLIP_BACKWARD|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ALBUM_COVERS_FLIP_FORWARD|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_ALBUM_COVERS_SEEK_1ST_CHAR|FALSE|TRUE|TRUE|0
PLUGIN_EVENT_ALBUM_COVERS_SEEK_2ND_CHAR|FALSE|TRUE|TRUE|0
PLUGIN_EVENT_SONGTRACKS_UP|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_SONGTRACKS_DOWN|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_SONGTRACKS_SELECT|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_SONGTRACKS_RANDOM|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_SONGTRACKS_PLAYALL|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_PLAYLISTS_CYCLE|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_PLAYLISTS_UP|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_PLAYLISTS_DOWN|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_PLAYLISTS_SELECT|FALSE|FALSE|FALSE|0
PLUGIN_EVENT_PLAYLISTS_RANDOM|TRUE|FALSE|FALSE|0
PLUGIN_EVENT_PLAYLISTS_PLAYALL|FALSE|FALSE|FALSE|0
I think the Support forum could also used to release any plugins (both beta and finished) other have wrote and also get help?
ETC, mightbe a sticky thread only one can update and post, just like the Jukebox Software list? OR moving the released plugins to the Wiki?
Should we not create a WIki page about it?]ETC, mightbe a sticky thread only one can update and post, just like the Jukebox Software list? OR moving the released plugins to the Wiki?
Should we not create a WIki page about it?
I Think I just adding a KeyLetter for that instead of adding a new boolean feature (and is backward combatible with last SDK beta). That why we can expand KeyEvent List when needed.
PLUGIN_EVENT_APP_EXIT|""
PLUGIN_EVENT_MEDIA_TAB|""
PLUGIN_EVENT_ALBUM_TAB|""
PLUGIN_EVENT_SEARCH_TAB|""
PLUGIN_EVENT_PLAY|""
PLUGIN_EVENT_PAUSE|""
PLUGIN_EVENT_FASTREV|"KEYDOWN KEYUP"
PLUGIN_EVENT_FASTFWD|"KEYDOWN KEYUP"
PLUGIN_EVENT_SKIP|""
PLUGIN_EVENT_VOLUMESET|"NUMBER"
PLUGIN_EVENT_VOLUMEUP|"KEYDOWN KEYUP"
PLUGIN_EVENT_VOLUMEDOWN|"KEYDOWN KEYUP"
PLUGIN_EVENT_FULLVIDEO|"ON OFF"
PLUGIN_EVENT_PRIMARY_MONITOR_DISP_CYCLE|""
PLUGIN_EVENT_DUAL_MONITOR_DISP_CYCLE|""
PLUGIN_EVENT_FULLSCREEN|"ON OFF"
PLUGIN_EVENT_SONGQ_CLEAR|""
PLUGIN_EVENT_SONGQ_REPEAT|"ON OFF"
PLUGIN_EVENT_SONGQ_RANDOM|"ON OFF"
PLUGIN_EVENT_SONGQ_MOVE|"ENABLE DISABLE"
PLUGIN_EVENT_SONGQ_UP|""
PLUGIN_EVENT_SONGQ_DOWN|""
PLUGIN_EVENT_IDLEPLAY_ACTIVATE|"ON OFF"
PLUGIN_EVENT_IDLEPLAY_RANDOM|"ON OFF"
PLUGIN_EVENT_IDLEPLAY_GENRE|"ENABLE"
PLUGIN_EVENT_IDLEPLAY_GENRE_CYCLE|""
PLUGIN_EVENT_IDLEPLAY_TOP10|"ENABLE"
PLUGIN_EVENT_IDLEPLAY_TOP25|"ENABLE"
PLUGIN_EVENT_IDLEPLAY_TOP50|"ENABLE"
PLUGIN_EVENT_IDLEPLAY_TOP100|"ENABLE"
PLUGIN_EVENT_ENTERSEL_DIGIT0|""
PLUGIN_EVENT_ENTERSEL_DIGIT1|""
PLUGIN_EVENT_ENTERSEL_DIGIT2|""
PLUGIN_EVENT_ENTERSEL_DIGIT3|""
PLUGIN_EVENT_ENTERSEL_DIGIT4|""
PLUGIN_EVENT_ENTERSEL_DIGIT5|""
PLUGIN_EVENT_ENTERSEL_DIGIT6|""
PLUGIN_EVENT_ENTERSEL_DIGIT7|""
PLUGIN_EVENT_ENTERSEL_DIGIT8|""
PLUGIN_EVENT_ENTERSEL_DIGIT9|""
PLUGIN_EVENT_ENTERSEL_CLEAR|""
PLUGIN_EVENT_ENTERSEL_DELETE|""
PLUGIN_EVENT_ENTERSEL_PLAY|""
PLUGIN_EVENT_ALBUM_COVERS_NAV_UP|""
PLUGIN_EVENT_ALBUM_COVERS_NAV_DOWN|""
PLUGIN_EVENT_ALBUM_COVERS_NAV_LEFT|""
PLUGIN_EVENT_ALBUM_COVERS_NAV_RIGHT|""
PLUGIN_EVENT_ALBUM_COVERS_FLIP_BACKWARD|""
PLUGIN_EVENT_ALBUM_COVERS_FLIP_FORWARD|""
PLUGIN_EVENT_ALBUM_COVERS_SEEK_1ST_CHAR|"NUMBER LETTER"
PLUGIN_EVENT_ALBUM_COVERS_SEEK_2ND_CHAR|"NUMBER LETTER"
PLUGIN_EVENT_SONGTRACKS_UP|""
PLUGIN_EVENT_SONGTRACKS_DOWN|""
PLUGIN_EVENT_SONGTRACKS_SELECT|""
PLUGIN_EVENT_SONGTRACKS_RANDOM|"ON OFF"
PLUGIN_EVENT_SONGTRACKS_PLAYALL|""
PLUGIN_EVENT_PLAYLISTS_CYCLE|""
PLUGIN_EVENT_PLAYLISTS_UP|""
PLUGIN_EVENT_PLAYLISTS_DOWN|""
PLUGIN_EVENT_PLAYLISTS_SELECT|""
PLUGIN_EVENT_PLAYLISTS_RANDOM|"ON OFF"
PLUGIN_EVENT_PLAYLISTS_PLAYALL|""
I Update: D, I 100% agree, that one is much much easier to understand and for use.:applaud: :cheers: :applaud:
I add a UTF8 based Letters for unicode support (can use 2-4 bytes for encodning), if unicode is enabledMy UNICODE will always be set to FALSE, so I am not sure whether I need to worry about this stuff.
I think we should now remove the "JUKE_FEATURE_xxxxx" stuff now. I agree these should all be handled by "PLUGIN_EVENT_(name)" events instead.
MY LAST RECOMMENDATION
I think it way to been too many statament, if these are added i Think? I want this to been general as possible, hence I really like enable/disable/letter/number/on/off as well.
I want to limit to these, you defined at your post.
You could actuelly use something like this to do the same:
PLUGIN_EVENT_ATTRACK_MODE|ENABLE DISABLE ON OFF"
ENABLE DISABLE take care if the ATTRACK MODE is ON (Enabled) or OFF (Disabled).
when the attrackmode is enabled, ON = OnActive, and Off=NoActive.
If you do that above, all FEATURES would simple been deleted, only AUTOPLAY. I think I rename that to JUKE_SONG_PLAYMODE(AnyText) for the same.
Juke_Command("JUKE_PLUGIN_EVENT_SEND", "eventName|valueStr")
Sends a previously defined jukebox-specific command to the plugin with a valueStr.
where: eventName = a text string in this format ---> "PLUGIN_EVENT_(name)"
valueStr = (see "PLUGIN_EVENT_CREATE" command definition)
I have not started to code this stuff ...... I will try to get to it some time soon. I need a little break first ;)
Now LoadMan, it time to checking for grammatical errors and such and maybe more in-depth text if needed. I do NOT touch this SDK anymore for a while, even if pluginwriters want some stuff tweaked.
PLUGIN_EVENT_APP_EXIT|""
PLUGIN_EVENT_MEDIA_TAB|""
PLUGIN_EVENT_ALBUM_TAB|""
PLUGIN_EVENT_SEARCH_TAB|""
PLUGIN_EVENT_PLAY|""
PLUGIN_EVENT_PAUSE|""
PLUGIN_EVENT_FASTREV|"KEYDOWN KEYUP"
PLUGIN_EVENT_FASTFWD|"KEYDOWN KEYUP"
PLUGIN_EVENT_SKIP|""
PLUGIN_EVENT_VOLUMESET|"NUMBER"
PLUGIN_EVENT_VOLUMEUP|"KEYDOWN KEYUP"
PLUGIN_EVENT_VOLUMEDOWN|"KEYDOWN KEYUP"
PLUGIN_EVENT_FULLVIDEO|"ON OFF"
PLUGIN_EVENT_PRIMARY_MONITOR_DISP_CYCLE|""
PLUGIN_EVENT_DUAL_MONITOR_DISP_CYCLE|""
PLUGIN_EVENT_FULLSCREEN|"ON OFF"
PLUGIN_EVENT_SONGQ_CLEAR|""
PLUGIN_EVENT_SONGQ_REPEAT|"ON OFF"
PLUGIN_EVENT_SONGQ_RANDOM|"ON OFF"
PLUGIN_EVENT_SONGQ_MOVE|"ENABLE DISABLE"
PLUGIN_EVENT_SONGQ_UP|""
PLUGIN_EVENT_SONGQ_DOWN|""
PLUGIN_EVENT_IDLEPLAY_ACTIVATE|"ON OFF"
PLUGIN_EVENT_IDLEPLAY_RANDOM|"ON OFF"
PLUGIN_EVENT_IDLEPLAY_GENRE|"ENABLE"
PLUGIN_EVENT_IDLEPLAY_GENRE_CYCLE|""
PLUGIN_EVENT_IDLEPLAY_TOP10|"ENABLE"
PLUGIN_EVENT_IDLEPLAY_TOP25|"ENABLE"
PLUGIN_EVENT_IDLEPLAY_TOP50|"ENABLE"
PLUGIN_EVENT_IDLEPLAY_TOP100|"ENABLE"
PLUGIN_EVENT_ENTERSEL_DIGIT0|""
PLUGIN_EVENT_ENTERSEL_DIGIT1|""
PLUGIN_EVENT_ENTERSEL_DIGIT2|""
PLUGIN_EVENT_ENTERSEL_DIGIT3|""
PLUGIN_EVENT_ENTERSEL_DIGIT4|""
PLUGIN_EVENT_ENTERSEL_DIGIT5|""
PLUGIN_EVENT_ENTERSEL_DIGIT6|""
PLUGIN_EVENT_ENTERSEL_DIGIT7|""
PLUGIN_EVENT_ENTERSEL_DIGIT8|""
PLUGIN_EVENT_ENTERSEL_DIGIT9|""
PLUGIN_EVENT_ENTERSEL_CLEAR|""
PLUGIN_EVENT_ENTERSEL_DELETE|""
PLUGIN_EVENT_ENTERSEL_PLAY|""
PLUGIN_EVENT_ALBUM_COVERS_NAV_UP|""
PLUGIN_EVENT_ALBUM_COVERS_NAV_DOWN|""
PLUGIN_EVENT_ALBUM_COVERS_NAV_LEFT|""
PLUGIN_EVENT_ALBUM_COVERS_NAV_RIGHT|""
PLUGIN_EVENT_ALBUM_COVERS_FLIP_BACKWARD|""
PLUGIN_EVENT_ALBUM_COVERS_FLIP_FORWARD|""
PLUGIN_EVENT_ALBUM_COVERS_SEEK_1ST_CHAR|"NUMBER LETTER"
PLUGIN_EVENT_ALBUM_COVERS_SEEK_2ND_CHAR|"NUMBER LETTER"
PLUGIN_EVENT_SONGTRACKS_UP|""
PLUGIN_EVENT_SONGTRACKS_DOWN|""
PLUGIN_EVENT_SONGTRACKS_SELECT|""
PLUGIN_EVENT_SONGTRACKS_RANDOM|"ON OFF"
PLUGIN_EVENT_SONGTRACKS_PLAYALL|""
PLUGIN_EVENT_PLAYLISTS_CYCLE|""
PLUGIN_EVENT_PLAYLISTS_UP|""
PLUGIN_EVENT_PLAYLISTS_DOWN|""
PLUGIN_EVENT_PLAYLISTS_SELECT|""
PLUGIN_EVENT_PLAYLISTS_RANDOM|"ON OFF"
PLUGIN_EVENT_PLAYLISTS_PLAYALL|""
PLUGIN_EVENT_APP_EXIT|""
PLUGIN_EVENT_PLAY|""
PLUGIN_EVENT_PAUSE|""
PLUGIN_EVENT_FASTREV|"KEYDOWN KEYUP"
PLUGIN_EVENT_FASTFWD|"KEYDOWN KEYUP"
PLUGIN_EVENT_SKIP|""
PLUGIN_EVENT_VOLUMESET|"NUMBER"
PLUGIN_EVENT_VOLUMEUP|"KEYDOWN KEYUP"
PLUGIN_EVENT_VOLUMEDOWN|"KEYDOWN KEYUP"
PLUGIN_EVENT_FULLVIDEO|"ON OFF" <-- do you need this???
PLUGIN_EVENT_FULLSCREEN|"ON OFF" <-- do you need this???
PLUGIN_EVENT_SONGQ_CLEAR|"" <-- do you need this???
PLUGIN_EVENT_SONGQ_REPEAT|"ON OFF" <-- do you need this???
PLUGIN_EVENT_IDLEPLAY_ACTIVATE|"ON OFF"
PLUGIN_EVENT_ENTERSEL_DIGIT|"NUMBER"
PLUGIN_EVENT_ENTERSEL_CLEAR|""
PLUGIN_EVENT_ENTERSEL_DELETE|""
PLUGIN_EVENT_ENTERSEL_PLAY|""
loadmanNIMHO ;)
1) Do I really "need" to inform the plugin when I am navigating UP/DOWN through the album covers, song list or song queue?
2) Do I really need to allow a plugin to move songs around in the song queue?
3) Do I really need the plugin to be able to switch between the Media/Album/Search tab windows?NIMHO ;)
4) Do I really need to allow the plugin to cycle through the video, cover and lyrics displays?NIMHO ;)
PLUGIN_EVENT_APP_EXIT|""
PLUGIN_EVENT_PLAY|""
PLUGIN_EVENT_PAUSE|""
PLUGIN_EVENT_FASTREV|"KEYDOWN KEYUP"
PLUGIN_EVENT_FASTFWD|"KEYDOWN KEYUP"
PLUGIN_EVENT_SKIP|""
PLUGIN_EVENT_VOLUMESET|"NUMBER"
PLUGIN_EVENT_VOLUMEUP|"KEYDOWN KEYUP"
PLUGIN_EVENT_VOLUMEDOWN|"KEYDOWN KEYUP"
PLUGIN_EVENT_FULLVIDEO|"ON OFF" <-- do you need this???
NIMHO ;)
PLUGIN_EVENT_FULLSCREEN|"ON OFF" <-- do you need this???
NIMHO ;)
PLUGIN_EVENT_SONGQ_CLEAR|"" <-- do you need this???
NIMHO ;)
PLUGIN_EVENT_SONGQ_REPEAT|"ON OFF" <-- do you need this???
NIMHO ;)
PLUGIN_EVENT_IDLEPLAY_ACTIVATE|"ON OFF"
PLUGIN_EVENT_ENTERSEL_DIGIT0|""
PLUGIN_EVENT_ENTERSEL_DIGIT1|""
PLUGIN_EVENT_ENTERSEL_DIGIT2|""
PLUGIN_EVENT_ENTERSEL_DIGIT3|""
PLUGIN_EVENT_ENTERSEL_DIGIT4|""
PLUGIN_EVENT_ENTERSEL_DIGIT5|""
PLUGIN_EVENT_ENTERSEL_DIGIT6|""
PLUGIN_EVENT_ENTERSEL_DIGIT7|""
PLUGIN_EVENT_ENTERSEL_DIGIT8|""
PLUGIN_EVENT_ENTERSEL_DIGIT9|""
PLUGIN_EVENT_ENTERSEL_CLEAR|""
PLUGIN_EVENT_ENTERSEL_DELETE|""
PLUGIN_EVENT_ENTERSEL_PLAY|""
sounds good to me ....
PCHAR Juke_GetPluginInfo();
int Juke_Initialize(value);
int Juke_Shutdown(value);
int Juke_Configure(HWND hWndParent);
PCHAR Juke_Command(Pchar Namer, PChar Value);
Juke_Command("JUKE_APP_GAINFOCUS","")
Juke_Command("JUKE_APP_LOSTFOCUS","")
UNICODE_SUPPORT$=Juke_Command("JUKE_APP_UNICODE","TRUE or FALSE")
Juke_Command("JUKE_APP_HOST","SOFTWARE NAME")
Juke_Command("JUKE_SONGLIST_ADD_SONG","system|postition|title|artist|album|genre|totalDuration|TrackNr|AlbumNr|more")
Juke_Command("JUKE_SONGLIST_REMOVE_SONG", "position")
Juke_Command("JUKE_SONGLIST_MOVE_SONG", "oldPosition|newPosition")
Juke_Command("JUKE_SONGLIST_CLEAR", "")
Juke_Command("JUKE_SONGLIST_CURRENTPOSITION", "position")
SuggestionFile=Juke_Command("JUKE_SONGLIST_SUGGESTION", "LastPlayedFile")
Juke_Command("JUKE_SONG_START","system|title|artist|album|genre|totalDuration|TrackNr|AlbumNr")
Juke_Command("JUKE_SONG_NEXT","system|title|artist|album|genre|totalDuration|TrackNr|AlbumNr")
Juke_Command("JUKE_SONG_FINISH","")
Juke_Command("JUKE_SONG_RESTART", "")
Juke_Command("JUKE_SONG_SKIP","")
Juke_Command("JUKE_SONG_PAUSE","")
Juke_Command("JUKE_SONG_RESUME","")
Juke_Command("JUKE_SONG_PLAYMODE", "AnyMode")
Juke_Command("JUKE_SONG_FASTFWD_START","")
Juke_Command("JUKE_SONG_FASTFWD_FINISH","")
Juke_Command("JUKE_SONG_FASTREV_START","")
Juke_Command("JUKE_SONG_FASTREV_FINISH","")
Juke_Command("JUKE_SONG_PLAY_POSITION",curPosSecs|totalDuration)
Juke_Command("JUKE_ENTER_ALBUM_VALUE", "VALUE")
Juke_Command("JUKE_ENTER_TRACK_VALUE", "VALUE")
Juke_Command("JUKE_VOLUME_CHANGE", "system|curVolumeLevel|minVolumeLevel|maxVolumeLevel")
Juke_Command("JUKE_VOLUME_MUTE", "TRUE or FALSE")
JukeCommand("JUKE_PLUGIN_EVENT_CREATE", "PLUGIN_EVENT_(name)|valueStr")
where "PLUGIN_EVENT_(name)|valueStr" can be one of the following:
PLUGIN_EVENT_APP_EXIT|""
PLUGIN_EVENT_PLAY|""
PLUGIN_EVENT_PAUSE|""
PLUGIN_EVENT_FASTREV|"KEYDOWN KEYUP"
PLUGIN_EVENT_FASTFWD|"KEYDOWN KEYUP"
PLUGIN_EVENT_SKIP|""
PLUGIN_EVENT_VOLUMESET|"NUMBER"
PLUGIN_EVENT_VOLUMEMUTE|"ON OFF"
PLUGIN_EVENT_VOLUMEUP|"KEYDOWN KEYUP"
PLUGIN_EVENT_VOLUMEDOWN|"KEYDOWN KEYUP"
PLUGIN_EVENT_SONGQ_CLEAR|""
PLUGIN_EVENT_SONGQ_REPEAT|"ON OFF"
PLUGIN_EVENT_IDLEPLAY_ACTIVATE|"ON OFF"
PLUGIN_EVENT_ENTERSEL_DIGIT|"NUMBER"
PLUGIN_EVENT_ENTERSEL_CLEAR|""
PLUGIN_EVENT_ENTERSEL_DELETE|""
PLUGIN_EVENT_ENTERSEL_PLAY|""
PLUGIN_EVENT_ALBUM_COVERS_FLIP_BACKWARD|""
PLUGIN_EVENT_ALBUM_COVERS_FLIP_FORWARD|""
Juke_Command("JUKE_PLUGIN_EVENT_SEND", "PLUGIN_EVENT_(name)|valueStr")
where "PLUGIN_EVENT_(name)|valueStr" can be one of the following:
PLUGIN_EVENT_APP_EXIT|""
PLUGIN_EVENT_SONGQ_REPEAT|"ON OFF"
PLUGIN_EVENT_IDLEPLAY_ACTIVATE|"ON OFF"
PLUGIN_EVENT_ALBUM_COVERS_FLIP_BACKWARD|""
PLUGIN_EVENT_ALBUM_COVERS_FLIP_FORWARD|""
retValStr = Juke_Command("JUKE_PLUGIN_EVENT_GET", "")
where "retValStr" is of the format "PLUGIN_EVENT_(name)|valueStr" and can be one of the following:
PLUGIN_EVENT_APP_EXIT|""
PLUGIN_EVENT_PLAY|""
PLUGIN_EVENT_PAUSE|""
PLUGIN_EVENT_FASTREV|"KEYDOWN" or "KEYUP"
PLUGIN_EVENT_FASTFWD|"KEYDOWN" or "KEYUP"
PLUGIN_EVENT_SKIP|""
PLUGIN_EVENT_VOLUMESET|"NUMBER"
PLUGIN_EVENT_VOLUMEMUTE|"ON" or "OFF"
PLUGIN_EVENT_VOLUMEUP|"KEYDOWN" or "KEYUP"
PLUGIN_EVENT_VOLUMEDOWN|"KEYDOWN" or "KEYUP"
PLUGIN_EVENT_SONGQ_CLEAR|""
PLUGIN_EVENT_SONGQ_REPEAT|"ON" or "OFF"
PLUGIN_EVENT_IDLEPLAY_ACTIVATE|"ON" or "OFF"
PLUGIN_EVENT_ENTERSEL_DIGIT|"NUMBER"
PLUGIN_EVENT_ENTERSEL_CLEAR|""
PLUGIN_EVENT_ENTERSEL_DELETE|""
PLUGIN_EVENT_ENTERSEL_PLAY|""
PLUGIN_EVENT_ALBUM_COVERS_FLIP_BACKWARD|""
PLUGIN_EVENT_ALBUM_COVERS_FLIP_FORWARD|""
Code is kind of done, testing is complete but I need to do a few more things before releasing ...... just a few more odds/ends:
Why not support JUKE_SONG_NEXT?
It's just the same song as the first song in your queue?
LCDS can't typical not need show more than 2 songs, hence the command can been good so it avoid to manage the queue. It only why that command is added.
Why not support JUKE_SONG_NEXT?
It's just the same song as the first song in your queue?
LCDS can't typical not need show more than 2 songs, hence the command can been good so it avoid to manage the queue. It only why that command is added. Should been easy to add, because you can send this command just after JUKE_SONG_START (check the first song in the queue and send its songinfo to that command, if there is also a last one song in the queue).
Juke_Command("JUKE_SONG_PLAYMODE", "AnyMode"):I could look into using this command for something ....
Can you not use this command with "Idle Mode On", "Repeat On", "AttractMode NoActive" and "AttractMode Active" messages? Otherwice it should been empty if all modes is off. PLAYMODE is just a message command and can been used with your defined features as well.
Juke_Command("JUKE_APP_GAINFOCUS","")If these commands were called "JUKE_APP_MINIMIZED" and "JUKE_APP_RESTORED" then I would use them. But right now, they are called "GAINFOCUS" and "LOSTFOCUS". The term "focus" indicates whether the window is the user's current active working window in their environment or not. Since I do not just have one main window but have many popup windows which can be displayed, then my "main" window will go out/in of focus everytime one of these popup windows are opened/closed.
Juke_Command("JUKE_APP_LOSTFOCUS","")
If you have options to minimize (like to tray) and maximize your software, use them there, elsewice don't support these commands.
The plugin is unicode aware if enabled. PureBasic is strong with UTF8/Unicode/AscII convertings.My software does not support Unicode, so I guess the plugin will always be disabled for me.
I wont really change the SDK again for renamed commands and break combatible. It pretty the same if I should use ATTRACKMODE commands for the SCREENSAVER in MultiJuke (even it not the same, it would been usable).Well since you call the LOSTFOCUS command when the window loses focus AND when the window is minimized, then it makes sense the command is called "LOSTFOCUS" then. This is just too much of a hassle to implement in my code to do the same thing as you since I have many windows. If I implement it then both of our implementation of these commands would be different .... which would not be right, so I chose not to implement it.
Other applications typical only use one Windows and these commands would been much more sence. So for you you really only can call them under minimize and maximize. In MultiJuke I Send these commands when the Window is lost focus or when the windows is minimized (I cant really see it should use both MAXIMAZED and GAINFOCUS commands?). Maybe I should write a bit indepth about these commands?
For the SONG_NEXT, I recommered to add a function and checking for the queue each time the have changed something in the queue (you cant change anything in MultiJuke). If the string is changed in the new function (In BlitzMax, you can global a strings inside a function), you can resend the command again with the new info.Exactly what I have coded now to use ..... just need to use it now ;D
JUKE_SONGLIST_CLEAR should not been needed here. I personally recommend you to just send empty data. But I guess both methods might works, but last one might been safer.Actually I think plugin authors should be able to handle both of these cases. If they get a SONG_NEXT command with empty data, then they know there is no "next" song. If they get a SONGLIST_CLEAR command then they should understand there is no next song either. As a result, I will leave it up to the plugin authors to code for both cases.
BTW. I could otherwise add "JUKE_APP_SUSPEND" and "JUKE_APP_RESTORED" as alternative names to these focus commands? Or should I rename to these to? OK with others (I ask that because it now over V1.0 and wont change without I heard).
I add these two commands, so the SDK would still been backward combatible. No need to change the code again.
I can't do sent a SONGLIST_CLEAR from MultiJuke, but only clear the SONG_NEXT info... But for your application its a good idea to use both commands.
That is why I next week will finish a songlist based plugin to test the queue/playlist system ised in various system and make sure it doing that correct....
PCHAR Juke_GetPluginInfo();
int Juke_Initialize(value);
int Juke_Shutdown(value);
int Juke_Configure(HWND hWndParent);
PCHAR Juke_Command(Pchar Namer, PChar Value);
Juke_Command("JUKE_APP_GAINFOCUS","")
Juke_Command("JUKE_APP_LOSTFOCUS","")
Juke_Command("JUKE_APP_RESTORED","")
Juke_Command("JUKE_APP_MINIMIZED","")
UNICODE_SUPPORT$=Juke_Command("JUKE_APP_UNICODE","TRUE or FALSE")
Juke_Command("JUKE_APP_HOST","SOFTWARE NAME")
Juke_Command("JUKE_SONGLIST_ADD_SONG","system|postition|title|artist|album|genre|totalDuration|TrackNr|AlbumNr|more")
Juke_Command("JUKE_SONGLIST_REMOVE_SONG", "position")
Juke_Command("JUKE_SONGLIST_MOVE_SONG", "oldPosition|newPosition")
Juke_Command("JUKE_SONGLIST_CLEAR", "")
Juke_Command("JUKE_SONGLIST_CURRENTPOSITION", "position")
SuggestionFile=Juke_Command("JUKE_SONGLIST_SUGGESTION", "LastPlayedFile")
Juke_Command("JUKE_SONG_START","system|title|artist|album|genre|totalDuration|TrackNr|AlbumNr")
Juke_Command("JUKE_SONG_NEXT","system|title|artist|album|genre|totalDuration|TrackNr|AlbumNr")
Juke_Command("JUKE_SONG_FINISH","")
Juke_Command("JUKE_SONG_RESTART", "")
Juke_Command("JUKE_SONG_SKIP","")
Juke_Command("JUKE_SONG_PAUSE","")
Juke_Command("JUKE_SONG_RESUME","")
Juke_Command("JUKE_SONG_PLAYMODE", "modeTextString")
Juke_Command("JUKE_SONG_FASTFWD_START","")
Juke_Command("JUKE_SONG_FASTFWD_FINISH","")
Juke_Command("JUKE_SONG_FASTREV_START","")
Juke_Command("JUKE_SONG_FASTREV_FINISH","")
Juke_Command("JUKE_SONG_PLAY_POSITION",curPosSecs|totalDuration)
Juke_Command("JUKE_ENTER_ALBUM_VALUE", "VALUE")
Juke_Command("JUKE_ENTER_TRACK_VALUE", "VALUE")
Juke_Command("JUKE_VOLUME_CHANGE", "system|curVolumeLevel|minVolumeLevel|maxVolumeLevel")
Juke_Command("JUKE_VOLUME_MUTE", "TRUE or FALSE")
JukeCommand("JUKE_PLUGIN_EVENT_CREATE", "PLUGIN_EVENT_(name)|valueStr")
where "PLUGIN_EVENT_(name)|valueStr" can be one of the following:
PLUGIN_EVENT_APP_EXIT|""
PLUGIN_EVENT_PLAY|""
PLUGIN_EVENT_PAUSE|""
PLUGIN_EVENT_FASTREV|"KEYDOWN KEYUP"
PLUGIN_EVENT_FASTFWD|"KEYDOWN KEYUP"
PLUGIN_EVENT_SKIP|""
PLUGIN_EVENT_VOLUMESET|"NUMBER"
PLUGIN_EVENT_VOLUMEMUTE|"ON OFF"
PLUGIN_EVENT_VOLUMEUP|"KEYDOWN KEYUP"
PLUGIN_EVENT_VOLUMEDOWN|"KEYDOWN KEYUP"
PLUGIN_EVENT_SONGQ_CLEAR|""
PLUGIN_EVENT_SONGQ_REPEAT|"ON OFF"
PLUGIN_EVENT_IDLEPLAY_ACTIVATE|"ON OFF"
PLUGIN_EVENT_ENTERSEL_DIGIT|"NUMBER"
PLUGIN_EVENT_ENTERSEL_CLEAR|""
PLUGIN_EVENT_ENTERSEL_DELETE|""
PLUGIN_EVENT_ENTERSEL_PLAY|""
PLUGIN_EVENT_ALBUM_COVERS_FLIP_BACKWARD|""
PLUGIN_EVENT_ALBUM_COVERS_FLIP_FORWARD|""
Juke_Command("JUKE_PLUGIN_EVENT_SEND", "PLUGIN_EVENT_(name)|valueStr")
where "PLUGIN_EVENT_(name)|valueStr" can be one of the following:
PLUGIN_EVENT_APP_EXIT|""
(application has exited)
PLUGIN_EVENT_SONGQ_REPEAT|"ON" or "OFF"
(song queue repeat button is turned ON/OFF)
PLUGIN_EVENT_IDLEPLAY_ACTIVATE|"ON" or "OFF"
(idle play button is turned ON/OFF)
PLUGIN_EVENT_ALBUM_COVERS_FLIP_BACKWARD|""
(album covers were flipped backward)
PLUGIN_EVENT_ALBUM_COVERS_FLIP_FORWARD|""
(album covers were flipped forward)
retValStr = Juke_Command("JUKE_PLUGIN_EVENT_GET", "")
where "retValStr" is of the format "PLUGIN_EVENT_(name)|valueStr" and can be one of the following:
PLUGIN_EVENT_APP_EXIT|""
(application should exit)
PLUGIN_EVENT_PLAY|""
(click the PLAY media button)
PLUGIN_EVENT_PAUSE|""
(click the {AUSE media button)
PLUGIN_EVENT_FASTREV|"KEYDOWN" or "KEYUP"
(KEYDOWN = start fast reversing the song)
(KEYUP = stop fast reversing the song)
PLUGIN_EVENT_FASTFWD|"KEYDOWN" or "KEYUP"
(KEYDOWN = start fast forwarding the song)
(KEYUP = stop fast forwarding the song)
PLUGIN_EVENT_SKIP|""
(click the SKIP media button)
PLUGIN_EVENT_VOLUMESET|"NUMBER"
(set the volume level directly)
PLUGIN_EVENT_VOLUMEMUTE|"ON" or "OFF"
(turn volume mute ON/OFF)
PLUGIN_EVENT_VOLUMEUP|"KEYDOWN" or "KEYUP"
(KEYDOWN = start increasing the volume)
(KEYUP = stop increasing the volume)
PLUGIN_EVENT_VOLUMEDOWN|"KEYDOWN" or "KEYUP"
(KEYDOWN = start decreasing the volume)
(KEYUP = stop decreasing the volume)
PLUGIN_EVENT_SONGQ_CLEAR|""
(click song queue CLEAR button)
PLUGIN_EVENT_SONGQ_REPEAT|"ON" or "OFF"
(turn song queue repeat button ON/OFF)
PLUGIN_EVENT_IDLEPLAY_ACTIVATE|"ON" or "OFF"
(turn idle-play activate button ON/OFF)
PLUGIN_EVENT_ENTERSEL_DIGIT|"NUMBER"
(click specific enter selection number button)
PLUGIN_EVENT_ENTERSEL_CLEAR|""
(click CLEAR enter selection button)
PLUGIN_EVENT_ENTERSEL_DELETE|""
(click DELETE enter selection button)
PLUGIN_EVENT_ENTERSEL_PLAY|""
(click PLAY enter selection button)
PLUGIN_EVENT_ALBUM_COVERS_FLIP_BACKWARD|""
(flip album covers page backward)
PLUGIN_EVENT_ALBUM_COVERS_FLIP_FORWARD|""
(flip album covers page forward)
you should include this to you homepage and/or in a readme file for your software. I create mine soon. Still messing about few commands list. It one of the harder one (JUKE_KEY_EVENT_GET). I still make sure it can compile under both Windows and Linux (without the plugin system).This is already embedded inside my jukebox application. I might add it to my homepage but I think I might be too lazy to change all that stuff .... :P
You have might been checking the speed of your mouse whn you moving you mouse? You could code it, so it only is a "user interaction" when the mouse is moved about 5 pixels from the original position when the idle mode was activated.....I have no idea what I am checking ... I got the mouse hook stuff from somewhere online. I just know it used to work like a charm and only inform me when the mouse actually moved. :dunno
Ok, I wrapped everything up much quicker than I thought .....
The new v3.0 of my jukebox software can be found at my site.
http://unclet.arcadecontrols.com/Jukebox/
I also added a new section for PLUGINs as well.
Let me know how it works ..... I will not officially announce the release until I see it is working with some plugins ....
JukeplugSys.com
I have the http://www.jukeplugsys.com domain based on wordpress. I think all plug-in releases should realease that soon as well host using this system. Something Headkaze and Loadman can help me with (please register on the homepage) and also create some content on it?
Q) How often are you firing the 'JUKE_PLUGIN_EVENT_GET'? I was thinking it might be good to have the polling a configuarable value option? What do you think?.
QuoteQ) How often are you firing the 'JUKE_PLUGIN_EVENT_GET'? I was thinking it might be good to have the polling a configuarable value option? What do you think?.
Good idea .... now go download v3.01 ..... there is a new "Settings" tab under the Plugins option menu
;D
IF you want to help me, I can set you as adminstrator for the page? But I need a registration, before I can set a status.
NB. I just set your status as editor, loadman.Cool
Good idea .... now go download v3.01 ..... there is a new "Settings" tab under the Plugins option menu
;D
I notice that even if a Plug-in is not enabled it still send the plug-in things like:
int Juke_Initialize(value)
int Juke_Shutdown(value)
Just created some start pages, I hope you are available to edit theseI will have a go tonight (AEST)
Glad you like the "Settings" tab I added. You attached the picture of this Settings page ... are you pointing out a problem with it?
doneThanks
Since you are one of authors of this projects, I can give you editor status if you register on the page.I registered already this morning, but I doubt I will spend time updating the site. I just do not like updating webpages and such. I am just happy to be done updating the software and updating my own site so I can now get back to finishing up my jukebox build. :)
but instead near finish a basic remote plugin to test out the functions in MultiJuke also works...
I am just happy to be done updating the software and updating my own site so I can now get back to finishing up my jukebox build. :)
Don't forget to post picturesOf course ..... :applaud:
2 software is released with this system. We still missing Freebox and maybe DWJukebox...
I was bored at work so I decided to update the Wiki ........
http://wiki.arcadecontrols.com/wiki/Jukebox_Plug-Ins
..... I was just really bored at work today. ::)
2 software is released with this system. We still missing Freebox and maybe DWJukebox...
Hi there. Just joined this forum after lurking on and off for a while.Welcome
I've written a jukebox application and am interested in supporting the JPS.I write my Plug-in in Delphi but I think Unclet's Juke is in VB6
My app is written with Delphi 7. I don't know what the rest of you use.
My main question is do I have to support more than one plugin at once?Yes Please
If so, do you keep the references to them in an array?:dunno Pass
OK, a couple of hours of fiddling around and I now have the basic Delphi host code running. It finds all the JPS dll's in the App/Plugins directory and generates the list. It also sends a Juke_Initialize command to each plugin at startup and a Juke_Shutdown to each plugin when it terminates. So far, so good!
simply because I don't have a configuration window for the GIU yet.
Gee, and I just wrote one! (http://www.users.on.net/~avd/aussiejuke/JPS_Config.zip)Looks and feels nice
I've also integrated it into Aussie Juke and it seems to work nicely.
Thanks for your help guys.
When I've finished testing the Delphi host code, who shall I send it to for inclusion in the SDK?You can send to Headkaze or just post it here (zipped) for him to collect.
With regard to the wiki page. it says I don't have a valid username.
Do I need to sign up for that section separately?
Nope. Still won't log me in. Who knows. :dunno
All too hard. Tried all the suggestions. No luck. Maybe I should just delete my account.Nope. Still won't log me in. Who knows. :dunno
Ahh You may be screwed because you have an underscore in your name. I seem to recal another user had an issue once
Post something in the Wiki Discussion for help
I've updated the host tool and also made an event viewer.
They can be found here. (http://www.users.on.net/~avd/aussiejuke/JPS%20Tools.zip)
There's nothing wrong with what you guys have made.
I just wanted to write one to prove the plugin dll code I wrote.
Minor point. Your app only seems to fire commands to the highlighted plug-in rather than all of them I assume that's not how your Juke will handle plug-insYes, that's so you can test them one at a time. The juke app does them all at once. (you can disable them too)
Minor point. Your app only seems to fire commands to the highlighted plug-in rather than all of them I assume that's not how your Juke will handle plug-insYes, that's so you can test them one at a time. The juke app does them all at once. (you can disable them too)
Hey, I just noticed this thread got stickyed, even I have not asked about this :D.
So I changed the topic to been more clear (removed version number and removed the DONE message, which is not needed any more). I also added the link to more information about this project.
Also I have added a note about " char with one of the plugin_event command, and is why I updated to v1.04. I know UncleT didden't like that char in that command, even it stated in the document. MultiJuke does not care about that char, since it just removed it before parsing.
This idea came from the other thread about Idea:.
WaitTimeInMS=Juke_Command("JUKE_SONG_FINISH","")
A song is played finish and it wait this number of MS, before it start the next song.
This mean a Sound FX, ads or other can been played before the next song from a plugin.
I add the filename addation to my software, I hope Uncle'T like that idea. In MultiJuke this was only required 3 code lines for all 3 commands. Theses is:
JUKE_SONGLIST_ADD_SONG
JUKE_SONG_START
JUKE_SONG_NEXT
You can add it to the SDK if you want. If I have trouble supplying the path for some reason then I would simply supply a "nullstring" instead of the file path. I would assume I would be able to supply the path though, but I have been wrong before so I need to check first :P
...\MusicDirectoryPath1
\Artist1
\Album1
\01 - Song1.mp3
to
MusicDirectoryPath1\Artist1\Album1\01 - Song1.mp3
Version 03.13
Added: The JUKE_SONGLIST_ADD_SONG, JUKE_SONG_START and JUKE_SONG_NEXT plugin commands were updated to include the full filename path of the song file.
Can't see any new messages. Anyway, thanks for updating it for me. ;D
Still working on the JPS Sound FX plugin. Just have that issue where it crashes if you shut it down while a sound is playing. :banghead: