Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Plugins: Document API for JukePlugSys  (Read 181089 times)

0 Members and 1 Guest are viewing this topic.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Plugins: A Command List using by Jukebox Plugins (FEW ISSUES LEFT)
« Reply #160 on: January 09, 2008, 08:31:57 pm »
Quote
Two 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:

People who can't deal with a trailing "|" should not be writing software!  :hissy:

Call it the Headkaze "Tail Case"!  :laugh2:

Or put this in the Jukebox code (sorry for the C#)...

Code: [Select]
if(Value.Substring(Value.Length - 1) == "|")
{
   MessageBox.Show("You bloody moron! You have a trailing '|' character. Headkaze HATES that. Program exiting...");
   Application.Exit();
}

 ;D

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: A Command List using by Jukebox Plugins (FEW ISSUES LEFT)
« Reply #161 on: January 09, 2008, 09:03:14 pm »
if(Value.Substring(Value.Length - 1) == "|")
{
   MessageBox.Show("You bloody moron! You have a trailing '|' character. Headkaze HATES that. Program exiting...");
   Application.Exit();
}

 ;D

 :laugh2:

You guys can 'Pipe' off.    ;D

I would then have it trigger my Plug-in to make a Fart noise   :P

he he  I needed that Laugh!

 0x2b|~0x2b|    ;)
« Last Edit: January 09, 2008, 09:09:21 pm by loadman »

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Command List using by Jukebox Plugins (FEW ISSUES LEFT)
« Reply #162 on: January 09, 2008, 09:23:31 pm »
Please, Let us all doing the documention work finished instead of these type of posts..



Unclet:

JUKE_KEY_EVENT, you can call whatever you like, if it easy to code that way. The Plugin should just use that KEY_EVENT name as it got. But you right here.

I referenced a PLAYLIST as typical use in a media player (like Winamp and Windows Media Player).... They never delete the played song from the queue, they just jump into the next song played.

Due to that I just renamed to SONGLIST instead. I now pretty use the commands you gave (but removed QueueChanged, that is completly uneed), but I just added a argument to JUKE_QUEUE_ADD_SONG to feed the PlayNext (Add the song to queue to been played after the current song) and PlayNow (Play directly)...

JUKE_QUEUE_CHANGED is not actuelly needed anymore. Just remove the current song from its queue.

I just change JUKE_FEATURE_ATTRACT_MODE to fit you need, but I so need to add a SCREEN_SAVER command as well, since it act a bit diffecene. Some Plugins might then use the some code, but I dosent care here.

JUKE_SELECTED_MARKED is removed completly.
« Last Edit: January 09, 2008, 09:25:43 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

SGT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1145
  • Last login:April 17, 2023, 08:29:42 pm
Re: Plugins: A Command List using by Jukebox Plugins (FEW ISSUES LEFT)
« Reply #163 on: January 09, 2008, 10:00:17 pm »
Please, Let us all doing the documention work finished instead of these type of posts..

Space Fractal, are you a robot?  Relax, its called humor.  ;D

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Command List using by Jukebox Plugins (FEW ISSUES LEFT)
« Reply #164 on: January 09, 2008, 11:09:46 pm »
Thank you for explaining what a Playlist is ...... I never played around with WinAmp or Windows Media Player that way ........ it makes more sense to me now.   :applaud:

Quote
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.

This is the 4th time I am giving this example to justify why I think the "JUKE_QUEUE_CHANGED" command is required.   Now that you know my software is capable of adding many many songs to the queue at once, then you might now understand why I need a command like "JUKE_QUEUE_CHANGE".   If you still do not believe I need a "JUKE_QUEUE_CHANGE" command then please tell me exactly how I should inform the plugin I added 50 songs to the queue at one time.

Of course we can call this command "JUKE_SONGLIST_CHANGED" instead of "JUKE_QUEUE_CHANGED"

Quote
Juke_Command("JUKE_SONGLIST_CLEAR", "")
Clear the SONGLIST.

Juke_Command("JUKE_SONGLIST_CLEAR", "System")
The song queue has been cleared by user or system.

You have both of these commands defined and they are meant to do the same thing.    Please remove Juke_Command("JUKE_SONGLIST_CLEAR", "") it is not required.


Quote
Juke_Command("JUKE_SONGLIST_ADD_SONG",
"system|position|queuePosNum|title|artist|album|trackNum|genre|totalDuration")

Add a song into that position in the queue.

1) Why do you define both "position" and "queuePosNum" values as part of the string?  You probably only need the "position" value.

2) Please put back the "albumNum" value since my software handles these values as two separate values.  Also, it is not nice to put two values (album and albumNumber) into one "album" text string.

