PG Music Home
Posted By: Mark Hayes BIAB for MIDI Show Control? - 09/09/21 03:31 PM
Does anyone use BIAB to control lighting via MIDI during performances?

I know there's expensive hardware to do like this, but it's possible to intercept a MIDI stream and use it to control Philips Hue lights with some relatively simple scripting and some open source tools.

Here's my Mac doing it, while Logic plays a generative piece by Brian Eno: https://www.youtube.com/watch?v=O5sMaDRqbbE
Posted By: Simon - PG Music Re: BIAB for MIDI Show Control? - 09/09/21 04:24 PM
Ok, now that's slick!

This should be possible in BIAB - since it's possible to output MIDI from BIAB to hardware synths, it should be possible to output that MIDI to a MIDI lighting device. As for having a script intercept it, you should be able to use the Mac's Audio/MIDI Setup to create a virtual MIDI device to take MIDI from BIAB and send it to the script app, then have the script output to your lighting hardware. I'm not sure of the specifics as I've never done this before with BIAB, but I'd be glad to try and help!
Posted By: Mark Hayes Re: BIAB for MIDI Show Control? - 09/09/21 04:38 PM
Originally Posted By: Simon - PG Music
As for having a script intercept it, you should be able to use the Mac's Audio/MIDI Setup to create a virtual MIDI device to take MIDI from BIAB and send it to the script app, then have the script output to your lighting hardware. I'm not sure of the specifics as I've never done this before with BIAB, but I'd be glad to try and help!


Yup, that's the ticket, IAC. This guy's tools will read the MIDI stream and let it trigger whatever you want, in this case HTTP requests to a local Hue hub:

https://github.com/gbevin/ReceiveMIDI

I need to figure out how to send MIDI from BIAB. I will probably need to take you up on your offer of help, thanks!

Mark
Posted By: Mark Hayes Re: BIAB for MIDI Show Control? - 09/09/21 07:16 PM
Well, figuring that out was a challenge! But I got things set up on the BIAB end. Playing chord sequence C then D with "send chords to external device" sends this out on the IAC bus, as trapped by ReceiveMIDI:

channel 16 note-on C1 1
channel 16 note-on E1 1
channel 16 note-on G1 1
channel 16 note-off C1 64
channel 16 note-off E1 64
channel 16 note-off G1 64
channel 16 note-on D1 1
channel 16 note-on F#1 1
channel 16 note-on A1 1

I'd rather have single events to process than all the component notes of the chords, but that's a lot to ask. Maybe silent MIDI events, easily placed in the chord sheet, that could function as lighting cues?
Posted By: Simon - PG Music Re: BIAB for MIDI Show Control? - 09/10/21 04:43 PM
Originally Posted By: Mark Hayes
Well, figuring that out was a challenge! But I got things set up on the BIAB end. Playing chord sequence C then D with "send chords to external device" sends this out on the IAC bus, as trapped by ReceiveMIDI:

channel 16 note-on C1 1
channel 16 note-on E1 1
channel 16 note-on G1 1
channel 16 note-off C1 64
channel 16 note-off E1 64
channel 16 note-off G1 64
channel 16 note-on D1 1
channel 16 note-on F#1 1
channel 16 note-on A1 1

I'd rather have single events to process than all the component notes of the chords, but that's a lot to ask. Maybe silent MIDI events, easily placed in the chord sheet, that could function as lighting cues?

Nice work!

Yeah, silent MIDI events can work too. If you set your Melody channel to output to the IAC device, you can use the Piano Roll in BB to enter in something like a Control Change or Program Change - or even just input some notes, since all the MIDI on that channel will be sent out to the IAC device instead of the Mac DLS synth. There may be a VST plugin you could use for that, to save you from having to change your MIDI output settings for the Melody track - I found one that seems to be part of FL Studio, and another called MidiOut though the website seems to be defunct.
Posted By: Mark Hayes Re: BIAB for MIDI Show Control? - 09/10/21 07:43 PM
Originally Posted By: Simon - PG Music
If you set your Melody channel to output to the IAC device, you can use the Piano Roll in BB to enter in something like a Control Change or Program Change - or even just input some notes


I need to learn how to do that sort of MIDI editing.

Program changes could work for scene cues. Ideally, I'd want to send arbitrary text messages, which I guess would be done via SysEx (?) so I could have BIAB come straight out and tell Hue, "light 5 - hue FFCCCC - brightness 55 - saturation 100 - transitiontime 3" or "scene - tequila sunset".

Controlling Hue lights via HTTP really limits the responsiveness, though, so it's not like I could get 10 lights dancing in perfect sync to 10 different song tracks; the system overloads pretty quickly and winds up lagging the music. (This sort of thing can be done at a lower level using the Zigbee protocol, bypassing the bridge and communicating directlly with the lamps, but that is completely beyond me.)

So, in my little home setup, a separate lighting track in BIAB would really have to be composed, as opposed to having the lights automatically track the music (which works kind of nicely in my example only because the material is so slow and un-rhythmic.)

I would really really like a way to put little blue sticky notes on the chord sheet with my special text messages, how unrealistic is that?
Posted By: Mark Hayes Re: BIAB for MIDI Show Control? - 09/10/21 07:57 PM
By the way, the MIDI Show Control spec is fun to read:

http://www.richmondsounddesign.com/docs/midi-show-control-specification.pdf

You can control: machinery, rigging, flys, lifts, turntables, trusses, robots, animation, floats, breakaways... fog, smoke, pyro, fireworks, flames, and explosions!
Posted By: rharv Re: BIAB for MIDI Show Control? - 09/10/21 08:20 PM
Yeah, we've used MIDI to DMX for lights and used MIDI for lots of other equipment, but some of those you mention I would never have even thought about .. flames and explosions via MIDI would kinda scare me
We tried Fog machine but never got it to cooperate with the equipment we had at the time so someone had to step on it and trigger it as needed frown
Posted By: Simon - PG Music Re: BIAB for MIDI Show Control? - 09/10/21 08:24 PM
Sysex would be more complicated, since there's no way to "enter" sysex messages into BIAB directly - you'd have to create a MIDI file with these Sysex messages then import it into BIAB and hope everything lines up, since I believe BB won't even let you edit the sysex after. I'm not even certain if BB will even import the Sysex messages, as I don't have anything to try with at the moment.

Program changes are easy - see my screenshot. Basically, open the Piano Roll, choose your track (Melody is handy since BB doesn't tend to use it), choose Program from the View/Edit menu, then click in the bottom section to add a program change.

Attached picture progchg.png
Posted By: Mark Hayes Re: BIAB for MIDI Show Control? - 09/10/21 09:47 PM
Originally Posted By: Simon - PG Music
Program changes are easy - see my screenshot


Thanks, got 'em!

channel 4 program-change 64
channel 4 program-change 97

Now I need to put together a Javascript to implement a set of program numbers as lighting scene codes.

Let me set this up, get BIAB to switch on the beat, and see how fast I can run it!
Posted By: rharv Re: BIAB for MIDI Show Control? - 09/11/21 08:16 AM
FWIW, Realband handles Sysex with ease.
Editing, creating, triggering .. I'd go the RB route for this type of control.

Plus easier MIDI Port control (send what signals you want where you want them) .. just a better solution in my mind.
Posted By: Mark Hayes Re: BIAB for MIDI Show Control? - 09/11/21 09:52 AM
Originally Posted By: rharv
FWIW, Realband handles Sysex with ease.


Yeah, but I'm a second-class Mac citizen, so no have.
Posted By: Simon - PG Music Re: BIAB for MIDI Show Control? - 09/13/21 09:20 PM
Originally Posted By: Mark Hayes
Originally Posted By: Simon - PG Music
Program changes are easy - see my screenshot


Thanks, got 'em!

channel 4 program-change 64
channel 4 program-change 97

Now I need to put together a Javascript to implement a set of program numbers as lighting scene codes.

Let me set this up, get BIAB to switch on the beat, and see how fast I can run it!

Nice work! I'd love to see another video if you manage to get this working from BIAB!
© PG Music Forums