Difference between revisions of "Jukebox Plug-Ins"

From BYOAC New Wiki
Jump to navigation Jump to search
(Description of the JPS SDK)
(Description of the JPS SDK)
Line 186: Line 186:
  
  
 +
<b><u>SONG PLAYING COMMANDS:</u></b>
  
  
  
 +
  Juke_Command("JUKE_SONG_START",
 +
              "system|title|artist|album|genre|totalDuration|trackNum|albumNum")<br>
 +
New song has just started to play.
  
'''SONG PLAYING COMMANDS:'''
+
<i>NOTE: Some song information might not be supplied if it could not be determined at the time the event was sent.</i>
  
'''Juke_Command("JUKE_SONG_START","")'''
 
New song is just started.
 
  
'''Juke_Command("JUKE_SONG_FINISH","")'''
+
<b><i>system</i></b> = whether user or system started the song (0=user 1=system)
 +
 
 +
<b><i>title</i></b> = song's name
 +
 
 +
<b><i>artist</i></b> = song's artist name
 +
 
 +
<b><i>album</i></b> = song's album name
 +
 
 +
<b><i>genre</i></b> = song's associated genre
 +
 
 +
<b><i>totalDuration</i></b> = total amount of seconds in the song
 +
 
 +
<b><i>trackNum</i></b> = jukebox's assigned track number
 +
 
 +
<b><i>albumNum</i></b> = jukebox's assigned album number
 +
 
 +
 
 +
  Juke_Command("JUKE_SONG_NEXT","system|title|artist|album|genre|totalDuration|trackNum|albumNum")<br>
 +
Information about the next song to be played.
 +
 
 +
<i>NOTE: Some song information might not be supplied if it could not be determined at the time the event was sent.</i>
 +
 
 +
 
 +
<b><i>system</i></b> = whether user or system started the song (0=user 1=system)
 +
 
 +
<b><i>title</i></b> = song's name
 +
 
 +
<b><i>artist</i></b> = song's artist name
 +
 
 +
<b><i>album</i></b> = song's album name
 +
 
 +
<b><i>genre</i></b> = song's associated genre
 +
 
 +
<b><i>totalDuration</i></b> = total amount of seconds in the song
 +
 
 +
<b><i>trackNum</i></b> = jukebox's assigned track number
 +
 
 +
<b><i>albumNum</i></b> = jukebox's assigned album number
 +
 
 +
 
 +
  Juke_Command("JUKE_SONG_FINISH", nullString)<br>
 
Current song has finished.
 
Current song has finished.
  
Juke_Command("JUKE_SONG_RESTART","")
 
Current song has been restarted
 
  
Juke_Command("JUKE_SONG_SKIP","")
+
  Juke_Command("JUKE_SONG_RESTART", nullString)<br>
 +
This is sent when a song HAS NOT finished playing and is requested to start playing from the beginning again
 +
 
 +
 
 +
  Juke_Command("JUKE_SONG_SKIP", nullString)<br>
 
Current song has been skipped.
 
Current song has been skipped.
  
Juke_Command("JUKE_SONG_PAUSE","")
+
 
 +
  Juke_Command("JUKE_SONG_PAUSE", nullString)<br>
 
Current song has been paused.
 
Current song has been paused.
  
Juke_Command("JUKE_SONG_RESUME","")
+
 
 +
  Juke_Command("JUKE_SONG_RESUME", nullString)<br>
 
Current song has been resumed from pause state
 
Current song has been resumed from pause state
  
Juke_Command("JUKE_SONG_FASTFWD_START","")
+
 
 +
  Juke_Command("JUKE_SONG_PLAYMODE", "modeTextString")<br>
 +
The playmode the jukebox. 
 +
 
 +
 
 +
<b><i>modeTextString</i></b> = Any text string at all (ex: Random Mode, Radio Mode, etc...)
 +
 
 +
 
 +
  Juke_Command("JUKE_SONG_FASTFWD_START", nullString)<br>
 
Current song has started being fast forwarded.
 
Current song has started being fast forwarded.
  
Juke_Command("JUKE_SONG_FASTFWD_FINISH","")
+
 
 +
  Juke_Command("JUKE_SONG_FASTFWD_FINISH", nullString)<br>
 
