Recording Light controlled via USB connected Arduino?
So, I would like to use an Arduino to control several tasks, while a recording in Reaper is running - first thing coming to mind, of course, to switch a recording light on and off.
But I am wondering if there is a way to do it in DIY style?
Preferably without a MIDI interface.
My dream would be a permanent recording signal, while Reaper is recording, so that I can check continously if Reaper is still running and recording - not just a one-time signal when the recording is switched on and another one-time signal when a recording is being switched off. Nothing is more annoying than a burning "Recording"-light, while the computer has just been switched off and Reaper had no chance to send the "recording-stopped"-flag.
AFAIK, Reaper can be set to send out OSC messages when starting and stopping record. Hence your device needs to use a network interface and wait for the OSC commands.
OSC messages are simply text strings sent as UDP blocks. Any language / Network library should support opening an UDP port and waiting for blocks.
In those threads, the one with the user-created script is likely the best route since my implementation uses a custom extension. The biggest thing is which light and now it can receive commands from reaper... I can think of a number of ways beyond philips hue (some of which I've tested) but depends on your experience DIYing this sort of thing. Hue is the easiest because it's just a matter of configuring the OPs script.
If not Hue, and you are familiar with micro controllers like programming an Arduino - A little device called ESP8266 is up to the task but requires that basic experience in micro controllers. Basically anything that can receive an HTTP request and act on it to change the light. I wouldn't be surprised if there were some way to do this with Alexa, SmartThings or similar products but I know nothing about their APIs.
__________________ Music is what feelings sound like.
If not Hue, and you are familiar with micro controllers...
Actually that is exactly what I am aiming for. I have found this old motor switch that is probably twice as old as I am (the waterproof isolation was not made of rubber but of twisted thread). And I thought to myself... what if I put an Arduino into it, and put some keyboard commands on two micro-switches I sneak under the big old chunky switches. One to start a recording, one to stop it... or... something else? Just for the fun of it?
Now with the Arduino already on board? I can use that one to control an LED for the red light, too. But I don't want to cut corners here by just trusting the pressing of the button. I want the response of Reaper to switch the light on. Just because it is the principle of the thing and I love doing stuff like that as it teaches me how things actually work.
Actually that is exactly what I am aiming for. I have found this old motor switch that is probably twice as old as I am (the waterproof isolation was not made of rubber but of twisted thread). And I thought to myself... what if I put an Arduino into it, and put some keyboard commands on two micro-switches I sneak under the big old chunky switches. One to start a recording, one to stop it... or... something else? Just for the fun of it?
Now with the Arduino already on board? I can use that one to control an LED for the red light, too. But I don't want to cut corners here by just trusting the pressing of the button. I want the response of Reaper to switch the light on. Just because it is the principle of the thing and I love doing stuff like that as it teaches me how things actually work.
Should be easier if connected to the machine Reaper is running from. If you use an Arduino Pro Micro which can attach as a USB MIDI device then you could probably just send a MIDI CC to that device via script? I'm not entirely clear on how to do that but I know reaper can see the device because I built a "3 big knob" MIDI controller that I use with Reaper:
If you use an Arduino Pro Micro which can attach as a USB MIDI device then you could probably just send a MIDI CC to that device via script?
Ooooh... It is that easy to implement it as MIDI device? I thought I would have to open a big can of worms to do that. But that "sounds" reasonably easy. Maybe I should follow this path then.
And by the way... your 3 wheel interface looks pretty awesome.
I am still keeping my eyes open on some old generator control panel with huge wheels. Now turning that into a control center... would probably be unpractical, but sooo stylish...
Ooooh... It is that easy to implement it as MIDI device? I thought I would have to open a big can of worms to do that. But that "sounds" reasonably easy. Maybe I should follow this path then.
And by the way... your 3 wheel interface looks pretty awesome.
I am still keeping my eyes open on some old generator control panel with huge wheels. Now turning that into a control center... would probably be unpractical, but sooo stylish...
If you look at my GitHub project for the MIDI controller, you'll see it's just a matter of including MIDI.h library and using it - when you plug the Arduino into the computer via USB it will show up as a MIDI device. However... I suppose my concern is receiving MIDI on the Arduino from Reaper since that's what you'd be doing and is the opposite of what I was explaining (sending to Reaper)...
Hmmm... thinking out loud, another thing I have actually tested in the past, is that if you have an existing MIDI Out hardware port on your sound card. You can just cut the end off a MIDI cable and hardwire it to the Arduino, which means you don't even need the Arduino to be a USB MIDI device. You just need to parse the incoming serial message, not that hard. Let me see if I can find the instructables link on wiring that up...
I just tested this a couple months ago but can't remember WTF I was going to use it for LOL. That said, I'm think you can still do that with the MIDI/USB method but you have to write the code to grab the serial input and parse it. A board called Teensy has a lot of MIDI support built in but probably more than you need.
__________________ Music is what feelings sound like.
Last edited by karbomusic; 07-20-2020 at 08:40 AM.
And lastly... The beloved ESP8266 controller. It can run a relay et al for the light just like the Arduino but it can also attach to your WiFi network AND be a web server. In that setup, you'd use the script from the OP above and point it to the ESP8266 IP Address, then on the ESP8266, when it receives the HTTP request, parse and flip the pin that controls the relay.
I've done a LOT of that from home automation projects - I have a button on my computer desk that turns my tube amp stack on/off from across the room - it uses two 8266s one to send (client) and one to receive (server). But it's a little more fiddly to flash, not hard but fiddly until you are set up to do it. Actually, if you get one of the ones that has all the stuff built in it's simpler: