Controlling the lighting setup from Mixxx

Mod your Mixxx: Share your controller mappings, keyboard mappings, skin and script tweaks here!

Moderators: garth, User Customization Moderators

Controlling the lighting setup from Mixxx

Postby RandomByte » Mon Mar 04, 2019 10:47 pm


I was asked to share my little project. So here we go.

I am a mobile DJ with some other guy. We have some lights: pars, led bars, scanners, moonflower effect lights. They are all controlled over DMX. The software we use is QLC+: . It is also opensource. My goal was to automate the lights to the beat sent by Mixxx and control some settings: which lights are on, which color theme (warm/cold), speed, light intensity and some nice manual strobing.
QLC+ can receive MIDI signals, and doesn't offer any way of scripting. It claims to have scripting support, but it doesn't have variables, control structures, etc, so basically that's useless. But I need to do some logic somewhere. I first thought about writing something like a MIDI proxy (Mixxx -> proxy with logic -> QLC+). But instead I decided to use Mixxx controller scripts for the light logic.

The first problem I encountered was that scripts only allow one MIDI device, that's a problem because I need the connection to my controller and to QLC+. So absolutely need a second script to control a second MIDI device. Ok, but the next problem was that there doesn't seem to be any "official" way to communicate between two scripts. I got a nice tip on Zulip: Unused controller objects in Mixxx can be set to some values, while the other script is listening and reading those values. I used the volume COs from various samplers, I think 8 in total.
So my controller script is listening for controller inputs, encoding them into the samplers volume, which is then read by the light script. The light script does some logic and finally sends out some MIDI signals to QLC+, in regular intervals.

In QLC+ I set up many scenes for all the fixtures for all the supported colors. Then I grouped the colors of one fixture into groups, warm and cold. Then I placed "next" buttons for those groups. When clicking those, the next element (color) in the group is selected. Because the group was set to random, the next button essentially acts like a "random color from that group" -button. Then I assigned MIDI inputs to those buttons. I have one button for each color group for each fixtures, so like ca. 20.
I did the same for the moonflower rotating speeds, and I also made groups for some scanner movements.
Some additional buttons were added for strobing. And I assigned a global master light intensity slider to a MIDI input.
That's actually quite a lot work in QLC+, copy and paste doesn't really work there. Some things I did by openeing the QLC+ project file (XML) and bulk changed stuff there.

Man, I hope someone understands what I wrote here.

That's the basic idea of how it works. I have never done anything in QLC+ before, so I started several times from scratch because my first approaches weren't good.

That's the QLC+ project:
The light script: ... Through.js
The control script where a sampler volume is set (Sorry for the indentation): ... xx.js#L572

QLC+ and Mixxx run nicely on Ubuntu Studio on a rather weak laptop.

Don't hesitate to ask some questions.

Damn, I hope this is understandable what I wrote.
Posts: 3
Joined: Fri Sep 14, 2018 10:31 pm

Re: Controlling the lighting setup from Mixxx

Postby L. Viejo » Wed Oct 23, 2019 6:31 pm

I'm starting to play similarly. What DMX controller are you using with Ubuntu + QLC+? I am just starting to try to use QLC+ and am having trouble getting it to work with dmxking ultradmx micro. QLC+ does recognize the controller but I have yet to get it to do anything at all with my lights (two Chauvet Gigbar 2s). I have tried it with both Ubuntu 18.04 (native driver) and MacOS Mojave (FTDI VCP driver). I have read that others have had trouble getting QLC+ to work with FTDI based controllers and MacOS) and went to (shudder) Windows to get a workable setup). A great alternative for me would be to get QLC+ to work with the Pioneer DJ DMX module (RB-DMX1) which works well with Rekordbox but seems to me to be pretty much undocumented in terms of technical details).

I's be very curious to hear how you have progressed with this over the 6+ months since your post.
L. Viejo
Posts: 1
Joined: Wed Apr 24, 2019 9:07 pm

Re: Controlling the lighting setup from Mixxx

Postby markus_b » Sat Oct 26, 2019 9:37 pm

I've used a similar setup a couple of times. An Ubuntu Laptop with Mixxx and QLC+. I did use the midi_for_light script in Mixxx, which sends information about sound volume and beat via midi to QLC+. It is using the midi loop device, which is only accessible in Mixxx, when you start it with the --developer option.

As a result I got beat and sound information from Mixxx to QLC plus and could drive DMX devices with this information. I used a light strip to display the beat and multi-color PARs lighting up in correlation with the music.
Posts: 19
Joined: Sun Oct 26, 2008 10:16 am

Return to User Customizations

Who is online

Users browsing this forum: No registered users and 1 guest