MIDI-Output for lightcontrol

Hi,

here are my file for controling lightsoftware by midi. I’m using two Notebook’s. One with MIXXX and one with PC-Dimmer. Midi is connected by Bonjour (by Apple) and rtpMidi (by Tobias Erichson) .

The File is tested with MIXXX 1.11 beta 2.

Funktions:

Sending note “D” every Beat, depends on faderposition. Fader in middle = send beat from left deck.

Sending Note “C” every songchange. Depends also on faderpostion. Fader must go over the middle befor signal is send. Also a timeout of 1 second before next signal sending. Preventing to confuse lightsoftrsionware.

Sending MIDI-Timecode near realtime and synchron of playing song. Also depends on fader like the beats, see point 1. I send only “MTC-Full-Frames” timecode! So its no problem when pitch (songspeed) is not in neutral or you jump to other songposition.

Have fun, Michael

PS:
When songname is ready for use in JS (future planed in MIXXX), i will update my file. Then songname will be send by MIDI Sysex.

Great thanks to MIXXX-Team and all Light-Software-Teams who make a great job.

This file is out-of-date. Look later in thread for newer version.
pc_dimmer_2013_02_22.zip (1.76 KB)

New Version:
Have implemented the proposal (by Dani from a other forum). The volume control from the deck’s were integrated into the controller.

In detail:
The beats, depending on the volume control now works parallel to the fader. For this to work, the following must be observed:

  1. The volume control will only be considered / effective when the fader has not moved in almost central position for at least 3 seconds. One eighth of the left / right accepted.
  2. If the fader (just a little) moved over the control, the volume control is locked up again. To conditions as under 1 re-apply.
  3. To “Wild Change” to prevent from deck is also a renewed exchange only after the end of a second are possible. But will be rescheduled.

This file is out-of-date. Look later in thread for newer version.
pc_dimmer_2013_09_11.zip (2.21 KB)

Hi, it’s the same dani here. :smiley:

Very nice update, it works fantastic!

Thanks dani for test. From same dg3nec to same dani hi hi hi.

The next Version

New: BPM output as value 2 with Note E (52)

The BPM is not send as real. The send BPM is the BPM-50. Because value limit is 127.
So you get the value-range:

  • BPM<=50 send as 0
  • BPM>=177 send as 127

Hint:
I receive the Note E value and give it to a free DMX-Chanel and a sub-fader. So i can set speed and other things by calculating with the channel/fader.
Also you can trigger to note C (48) the procedure. Note C is send every (song)change that was detektik by crossfader or volume differenz of the decks.
The File:
PC_Dimmer_2013_12_31.zip (3 KB)
This file is out-of-date. Look later in thread for newer version.

In the File is a TXT. That is the programmcode from my PC-Dimmer->Kontrtolpanel->Button. German Text.

One Note before. I have chnged the name. Reason: There are many DMX-programs who uses MIDI input. New name is “Midi for light”. The filenames has also changed. Attention.

New is, using the VU-Data via Midi. There are many data transferd. All data comes 25x per second. Sounds not easy, but there are many function possible for your light. Now some explanations.
MIXXX has 3 VU-data for us. Left, right and mono. You find all and more as midi transfered. First ist the absolut data. With this one, there are no great light change. Because this, i calculate some more. I calculate from the last second minimum, maximum and middle. And a calculated absolut as relativ to min and max. This data gives you more change and action for the light.
For a real VU as light, i calculate 4 datas. “Meter 1” must be max before “Meter 2” will filled (and so on). Looks like the VU in MIXXX. This also in absolut and relativ.

In my home:
I have 4 PAR. Data “Meter 1” to “Meter 4” are out to the dimmerchannel of each PAR. In additional i change every beat the complete color of all PAR. So i have a big VU-Meter with my PAR in real and big. Makes me happy, looks soooo good …!

Here are the data you need:

Midi data are send:
###################

Channel mono:

current absolutely: dez.64, okt.5 note E

average minimum: dez.65, okt.5 note F
average midle: dez.66, okt.5 note F#
average maximum: dez.67, okt.5 note G

current relatively: dez.68, okt.5 note G#

Meter 1 absolutely: dez.69, okt.5 note A
Meter 2 absolutely: dez.70, okt.5 note A#
Meter 3 absolutely: dez.71, okt.5 note B
Meter 4 absolutely: dez.72, okt.6 note C

Meter 1 relatively: dez.73, okt.6 note C#
Meter 2 relatively: dez.74, okt.6 note D
Meter 3 relatively: dez.75, okt.6 note D#
Meter 3 relatively: dez.76, okt.6 note E