Current song has finished being fast forwarded
 
Current song has finished being fast forwarded
  
Juke_Command("JUKE_SONG_FASTREV_START","")
+
 
 +
  Juke_Command("JUKE_SONG_FASTREV_START", nullString)<br>
 
Current song has started being fast reversed
 
Current song has started being fast reversed
  
Juke_Command("JUKE_SONG_FASTREV_FINISH","")
 
Current song has finished being fast reversed
 
  
Juke_Command("JUKE_SONG_PLAY_POSITION",curPosSecs)
+
  Juke_Command("JUKE_SONG_FASTREV_FINISH", nullString)<br>
The number of seconds into the current song. This command is also still invoked under FASTREV or FASTFWD commands.
+
  Current song has finished being fast reversed
 +
 
 +
 
 +
  Juke_Command("JUKE_SONG_PLAY_POSITION", curPosSecs|totalDuration)<br>
 +
The number of seconds into the current song.  
 +
 
 +
<b><i>curPosSecs</i></b> = how many seconds the song has been played
 +
 
 +
<b><i>totalDuration</i></b> = total amount of seconds in the song
 +
 
 +
 
 +
 
 +
 
 +
 
 +
<b><u>DIGIT COMMANDS:</u></b>
 +
 
 +
 
 +
 
 +
  Juke_Command("JUKE_ENTER_ALBUM_VALUE", "value")<br>
 +
All digits which have been currently entered for the album number
  
The Jukebox Software Do allways send this info when the secs is changed due to above reason.
 
  
 +
  Juke_Command("JUKE_ENTER_TRACK_VALUE", "value")<br>
 +
All digits which have been currently entered for the track number
  
VOLUME COMMANDS:
 
  
Juke_Command("JUKE_VOLUME_SET", "system|curVolumeLevel|minVolumeLevel|maxVolumeLevel")
 
A new value volume have been set.
 
  
If system is set the volume, the last argument would set to one.
 
  
Juke_Command("JUKE_VOLUME_MUTE", "TRUE or FALSE")
 
  
Set Mute Status to TRUE or FALSE.
+
<b><u>VOLUME COMMANDS:</u></b>
  
  
DIGIT COMMANDS:
 
  
Juke_Command("JUKE_ENTER_ALBUM_VALUE", "VALUE")
+
  Juke_Command("JUKE_VOLUME_CHANGE", "system|curVolumeLevel|minVolumeLevel|maxVolumeLevel")<br>
Send the value string on the marked album, when the have entered a album number or letter.
+
Indicates the volume has been set to another value
  
Juke_Command("JUKE_ENTER_TRACK_VALUE", "VALUE")
+
<b><i>system</i></b> = whether user or system changed the volume (0=user 1=system)
Send the value string on the marked track or singles, when the have entered a album number or letter.
 
  
A Track number and or letter have been selected. Send the whole value, user seen on screen and not one digit at one time.
+
<b><i>curVolumeLevel</i></b> = new/current volume level
  
 +
<b><i>minVolumeLevel</i></b> = minimum volume level allowed to be entered
  
KEY_EVENT COMMANDS
+
<b><i>maxVolumeLevel</i></b> = maximum volume level allowed to be entered
  
Juke_Command("JUKE_KEY_EVENT_SEND", "KEYEVENT|ENABLE or DISABLE")
 
Is event is disabled or enabled? If the EVENT dosent need that, it might just send a "" string. Hence it allways enabled.
 
  
EVENT=Juke_Command("JUKE_KEY_EVENT_GET","")
+
  Juke_Command("JUKE_VOLUME_MUTE", "TRUE/FALSE")<br>
A KEY_EVENT have sendt from plugin to the jukebox software, and the command EVENT would been accour.
+
Indicates whether volume mute is active
  
 
==See Also==
 
==See Also==

Revision as of 14:05, 21 January 2008

Jukebox Plugins are bit of 'add on' software that is controlled by your Juke-box software.

BackGround

In early 2008 a 'standard' set of commands was agreed upon by a few Jukebox software Authors. With some input from other interested parties a Global standard was created. The goal was a plug-in could be created and with a view most if not al functionality would be compatible with any Jukebox software applying this standard.