system|position|queuePosNum|title|artist|album|albumNum|trackNum|genre|totalDuration

3) For all "JUKE_SONGLIST_xxx"  commands, please rename "queuePosNum" to be just "position"

Quote
  • Albumnumber or such should been part of the album name, like "01 Album".
Please remove this statement since the "albumNum" value should be listed as a separate value and not as part of the "album" string value.

Quote
  • Some songs might not have a TotalDuration if it is unknown.
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.


Quote
Juke_Command("JUKE_SONG_PAUSE","")
New song is just started.

Juke_Command("JUKE_SONG_START","")
Current song has been paused.

I mentioned this in my last comments...... the descriptions you have for these two commands are not describing the correct command ...... (see RED above). 

Also please move the "JUKE_SONG_START" command before the "JUKE_SONG_FINISHED" command in your list. 


Quote
Juke_Command("JUKE_VOLUME_MUTE", "TRUE|FALSE")

I understand this command take "one" value .... either TRUE or FALSE, but how you currently have it defined it looks like two values since you are using the "|" separator character.

Please replace "TRUE|FALSE" with "value" like this:

Juke_Command("JUKE_VOLUME_MUTE", value)

..... and in the description of the command you can simply explain "value" can be either "TRUE" or "FALSE".

**  You do this with some of the other commands as well ..... please check them all and make sure you define them correctly.
« Last Edit: January 09, 2008, 11:13:49 pm by unclet »

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: A Command List using by Jukebox Plugins (FEW ISSUES LEFT)
« Reply #165 on: January 09, 2008, 11:19:34 pm »
Quote
note: 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 
« Last Edit: January 09, 2008, 11:25:49 pm by loadman »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Plugins: A Command List using by Jukebox Plugins (FEW ISSUES LEFT)
« Reply #166 on: January 09, 2008, 11:42:40 pm »
Quote
note: 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 

No the PeekMemory.dll is not necessary as I figured out how to return strings to VB6 using API functions... That code he pasted in the first post is from the code I use in the current SDK (JukePlugin.zip). Don't know why it's there in the first thread as PeekMemory.dll has never been needed  :dunno

Space Fractal: You can remove PeekMemory.zip and that source code as we don't need it nor use it.

The PtrToVBString() function was the key to getting a string...

Code: [Select]
sPluginInfo = PtrToVBString(CallFuncPtr(pDC, pGetPluginInfo, vbNull))
« Last Edit: January 10, 2008, 12:47:06 am by headkaze »

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: A Command List using by Jukebox Plugins (FEW ISSUES LEFT)
« Reply #167 on: January 10, 2008, 04:52:54 am »


Not sure if this helps, but attached is the MaLa SDK doc...

Is this the sort of format we will use here?

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Command List using by Jukebox Plugins (FEW ISSUES LEFT)
« Reply #168 on: January 10, 2008, 06:37:15 am »
All document errors you saw is fixed.

I have removed queue.txt because this file is NOT needed any more due to the much much faster JUKE_SONGLIST_ADD_SONG commmand.

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_SONGLIST_ADD_SONG  to been using SongNr and AlbumNr near the last argument to make more sence (before more argument). Values should been the same as them you gave using DIGIT COMMANDS.

HeadKaze:
Please give me the VB6 code again to the string without PeekMemory, and I change the first post about (and remove PeekMemory file).


« Last Edit: January 10, 2008, 07:02:52 am by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Command List using by Jukebox Plugins (FEW ISSUES LEFT)
« Reply #169 on: January 10, 2008, 07:17:31 am »
Quote
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....

Sounds good to me   :applaud:


Now, just a couple more comments:

Quote
Juke_Command("JUKE_APP_UNICODE","FALSE|TRUE")
Does the Jukebox support Unicode or not? Then the UTF8 formatted strings can been used.

Please change to "TRUE or FALSE"


Quote
Juke_Command("JUKE_SONGLIST_CLEAR", "")
Juke_Command("JUKE_SONGLIST_CLEAR", "System")

You have defined "JUKE_SONGLIST_CLEAR" command twice.   Please check your list.  They are not defined next to each other in your list but they are BOTH defined.    Please keep the second definition of the command with the "system" parameter.

Quote
Juke_Command("JUKE_SONGLIST_MOVE_SONG", "System|position|newPosition")
Song has been moved in the queue by user or system.

Please rename parameters  to the following:
Juke_Command("JUKE_SONGLIST_MOVE_SONG", "System|oldPosition|newPosition")


Quote
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)

Please rename parameters to the following:

Juke_Command("JUKE_FEATURE_ATTRACT_MODE", onActive or onNotActive or Off)


Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Command List using by Jukebox Plugins (FEW ISSUES LEFT)
« Reply #170 on: January 10, 2008, 07:22:15 am »
Done  :). More errors?


A last thing around Split command in Pure Basic:
There is no indbuilt split to array command in Pure Basic, but its exist a another command, that do the same, just without array:
Result$ = StringField(String$, Index, Delimiter$)

So no problems for me on that point. So no need to use that function HeadKaze posted. The major problem was with returned strings using VB6. Here I think I need the code to been posted in the first post.
« Last Edit: January 10, 2008, 07:47:04 am by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Command List using by Jukebox Plugins (FEW ISSUES LEFT)
« Reply #171 on: January 10, 2008, 09:16:16 am »
All done for me!   :applaud:   

Although, once the coding starts and we really start playing with some of the plugin Beta applications then we might fine we need to tweak some SDK stuff before we officially officially release the SDK for good.   

Space Fractal
Thanks for your all your work!

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Command List using by Jukebox Plugins (FEW ISSUES LEFT)
« Reply #172 on: January 10, 2008, 09:49:22 am »
We can allways make a v1.1, if we see a missing command or two.

These commandlist for v1.0b is now finally done.  :applaud:

Hope all goes well  :cheers:.



Hey, you dident notice a JUKE_KEY_EVENT_SEND "bug"... There was no KEY_EVENT sendt, but fixed in the document.



1. Should we have a child board about plugins and have a sticky tread about it?

2. Should I ask moderator (Saint) to remove these threads to hell?
 - new vision(s) on a new SDK (no listed commands)
 - Plugins: A Little wrapper dll for dynamic loading of Plugins (out of date)
 - Any maybe the dummy the thread about 2 plugin standards?


For the middle one,  I could simply use the example wrapper into the firstr thread it self, so we dosent have unneeded threads about it (unless we have a child board)?



Done a sound plugin, and hopefully it works. The sound plug can been found in that thread, I used the old document API.



« Last Edit: January 10, 2008, 03:12:34 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #173 on: January 10, 2008, 05:27:23 pm »
I would just see how many people start writing plugins and then it we need a child board make one.   

Although one could argue that there are not "tons" of people other then us few who ask questions in the current "Audio/MP3/Jukebox" forum anyway, so it is feasible that people simpy ask plugin question in the existing forum.

I am just glad to be done deisgning the SDK.   I can start coding some of this soon, but I really need to get back to my jukebox build a bit first.  I spent a lot of my time on this SDK, must to other stuff for a while.

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #174 on: January 10, 2008, 05:37:05 pm »
I started a Wiki Page.  IT's a bit of a mess at the moment. I will look at it tonight


http://wiki.arcadecontrols.com/wiki/Jukebox_Plug-Ins


Obviously we can us this to tell users what a Juke-Box Plug-In is.  But in the short term possibly we could use it to fine tune the SDK.?

What do you think?
« Last Edit: January 10, 2008, 05:39:00 pm by loadman »

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #175 on: January 10, 2008, 06:33:24 pm »
I would think a Wiki page we be nice so all jukebox software authors and plugin authors can edit it to inform people what commands they support, like within a BIG grid.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #176 on: January 10, 2008, 07:53:48 pm »
headkaze
Will you supplying a new updated JukePlugIn class module for use in VB6?   :notworthy:

Space Fractal
Quote
Juke_Command("JUKE_FEATURE_RANDOM_MODE", TRUE or FALSE)
Radio or Random mode is enabled(TRUE) or disabled(FALSE)

We you please explain what the "JUKE_FEATURE_RANDOM_MODE" command does?  I missed this one during the review and I want to understand what it does because I am going to ask you to rename it to something which is more meaninful.

Does it mean that the jukebox does not have any songs which were entered by the user  to play so it will randomly pick a song to play itself?  If so, then isn't this covered by the "JUKE_SONGLIST_ADD_SONG" command .... you just indicate the "system" selected the song automatically .. correct?

Please explain what this command does.


Quote
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.

Also, this command should be listed under the "KEY EVENTS" section you have defined with the other KEY_EVENT_SEND and KEY_EVENT_GET commands.
« Last Edit: January 10, 2008, 08:02:06 pm by unclet »

Barry Barcrest

  • I'm only in it for the lack of money
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1620
  • Last login:November 09, 2021, 09:54:17 am
  • Simple Plan
    • E-Touch Jukebox
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #177 on: January 10, 2008, 08:03:51 pm »
Ok i created a little test app to see if i can list all the plugins so i have this code..

Code: [Select]
    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

That loops through a file list box that has the mask set to *.jps and returns the descriptions to a list box.

Then i click an entry in the list box and call this for the config button.

Code: [Select]
    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

I am pretty sure i am doing something wrong here, can anyone point me in the right direction?

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #178 on: January 10, 2008, 08:24:44 pm »
For each JPS file you should call Initialize and then after confirm whether the plugin is valid.   If it is valid then read the plugin information.   You should NOT be calling "Shutdown" until your jukebox app is closed (Form_Unload() routine).  If you call Shutdown before then (like you are doing) then you lose the connection with the plugin.


Quote
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


When the listbox is populated and the user highlights a plugin and then clicks on the "Configure" button, then you do something like this:

Quote
pluginRetStr = JukePluginArray(selectedIndex).Command("JUKE_PLUGIN_CONFIGURE", vbNullString)



Now, I also added the ability for the user to enable/disable plugins via the GUI interface rather than making them have to remove the JPS file from the /plugins/ directory, but whether to do this is completely up to you.

« Last Edit: January 10, 2008, 10:14:38 pm by unclet »

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #179 on: January 10, 2008, 08:59:40 pm »
Quote
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.

This command is sent when a song is added to a queue


Quote
Juke_Command("JUKE_SONG_START","")
New song is just started.

This command is sent when a song starts.   I believe this command needs to have the same cmdValue string as the "JUKE_SONGLIST_ADD_SONG" command above.


PROBLEM:
If the plugin is keeping track of the queue contents then it accepts the "JUKE_SONGLIST_ADD_SONG" command and will receive the song information.  So when it eventually receives a "JUKE_SONG_START" command the plugin will know what song has started so there is no need for the song information in the "JUKE_SONG_START" command.

However, if the plugin does not process the "JUKE_SONGLIST_ADD_SONG" command (ie: does not maintain the queue contents) then there is no way to get the song information to the plugin.  As a result, the "JUKE_SONG_START" command must be updated to include the following cmdValue string:

"system|title|artist|album|genre|totalDuration|TrackNr|AlbumNr"

Basically a plugin which does not maintain the queue contents but would always like to at least know the current playing song has no idea what the song information is unless we make this change.





« Last Edit: January 10, 2008, 09:04:49 pm by unclet »

Barry Barcrest

  • I'm only in it for the lack of money
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1620
  • Last login:November 09, 2021, 09:54:17 am
  • Simple Plan
    • E-Touch Jukebox
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #180 on: January 10, 2008, 10:06:24 pm »
Thanks for the pointers uncleT, i also agree with you on the song start as i don't think i will passing queue information across to the plugin but i would like to pass the song start information.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #181 on: January 10, 2008, 10:15:54 pm »
Just so I am clear ...... you should only be calling ShutDown in your main Form_Unload() routine


Quote
    'free all plugins
    SendPluginCommand(JUKE_APP_CLOSED, vbNullString)

    For i = 1 To numOfPlugins
        JukePluginArray(i).Shutdown
    Next i
    numOfPlugins = 0



What does "UNICODE" mean?   Should my software send the "JUKE_APP_UNICODE" command when it starts?  :dunno
« Last Edit: January 10, 2008, 10:23:46 pm by unclet »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #182 on: January 11, 2008, 12:07:05 am »
Here is the latest SDK with updated source and readme.txt

I removed the JUKE_APP_OPENED and JUKE_APP_CLOSED commands as they are the same as Juke_Initialize and Juke_Shutdown.

I removed the JUKE_PLUGIN_CONFIGURE command and instead added a Juke_Configure(hWnd) function instead.

The example plugin will pop up a window when you call Juke_Configure() to demonstrate how a configuration window will work in your software.

The VB6 Host code has been updated to read a directory of plugins in a folder called "Plugins". It shows how you Initialize and Shutdown all the plugins and how to call a command.

All the commands have been added to VB6 Host code and are very easy to use and wrapped in simple class methods.

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.

Space Fractal: You can remove the PeekMemory.dll and VB6 code from the first post as it is not necessary. All the code for VB6 is included in the SDK. Also can you update the first post with the updated readme.txt included in the SDK archive.

And here it is the first JPS SDK v1.0b! ...
« Last Edit: January 11, 2008, 01:01:30 am by headkaze »

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #183 on: January 11, 2008, 12:21:07 am »
Unicode is something needed to support OTHER than english (like Russia and many other EU languages), hence 8 bit ASCII it not good enouch. They so NEED to been 16 bit strings (64KB chars) instead using by the plugin. To been combatile with ASCII, I choiced to use UTF8 strings when doing that. Many ID3tags and ogg is also unicoded.

