Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 08-17-2015, 04:19 PM   #1
DogsoverLava
Human being with feelings
 
Join Date: Oct 2013
Posts: 27
Default Can Reaper be configfured to turn on an active recording light?

Basically - is there a way for Reaper to send a signal when the Recording button is triggered to turn on a remote light or LED that would let my wife (or others) know that I'm actively recording a take and to not walk in the room?

I know I could make something that I manually turn on or off but I would end up leaving it on all the time -- wondering if there's an automated way to do this so the light only goes on when there's a live active take in session?
DogsoverLava is offline   Reply With Quote
Old 08-17-2015, 04:59 PM   #2
typhonj
Human being with feelings
 
Join Date: Jan 2015
Location: Québec, QC, Canada
Posts: 349
Default

Google would be your best friend. . .
A quick search like this one;

https://www.google.ca/webhp?sourceid...ght+controller

The idea here is that almost all of Standard audio interface are already equipped with Midi interface that can easily hooked up to a lighting controller

Searching about Midi to DMX512 would help but I know that there might be lots of other solution!

Cheers
typhonj is offline   Reply With Quote
Old 08-17-2015, 05:07 PM   #3
DogsoverLava
Human being with feelings
 
Join Date: Oct 2013
Posts: 27
Default

Thanks Ty -- I didn't know midi was used for anything beyond music keyboards so I don't know if I would have stumbled on that. Thanks for pointing me in that direction.
DogsoverLava is offline   Reply With Quote
Old 08-17-2015, 05:18 PM   #4
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

train your wife to knock on the door before entering... LoL
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is online now   Reply With Quote
Old 08-17-2015, 05:24 PM   #5
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

I did it but it is special case because I have a Faderport and some Philips hue wireless lights and some custom written Faderport code I wrote. Short story is the light turns red on record, green on play and white on stop. Keeps wifeypoo from barging in accidentally when laying the greatest track of my life.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 08-17-2015, 06:01 PM   #6
DogsoverLava
Human being with feelings
 
Join Date: Oct 2013
Posts: 27
Default

Quote:
Originally Posted by karbomusic View Post
I did it but it is special case because I have a Faderport and some Philips hue wireless lights and some custom written Faderport code I wrote. Short story is the light turns red on record, green on play and white on stop. Keeps wifeypoo from barging in accidentally when laying the greatest track of my life.
That's the idea totally -
DogsoverLava is offline   Reply With Quote
Old 08-17-2015, 07:27 PM   #7
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

nice... now what the world needs is code to turn lights on on the wifeypoo directly... 'not tonight dear'... white, 'maybe next week'...yellow, 'right now'...red, ... 'never again' ...blue, ...etc., etc.
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is online now   Reply With Quote
Old 08-17-2015, 08:35 PM   #8
Punk Duck
Human being with feelings
 
Punk Duck's Avatar
 
Join Date: Apr 2015
Location: Melbourne
Posts: 138
Default

I'm thinking of this, I'd like to try it:

Get a usb to midi cable, and adapt a midi tester to turn on a light, reckon it's a simple circuit.

If some midi signal is reequired, I'd write a js plugin to output something when in record mode.

Think that could work, just need to do a bit more research.

Need to see how to get a signal only on midi channel 16 so I can switch a transistor or a 555 monostable circuit.

Any help gladly received!
Punk Duck is offline   Reply With Quote
Old 08-17-2015, 09:12 PM   #9
Punk Duck
Human being with feelings
 
Punk Duck's Avatar
 
Join Date: Apr 2015
Location: Melbourne
Posts: 138
Default

I'm thinking of this, I'd like to try it:

Get a usb to midi cable, and adapt a midi tester to turn on a light, reckon it's a simple circuit.

If some midi signal is reequired, I'd write a js plugin to output something when in record mode.

Think that could work, just need to do a bit more research.

Need to see how to get a signal only on midi channel 16 so I can switch a transistor or a 555 monostable circuit.

Any help gladly received!
Punk Duck is offline   Reply With Quote
Old 08-17-2015, 09:37 PM   #10
Fergler
Human being with feelings
 
Fergler's Avatar
 
Join Date: Jan 2014
Posts: 5,205
Default

