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: Tools by Space Fractal :: Jukebox Event Test  (Read 7906 times)

0 Members and 1 Guest are viewing this topic.

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: Tools by Space Fractal :: Jukebox Event Test
« Reply #40 on: February 16, 2008, 12:16:53 pm »
Here is the update to get VolumeSet and VolumeMute better to work (read previous post)...

Make sure "VOLUME" and "MUTE" texts can been found in a PLUGIN_EVENT, when you define it. The same goes for VOLUME SET, which the plugin search for "VOLUME" and "SET" or "VOLUME" and "CHANGE".

For some reason Uncle'T Jukebox (I "still" using 3.04) dosen't send a startup volume value to the plugin under startup? Hence (mightbe) nothing I can due until it fixed, so it still show 0 under Volumeset and not the current volume asit should.

I update soon on the homepage.
« Last Edit: February 16, 2008, 06:50:10 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:March 17, 2025, 11:51:15 am
Re: Plugins: Tools by Space Fractal :: Jukebox Event Test
« Reply #41 on: February 16, 2008, 04:18:31 pm »
If you grab v3.08 of my software then a VOLUME_CHANGE event is now sent to the plugin at startup to indicate the current volume level

Let me know if it works since I threw it in there quickly for you .... gotta go now...

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: Tools by Space Fractal :: Jukebox Event Test
« Reply #42 on: February 16, 2008, 05:47:34 pm »
OK  :P

Mute/Unmute Fixed: Thanks Space Fractal  ;D

Volume level set on startup fixed: Thanks UncleT  ;D

The VOLUMESET is still a problem. It does not work every time (about 75% for me)

It seems like the command is missed sometimes. You guys should try it.

THis could be a design fault with the JPS system  :dunno It seems to work better if the polling is set higher? I would have thought that that would just add delay not potential failure? 

Anyway in this case it is more annoying because Space Fractals plug-in does not appear to re-send the command if you click ok again? You need to change the value before it will work.

Any Ideas?

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: Tools by Space Fractal :: Jukebox Event Test
« Reply #43 on: February 16, 2008, 06:22:52 pm »
Just looked on it:
 VOLUMESET problem is just a minor bug in the plugin, not in Uncle'T Jukebox. Fixed.

You now need to press t he OK button, before the value change, not just with TAB. Before the OK buttton didden't actuelly works in the correct way.

Released on both homepage and here.

But I can't Release a VolumeUp and VolumeDown event either, while the slider is moving? This seen UncleT Jukebox does not check JUKE_PLUGIN_EVENT_GET events, while it on and moving? THe Release is only checked when the slider is finish moved (position 0 or 100). Please Note: This is not effected the above VolumeSet bug.

NB. MultiJuke checking commands 30 times per seconds (since it run at 30 FPS),  which is why I priotity JUKE_PLUGIN_EVENT_GET highest in the parser, just after VOLUME_MUTE and VOLUME_CHANGE commands. I asume this is the most used command.
« Last Edit: February 16, 2008, 08:26:59 pm 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: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: Tools by Space Fractal :: Jukebox Event Test
« Reply #44 on: February 16, 2008, 07:46:52 pm »
OK That works perfectly now  :notworthy:  ;D

Even with the event request frequency set to 2 secs. That command is delayed but it still works  :-)

You may wonder why am am being so 'anal' about this?

Well the reason is I want to know what to expect as normal operation of JPS as apposed to a Bug or my missunderstanding of the way it works   :P

Don't worry about the volume slide, I get it  ;)

Thanks again

Was the Bug you found in your plug-in anything I could learn from? Is it 'tricky' to get it to 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: Tools by Space Fractal :: Jukebox Event Test
« Reply #45 on: February 16, 2008, 08:22:12 pm »
I got the problem and fixed it. The main reason, UncleT Jukebox might send a another command to change a value (VOLUME_SET) and got the JUKE_PLUGIN_GET string deleted. Hence the jukebox software just got a empty string.

This can been sometimes a nightmire when using strings in threads, but seen to works ok. I do hope UncleT add a another JUKE_PLUGIN_GET just before VOLUME_CHANGE command to make sure the plugin actually have a string to return (if any).

To the last question, not sure what you tell here? The mean reason I use OK button is due to a Pure Basic bug when Lost Focus is NOT send when TAB is used in a String Gadget, and then move directly to a another String Gadget. In Visual Basic, you should not have that problem.
« Last Edit: February 16, 2008, 08:29:19 pm 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: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Plugins: Tools by Space Fractal :: Jukebox Event Test
« Reply #46 on: February 16, 2008, 09:19:53 pm »
Kewl  ;D

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:March 17, 2025, 11:51:15 am
Re: Plugins: Tools by Space Fractal :: Jukebox Event Test
« Reply #47 on: February 16, 2008, 10:18:33 pm »
Quote
The main reason, UncleT Jukebox might send a another command to change a value (VOLUME_SET) and got the JUKE_PLUGIN_GET string deleted. Hence the jukebox software just got a empty string
Not real sure what you are trying to say here.  However, it is true that my jukebox software can send the JUKE_VOLUME_CHANGE command to the plugin at any time. 

Also, I never send a PLUGIN_EVENT_VOLUMESET "to" the plugin ever ..... this event is only ever sent "from" the plugin to the software.

Quote
I do hope UncleT add a another JUKE_PLUGIN_GET just before VOLUME_CHANGE command to make sure the plugin actually have a string to return (if any).
Not sure what you mean here either.

 The JUKE_PLUGIN_EVENT_GET is sent to the plugin  continuously at the specified interval time (ie: every 200ms, 400ms, 500ms, etc...) . This interval is set in my Options/Plugin page.   The sending of the JUKE_PLUGIN_EVENT_GET command to the plugin is not related to me sending a VOLUME_CHANGE or any other command to the plugin at all.

Please explain what you think I am missing.  I do not understand this.


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: Tools by Space Fractal :: Jukebox Event Test
« Reply #48 on: February 17, 2008, 04:40:55 am »
I just asked to add a extra JUKEBOX_PLUGIN_GET check, just before JUKE_VOLUME_CHANGE to make sure the plugin didden't delete the returned string (which was happens for the slider problem).

I do got that bug fixed, so no worries UncleT...



BTW, when you send a  JUKE_VOLUME_CHANGE, it automatic changed to a "PLUGIN_EVENT_VOLUMESET" event in the plugin parser code. This is due it found a VOLUME and SET text in a PLUGIN_EVENT_VOLUMESET, when you defined it. I do that, because the windows it self, can't check for JUKE_VOLUME_CHANGE.
« Last Edit: February 17, 2008, 04:51:40 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:March 17, 2025, 11:51:15 am
Re: Plugins: Tools by Space Fractal :: Jukebox Event Test
« Reply #49 on: February 17, 2008, 08:35:21 am »
Quote
when you send a  JUKE_VOLUME_CHANGE, it automatic changed to a "PLUGIN_EVENT_VOLUMESET" event in the plugin parser code.
This seems to be misleading .... plugin authors (like Loadman) are going to think my software sends the plugin a PLUGIN_EVENT_VOLUMESET event but this is not the case.  My software sends a JUKE_VOLUME_CHANGE command "to" the plugin and your test app changes it to a PLUGIN_EVENT_VOLUMESET event automatically. 

Once your test app is removed from the testing then the plugin is not going to work properly since it will never receive a PLUGIN_EVENT_VOLUMESET event from my software.

Would you agree?

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: Tools by Space Fractal :: Jukebox Event Test
« Reply #50 on: February 17, 2008, 09:53:27 am »
The Plug in actually works with your software, if you tested using the newest version.

Loadman also confirmed it.

So it more the technical part, how the plug in works, you might misleading me, so look in the source, what I mean:

Quote from: spacefractal

ProcedureDLL.l Juke_Command(Command.l, value.l)
    ; here goes some convertning code from pointer to string (CommandStringLocal$=Command. EventStringLocal$ = value).
    ...
    ...

    ; First part of the parser
    If UCase(EventStringLocal$)="ON" Or UCase(EventStringLocal$)="TRUE"
      CommandStringLocal$="JUKE_PLUGIN_EVENT_SEND" : EventStringLocal$=VolumeMute$+"|ON"
    EndIf

    If UCase(EventString$)="OFF" Or UCase(EventString$)="FALSE"
      CommandStringLocal$="JUKE_PLUGIN_EVENT_SEND" : EventStringLocal$=VolumeMute$+"|OFF"
    EndIf
  EndIf
 
  If CommandStringLocal$="JUKE_VOLUME_CHANGE"
    VolumeChange=Val(StringField(EventStringLocal$, 2, "|"))
    If VolumeSet$<>""
      CommandStringLocal$="JUKE_PLUGIN_EVENT_SEND"
      Number$=StringField(EventStringLocal$, 2, "|")
      EventStringLocal$=VolumeSet$+"|"+Number$
    EndIf
  EndIf

  ; Here I checks for JUKE_PLUGIN_EVENT_SEND and JUKE_PLUGIN_EVENT_GET commands as normal in the plugin.
  ...

That above wrapper is needed, otherwise the volume mute button won't change its content, since its only look for the JUKE_PLUGIN_EVENT_GET event. I recommend look to the source code I have included, how the whole plug in works.

Loadman might not need to use a wrapper code like this of course... It depend the plugin he actuelly write and which commands he choiced to been used.
« Last Edit: February 17, 2008, 10:06:44 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:March 17, 2025, 11:51:15 am
Re: Plugins: Tools by Space Fractal :: Jukebox Event Test
« Reply #51 on: February 17, 2008, 10:26:37 am »
Yeah, let me see if Loadman has any problems with his plugin or not.  I think as long as Loadman knows how my software works then his plugin knows what events to expect.