The standard is known as 'The Jukebox Plug-in System' or JPS

How To Use a Plug-In

Download the plug-in and place it in the 'plugins' subfolder of your Jukebox software. You then need to configure it by.......

Description of the JPS SDK

MAIN PLUGIN CONTROL FUNCTIONS:


PCHAR  Juke_GetPluginInfo()

Return a string with plugin info in the following format ---> "NAME + | + AUTHOR + | + VERSION + | + DESCRIPTION"


int  Juke_Initialize(value)

Inits the plugin when the Jukebox Software starts. Returns 1 when successful.


int  Juke_Shutdown(value)

Shuts down the plugin when the Jukebox Software ends. Returns 1 when successful.


int  Juke_Configure(HWND hWndParent)

Invokes the plugin configuration screen with the jukebox application's window ID. The plugin can use this as it's parent window, so the configuration window can have the current focus. If a jukebox application does not know what it is, this can been set to 0.


PCHAR  Juke_Command(PChar Name, PChar Value)

Sends a command(event) (ASCII formatted) with a name and a value to the plugin. The plugin can return a string pointer to a jukebox software (ASCII formatted) as well (when required).



PLUGIN EVENT COMMANDS:


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

This command is used to create(define) a jukebox-specific event which can be sent/received to/from the plugin at any time. One of these commands are sent for each specific event which is defined and are sent to the plugin when the jukebox first starts. The command informs the plugin about "extra" events (which are not defined by the JPS standard).


PLUGIN_EVENT_(name) = jukebox-specific event name

valueStr = text string indicating which types of values are allowed to be sent/received to/from the plugin. This string consists of any of the following text values listed below. Multiple values are space delimited.


ENABLE = allow the user to provide input or invoke change (ie: allow users to delete queued songs)

DISABLE = do not allow user to provide input or invoke change (ex: do not allow users to delete queued songs)

NUMBER = number can be provided (ex: set volume level)

LETTER = letter can be provided (ex: jump to album covers starting with a certain letter).

ON = feature/setting was turned on (ex: mute volume, repeat song)

OFF = feature/setting was turned off (ex: mute volume, repeat song)

KEYDOWN = button has been pressed

KEYUP = button has been released

KEYCLICK = button has been pressed and released


 Juke_Command("JUKE_PLUGIN_EVENT_SEND", "PLUGIN_EVENT_(name)|valueStr")

Sends a previously created(defined) jukebox-specific event to the plugin.


 retValStr =  Juke_Command("JUKE_PLUGIN_EVENT_GET", nullString)

This command is continuously sent to the plugin so the plugin can then return an event string value to indicate an event in which the jukebox software should execute.


retValStr = "PLUGIN_EVENT_(name)|valueStr"



APPLICATION COMMANDS:


Juke_Command("JUKE_APP_GAINFOCUS", nullString)

When the jukebox window becomes the active window in the user's environment


Juke_Command("JUKE_APP_LOSTFOCUS", nullString)

When the jukebox window is no longer the active window in the user's environment


Juke_Command("JUKE_APP_RESTORED", nullString)

When the jukebox application is restored from being minimized


Juke_Command("JUKE_APP_MINIMIZED", nullString)

When the jukebox application is minimized


Juke_Command("JUKE_APP_UNICODE", "TRUE/FALSE")

Whether the Jukebox supports Unicode or not?


Juke_Command("JUKE_APP_HOST", "JukeboxName")

Informs the plugin with the jukebox's name.



SONGLIST COMMANDS:


 Juke_Command("JUKE_SONGLIST_ADD_SONG",
"system|position|title|artist|album|genre|totalDuration|trackNum|albumNum|more")

Indicates a song has been added to the queue.

NOTE: Some song information might not be supplied if it could not be determined at the time the event was sent.


system = whether user or system added the song (0=user 1=system)

position = queue position the song has been added

title = song's name

artist = song's artist name

album = song's album name

genre = song's associated genre

totalDuration = total amount of seconds in the song

trackNum = jukebox's assigned track number

albumNum = jukebox's assigned album number

more = if more songs are going to be added to the queue immediately after this event is sent then we can inform the plugin this is going to happen and that more of these events are going to be sent. (0=no more, 1=more)


 Juke_Command("JUKE_SONGLIST_REMOVE_SONG", "position")