If you example try to send a song with Russia alphabet to a JUKE_SONGLIST_ADD_SONG, it would otherwice just display wrong LATIN chars (I did have a lots of trouble to get this working correct in MultiJuke).

UTF8 is a ASCII encode system, that use a 8 bit system to send throuch.


I assume JUKE_SONGLIST_ADD_SONG is ALLWAYS to been processed by plugin when they using any SONG playing commands (to been sync with the queue) if they need the queue. 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 !!

JUKE_FEATURE_RANDOM_MODE is removed (yes you was correct), and added a new system value instead.



HeadKaze:
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 also need to update your SDK around your test plugin, due Juke_Initialize(int Value) and Juke_Shutdown(int Value) is not used in the Document API. Instead You should call them used the explained JUKE_APP_OPENED and JUKE_APP_CLOSED to call these functions.



HeadKaze, I doing that soon  :), dont worry if I forgot it now. I do that when I see your SDK and when I went home. BTW can you sent that file into the thread where I have the wrapper aso?



« Last Edit: January 11, 2008, 12:49:06 am by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #184 on: January 11, 2008, 12:27:49 am »
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
« Last Edit: January 11, 2008, 01:00:03 am by loadman »

Barry Barcrest

  • I'm only in it for the lack of money
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1620
  • Last login:November 09, 2021, 09:54:17 am
  • Simple Plan
    • E-Touch Jukebox
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b2 DONE !!)
« Reply #185 on: January 11, 2008, 12:44:38 am »
Excellent i will be playing with this over the weekend. Hopefully we will start to see some plugins become availble.

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b2 DONE !!)
« Reply #186 on: January 11, 2008, 12:51:47 am »
Excellent i will be playing with this over the weekend. Hopefully we will start to see some plugins become availble.

We need Two to Tango,  but I'm practicing until some Jukebox will dance with my Plug-in

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #187 on: January 11, 2008, 12:53:17 am »
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.

The JUKE_APP_CLOSED was the same as Juke_Configure was a TYPO. I meant Juke_Shutdown and I edited my post to fix that.

I don't like having Juke_Initialize/Juke_Shutdown/Juke_Configure as commands so they will stay as functions. You need to update your source to match mine :P

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #188 on: January 11, 2008, 12:59:43 am »
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..
« Last Edit: January 11, 2008, 05:01:26 pm by headkaze »

Barry Barcrest

  • I'm only in it for the lack of money
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1620
  • Last login:November 09, 2021, 09:54:17 am
  • Simple Plan
    • E-Touch Jukebox
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b2 DONE !!)
« Reply #189 on: January 11, 2008, 01:02:26 am »
So i need to get a new source? I'll wait then...

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b2 DONE !!)
« Reply #190 on: January 11, 2008, 01:05:32 am »
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.

Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b2 DONE !!)
« Reply #191 on: January 11, 2008, 01:09:33 am »
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.

There is no real difference except I think it's important to separate the basic plugin functions from the Jukebox commands. When UncleT see's the source code he will realise there is nothing to worry about as everything is wrapped inside a class anyway. And I think the way I changed it will be better for plugin coders.

So i need to get a new source? I'll wait then...

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.

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b2 DONE !!)
« Reply #192 on: January 11, 2008, 01:15:37 am »
PLEASE start the new thread.

I might create a general dll to you to include  :D. that SDK project is now your.

I let my own wrapper dll die (dont post anything into that). I think your SDK is fine, headKaze.

« Last Edit: January 11, 2008, 01:25:17 am by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b DONE !!)
« Reply #193 on: January 11, 2008, 01:20:04 am »
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..

Sorry Mate   :-[   
« Last Edit: January 11, 2008, 05:14:26 am by loadman »

Barry Barcrest

  • I'm only in it for the lack of money
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1620
  • Last login:November 09, 2021, 09:54:17 am
  • Simple Plan
    • E-Touch Jukebox
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b2 DONE !!)
« Reply #194 on: January 11, 2008, 01:21:42 am »
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.

Cheers buddy.

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b3 Update !!)
« Reply #195 on: January 11, 2008, 06:46:20 am »
Hey, it look last time I updated the Copy&Paste suddently go crazy. I have moved some elements up and down and fixed the messy text.

I looking on HeadKaze SDK and see I can get the Sound Plugin to work with that. That is on the other thread....
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b3 Update !!)
« Reply #196 on: January 11, 2008, 07:31:44 am »
headkaze

Quote
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.

No need to include an Timer example in your code  I understand how it should work.

Actually I wish you take out all examples from your code and just let it function correctly now.   I have not seen your new plugin DLL supplied here yet so perhaps you are alreadt doing this .....