Channel left:

current absolutely: dez.80, okt.6 note G#

average minimum: dez.81, okt.6 note A
average midle: dez.82, okt.6 note A#
average maximum: dez.83, okt.6 note B

current relatively: dez.84, okt.7 note C

Meter 1 absolutely: dez.85, okt.7 note C#
Meter 2 absolutely: dez.86, okt.7 note D
Meter 3 dez.87, okt.7 note D#
Meter 4 absolutely: dez.88, okt.7 note E

Meter 1 relatively: dez.89, okt.7 note F
Meter 2 relatively: dez.90, okt.7 note F#
Meter 3 relatively: dez.91, okt.7 note G
Meter 4 relatively: dez.92, okt.7 note G#

Channel right:

current absolutely: dez.96, okt.8 note C

average minimum: dez.97, okt.8 note C#
average midle: dez.98, okt.8 note D
average maximum: dez.99, okt.8 note D#

current relatively: dez.100, okt.8 note E

Meter 1 absolutely: dez.101, okt.8 note F
Meter 2 absolutely: dez.102, okt.8 note F#
Meter 3 absolutely: dez.103, okt.8 note G
Meter 4 absolutely: dez.104, okt.8 note G#

Meter 1 relatively: dez.105, okt.8 note A
Meter 2 relatively: dez.106, okt.8 note A#
Meter 3 relatively: dez.107, okt.8 note B
Meter 4 relatively: dez.108, okt.9 note C
midi_for_light_2014_09_14.zip (5.38 KB)

This script looks exactly like what I need. I’d like to use Mixxx for the music part and feed its BPM info to QLCplus which controls the lights.

But I can not find how to install the script in Mixxx. From the Mixxx documentation I understand that scripts are assigned to controllers. But I do not use any controller and therefore in the Mixxx ‘Preferences’ dialog, under ‘Controllers’ I find ‘No controllers found’. This looks normal to me as there aren’t any.

How can I install this script in Mixxx ?

I’m running Mixxx and QLCplus on the same Laptop running Ubuntu 14.04, but this itself should not create a problem.

I found part of the solution: The scripts have to go into /usr/share/mixxx/controllers. They do not work if placed in .mixxx/controllers. Then I have to start QLC Plus before Mixxx and a controller QLC shows up and I can load the preset ‘MIDI for light’ into it. In the Mixxx log I can see that the midi for light script is loaded too.

But I’d expect Mixxx now to show up as MIDI device but ‘aconnect -io’ only shows ‘QLC’. How can I route the Mixxx midi output to QLC ?

I found a work-around: If I connect a keyboard via USB midi adapter and route the outgoing MIDI stream via MIDI-through back to the computer, then I can select this MIDI in in QLC and I can use the MIDI steam in QLC.

So my ‘proof of concept’ is a success, but having to attach a keyboard, just to route midi traffic back is very inconvenient.

Hello,

intresting and nice to hear about running under linux. I doesn’t have linux here
OK, under windows i use a “logical/virtual” Midi Port. In my case with RTPMidi. This must be run and ready before Mixxx, or the light-software will be started. I think its the same way under linux. What can be used for virtual midi under linux… sorry.
After Midi-Port is ready, you find it under options in Mixxx.
I think there must be a other way or software which can do this. I hope this helps: ubuntuforums.org/showthread.php?t=1445186

I found the solution: Mixxx, per default hides the ‘Midi Through’ interface. That is why I could not see it (I did not know I was looking for it anyway).
However, you can enable it by starting Mixxx in developer mode ‘mixxx --developer’, then it shows up and you can select and use it.

I’ve written a small howto about the entire process in the forum, the same information will be part of the QLCplus documentation, too.

Now, back to the midi_for_light scripts, I have some suggestions:

  • Write MIDI in caps in the script, then it will show up correctly in the list of scrips (not at the end).
  • Add a comment to the top of the script about how to install it, took me a minute to find
  • Provide two scripts, one for all the VU-Meter info and one with only the BPM, no point swamping the system with 1000msg/sec if 1-2 will do
  • Add the BPM information to the VU-Meter-Info.txt file to avoid having to examine the script to find which note it is using
  • can these scripts become part of the standard Mixxx distribution ?

Markus

Thanks so much for great feedback. Some infos i have seen, but no idea how to fix. So i say thank you very much.
But sorry when i say: No update for Mixxx 11. I have now running mixxx 12 (alpha) with 4 decks and so on. The script for mixxx 12 is running since 3 months. Many changes are done. New feature, setting up the midi-channel. Much changes are done in the new version.
To give the script to the mixxx crew for include it into Mixxx is a idea. I will ask a crew member about this.
The next point is… a good manual. Yes, i know… The script gots more features and much midi output is calculated. Hope i have time and ideas to do this in a way for all light programs.

Thanks, and one question to QLCplus:
My Dream: When i play a song, the complete lightshow will automated loaded, startet and is in sync with midi-timecode.

I need a lightsoftware that can load complete shows when receive a midi sysex “load file” with filename. Starts the lightshow on midi signal and is synchron to MTC Midi Timecode. With this, i can made the perfekt light to the music. Can QLCplus this?

Dear Michael,

i found your great Script via QLC+ Forum and now i tried to get it to work under Mac OS X 10.10.2. with Mixxx 1.12.0 alpha. I have also the option to test it under Windows 7,8 and 10. Could you please provide the latest version of your script for Mixxx 1.12?

And if anybody else here can help me how to start Mixxx in Developer-Mode on OS X with the terminal?

Thanks & regards
Heiko

Thanks for response and good news!
Just in moment the script is uploaded to github, pullrequest is running. Next step is review and then it is a default script. So, it’s OK to put here the script and collect feedbacks.

Info to this version:

  • alle 4 decks are usable
  • in Midi_for_light-scripts.js is at the top a litle setup to configure what midi output should send or not
  • also there can be found the midi chanel (usefull if midi signals merged in light and more midi hardware is used)

:unamused: I hope it run’s…

This Version runs under MIXXX 1.12 (alpha), not for use in 1.11 !!!
File is old. Look downward for new one.

Midi_for_light_2015_02_16.zip (4.85 KB)

Thank you for the update :slight_smile:

since yesterday i can start Mixxx on OS X and Windows 7 as developer. But now i have the question, where to place the 2 files? At first i want to try out Windows.

Is it better to use a) system-preset, b) local-preset or c) user-preset-folder?

I tried all options, but i always get the message that none controller is detected by Mixxx.

The “Sytem preset” should be the right to first start. It can be, that mixxx need a restart to find it.
To tweak your controler (later after setup), go into user. Ther is only the JS, but this is OK.

The message “no controler” means you have no “Midi Controler”. You must first install it. Try “rtpMIDI”. To find under tobias-erichsen.de/software/rtpmidi.html
With rtpMIDI you can additional create virtual midi over lan. So you can use one computer for musik and one for light. But one computer also works.

… crossing fingers

Yeah, i got the script to work under OS X :slight_smile: by placing the script into the system-folder /Applications/Mixxx.app/Contents/Resources/controllers

For the 1st test i disabled the VU-Meter in the script:

var enable_vu_meter_global = false;   // set to false if you not need VU-Meter

In Mixxx under Preferences/Controller IAC-Driver IAC Bus 1 was activated and the Midi for light script was assigned as preset.

Then i was happy to see the first lines with Midi-Monitor on channel 1:
18:32:50.184 From IAC-Bus 1 Note On 1 D2 100
18:32:50.253 From IAC-Bus 1 Note On 1 E2 78
18:32:50.323 From IAC-Bus 1 Note Off 1 D2 0
18:32:50.346 From IAC-Bus 1 Note Off 1 D2 0
18:32:50.346 From IAC-Bus 1 Note On 1 C2 102
18:32:50.390 From IAC-Bus 1 Note Off 1 C2 0
18:32:51.391 From IAC-Bus 1 Note Off 1 C2 0

I hope to reproduce this steps under Windows 7 with “rtpMIDI” instead of Apples IAC-Bus 1. When it runs it may be time to extend the QLC+ Tutorial under github.com/mcallegari/qlcplus/w … x-via-MIDI to include OS X and Windows.

This made my day :exclamation:

Sorry to all,
i have found a problem.
Hint: If the script runce before, the new files must replace all files. Preset alone is not enough.

Here ar the new file:

File is for 1.22 (alpha) and not running under 1.11
File is old. Look downward for new one.

Midi_for_light_2015_02_17.zip (4.88 KB)

I’m happy to hear good news from OS X side :smiley:

… continious crossing fingers

On Windows i could now assign the controller to “midi for light script” after setup “rptMIDI” :smiley: But there i don’t have a Midi-Monitor like on OS X for more tests.

But now is first time to play around with Mixxx, Midi for light and QLC+ on OS X. Some Beat-driven cues are on goal, the other is to get my old LED Par Cans from Stock and try to reproduce your DMX-driven VU-Meter :smiling_imp:

Thank you very much for this script :exclamation: