PC Software Options for Adalight – Processing vs Prismatik

Once the LED strip has been soldered together and attached behind the monitor, the next step is to configure the software on the PC. The communication protocol for Adalight is quite simple, which means there is a variety of PC software that can send color information to the Arduino. There are other options, but the two I’ll cover are Processing and Prismatik.

Processing

Processing is what Adafruit used in their original Adalight setup. Processing is not a standalone ambilight software package, but in fact a media-oriented development environment based on Java.

Processing 2.2.1: Adalight Sketch

To get Processing working, you need to download the 2.2 IDE (Adafruit says users have reported problems with newer versions) from the processing.org website here. You will also need the Adalight sketch from Adafruit’s Github repository.

Setup for the Processing sketch is a bit complicated. If the Arduino’s serial port isn’t the first in the serial list, you’ll need to find and change the index number after Serial.list(). On my system the Adalight device uses the second serial port, so I needed to change the index number from “0” to “1”.

You’ll also need to set up the number of LEDs and their positions.  This is done in two places: a display array and a per-LED array. These keep track of the total number of LEDs on an XY coordinate plane, as well as their respective positions. For the individual LEDs order matters: the first LED listed is the one that receives data first. On my system that’s the LED in the bottom-right, closest to the monitor stand.

These are the parameters for my setup:

With the serial port and LEDs configured, press the “Run” button in the top left and the program will start pushing data. I was expecting it to be clunky, but to my surprise it works quite well. The Processing sketch includes both a debug framerate and a display pane that tells you the colors of every given LED and their position. I tried a few different programs, including a movie and a fullscreen video game. All of them worked flawlessly with no tweaks.

Processing: The Grand Tour in Adalight

That’s about the extent of the good news. The bad news is that the Processing sketch is fairly barebones – it only has a few configuration options, and it has no way to set color balance, gamma, or over-brightening. Worse than that, it’s a resource hog: for 20 frames per second, the application used an average of 12% of my CPU and 200MB of RAM.

Processing is a development environment, so I have no doubt that if you spent considerable time rewriting the Adalight code you could improve its efficiency and add the missing features. Though as an off the shelf solution it leaves a lot to be desired.

Prismatik

Enter Prismatik – an open-source software for ambilight devices that works with Adalight. Compared to the Processing sketch, Prismatik has many more configuration options including more advanced darkness compensation, gamma correction, and the ability to set color balance. It’s also significantly more lightweight: using less than 1% of my CPU and fewer than 40MB of RAM to produce the same framerate as the Processing sketch.

Prismatik: Mode Screen

You can download Lightpack’s Prismatik from their website here, though I would recommend another version. Prismatik is open source software, and one user named Patrick Siegler decided he could improve it, adding features such as DirectX grabbing, 64 bit support, and an audio visualizer. He also incorporated the Windows Desktop Duplicator API for color grabbing, which he says significantly increases performance.

Having compared both builds, I’ve found that Patrick’s version works much better.  You can find downloads for both the installer and source files at the forked Github repository here. As of this post, the current version is 5.11.2.11.

Configuring Prismatik is a snap. Under the “Device” category there is a configuration wizard. Set the serial options, RGB color format (remember that the Arduino takes care of the GRB transformation for the WS2812B LEDs), and then arrange the LEDs and capture zones. For my setup the auto arrangement in the “Andromeda” pattern works almost perfectly. You can also chose “Cassiopeia” if you have no LEDs on the bottom edge, or “Pegasus” if you have none on either the top or bottom. Patrick Siegler’s version added a “Custom” arrangement option, where you can set the number of LEDs in each segment (top, side, bottom), capture width, and set a gap for stand width at the bottom.

My custom 80-pixel setup on my Dell S2415H is as follows:

Once you click “Finish” your lights should click on! Easy! The software isn’t without its bugs – the lights don’t always reflect the current profile, and the “on/off” button occasionally glitches out. But by and large, it’s a big improvement over the Processing sketch.

Conclusion

With basic configuration done in either Processing or Prismatik, the ambilight is working! Play with the LEDs for a bit – drag a window around the screen, load up a colorful video, or play a game. Don’t be afraid to tweak things if they seem off (e.g. if an LED is in the wrong position, or the LEDs display green when there is red on the screen). In Processing you can stop the code and make updates, and in Prismatik you can re-run the configuration wizard at any time. If your lights aren’t working, make sure the LEDs have power, you selected the right serial port, and in Prismatik that the lights are turned “on”. If you see flickering, try another USB cable or another USB port.

This post is part of a series on creating a DIY ambilight using Adalight and WS2812B LEDs. Check out the project page here.

Next up: Part 4 – Calibrating Ambilight Color in Prismatik


An Aside: AmbiBox

When I was doing my research for this post I came across AmbiBox, a program which came recommended by a number of people. I tried both AmbiBox 2.1.7 and AmbiBox 2.1.0, and neither worked well. The software was clunky, slow to respond to inputs, and either threw errors or crashed when setting the pixel configuration. It’s possible these issues were permissions-related due to not running the program as administrator, but a blind exe provided by a Russian developer with “tons of features” and no documentation that needs admin permissions sets off alarm bells for me. If you’re successfully using AmbiBox with Adalight more power too you – but I’m not interested.

 

3 thoughts on “PC Software Options for Adalight – Processing vs Prismatik”

  1. Hi! I’m currently building 78 led strip Ambilight for my MacBook Pro 15″ 2017 with screen size 2880×1800 221 ppi and using Prismatik 5.11.2.13 (by psieg) I can’t configure the screen size capture correctly, it maps to a smaller size: 1680×1056 px in the top left screen corner, so I get only this screen area mapped and displayed on the led strip. Is it a problem in Prismatik app running it on High Sierra OS? I didn’t find the solution to this issue, so I really hope you could help me with this, so looking forward for your reply!
    Btw, I’v managed to power my 78 led strip and send signals to Arduino Nano just via one USB-C port (5V 3A max) on MacBook which is really cool because I don’t need any additional external power adapters for the strip.

    Dmitry

    1. Unfortunately I can’t help. That sounds like an issue with Prismatik itself, I’d recommend creating an issue on GitHub.

Leave a Reply

Your email address will not be published. Required fields are marked *