The NEW Build Your Own Arcade Controls

Main => Software Forum => Linux => Topic started by: meduza on December 04, 2018, 07:32:38 pm

Title: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on December 04, 2018, 07:32:38 pm
After several months of working in my spare time, I’d like to share this little program I created to handle the LEDs on my arcade box, right now is on beta phase and even while still on development it is mature enough to be used.
Most of the features are working:

I have been using it for several months and I feel it is ready for the community to be used and tested.
Right now I’m supporting two adapters but I can add more easily (I just don't have the hardware to test), I’m working on finishing the code for the LED-Wiz one (I hope) this week.
You can get the code using git from sourceforge (https://sourceforge.net/projects/ledspicer/) or GitHub (http://"https://github.com/meduzapat/LEDSpicer")
To test is, I left a lot of documentation in project the wiki.

Here some videos of the program working:
Profiles
(https://i9.ytimg.com/vi/FMgF6B2j2CA/mq3.jpg?sqp=CPLOwfIF&rs=AOn4CLB8pt-UKi2zph6HUPsNvR4lONGI3Q) (https://youtu.be/FMgF6B2j2CA)
Mame Integration
(https://i9.ytimg.com/vi/L17FuAiQHOE/mq2.jpg?sqp=CJ7PwfIF&rs=AOn4CLDYHLOTPKioxdhXt-LMwBRNgKsHbA) (https://youtu.be/L17FuAiQHOE)
Sound effects
(https://i9.ytimg.com/vi/l4lzksatgVA/mq2.jpg?sqp=CMHPwfIF&rs=AOn4CLAQcfEDMCZvAyZhDkd7y1xESrRTcw) (https://youtu.be/l4lzksatgVA)
Game detection
(https://i9.ytimg.com/vi/DbuePBl1W0Y/mq3.jpg?sqp=CLLQwfIF&rs=AOn4CLAzaNognb0lBtEJH4_v5V2br-2Plg) (https://youtu.be/DbuePBl1W0Y)
Different sound effects for karaoke mode
(https://i9.ytimg.com/vi/ucLmHIqVq0c/mq2.jpg?sqp=CIvQwfIF&rs=AOn4CLArqR7quopyT1ozZUAfdVN22acyqQ) (https://youtu.be/ucLmHIqVq0c)
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: Jimbo on December 05, 2018, 03:36:33 am
Hi

One thing I missed from RGBCommander, was the ability to use system audio streams to adjust the LED brightness... so for example you could have inactive buttons (i.e. buttons not lit for the current game)  flashing in time with music beats, sound effects etc.

Just like the windows LEDBlinky software does here:  https://www.youtube.com/watch?v=Tcuan9aMQ90 (https://www.youtube.com/watch?v=Tcuan9aMQ90)

Any plans to add this functionality?

Cheers

Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on December 05, 2018, 11:57:12 am
Yes, actually I started working on the dynamic modules (the ones that feeds from external sources) and an Actor that feeds from sound is kinda easy to implement, I will add this to the TODO list that right now is:
Human Input (buttons, joysticks, etc will turn lights on)
MAME input, will digest the Mame output
And this one that will feed from sound waves
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: Jimbo on December 05, 2018, 11:58:37 am
 :cheers: looking forward to trying it
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on December 05, 2018, 03:29:27 pm
What device you are using Jimbo?
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: Jimbo on December 05, 2018, 03:33:44 pm
2 x ipac ultimate io's, different device number programmed on each of them so I can use all the inputs and led outputs on both.
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on December 05, 2018, 06:21:10 pm
ultimate is 100% supported.

I need to work on the Ipac 2 and 4, and if needed on the oldies.
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on December 13, 2018, 10:41:18 pm
:cheers: looking forward to trying it

question: do you use pulseaudio?
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on December 22, 2018, 07:34:57 pm
I finished the audio plugin for LEDSpicer, it have three modes:
VU meter:
In this mode the sound is spitted into channels and displayed like a linear VU meter, in the configuration you can select what channels will use, Left, Right or Both (check the wiki for more information)
https://www.youtube.com/watch?v=l4lzksatgVA (https://www.youtube.com/watch?v=l4lzksatgVA)

VU Levels:
Every element in a group follows a different peak on the sample
https://www.youtube.com/watch?v=xCQpJldxg-E (https://www.youtube.com/watch?v=xCQpJldxg-E)

And Single mode:
In this mode all the lights follows the same peak
https://www.youtube.com/watch?v=wnzuR74M6oc (https://www.youtube.com/watch?v=wnzuR74M6oc)

All the colors can be selected on the configuration check the WIKI at: https://sourceforge.net/p/ledspicer/wiki/Home/ (https://sourceforge.net/p/ledspicer/wiki/Home/) for more information
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: Jimbo on December 23, 2018, 01:54:48 pm
Hey hey!

Nice christmas present!  :applaud:

I will try this over the next week or so!

Thanks  :cheers:
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on December 25, 2018, 11:02:16 am
Hey hey!

Nice christmas present!  :applaud:

I will try this over the next week or so!

Thanks  :cheers:

The plugin pulseaudio will not get any sound form the sound card if you run the daemon as root, except that the pulseaudio is running systemwide, I not sure how to solve this issue, just run it as a normal user app (on user login?) and it will work just fine.
I created some profiles for 2 players games with player 3 and 4 doing sound effect and looks nice!

Merry Christmas for you and all here :)
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on January 29, 2019, 08:03:07 pm
Yesterday I finished the driver for the led-wiz 32 LEDs board
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: Gideon on February 03, 2019, 12:31:51 pm
You seem to be doing a great job with this.  Not everyone is diligent enough to take code to the next level with documentation, build files, proper hierarchy of files... I wish I had some hardware to test right now.  :-\
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on February 10, 2019, 04:01:52 pm
You seem to be doing a great job with this.  Not everyone is diligent enough to take code to the next level with documentation, build files, proper hierarchy of files... I wish I had some hardware to test right now.  :-\

Thank you  :D

I like to do things right :)

You can run the program on DRY MODE that connects to no hardware at all, only displays the LEDs status on the terminal, but is boring as hell  :lol

Last weekend I tested the code in my rpi and it works perfectly.

I'm finishing the pacled64 driver right now
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on March 11, 2019, 01:57:09 am
Version 0.3.4 completed.
This version introduces LedPac64 driver, some small improvements and minor bug fixes.
Is working amazingly on my cabinet 🥳.
Now I working on version 0.3.5 that will add an experimental driver for NanoLed, I means experimental because I don't have a device to test it yet, but the code is very similar to the pacled64. if someone is brave enough to help me test it I will really appreciate it 😁
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on February 04, 2020, 08:56:34 pm
Sorry long time I not posting here:

New version of LEDSpicer 0.39.0, it include several new features, check the FB for more information
I also created some DEB files for PC and Raspbian for easy install (they need testing and feedback)

here a demo of the new sound plugin (Waves)
(https://i9.ytimg.com/vi/ucLmHIqVq0c/mq2.jpg?sqp=CJmMpvIF&rs=AOn4CLBqiQCy-ENV5dJ4B9MC4rVA-jmQFA) (https://youtu.be/ucLmHIqVq0c)
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: Substring on February 06, 2020, 05:24:12 am
Hi,

I'll make a arch linux package for groovyarcade in the coming days  :)
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on February 06, 2020, 05:14:17 pm
Hi,

I'll make a arch linux package for groovyarcade in the coming days  :)

Cool, let me know if you need any help :)

I'm working on supporting the Howler Controller right now :) I know is not in the stores anymore but may help several users.
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: Substring on February 06, 2020, 06:05:32 pm
Besides some Arch specific problems, one bugs me for now https://github.com/meduzapat/LEDSpicer/blob/development/configure.ac#L135
I had to change [libusb-1.0 >= 1.0.~] to [libusb-1.0 >= 1.0] otherwise libusb 1.0.23 was considered missing by the system. I'm absolutely no autoconf pro, but this helped me pass the libusb check. I'll give some more news later :)

The main problem is that I don't have any led board, but got someone who can test that for me eventually
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on February 06, 2020, 06:57:19 pm
Besides some Arch specific problems, one bugs me for now https://github.com/meduzapat/LEDSpicer/blob/development/configure.ac#L135
I had to change [libusb-1.0 >= 1.0.~] to [libusb-1.0 >= 1.0] otherwise libusb 1.0.23 was considered missing by the system. I'm absolutely no autoconf pro, but this helped me pass the libusb check. I'll give some more news later :)

The main problem is that I don't have any led board, but got someone who can test that for me eventually

I will update the configure.ac change, makes sense.

You can use DRY RUN to run the program with any controller adding
Code: [Select]
CPPFLAGS='-DDRY_RUN=1' to the configure command line.
That will make the program avoids opening the USB device and instead send the output data to the terminal, that way you will be able to see that is working.
ex:
Code: [Select]
./configure --prefix=/usr --sysconfdir=/etc CXXFLAGS='-g3 -O0' CPPFLAGS='-DDRY_RUN=1' --enable-develop --enable-pacdrive
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: Substring on February 07, 2020, 03:38:23 am
No hurry for configure.ac, it's patched for now on my side until you make a new release.

And thank you for the tips, at least I'll be able to validate that the installation went fine ! I'll give you the conclusion of all that ;)
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: Substring on February 07, 2020, 12:50:00 pm
So, ledspicer is packaged, I think all files are now in the good place. The daemon complains with
Code: [Select]
Program terminated by error: Unable to read the file /usr/share/ledspicer/.xml Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename=/usr/share/ledspicer/.xmlOk, I guess it's not configured the right way. Would you mind giving me the steps so I can test in dry_run mode ?
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on February 16, 2020, 01:16:21 pm
that is the colors file most likely, use one of the config files from here (https://sourceforge.net/projects/ledspicer/files/configurations/)
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: beernut on February 23, 2020, 11:44:25 am
Thanks for this!  It is just what I needed to get my Q*Bert knocker working with groovymame and Ultimarc's PacDrive.

It was somewhat confusing on how to set it up since I didn't need any of the animation or color stuff but I finally figured it out.  In case anyone else wants to save some effort here is my ledspicer.conf:
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<LEDSpicer
        version="1.0"
        type="Configuration"
        fps="15"
        port="16161"
        colors="basicColors"
        logLevel="Info"
        userId="1000"
        groupId="1000"
>
  <devices>
    <device
        name="UltimarcPacDrive"
        boardId="1"
        >
      <element
          name="KNOCKER_0"
          led="1"
          />
  </device>
  </devices>
   <layout
        defaultProfile="default"
        >
     <group name="knocker">
       <element name="KNOCKER_0"/>
     </group>
   </layout>
</LEDSpicer>
And my default.xml profile (in /usr/local/share/ledspicer/profiles)
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<LEDSpicer
        version="1.0"
        type="Profile"
        backgroundColor="Black"
        >
  <inputs>
    <input name="Mame"/>
  </inputs>
</LEDSpicer>
and my Mame.xml input (in /usr/local/share/ledspicer/inputs)
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<LEDSpicer
    version="1.0"
    type="Input"
    name="Mame"
>
        <map
            type="Element"
            target="KNOCKER_0"
            trigger="knocker0"
            color="White"
            filter="Normal"
        />
</LEDSpicer>

Note that even though you are not using colors you need to specify and install the basicColors.xml otherwise you will get a missing ".xml" error.

Anyway, thanks again.

Mark
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on February 24, 2020, 06:31:32 pm
You did it perfectly Mark :applaud:, yes, on the pacdrive, White color will act as an ON, while Black will act as an OFF (actually any color that pass the changePoint value will act as an ON)
I will do the same with a pacdrive I just need the knocker

let me know if you need help setting something else, but looks like you are clever setting this up.   :cheers:

BTW, on the last version I added a colors file only for pacdrive users (only have two colors White and Black)
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: SteelRush on March 26, 2020, 11:05:07 am
Having an issue with 0.4.1 and the PacDrive.  The profiles change properly, but the buttons momentarily flash, and stay off.  They worked properly in 0.4.0.

ledspicer.conf
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<LEDSpicer
version="1.0"
type="Configuration"
fps="10"
port="16161"
colors="basicColors"
logLevel="Debug"
userId="1000"
groupId="1000"
>
<devices>
        <device name="UltimarcPacDrive" boardId="1">
            <element name="P1_BUTTON1" type="button" led="1"/>
            <element name="P1_BUTTON2" type="button" led="2"/>
            <element name="P1_START" type="button" led="3"/>
            <element name="P2_START" type="button" led="4"/>
            <element name="P1_CREDIT" type="button" led="5"/>
            <element name="P2_CREDIT" type="button" led="6"/>
        </device>
</devices>
    <layout defaultProfile="default">
        <group name="P2_B0">
            <element name="P1_START"/>
            <element name="P2_START"/>
            <element name="P1_CREDIT"/>
            <element name="P2_CREDIT"/>
        </group>
        <group name="P2_B1">
            <element name="P1_START"/>
            <element name="P2_START"/>
            <element name="P1_BUTTON1"/>
            <element name="P1_CREDIT"/>
            <element name="P2_CREDIT"/>
        </group>
        <group name="P2_B2">
            <element name="P1_START"/>
            <element name="P2_START"/>
            <element name="P1_BUTTON1"/>
            <element name="P1_BUTTON2"/>
            <element name="P1_CREDIT"/>
            <element name="P2_CREDIT"/>
        </group>
    </layout>
</LEDSpicer>

Profile example P2_B1
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<LEDSpicer
    version="1.0"
    type="Profile"
    backgroundColor="Black"
>
    <alwaysOnGroups>
        <group name="P2_B1" color="White" />
    </alwaysOnGroups>
</LEDSpicer>

Any suggestions?
Title: Re: LEDSpicer - Arcade LED Control and Animation software for linux
Post by: meduza on October 20, 2020, 11:23:16 am
Sent you a MSG