Space Fractal
Keep in mind, when a song from the queue is ready to play, I remove it from the queue and then play it.  Basically, the song does not remain in the song queue when it is playing.  Songs in the queue are songs which are "waiting" to be played.  Once the song is over (ie: done playing) I will send a SONG_FINISH command.     So the SONG_FINISH command is required as well .... do NOT remove it please.

Please DO NOT remove commands from the SDK.   I am trying to code stuff and really do not want commands changing or disappearing until we all agree on the changes.

Not sure if you commented on the "JUKE_SONG_START" command, but please add the information I requested to that command .... it is needed.  I am sure of it.  My jukebox does not function how you think it does ... so please leave the existing commands alone and simply update the "JUKE_SONG_START" command for me.     For those software who do not want to supply the information for JUKE_SONG_START you do not have to ..... no big deal. 


« Last Edit: January 11, 2008, 07:33:29 am by unclet »

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b3 Update !!)
« Reply #197 on: January 11, 2008, 07:47:13 am »
I just want to seperate songlist and player functions completly.

I should let you known the FIRST song from the SONGLIST would allways been the currectly played song for a queue based jukebox (even yours is toally empty). That is why i changed QUEUE to SONGLIST.

How a Plugin Writers would use that SONGLIST, I dosen't care that.....

A Plugin Writer can actuelly easyly detect how many songs that is actuelly is in a QUEUE system like yours: "TotalSongs-1", due the first song is currectly playing. That is what I doing in MultiJuke.




Some commands was removed and added 2, because I think HeadKaze is correct about init, config and shutdown SHOULD been seperated from the parser for easier codning. I also want seperate these too.

They have nothing due to the commands itself.


« Last Edit: January 11, 2008, 08:14:15 am by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:April 26, 2023, 07:34:43 pm
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b3 Update !!)
« Reply #198 on: January 11, 2008, 10:17:00 am »
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.....


Space Fractal
Please try to provide answers to my comments in the same order as they are dislpayed below so I can easily figure out what your comments are related to.    When you supply comments you do not use the "Quote boxes" so it is very hard sometimes to figure out what you are commenting on exactly.


Quote
"JUKE_FEATURE_RANDOM_MODE" command
I would recommend renaming this command to "JUKE_FEATURE_IDLE_SYSTEM_PLAY_MODE" (which means, when the system is idle, then a song will play automatically).

I have a feature like this, but it does not always play a "random" song when this occurs.  The user can select songs from the Top10,25,50,100 lists to play and has the "option" of playing them in order or at random.   As a result, this commands name should not have the word "random" in it since my feature is not always play the songs "randomly"

I would also recommend the parameters be "ON" or "OFF" instead of "TRUE" or "FALSE"


Quote
Juke_Command("JUKE_SONGLIST_REMOVE_SONG", "System|position")
Song removed from the queue by user or system or a song is played finished (using queuePosNum=1 as value)

What does "(using queuePosNum=1 as value)" mean?
(Note: There is not "queuePosNum" parameter in the interface ... it is called "position".)

Are you indicating that the "position" value text always be set to "1".  If this is the case, then you are wrong.  The "JUKE_SONGLIST_REMOVE_SONG" command will indicate when a song has been removed from the song queue.  A user of my software can remove any song (from "any" position) from the song queue whenever they want.

For example: When the user removes song located at queue position 45, then the following command will be sent:

JukeCommand("JUKE_SONGLIST_REMOVE_SONG", "0|45")  -- remove song from position 45

So please remove your "(using queuePosNum=1 as value)" statement please since it does not make sense for my software.


Quote
I should let you know the FIRST song from the SONGLIST would always be the currently playing song for a queue based jukebox
This is not how my jukebox works and I am not going to try to make my software work like this.   

The first song in my song queue represents the "next" song which will be played.   I am "not" going to use the "JUKE_SONGLIST_ADD_SONG" command to indicate the currently playing song since this is not what it was designed to represent.

I will send the "JUKE_SONG_START" command whenever a new song starts.

Here are the definitions of the commands:

"JUKE_SONGLIST_ADD_SONG" = Add a song into the queue
"JUKE_SONGLIST_REMOVE_SONG" =  Remove a song from the queue
"JUKE_SONG_START" = a new song has started to play


Jukebox software which is PLAYLIST based and DOES NOT remove songs from the song list but instead cycles through all the songs, can still call the "JUKE_SONG_START" when a new song is started.   Jukebox software which is NOT PLAYLIST based (ie: mine) and DOES remove songs from the song list can still call the "JUKE_SONG_START" when a new song is started.  Basically, the "JUKE_SONG_START" command is NOT related to queue functions at all.

In my software, when a song is currently playing and the user selects a new song, then this new song gets placed in the song queue.  When ever a song gets placed into the song queue I send a "JUKE_SONGLIST_ADD_SONG" command with all of the song information (ie: value string information) to the plugin.

When the currently playing song ends, then these are the sequence of commands I will send to the plugin:

JukeCommand("JUKE_SONG_FINISH", null)  <-- current playing song has finished
JukeCommand("JUKE_SONGLIST_REMOVE_SONG", "1|1")  <-- Remove next song from queue position 1
JukeCommand("JUKE_SONG_START", null) <-- next song starts

IMPORTANT: If the plugin does not maintain the song queue (does not support the "JUKE_SONGLIST_ADD_SONG" command at all) then there is no way the plugni will get the currently playing song information at all.  This is why the "JUKE_SONG_START" command must have song information in it  I would imagine a lot of plugin are not going to take the time to maintain the complete song queue so this is really needed.  I would think most plugin might only be interested in the currently playing song only.

Please update the "JUKE_SONG_START" command to have the cmdValue string as follows:

"system|title|artist|album|genre|totalDuration|TrackNr|AlbumNr"


Quote

SpaceFractal .... please read and let me know if you agree:
Just thought I would mention this point......

I know your software is "PLAYLIST" based, so I would imagine when a playlist of songs are loaded and your software is simply cycling through each song to play it, then I would imagine your software would only ever send the following commands:

JUKE_SONG_START  <-- new song started
JUKE_SONG_FINISH  <-- new song finished

I would not expect your software to send any "JUKE_SONGLIST_xxxxx" commands at all when the songs are simply being cycled through one by one.  If this is not the case, then plugin authors are going to get pretty confused with how my software and your software  use the "JUKE_SONGLIST_xxxx" and "JUKE_SONG_xxxx" commands.

Basically, this could be a real problem in the SDK if we are using these commands differently. 

Quote
When they got a SONG_FINISH command, you might simply remove the song from the queue using REMOVE command. I guess that command is not actuelly needed, but leave it as it are !!
For my software the SONG_FINISH command is sent when the currently playing song is finished playing.   The SONG_FINISH command has nothing to do with a song queue.   Again, my "currently playing song" has already been removed from the song queue, so when it finishes playing I need to send "JUKE_SONG_FINISH"
 
Please DO NOT remove the "JUKE_SONG_FINISH" command. 


Quote
Juke_Command("JUKE_APP_OPENED","")

Juke_Command("JUKE_APP_CLOSED","")

I am assuming thee commands were removed since these are now being sent internally when the Initialize and Shutdown routines are being called for the plugin?




Quote
Juke_Command("JUKE_APP_GAINFOCUS","")
When the user just switched to this software to activate the WIndow.

Juke_Command("JUKE_APP_LOSTFOCUS","")
If the jukebox application lost focus.

I wish you would ask before you change the SDK around by adding new commands.   ::)

Anyway, I do not plan on supporting these commands and do not know why they are required.   I have a lot of child windows which can pop up which can then lose focus (or gain focus) if the user switches to another window to do something before returning back to my Jukebox software window.   Maintaining GAINFOCUS and LOSTFOCUS commands is something I am not interested in doing.

If you really think these are necessary, please explain in detail why you need them.



Quote
Juke_Command("JUKE_SONGLIST_ADD_SONG",
"system|postition|title|artist|album|genre|totalDuration|TrackNr|AlbumNr|more")
Add a song into that position in the queue.

Some Jukebox Software might add a song directly as a first song, so it play directly. Here set a value to 0.
If a positionis to big, it would just added next to the queue.

Info about arguments:

    * Auto means if it was added by the "USER", "RANDOM" or by "SYSTEM".
    * TrackNr and AlbumNr is the same values gave by DIGIT COMMANDS.
    * Some songinfo "tags" might been empty if not used.
    * Some songs might not even contain TotalDuration if it is unknown.
    * If more songs is going to submit at once, the more vaule is set to 1. The last submitted song would have a value set to 0.


I would recommend "removing" everything in RED because:

1) There are no DIGIT_COMMANDS

2) I have decided not to use the "more" value text after all, so probably no longer needed.  If you want to keep it in case you think someone might want this functionality in the future, then this is fine.  Just thought I would tell you I decided not to use it for myself.

Quote
TOTAL SONG DURATION
I was looking at my code yesterday and it is not feasible for me to provide totalDuration values in the JUKE_SONG_START or JUKE_SONGLIST_ADD_SONG commands.     The media player does not tell me this information until after the player has started processing a bit (long story).  Anyway, I really need you to add this information back into the followin command:

Juke_Command("JUKE_SONG_PLAY_POSITION", curPosSecs|totalDuration)

This really should not be a problem for any jukebox software.   If other software do not want to provide this information, then just leave it as a NULL string, however, I do need it since this will be the only way to get the song's totalDuration to the plugin.



Quote
PLEASE CONFIRM SOMETHING FOR ME

All the Juke_Command("JUKE_KEY_EVENT_CREATE","KEY_EVENT_NAME") commands which are sent to the plugin will define events used by the specific jukebox software only.  The plugin will remember these events so it can populate a listbox in it's configuration window to allow the user to map things to these commands such as "sounds".    When the key event occurs in the jukebox software, then the Juke_Command("JUKE_KEY_EVENT_SEND", "KEYEVENT") command is sent to the plugin and then plugin can then look the event up in it's list and play the "sound" file.

If this how it works, then the plugin will never know what each KEY_EVENT really does or what each KEY_EVENT value is related to within the jukebox software.   Basically, the plugin never sends these KEY_EVENT events back to the jukebox ever, since they have no idea what they mean so it would be impossible for the plugin to send them back.  Are all of these statements correct?

If all of my comments are correct, then when the plugin wants to send a command to the jukebox software (ie: pause the song, skip the song, etc....) then the plugin must be using the standard set of commands (ie:  "JUKE_SONG_PAUSE", "JUKE_SONG_SKIP", etc..).     Is this correct?

If this is correct ...... then how will the plugin inform the jukebox software that specific digits have been entered?  Will the plugin use the standard "JUKE_ENTER_ALBUM_VALUE" and "JUKE_ENTER_TRACK_VALUE" commands? 

If so, then how will the plugin know how many digits make up an album number or track number.   My jukebox software always requires 5 digits for the album number and 3 digits for the track number no matter how many albums or tracks are loaded.

For example: If only one album with one track was loaded in my software, and the user wants to request the track to be played by entering the digits manually, then the suser would need to enter the following 8 digits:

albumNum = 00001 and  trackNum = 001

Now, some software might not require the user to enter the leading zeroes so entering the same album and track number on other software might only require the following:

albumNum = 1  and trackNum = 1


My whole point is ....... :P

I think the plugin must know how many digits are required for albumNum and trackNum values if the plugin is going to send the "JUKE_ENTER_ALBUM_VALUE" and "JUKE_ENTER_TRACK_VALUE" commands back to the jukebox software.

I know this was a long explanation, but I think it was needed so people would understand what I am saying better.

I think a new command might need to be created to inform the plugin of all max/min values which it will need to know ...... something like this (we can even have the volume min/max values moved into this command):

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



Keep in mind some jukebox software might allow the user to enter "0003", "003", "003" or "3" to indicate an album or track since it will simply trim off the leading zeroes automatically.  My software does not do this since it is smart enough to realize that after 5 digits have been entered for the album number then the next digits being entered must be for the track number.   Anyway, this is why we need the "min" and"max" values for each albumNumDigitsRequired and trackNumDigitsRequired data.
« Last Edit: January 11, 2008, 02:29:46 pm by unclet »

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Plugins: A Command List using by Jukebox Plugins (!! V1.0b3 Update !!)
« Reply #199 on: January 11, 2008, 12:22:32 pm »


In the future, I make all new commands and arguments as red when I update the sdk. I did not about  totalduration this time.

JUKE_FEATURE_RANDOM_MODE, why not JUKE_FEATURE_AUTOPLAY(mode) to been more generic?

mode$ can been any string, and then just show to the user? When it disabled, the string would just been NULL. In MultiJuke I have more Random and Radio options, both can use such a AUTOPLAY to tell about it.



I wont not want to change JUKE_SONG_START...

BUT

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

Numberofsongs=Juke_Command("JUKE_SONGLIST_CHECK")

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

This mean a plugin can use both PLAYNOW and PLAYNEXT informations without using queue (example).

I could also just add a return value with JUKE_SONGSTART, that tell number of "queue" resubmits?



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


yes, they does the same thing. HeadKaze (as plugin writers wont use them, and I accepted that.



About the focus thing is ONLY meant to been the main windows, not all internal windows you might have... Like when they switched application. No use in fullscreen applications.

But should I remove them?




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.




no DIGIT COMMANDS? It's JUKE_ENTER_ALBUM_VALUE and JUKE_ENTER_TRACK_VALUE.....



I correct rest, since they are errors.



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

That is toally up to the user to tell the plugin, that they should do with the commands, and that they are named to been real use. That is why plugin configuration absolutty is 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.







« Last Edit: January 11, 2008, 01:18:06 pm by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.