VernonGraner Contributor - Level 2 2018-01-27

2018-01-27

DIY WiFi/MIDI Remote control box for X-AIR: WORKING!

Tl;DR - I've built a portable WiFi/MIDI mixer control box that allows MIDI or completely wireless operation of an XR18 mixer. typical uses include talkback routing, "Cough box" on the talent table or a way to quickly route/reroute signals Smiley Happy

Based on the Adafruit HUZZAH32, this unit can run on a USB cable connected to a small USB "brick" or it can also run on a LiPo battery. Signal output is a combination of MIDI and WiFi. At the moment, the WiFi info (SSID/Pass) and the IP address of the target Mixer is hard-coded in the source before downloading to the chip.

So, you can plug in the USB cable and charge brick for long term use, and the MIDI cable for sure-fire control, or you can run on batteries and use WiFi to be completely portable! In wireless mode on batteries, it is REALLY fun! Smiley Happy

This is really a V1.0 "proof of concept" design. I built it in a leftover project box and the unit is cumbersome to reprogram. I plan to add an OLED display to allow the WiFi / IP info to be input from the front panel, and also to allow button functions to be programmed.

Here are some pictures:


The first prototype on the breadboard


Closeup of the case


Closeup of the microcontroller (HUZZAH32)


All Buttoned Up! Smiley Happy


Rear panel


Unit in operation

And lastly, I have a video of the unit controlling my XR18:

https://youtu.be/CI1OQnQrRa4

I'm happy to answer any questions and welcome ideas on how to improve the design. Thanks to all the forum members that helped steer me in the right direction! Smiley Very Happy

  • 0 Kudos
  • 64 Replies
  • Reply
Contributor - Level 2

Re: DIY WiFi/MIDI Remote control box for X-AIR: WORKING!

Paul Vannatto;159803 wrote:
That requires getting the current DCA fader level


OOooh! I have been wanting to see some code for actually doing a "query to"/"receive from" the XR via Arduino!

I want to be able to change the MUTE LEDs on my box to reflect the actual mute state. As it is, the LEDs blink if the box has sent a MUTE and then stop blinking when the box sends an UNmute.

If someone changes the mute state at the mixer, the mute light will continue to blink on the box which can be a problem - the hosts may think their mics are muted when they actually aren't. Smiley Sad

I really want to figure out how to have the box "sync" the MUTE state so the LEDs reflect the board, not just what the box has sent.

Is the source code that does this for the Arduino available somewhere to review? Smiley Happy
-- Vern
Contributor - Level 2

Thank you both.

My idea also involved sync'd status so that if anyone muted the FX from either the tablet or their wireless module it would update all of the devices, but it was all just a dream at this point I hadn't made it far enough to know what hardware or type of code i should be using.. I was assuming it would have to be OSC. Wouldnt the HUZZAH board still be perfect for this because of its built in wifi therefore having the ability to speak to the mixer via the network instead of midi?
Contributor - Level 2

Re: DIY WiFi/MIDI Remote control box for X-AIR: WORKING!

Rob Johnson;159835 wrote:
Wouldn't the HUZZAH board still be perfect for this because of its built in WiFi therefore having the ability to speak to the mixer via the network instead of midi?


I think so yes.. but not because ESP32 based boards do WiFi specifically. In my code I am still using OSC for the MIDI communications. But yes, I think the HUZZAH32 (or any other ESP32 board likely) would work fine for this purpose. Smiley Happy
-- Vern
Volunteer Moderator

Re: DIY WiFi/MIDI Remote control box for X-AIR: WORKING!

Vernon Graner;159832 wrote:
Is the source code that does this for the Arduino available somewhere to review? Smiley Happy

Yes it is - in bits and pieces. The problem is trying to remember where I got all the pieces. Here is one link. If I do come across some of the other links, I'll gladly pass them on. In the meantime, I'm planning on providing a basic package for everyone who is interested, now that I finally figured it out - and eventually provide an OSC library, based on the Live Toolbox engine (which includes toggles, relative values, tidbits, etc), but will depend on how much I can squeeze into the limited memory of the arduino.

One of the key "tricks" is that the incoming port is NOT the same as the outgoing port (10023 for X32, 10024 for X-Air). What worked for incoming port is 8888, which I just learned last night.
Paul Vannatto, Volunteer Forum Administrator and Moderator. Did you find my post helpful? Give kudos or mark it as a solution!
Contributor - Level 2

Re: DIY WiFi/MIDI Remote control box for X-AIR: WORKING!

Thanks for the link Paul! Smiley Happy