Indicates a song has been removed from the queue.


position = queue position which the song was removed


 Juke_Command("JUKE_SONGLIST_MOVE_SONG", "oldPosition|newPosition")

Indicates a song has been moved in the queue.


oldPosition = old/previous queue position of the song

newPosition = new/current queue position of the song


 Juke_Command("JUKE_SONGLIST_CLEAR", nullString)

Indicates the song queue has been cleared (ie: either by the user or as a result of all the songs being removed for playing)


 Juke_Command("JUKE_SONGLIST_CURRENTPOSITION", "position")

Indicates the position of the highlighted song within the song list.


position = queue position which the song was removed


 FILE  Juke_Command("JUKE_SONGLIST_SUGGESTION", "file")

Obtain a playlist file from the plugin. This command can been used when the songlist is empty or last song is played/finished from the playlist.


file = playlist file



SONG PLAYING COMMANDS:


 Juke_Command("JUKE_SONG_START", 
              "system|title|artist|album|genre|totalDuration|trackNum|albumNum")

New song has just started to play.

NOTE: Some song information might not be supplied if it could not be determined at the time the event was sent.


system = whether user or system started the song (0=user 1=system)

title = song's name

artist = song's artist name

album = song's album name

genre = song's associated genre

totalDuration = total amount of seconds in the song

trackNum = jukebox's assigned track number

albumNum = jukebox's assigned album number


 Juke_Command("JUKE_SONG_NEXT","system|title|artist|album|genre|totalDuration|trackNum|albumNum")

Information about the next song to be played.

NOTE: Some song information might not be supplied if it could not be determined at the time the event was sent.


system = whether user or system started the song (0=user 1=system)

title = song's name

artist = song's artist name

album = song's album name

genre = song's associated genre

totalDuration = total amount of seconds in the song

trackNum = jukebox's assigned track number

albumNum = jukebox's assigned album number


 Juke_Command("JUKE_SONG_FINISH", nullString)

Current song has finished.


 Juke_Command("JUKE_SONG_RESTART", nullString)

This is sent when a song HAS NOT finished playing and is requested to start playing from the beginning again


 Juke_Command("JUKE_SONG_SKIP", nullString)

Current song has been skipped.


 Juke_Command("JUKE_SONG_PAUSE", nullString)

Current song has been paused.


 Juke_Command("JUKE_SONG_RESUME", nullString)

Current song has been resumed from pause state


 Juke_Command("JUKE_SONG_PLAYMODE", "modeTextString")

The playmode the jukebox.


modeTextString = Any text string at all (ex: Random Mode, Radio Mode, etc...)


 Juke_Command("JUKE_SONG_FASTFWD_START", nullString)

Current song has started being fast forwarded.


 Juke_Command("JUKE_SONG_FASTFWD_FINISH", nullString)

Current song has finished being fast forwarded


 Juke_Command("JUKE_SONG_FASTREV_START", nullString)

Current song has started being fast reversed


 Juke_Command("JUKE_SONG_FASTREV_FINISH", nullString)
Current song has finished being fast reversed


 Juke_Command("JUKE_SONG_PLAY_POSITION", curPosSecs|totalDuration)

The number of seconds into the current song.

curPosSecs = how many seconds the song has been played

totalDuration = total amount of seconds in the song



DIGIT COMMANDS:


 Juke_Command("JUKE_ENTER_ALBUM_VALUE", "value")

All digits which have been currently entered for the album number


 Juke_Command("JUKE_ENTER_TRACK_VALUE", "value")

All digits which have been currently entered for the track number



VOLUME COMMANDS:


 Juke_Command("JUKE_VOLUME_CHANGE", "system|curVolumeLevel|minVolumeLevel|maxVolumeLevel")

Indicates the volume has been set to another value

system = whether user or system changed the volume (0=user 1=system)

curVolumeLevel = new/current volume level

minVolumeLevel = minimum volume level allowed to be entered

maxVolumeLevel = maximum volume level allowed to be entered


 Juke_Command("JUKE_VOLUME_MUTE", "TRUE/FALSE")

Indicates whether volume mute is active

See Also