Quote:
Originally Posted by hopi View Post
train your wife to knock on the door before entering... LoL
But the knock will ruin the recording
Fergler is online now   Reply With Quote
Old 08-17-2015, 10:02 PM   #11
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by Punk Duck View Post

Need to see how to get a signal only on midi channel 16 so I can switch a transistor or a 555 monostable circuit.

Any help gladly received!
You could probably easily do it with an Arduino nano or similar to receive the MIDI signal then let it turn on a relay or transistor etc. to turn on the light.

http://www.instructables.com/id/Send...-with-Arduino/
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 08-17-2015, 10:12 PM   #12
SmajjL
Human being with feelings
 
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
Default

lol @ knock on door and lol @ wifeypoo
So basically ROFL
__________________
_Ohh.))::_Linux_::((.Xoxo_

SmajjL is offline   Reply With Quote
Old 08-18-2015, 02:12 AM   #13
Bigopigo
Human being with feelings
 
Bigopigo's Avatar
 
Join Date: Nov 2012
Location: Lisbon, Portugal
Posts: 83
Default

Here you go:

www.punchlight.com
Bigopigo is offline   Reply With Quote
Old 11-11-2017, 05:31 AM   #14
RuudNL
Human being with feelings
 
Join Date: Mar 2016
Posts: 3
Default

I did this with a PIC 16F628 chip and a USB to MIDI interface.
The chip was programmed using PicBasic.
The chip filters the commands from Reaper sent to a HUI interface.
When Reaper goes into the record mode, the light is switched on through a solid state relay (230 V AC). And of course after a stop, the light goes out.
The only thing I would like to change, is to get rid of the USB to MIDI interface, but I haven't found the right solution yet to let a PIC (USB input) behave like a MIDI interface.

Here is the code for the PIC 16F628 MCU:
(PortB.2 pin selects the polarity of the incoming MIDI signal.)

'* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
'* MIDI switch for recording light 20 MHz resonator (HS) *
'* PIC16F628 Watchdog timer OFF *
'* PORTB.0 = Output *
'* PORTB.1 = Input (MIDI) *
'* PORTB.2 = Polarity 0=+5V idle/0V pulse 1=0V idle/+5V pulse *
'* Version 1.0 16 May 2017 *
'* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

TRISB= %00000110
CMCON=7 ' Disable comparators
DEFINE OSC 20 ' 20 MHZ OSC.

BX Var Byte ' Third byte of Control message
Bx = 5
Pause 500
If PORTB.2 = 1 then AltLoop ' 0V idle / +5V pulse, go to AltLoop

loop: if Bx = 69 then PORTB.0 = 1
if Bx = 5 then PORTB.0 = 0

Serin2 PORTB.1, 12, [WAIT(176,44), Bx] ' +5V idle / 0V pulse

Goto loop

AltLoop: if BX = 69 then PORTB.0 = 1 ' 0V idle / +5V pulse
if BX = 5 then PORTB.0 = 0

Serin2 PORTB.1, 16384+12, [WAIT(176,44), Bx]

Goto AltLoop

https://www.youtube.com/watch?v=imt3...ature=youtu.be

Last edited by RuudNL; 11-11-2017 at 06:14 AM.
RuudNL is offline   Reply With Quote
Old 11-13-2017, 03:33 AM   #15
sickamorz
Banned
 
Join Date: Feb 2015
Location: Philippines
Posts: 741
Default

Put a dead bolt with no way of being operated from outside of your recording studio.
sickamorz is offline   Reply With Quote
Old 09-19-2018, 09:42 AM   #16
planktone
Human being with feelings
 
planktone's Avatar
 
Join Date: May 2006
Location: mortsel / antwerp / belgium
Posts: 147
Default

found and easy solution

i use a MIDI-RLY8 card ( https://www.robot-electronics.co.uk/htm/midi-rly8.htm )
the record relay listen to note B6 on channel 1 in FRONTIER TRANZPORT mode

w.

thx to klankschap for helping me out ...
planktone is offline   Reply With Quote
Old 12-01-2019, 08:07 AM   #17
Doofer
Human being with feelings
 
Join Date: Mar 2019
Posts: 5
Default HUI 'Record' output from Reaper dodgy? Solution...

(Reaper 5.987 x64, Win 10)

Thanks for the suggestion about using the HUI mode, RuudNL.

A nice friend of mine (sitting next to me as I type!) gave me an Arduino looking for those codes from the HUI mode. It had an optocoupler on the input, connected to the MIDI OUT of a cheap USB MIDI interface dongle - see the github page link below for a schematic.

It worked!

For a bit.

It then started only detecting 'Record' being clicked after a delay, of between 4-12 seconds, depending on the project and time of day. Sometimes it worked immediately again. It would always switch off immediately Record was clicked off.

Not so useful.

Using a terminal, we could see that the problem was actually Reaper not outputting the relevant code for some seconds after the record icon goes red and recording starts - sometimes. No other problem with record seems in evidence, just the delay in outputting the MIDI code.

This could of course be a problem with the USB-MIDI interface, but in previous use the only issue I had with this device was latency measurable in milliseconds, not ten seconds!

** Therefore, a warning - the HUI output is not to be trusted, at least not in v5.987 **


SO, we tried investigated the output of the FRONTIER TRANZPORT mode.

planktone (above) reports this as B6 on Ch 1. We couldn't see this code being sent.

What we COULD find, eventually, was a 3 byte MIDI code when RECORD is clicked:

90 5F 7F = RECORDING
90 5F 00 = NOT RECORDING

(Codes:
90: note on for channel 0
5F: note value
3rd byte = velocity(!): 7F for record on, 00 for record off )

This seems to work consistently now.

The output switches on a 'Record' light in my audio booth, as well as turning off the air conditioning fan.


Arduino sketch below.
__________________________________________________ _____________________

/* Code courtesy of Martyn Davies https://github.com/magiccow/midi-reaper */

#include <SoftwareSerial.h>


SoftwareSerial mySerial(10, 11); // RX, TX

void setOutput(int on){
if(on){
digitalWrite(LED_BUILTIN, HIGH);
digitalWrite(3, HIGH);
digitalWrite(4, LOW);
}else{
digitalWrite(LED_BUILTIN, LOW);
digitalWrite(3, LOW);
digitalWrite(4, HIGH);
}
}


int state=0;
unsigned char buffer[5];
int buflen=0;

void add(unsigned char ch){
if(state==0){
unsigned char op = ch & 0xF0;
if(op == 0xB0){
buffer[buflen++]=ch;
state=1;
}else if(op==0x80 || op==0x90 || op==0xC0 || op==0xD0){
buffer[buflen++]=ch;
state=5;
}
}else if(state==1){
if(buflen<3){
buffer[buflen++]=ch;
if(buflen==3){
for(int i=0;i<3;i++){
Serial.print(buffer[i],HEX);
Serial.print(' ');
}
Serial.println();
if(buffer[0]==0xB0 && buffer[1]==0x2C){
int on = (buffer[2]==0x45);
if(on)
Serial.println("Output on");
else
Serial.println("Output off");
setOutput(on);
}
state=0;
buflen=0;
}
}
}else if(state==5){
if(buflen<3){
buffer[buflen++]=ch;
if(buflen==3){
for(int i=0;i<3;i++){
Serial.print(buffer[i],HEX);
Serial.print(" ");
}
Serial.println();
if(buffer[0]==0x90 && buffer[1]==0x5F){
int on = (buffer[2]==0x7F);
if(on)
Serial.println("Note on: Output on");
else
Serial.println("Note off: Output off");
setOutput(on);
}
state=0;
buflen=0;
}
}
}else if(ch==0xFA || ch==0xFC){
if(ch==0xFA){
Serial.println("Start");
}else{
Serial.println("Stop");
}
}
}


void setup() {
// Open serial communications and wait for port to open:
Serial.begin(57600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}

pinMode(LED_BUILTIN, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
setOutput(0);

// set the data rate for the SoftwareSerial port
mySerial.begin(31250);
Serial.println("Running");
}


void loop() { // run over and over
if (mySerial.available()) {
unsigned char c = mySerial.read();
add(c);
}

}
Doofer is offline   Reply With Quote
Old 12-01-2019, 09:27 AM   #18
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Nice work

Probably a little late but if you download the reaper extension SDK, all the codes sent/listened to are in the csurf_device cpp files:

Code:
      case 0x5f:
          if (ispress) CSurf_OnRecord();
        break;
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.