BlinkStick AmbiLight - A real AmbiLight for Flex and Pro


#1

Hello to all BlinkStick friends!
Today I would like to share with you my latest project: A real BlinkStick AmbiLight.

Instead of calculating only one average color for the whole screen, the new tool is able to calculate average colors for given regions and sending them to the BlinkStick LEDs.
There are already a lot of Ambilights on the market, for Arduino, Raspberry or other DIY stuff. But what I missed is one for my favorite RGB LED device BlinkStick.

Long story short, just take a look at the screenshot of the main window:

The tool should be able to find the first BlinkStick connected when starting it. Otherwise you can change the device in the settings. Most of the options are self explained (I think). Set up the LEDs for every side of your screen and set up a size (Default 30 pixel) for the width and height of the regions. The shift option is for changing the first LED (Index 0). This is the place where LED strip is connected to the USB cable behind your screen. The connection point is shown as ->0 in the region.
The “Screen Preview” will automaitcly be switched off when closing the main window (BlinkStick AmbiLight stays in the TNA), to save CPU usage.

The tool supports up to 32 LEDs (Flex) and up to 64 LEDs (Pro). Please keep in mind that you have to care about the power supply when using a BlinkStick Pro.
On my test PC I have a Flex. 14 LEDs at the top and 9 on the left and also on the right side.

A video showing BlinkStick AmbiLight in action can be downloaded here:
BSAmbiLight

Please find the very first version below. I´m still working on some issues regarding CPU usage and region calculations when using many LEDs. I´m also experimenting with different functions for getting the screen colors etc. If you can live with it, feel free to download the setup, install it and report any suggestions and issues here in this thread.

BSALSetup.exe
(Version 1.0.3)

Note: The BS Pro device will be set to mode 2 automaticly which is neceassary for BSAL to run. Modes 0 and 1 are not supported so you need a Pro with addressable LEDs.


New version under the download link above:

ChangeLog 1.0.3

  • ! Fixed an AccessViolation that could occur with some screen resolutions.
  • ! Fixed the “screen double” bug (reported by user Doffi)
  • ! Fixed a possible memory leak.
  • Reduced stuttering of BSAL when screen preview is off.
  • Minor tweaks.

ChangeLog 1.0.2

  • Added brightness control for the device.
  • Added static color mode.
  • Added Ambilight screen mode. This mode sends the average color of the whole screen to all LEDs.
  • Now BSAL can be started only once.
  • Improved region handling (especially if one or more sides of the screen are not equipped with LEDs).
  • Improved CPU usage

Project source codes:


Ambilight intensity
#2

Hi p0ke, Amazing project and works well in 1920x1080(16:9 aspect ratio). There is a problem im having when using 2560x1080(21:9 aspect ratio) screen. The vertical ambilight regions work but horizontal length is displayed 4 times side by side. The preview feature also displays it like that. Is there a way to use other than 16:9 aspect ratio?


#3

Hi Doffi,

thanks for your feedback.
Could you attach a screenshot of the main window with the preview and your settings please?


#4


#5

Cool effect :smile:

Could you please test a special version, I´ve fixed a problem regarding aspect ratio there. But I´m not sure if this can also fix your issue. I don´t have a chance to reproduce it. Can´t set this resolution on my system.
https://dl.dropboxusercontent.com/u/19452479/BlinkStickAmbiLight.zip
Please rename your old BlinkStickAmbiLight.exe and put that one in your BSAL folder.
Start it and tell me if anything have changed.

Thanks


#6

Thanks p0ke, This completely fixes the problem regarding aspect ratio. Now that i started using the software i did notice another problem. when i have the program running im getting very low framerate and lots of stuttering issues. same thing as in this thread https://forums.blinkstick.com/t/low-framerate-when-using-ambilight/92.


#7

Hey Doffi,
I´ve tested the AmbiLight on a few different machines and cannot see a general framerate issue.
But moving the window of the tool itself could stutter because if the ambilight thread. Normally this window should be hidden when running the ambilight (close the main window, it runs in the notification area).
I do not have any issue when watching videos or playing games while amblight is open in the background.
Could you confirm that only the tool itself is stuttering or did the whole desktop become slow?


#8

Low framerate: Tool only
Stuttering: Whole desktop

Stuttering also happens with Blinkstick client. Its subtle so most people probably wont even notice it. My eyes are made of something that sees every single annoyance there is :cry:
Easiest way to measure stutter would be an online frame skipping test that also detects stuttering. UFO frame skipping test is good for this.


#9

Hey, thanks much for testing it.

Hmm…
I did a test this morning with testufo.com.
A 6 UFO test and a frame skipping test does not show any problems. I have a permanent frame rate of 60.

But I will take a look at it again… Maybe it depends on the aspect ratio.


#10

In fact that I do not see any problem at the moment it is a bit fishing in the dark.
Please be so kind and try to replace the .exe again:
https://dl.dropboxusercontent.com/u/19452479/BlinkStickAmbiLight.zip

Let me know if something has changed.


#11

No change to stuttering. Just brings back the aspect ratio issue. I will test everything with another pc later.


#12

Jup sorry, tested around a bit with everthing and have killed the aspect ratio fix … :frowning:

Edit: I´ve recognized a frameskip on one machine now. It is not the most ugly but it is present…

Edit2:
Fixed the aspect ratio again and changed a few screws.
https://dl.dropboxusercontent.com/u/19452479/BlinkStickAmbiLight.zip (v 1.0.2.9993)
Another test shows that the the Frame Skipper Test also shows frameskip without running the ambilight tool.
I´ve also tested a few games with a FPS viewer and there is no change if running with BSAL or without.

But the tool is not final. Maybe SlimDX is not the right way and in the end even DirectX is not…


#13

More tests using the newest version:

Edit: My screen refresh rate is 76hz. I made sure all applications run at steady 76fps in normal conditions.

Open ambilight-> desktop stutters, framerate constantly fluctuates between 69-76fps.
Open ambilight -> Open game -> Stutter, framerate fluctuates between 72-76fps.
Open game -> Open ambilight -> No stutter!, steady 76fps when applications are opened in this order.
Desktop, browser, etc. are allways stuttering with fps fluctuating between 69-76.

Edit2: Actually most games dont seem to be affected by stutter at all. Youtube and local video plays with a steady fps. Problem seems to be limited mostly to desktop. i jumped the gun on this one, sorry about that.


#14

Is the source code for your AmbiLight application available?


#15

I´ve uploaded the last sources to github today. Not optimized and not well commented but feel free to take a look at it:


#16

Awesome! Thank you very much.


#17

Hmm, as for me i can not even seem to open the software, it will open as a process and end after 1-2 seconds running.
Very strange.


#18

Hey Arno,

somehow nothing works for you :cry:

Could you please unzip the following file and copy it to the BilnStickAmbiLight main folder:
https://dl.dropboxusercontent.com/u/19452479/BlinkStickAmbiLight.exe.zip

Start BSAL then and see if a .log file will be written to the main folder. Tell me if you can find something useful in it.


#19

All i get from the log is

2017-01-31 15:27:09,106 [1] INFO BlinkStickAmbiLight.MainForm [(null)] - Starting BlinkStick Ambilight v.1.0.3.0
2017-01-31 15:27:09,961 [1] DEBUG BlinkStickAmbiLight.MainForm [(null)] - GetFeature failed.
2017-01-31 15:27:10,062 [1] DEBUG BlinkStickAmbiLight.MainForm [(null)] - GetFeature failed.

But in all honestly it’s not such a big a deal if this does not work and no need to investigate it till the end!
the only small problem is that ever since i tested this my previous Blinkstick Client has stopped working correctly, as a matter of fact i can’t get a single color out of it, everything is a low brightness red and doesn’t last longer then a second now :frowning:


#20

See my entry here:

Maybe this could be your problem.

I really want to investigate, I´ve developed it for usage :smile:
But I think it can only work for adressable LEDs and it always needs at least mode 2. I should add some more infos to the specs.