Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Live Use

Reply
 
Thread Tools Display Modes
Old 07-01-2022, 10:18 AM   #1
hlavsa
Human being with feelings
 
Join Date: Oct 2018
Posts: 14
Default Sending OSC command from Reaper to X Air mixer - cool

I just found a cool way how to send OSC command directly from Reaper to X Air mixer during live session and it might be interesting to others:
Situation:
- I have a song with tracks that I use for live playing with Reaper.
- I want to send timed OSC commands to our X18 mixer to switch off and on insert effect in mixer during the song (ex. for choruses)

I found this solution:
1. Download command line utility sendosc.exe from https://github.com/yoggy/sendosc

2. Create a lua script with just 1 line of code: "reaper.ExecProcess('D:\\Downloads\\sendosc-win-1.0.2\\sendosc.exe 192.168.0.110 10024 /ch/08/insert/on i 0', 0)"
You have to change the IP address and port number for your X Air mixer.
You have to change the path to the sendosc utility.
You have to use double \\ in a path string.
You have to change the OSC command if you want to change different parameter of X Air mixer. I am switching OFF (and later ON) the insert FX on channel no. 8.

3. Insert action marker beginning with ! and ID of the lua user action, ex. !_RS1687c9d8d1924feb8fdd0812521ef8025cdb88f7

When Reaper plays the song and gets to the marker it will execute shell command that sends OSC command to X Air mixer.

Last edited by hlavsa; 05-05-2023 at 12:06 AM.
hlavsa is offline   Reply With Quote
Old 07-01-2022, 12:24 PM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Great !

I did something similar, but not for automatic procedure, but for bidirectional syncing of values in Reaper and the XAir. I also used an external program - namely OSCIIBot by Cockos - to convert Midi and OSC to and fro. (In Reaper I use JSFXes instead of scrips to send and receive (Midi-) messages.)

This does work fine, but I never was happy with using an external program.
Later ReaLearn was created and same now does speak OSC. IMHO this is a much nicer option than using external converter software.
-Michael

Last edited by mschnell; 07-01-2022 at 12:31 PM.
mschnell is offline   Reply With Quote
Old 07-07-2022, 01:58 PM   #3
hlavsa
Human being with feelings
 
Join Date: Oct 2018
Posts: 14
Default

Quote:
Originally Posted by mschnell View Post
Great !

I did something similar, but not for automatic procedure, but for bidirectional syncing of values in Reaper and the XAir. I also used an external program - namely OSCIIBot by Cockos - to convert Midi and OSC to and fro. (In Reaper I use JSFXes instead of scrips to send and receive (Midi-) messages.)

This does work fine, but I never was happy with using an external program.
Later ReaLearn was created and same now does speak OSC. IMHO this is a much nicer option than using external converter software.
-Michael
Interesting. I needed just a very simple OSC command to be automatically sent to my X18 mixer console at exact timing during song playback to change EFX parameter in mixer and then to change it back. Therefore, a simple command line external tool was OK for me. OSCIIBot language seems to me to be too complex for what I need so I did not have nerves to learn it.
But I would be interested if I could send OSC directly from Reaper. It should be possible using OSC library for Python in Reaper or OSC library for Lua. Any suggestions?
hlavsa is offline   Reply With Quote
Old 07-07-2022, 04:37 PM   #4
EcBaPr
Human being with feelings
 
Join Date: Aug 2009
Posts: 402
Default

thanks for posting.. i will probably find a use for this with X32 also..

I agree with mschnell that external programs are never ideal solution but this sendosc file is only 18kbs so its very lightweight (and assuming its not buggy in anyway).. I'm already using OSCii to link selected faders with X32 faders which works ok but ultimately it would be great if there was more native solution such as a script etc..

Last edited by EcBaPr; 07-07-2022 at 04:49 PM.
EcBaPr is offline   Reply With Quote
Old 07-07-2022, 09:40 PM   #5
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by hlavsa View Post
But I would be interested if I could send OSC directly from Reaper. It should be possible using OSC library for Python in Reaper or OSC library for Lua. Any suggestions?
ReaLearn.

-Michael
mschnell is offline   Reply With Quote
Old 07-08-2022, 12:13 AM   #6
EcBaPr
Human being with feelings
 
Join Date: Aug 2009
Posts: 402
Default

IMO ReaLearn is a bit overkill if you just want to send OSC address occasionally to one device.. the DLL is 20meg.. ideally a native solution in Reaper would be best otherwise scripting solution would be good..

with that said, nothing wrong with Realearn especially for multiple controllers/devices or if you want a gui but just doesn't seem the most efficient for occasional updates to a single device..
EcBaPr is offline   Reply With Quote
Old 07-08-2022, 09:57 AM   #7
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

AFAIU the file size of a DLL says nothing about how heavy it is when actually used.

The great thing about Reaper is that you can use (many kinds of) plugins to add seldomly used features for interested users.
-Michael
mschnell is offline   Reply With Quote
Old 07-08-2022, 07:07 PM   #8
EcBaPr
Human being with feelings
 
Join Date: Aug 2009
Posts: 402
Default

Quote:
Originally Posted by mschnell View Post
AFAIU the file size of a DLL says nothing about how heavy it is when actually used.
i think in most situations the ram usage is unlikely to be smaller than the DLL size though ? if anything it would increase.. also its not hard to check in Reapers performance monitor.. when i loaded ReaLearn just now ram use increases around 50mb..

these days ram isnt a major issue and 50mb isnt huge but if all you need to do is just update a single address occasionally, its not as economical as it could be.. nothing against Realearn.. its great, especially for more complex setups but IMO the best solution for simple applications would be a script directly from Reaper (if its possible ?)..
EcBaPr is offline   Reply With Quote
Old 07-08-2022, 09:47 PM   #9
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by EcBaPr View Post
a script directly from Reaper (if its possible ?)..
No.

AFAIK, Reaper does not offer an API for directly using OSC.

Hence the functionality (plugin) would need to do OS Network API calls do to OSC transfers with external equipment.

-Michael
mschnell is offline   Reply With Quote
Old 07-09-2022, 04:57 AM   #10
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 2,184
Default

Just some facts about ReaLearn's resource consumption:
  • Loading the *first* ReaLearn instance will take a bit of memory, yes (something between 50 and 100 MB, depends a bit on the OS how much).
  • Adding more instances is rather cheap (5 MB or so).
  • ReaLearn uses this memory mainly for achieving better performance and reserves it to prevent allocation from real-time threads (to prevent in turn clicks, dropouts etc.).
helgoboss is offline   Reply With Quote
Old 07-16-2022, 04:47 AM   #11
rschiener
Human being with feelings
 
Join Date: Jun 2022
Posts: 2
Default

I can't figure out, how to use ReaLearn to control the XAir via OSC

- with MIDI it works fine (but only a subset of XAir-Parameters is available via MIDI)
- with sendosc I can control the XAir, so principially it should work.

But using the same parameters I struggle with ReaLearn/OSC:

1. I added a OSC-Device in ReaLearn (LocalPort: tried different ones, eg. 7878, 8000, 8080,10024 ...; Host-Address: XAir-IP; Host-Port: 10024)
2. As control input and feedback output I chose XAir (OSC)
3. XAir is not set as OSC-Source in Reaper -> Options -> OSC

- "learn" doesn't react on XAir fader movements
- I neither receive XAir-fader-movements nor do the faders react on fader movements in Reaper.

Could anyone please help me? Thank you!
Ralf
Attached Images
File Type: png Bild 001.png (5.4 KB, 133 views)
File Type: png Bild 002.png (33.0 KB, 119 views)
File Type: png Bild 003.png (31.0 KB, 119 views)
File Type: png Bild 004.png (19.6 KB, 115 views)
rschiener is offline   Reply With Quote
Old 07-16-2022, 06:04 AM   #12
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Welcome to the Reaper Fprums !

You don't talk about the XAir's IP address. Same needs to be configured in ReaLearn.

-Michael

Last edited by mschnell; 07-16-2022 at 06:10 AM.
mschnell is offline   Reply With Quote
Old 07-16-2022, 06:47 AM   #13
rschiener
Human being with feelings
 
Join Date: Jun 2022
Posts: 2
Default

Thanks for your fast reply, Michael.

Quote:
Originally Posted by mschnell View Post
Welcome to the Reaper Fprums !

You don't talk about the XAir's IP address. Same needs to be configured in ReaLearn.

-Michael
XAir's IP is what I entered in Device host (when I configured XAir as OSC device), see "Bild 001.png" (grayed out). Do I have to configure it elsewhere?
rschiener is offline   Reply With Quote
Old 07-16-2022, 02:51 PM   #14
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Bild001 looks rather funny on that behalf.
-Michael
mschnell 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 03:31 AM.


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