|
|
|
12-30-2021, 01:36 PM
|
#1
|
Human being with feelings
Join Date: Apr 2016
Location: Stuttgart, Germany
Posts: 217
|
OSC from Reascript to outside Reaper
Hello you fine people,
is it possible to send OSC messages to external devices
from Reascript in Lua?
Thank you,
Micha
|
|
|
12-31-2021, 04:27 AM
|
#2
|
Human being with feelings
Join Date: Apr 2016
Location: Stuttgart, Germany
Posts: 217
|
Is there ANY way to send custom OSC messages to outside of reaper?
Could it be that Reaper only sends a certain set of OSC messages (like play status, track selection) to the outside but doesn't let the user send his own messages (like a string)?
(I'm trying to send feedback to a Streamdeck btw)
|
|
|
12-31-2021, 04:48 AM
|
#3
|
Human being with feelings
Join Date: Sep 2017
Posts: 998
|
Hi there, I was following the thread because I don't know the answer.
I suspect that the answer is no, though. I know there is a function for sending midi both out to enabled midi surfaces and into the control path or the virtual keyboard called StuffMidiMessage. I'm fairly sure the same doesn't exist for OSC though as I've looked myself.
Another thing I don't know for sure (sorry) but Realearn might be worth checking into. You should be able to send custom osc messages in the advanced section but I haven't dug into Realearn as much as I would have liked to at this point.
|
|
|
12-31-2021, 05:24 AM
|
#4
|
Human being with feelings
Join Date: Aug 2007
Location: London, UK
Posts: 767
|
Despite having been asked for for years, the feature still isn't available. I'm sure there are good technical reasons...
I've done "magic" like having TouchOSC send OSC messages from a button but have an LED sensitive to MIDI messages "under" it, then have the script send the appropriate MIDI message. Painful but it works.
The design of the Reaper OSC system is the .ReaperOSC file, really - pattern match the input, trigger the operation, issue the OSC message reflecting the new state.
I also use "cheats" like having
TRACK_SELECT b/track/@/onOff
in my .ReaperOSC pattern file and then selecting a track in the script -- triggering the state update and issuing the message. Then my control surface uses that message to light an LED (vaguely related to track selection but I needed to run a script as there's no "track exclusive enable apart from the following" command built in for some reason... ).
__________________
Quote:
Originally Posted by Tony Williams
...Playing fast around the drums is one thing. But to play with people for others, to listen to, that's something else. That's a whole other world.
|
|
|
|
01-01-2022, 10:06 AM
|
#5
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
ANY WAY ?!?!?
AFAIU, you can generate Midi Messages by the Reaper API in a ReaScript and use ReaPack->ReaLearn to receive same and send out OSC messages.
-Michael
|
|
|
01-02-2022, 02:21 PM
|
#6
|
Human being with feelings
Join Date: Apr 2016
Location: Stuttgart, Germany
Posts: 217
|
Thank you all for your help!
Quote:
Originally Posted by cjewellstudios
Realearn might be worth checking into
|
Yes i had a look at Realearn and it does support OSC devices, but i couldn't get mine to connect. I might have to look into it again.
Also, i've read, in another thread, a comment by the Realearn dev that sending OSC strings is not supported by Reaper. I was really hoping to send strings specifically.
Quote:
Originally Posted by pljones
Despite having been asked for for years, the feature still isn't available.
|
Mh too bad :-/ Thank you for the info.
Quote:
Originally Posted by mschnell
ANY WAY ?!?!?
AFAIU, you can generate Midi Messages by the Reaper API in a ReaScript and use ReaPack->ReaLearn to receive same and send out OSC messages.
-Michael
|
Yes, that seems like a viable workaround. I was really hoping though to send out strings, and i think Realearn can't send strings. Certainly, Midi can't.
Also, it begs the question: If Realearn can send OSC, what do i have to do (that Realearn does right) so write code that sends OSC?
|
|
|
01-02-2022, 03:32 PM
|
#7
|
Human being with feelings
Join Date: Aug 2010
Location: Germany
Posts: 2,185
|
Quote:
Originally Posted by GameAudioRvlzzr
Yes i had a look at Realearn and it does support OSC devices, but i couldn't get mine to connect. I might have to look into it again.
Also, i've read, in another thread, a comment by the Realearn dev that sending OSC strings is not supported by Reaper. I was really hoping to send strings specifically.
|
Let me quickly correct that before the rumor spreads ;-) My comment here was that ReaScripts can't be called with a string parameter. This is not related to OSC, at least not directly.
ReaLearn certainly can send string arguments to OSC devices. REAPER, too. This is not an issue.
The issue regarding REAPER is that it doesn't provide any ReaScript function that allows one to send an OSC message to an external OSC device, not even one with a number argument. I'm sure if the devs would add one, it wouldn't be a big deal at all to support strings.
The issue regarding ReaLearn is similar. It can send OSC, but only as part of its built-in feedback functionality (both text and numbers) and with the dedicated "OSC: Send message" target (numbers only at the moment) - so only for control/feedback purposes, that is in response to incoming MIDI/OSC messages and certain events in REAPER.
Although one can use scripting in certain parts of ReaLearn (control/feedback transformation, generating MIDI feedback in response to target value changes, etc.), it's not a scripting environment comparable to ReaScript. It's not a generic programming platform made for writing totally custom scripts and executing them on demand.
Quote:
Originally Posted by GameAudioRvlzzr
Yes, that seems like a viable workaround. I was really hoping though to send out strings, and i think Realearn can't send strings. Certainly, Midi can't.
Also, it begs the question: If Realearn can send OSC, what do i have to do (that Realearn does right) so write code that sends OSC?
|
BTW, it's not impossible to send text via MIDI. ReaLearn, CSI, Klinke and all that stuff ... they all send text via MIDI sys-ex by adhering e.g. to the Mackie protocol. But you are right, for your purposes this is probably not helpful.
So much for the status quo.
Something I could do is exposing a ReaScript function from ReaLearn which lets one send arbitrary OSC messages to the OSC devices configured in ReaLearn. (ReaLearn uses its own OSC infrastructure so it doesn't work with the OSC devices which are set up in the REAPER preferences.)
|
|
|
01-02-2022, 05:19 PM
|
#8
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Quote:
Originally Posted by GameAudioRvlzzr
If Realearn can send OSC, what do i have to do (that Realearn does right) so write code that sends OSC?
|
Learn EEL
In my setup (done before ReaLearn was released, I use OSCIIBot instead, connected to Reaper via LoopMidi. OSCIIBot can do anything with Midi and OSC.
-Michael
Last edited by mschnell; 01-02-2022 at 11:40 PM.
|
|
|
01-02-2022, 05:48 PM
|
#9
|
Human being with feelings
Join Date: Aug 2010
Location: Germany
Posts: 2,185
|
I agree, OSCII-bot is great for OSC/MIDI routing. Only downside is that it runs outside of REAPER and is therefore not suited for calling ReaScript functions.
The best solution would clearly be if ReaScript would get a possibility of sending OSC messages.
|
|
|
12-17-2023, 01:50 AM
|
#10
|
Human being with feelings
Join Date: Feb 2021
Posts: 28
|
Quote:
Originally Posted by GameAudioRvlzzr
Thank you all for your help!
Also, it begs the question: If Realearn can send OSC, what do i have to do (that Realearn does right) so write code that sends OSC?
|
Maybe I'm missing something , but you could just create a realearn mapping with source parameter1. then in reascript code change that parameter to a specific value
Code:
calcv = calculateValue()
-- track , fx id pointing to realearn FX // 0 = first param
reaper.TrackFX_SetParam(track,fxIdx,0,calcv)
|
|
|
12-17-2023, 04:52 AM
|
#11
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Quote:
Originally Posted by helgoboss
OSCII-bot is great for OSC/MIDI routing. Only downside is that it runs outside of REAPER and is therefore not suited for calling ReaScript functions.
The best solution would clearly be if ReaScript would get a possibility of sending OSC messages.
|
OSCIIBot as a plugin with standard Midi I/O also would be very nice to have.
Supposedly ReaLearn can do this, but for very dedicated OSC stuff,OSCIIBot seems nice and compact.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:10 PM.
|