One thing I am pondering is the idea of "polling" the mixer asking for status. This concerns since the button box can be run on Batteries and lots of WiFi transmissions might be a fairly high drain.

Also, I wouldn't want to overwhelm the XR18 with "pestering" status calls. I imagine it could become a sort of Denial-of-service situation.

So, I'm wondering how often I would have to poll these values to have the button lights reasonably reflect the mute status without effecting the box "feel" for the user.

For example, if I poll once per second, it may take a full second for the light to come on the box when the button is pressed. This kind of "lag" would likely confuse users or create an impression that the box is "sluggish" in responding.

Should be interesting to see how well this works and how well I can make the LEDs respond so as to keep a good user experience. Smiley Happy
-- Vern
Volunteer Moderator

Re: DIY WiFi/MIDI Remote control box for X-AIR: WORKING!

This code I'm finishing up, polls the console on startup for initial status. Then it is polled when certain buttons are pushed. For example the 8th button which is setup as a momentary button which unmutes a bus, polls for the DCA 8 fader level, drops it by 20 db, when the button is pressed, then reverses both of those when it is released. So the console is not pestered during operations.

I am in the process of creating the example package and will add a polling of current state in the main loop with a timer - say every 500 ms. That probably should work fine.
Paul Vannatto, Volunteer Forum Administrator and Moderator. Did you find my post helpful? Give kudos or mark it as a solution!
Regular Contributor - Level 1

Re: DIY WiFi/MIDI Remote control box for X-AIR: WORKING!

Paul Vannatto;159841 wrote:
Yes it is - in bits and pieces. The problem is trying to remember where I got all the pieces. Here is one link. If I do come across some of the other links, I'll gladly pass them on. In the meantime, I'm planning on providing a basic package for everyone who is interested, now that I finally figured it out - and eventually provide an OSC library, based on the Live Toolbox engine (which includes toggles, relative values, tidbits, etc), but will depend on how much I can squeeze into the limited memory of the arduino.

One of the key "tricks" is that the incoming port is NOT the same as the outgoing port (10023 for X32, 10024 for X-Air). What worked for incoming port is 8888, which I just learned last night.


Very interested in this Paul!
Thanks as always..
Don
Don Mc Southwestern Ontario
Volunteer Moderator

Re: DIY WiFi/MIDI Remote control box for X-AIR: WORKING!

Don McLellan;159925 wrote:
Very interested in this Paul!

I figured you would Don. Unfortunately I spent a good portion of today trying to make an example sketch that included a latching switch (mute/unmute FX1 sends (bus 13)), a momentary switch (FX2), and a latching switch that alternated mute/unmute FX3/FX4 sends, plus monitor current state of those mutes. Unfortunately I ran into a snag. When I muted FX1 sends, it lit LED 2. When I muted FX2, it lit LED 3. When I muted FX3, it lit LED 1. Also using the buttons, it was not muting/unmuting the right mutes on the console. So I realized that it was a timing issue. What was being received was out of sync with what was expected.

I remember running into this scenario while developing Live Toolbox a few years ago. So I have to go back and figure out what I did to fix it. Stay tuned.

:edit (2 hours later: I fixed the timing problem and the lights are lining up with the FX. Just have some further testing to do.
Paul Vannatto, Volunteer Forum Administrator and Moderator. Did you find my post helpful? Give kudos or mark it as a solution!
Volunteer Moderator

Re: DIY WiFi/MIDI Remote control box for X-AIR: WORKING!

Hi Vernon, Don and others

I think we have tested the arduino code for the 10 button project I've been working on enough to be comfortable to release this example sketch that shows how to read OSC returns from the console. I've commented this as best that I can to help everyone using it to understand it. In the top part are the various variables that will need to be changed to suit your needs. If there are any questions, feel free to ask (or make suggestions).

I want to get this posted before the read-only status gets put on the forum in preparation for the new forum release.
Paul Vannatto, Volunteer Forum Administrator and Moderator. Did you find my post helpful? Give kudos or mark it as a solution!
Highlighted
Contributor - Level 2

Re: DIY WiFi/MIDI Remote control box for X-AIR: WORKING!

aww man... Smiley Happy

I just got my dirty little sketch cobbled together for a simple mute group toggle with my very limited knowledge of arduino programming and now this! Smiley Happy

Having the states of the buttons and LEDs sync'd was my final wish for how i wanted my controller to operate but your code is fairly overwhelming for this noob lol.. plus im using the built in wifi on the ESP32 board..

time to get to learnin'! Smiley Happy

thanks so much for sharing Paul