|
|
|
03-26-2023, 05:51 PM
|
#1
|
Human being with feelings
Join Date: Jun 2011
Posts: 97
|
Latest reaper external control API
Every few years I come and check to see if there’s anything new created in the realm of controlling reaper via external messages/API.
MIDI is still very limited, OSC doesn’t seem to have been updated in like ever, so curious if there’s anything new out there? TCP or UDP or CRUD perhaps?
Hoping against hope that one day they’ll be a protocol that allows full bidirectional communication of every Reaper API C++ function. Anything yet?
|
|
|
03-27-2023, 12:56 AM
|
#2
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
- luasocket extension
- Lua Batteries extension
- Reapy library
- CSI extension...
- edit: EEL TCP functions
You should rather come every months that every year 😅
Last edited by X-Raym; 03-28-2023 at 01:31 AM.
|
|
|
03-27-2023, 07:12 AM
|
#3
|
Human being with feelings
Join Date: Jun 2011
Posts: 97
|
Quote:
Originally Posted by X-Raym
You should rather come every months that every year 😅
|
Maybe! Never saw any of these before.
Would you mind TL;DR them for me? Do they all allow direct bi-directional communication with Reaper via TCP or UDP or ??
If I just want to send and receive control messages that allow all of the Reaper API functions, which should I start looking at?
|
|
|
03-27-2023, 07:37 AM
|
#4
|
Human being with feelings
Join Date: Feb 2016
Posts: 189
|
What about the Reaper Web Remote control? Plenty of tutorials can be found.
Low level documentation here https://mespotin.uber.space/Ultrasch...mentation.html.
Also lots of folk have created Web UI's from this.
Given a use case then the community advice could be more specific.
Good luck.
|
|
|
03-27-2023, 08:15 AM
|
#5
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@goldenarpharazon
I thought about web interface but not all reaper api is available thought it.
@Mr.X
Quote:
Would you mind TL;DR them for me?
|
These are easily accessible via search engine as they all have dedicated threads 😉
|
|
|
03-27-2023, 09:22 PM
|
#6
|
Human being with feelings
Join Date: Jun 2011
Posts: 97
|
Quote:
Originally Posted by goldenarpharazon
What about the Reaper Web Remote control? Plenty of tutorials can be found.
Low level documentation here https://mespotin.uber.space/Ultrasch...mentation.html.
Also lots of folk have created Web UI's from this.
Given a use case then the community advice could be more specific.
Good luck.
|
Interesting, but seems to be missing a lot of commands and states, like track meters, adding/edit/delete markers, stuff like that. (Unless I missed it)
I’m really looking for some method of communicating with Reaper that has the FULL API with every function, state, value that is contained in the API accessible via some communication protocol.
Is there anything like that yet?
|
|
|
03-27-2023, 09:41 PM
|
#7
|
Human being with feelings
Join Date: Jun 2011
Posts: 97
|
Quote:
Originally Posted by X-Raym
@goldenarpharazon
I thought about web interface but not all reaper api is available thought it.
@Mr.X
These are easily accessible via search engine as they all have dedicated threads 😉
|
Well, I guess I’m just not very good at searching.
I can’t find any info or instructions on how to use luasocket, just talk about it with no instructions that I can find.
Not a single hit on “Lua Batteries extension” on the forum or Google.
Reapy library looks to be a python library, not a communication protocol.
The CSI extension thread is 22000+ posts long. Is there some documentation in there somewhere? What is it? Is it a communications protocol?
|
|
|
03-27-2023, 11:19 PM
|
#8
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,784
|
Quote:
Originally Posted by Mr.X
Do they all allow direct bi-directional communication with Reaper via TCP or UDP or ??
If I just want to send and receive control messages that allow all of the Reaper API functions, which should I start looking at?
|
Do you want to access the complete Reaper API or just a set of functionality for some dedicated purpose ?
ReaPy (and the supposedly not supported any more "Beyond" which a friend of mine used for exactly this) provide the complete API via OSC (and hence via UDP), (They ARE a communication protocol, as they provide a remote Python representation of the Reaper API and have the server and the client communicate via an RPC mechanism implemented on OSC messages.)
CSI and ReaLearn can communicate via OSC (UDP) and offer a commonly used bidirectional remote control command / control set,
The Reaper "Web Control" feature works via HTTP (hence TCP) protocol.
And of course there are ways to transport Midi over TCP or UDP, if the Midi based Reaper features seem more appropriate.
If you do C++, it's rather easy to do a VST3 plugin that can access the complete Reaper API (using the "JUCE" framework - I did that some months ago), With Rust language the same should be possible via the "RustAudio" crate (I intend to try this some time soon. ReaLearn { open source -> https://github.com/helgoboss/realearn } does this more "bare bone" without using RustAudio). With such plugins you of course can implement any network transport you desire.
I desperately failed trying to do a "Reaper Extension" in C++ (this is the format "CSI" uses).
Quote:
Originally Posted by Mr.X
The CSI extension thread is 22000+ posts long. Is there some documentation in there somewhere? What is it? Is it a communications protocol?
|
CSI "speaks" OSC (UDP) and Midi ("pure" and MCP).
I suppose a link to some documentation is in Geoff's message footer. But as CSI is rapidly evolving, supposedly the doc is always incomplete and you need to ask in the Threrad about specifics.
BTW.: AFAIU there are ways to run Reaper without the GUI (by swapping an open source DLL) if you really want nothing but remote control it.
-Michael
Last edited by mschnell; 03-28-2023 at 03:14 AM.
|
|
|
03-28-2023, 01:30 AM
|
#10
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Also, after a simple 'reaper udp' search, I found there are native EEL reascripts function for TCP stuffs (send, recieve, create server, listening port etc).
https://extremraym.com/cloud/reascri.../#eel_tcp_send
So many ways to send message ro reaper !
|
|
|
03-28-2023, 02:59 AM
|
#11
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,784
|
Scripts can be triggered by OSC messages.
Since some time the "ActionContext" of triggered ReaScripts is supposed to work for OSC as well (while it only did work for Midi before that). So the script can access Parameters of the OSC message.
AFAIU, scripts can send OSC messages.
-Michael
|
|
|
03-28-2023, 07:20 AM
|
#12
|
Human being with feelings
Join Date: Jun 2011
Posts: 97
|
Thanks everyone for helping me find out more information.
I could really use an example of how to use any of these.
Let's say I have a program that can spit out TCP. How do I send commands to Reaper and receive back status? (Not how do I send and receive TCP, I know how do do that, it's the Reaper side receiving commands and transmitting status that I'm looking to solve)
UDP would be ok too, just not as convenient.
Honestly, OSC would be ok if it implemented all the API commands and had a way to request status of any specific item in the API. There's been no work on OSC support in Reaper in like decades.
So, for the sake of argument, I would ike access to all possible commands and status that are in the Reaper API. (The ones that can be accessed in C++)
If anyone can find an example of how to do that, using ANY of the tools suggested, or some other tool, I'd be very grateful! :-) I don't do any programming in C++, BTW.
|
|
|
03-28-2023, 09:55 AM
|
#13
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,784
|
You should first decide which way to go.
If you want to remote-control some Reaper activities and receive some dynamic status information, AND are free which commands you send and receive on your site, I suppose the easiest way is to use CSI and find an already via OSC supported Control Surface device.
You then can install CSI and the appropriate configuration files for that device.
Now your software can simulate this device by sending and receiving the compatible OSC messages via UDP.
By that you don't need to do anything complex on the Reaper site at all
-Michael
|
|
|
03-28-2023, 06:58 PM
|
#14
|
Human being with feelings
Join Date: Jun 2011
Posts: 97
|
Quote:
Originally Posted by mschnell
You should first decide which way to go.
If you want to remote-control some Reaper activities and receive some dynamic status information, AND are free which commands you send and receive on your site, I suppose the easiest way is to use CSI and find an already via OSC supported Control Surface device.
You then can install CSI and the appropriate configuration files for that device.
Now your software can simulate this device by sending and receiving the compatible OSC messages via UDP.
By that you don't need to do anything complex on the Reaper site at all
-Michael
|
Thank you for your help with this.
I'm not using a controller, but I do want to be certain that I can send and receive most every message the Reaper API supports.
e.g. I would like to be able to send a message to reaper asking "how many tracks are in this project" and get back the #.
I want cursor position and track vu meter levels sent in real-time.
I want to be able to send a message to reaper asking what markers there are, what times they're at and their names. I want to be able to create and edit the markers.
This sort of stuff I had hoped OSC would support, but it's really not set up for any sort of querying of values.
After looking at the CSI action list, it doesn't look like it supports this sort of stuff either. If it does, maybe you can point me to where/how?
Are there any instructions on how to get started with CSI when I'm NOT using a control surface but sending and receiving TCP messages (which I can format any way it wants - I'm a programmer, just not C++)
Again, to be clear, I'm looking for access to ALL API functions, not just the ones for controllers.
Last edited by Mr.X; 03-28-2023 at 07:52 PM.
|
|
|
03-29-2023, 01:35 AM
|
#15
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,784
|
If you want to access the complete internal Reaper API, the only options I know of that don't require massive programming on the Reaper site are are "ReaPy" and "Beyond". Both are Python based and seemingly abandoned by their creators.
The reason why Python is used is that Python automatically dynamically creates a language object interface on the remote site. With other languages you need to do this manually.
If not using Python, on the Reaper site the API can be accessed by a script (EEL or LUA), by a reaper extension (this is what CSI does) or by a VST plugin (this is what ReaLearn does). For a Reaper extension you supposedly need to used C++, for a VST plugin your most obvious options are C++ or Rust.
In both cases you need to do the RPC mechanism manually on both sites, e.g. by using Protobuffer.
-Michael
|
|
|
03-29-2023, 02:33 AM
|
#16
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@mschnell
reapy has a maintained forked called reapy-boost
---
Anyway, this thread is running in circle. We already list various solutions with complete access to API, right from post #2.
There are various theads with infos, links etc.
Some infos are indeed a bit light like for EEL tcp but I found working code snippet in some threads.
Asking to write generic custom code for each of these solutions is a bit much to ask cause it does take time, and as this is not related to particular project, it lacks of incentive to donit as dont even know that the research will be used in the end.
You have to explore on your own to see what fit your workflow and come back tell us what solutions you choose!
Note: it is false to claims that reaper didnt had any OSC update since 10 years. Ir had major changes like bidirectionnal communication. check changelog for more infos about what more was added.
|
|
|
03-29-2023, 09:21 AM
|
#17
|
Human being with feelings
Join Date: Jun 2011
Posts: 97
|
Quote:
Originally Posted by X-Raym
@mschnell
reapy has a maintained forked called reapy-boost
|
I'll see if I can find that.
Quote:
Anyway, this thread is running in circle. We already list various solutions with complete access to API, right from post #2.
There are various theads with infos, links etc.
|
Not looking to be spoon-fed, just some help finding the actual links within the 10's of 1000's of posts here. Any example of IP communication of any kind to reaper's API would be of benefit, or a way to find anyone involved in any of the projects that might be able to answer a question, so I can find some documentation or at least "yes, this plugin/library can do these things" would be very much appreciated.
Quote:
Asking to write generic custom code for each of these solutions is a bit much to ask cause it does take time, and as this is not related to particular project, it lacks of incentive to donit as dont even know that the research will be used in the end.
|
I understand, and not looking for that (Even though if it were me, I'd be happy to do so if I knew the answer), just looking for a point in the right direction.
It seems like at least one of your suggestions (CSI) cannot do what I'm asking.
@mschnell has given me something additional information to go on, suggesting that ReaPy and Beyond are probably the only solutions that will work for me.
At one point, there was a person working on a C# wrapper for all the C++ calls, but it only just got started and abandoned.
SO many things get started for Reaper and then abandoned!
Quote:
You have to explore on your own to see what fit your workflow and come back tell us what solutions you choose!
|
Sure, just point me to the person to ask so I don't waste a lot of time on VST/Plugins/Libraries that aren't going to do what I want. I would be happy to do the same for anyone who asked me about the stuff that I do. :-)
Quote:
Note: it is false to claims that reaper didnt had any OSC update since 10 years. Ir had major changes like bidirectionnal communication. check changelog for more infos about what more was added.
|
That would be amazing if someone had actually updated it to allow querying of values, and TBH, I've asked in the OSC thready many times, and so far the answer has been no.
I know you hate giving links, but if you have any links to evidence that OSC now supports queries (i.e. requesting a single value) then it would be great if you felt like helping me out!
Appreciate everything I've gotten so far, it does at least sound hopeful!
|
|
|
03-29-2023, 11:54 AM
|
#18
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,784
|
Quote:
Originally Posted by Mr.X
... OSC now supports queries (i.e. requesting a single value)
|
That is not something usually done with OSC. OSC is intended as a "push" protocol, transferring parameter changes when imposed and automatically transferring state changes when those happen.
Hence I doubt the Reaper devs ever will implement any poll protocol on top of OSC .
-Michael
|
|
|
03-29-2023, 02:23 PM
|
#19
|
Human being with feelings
Join Date: Jun 2011
Posts: 97
|
Quote:
Originally Posted by mschnell
That is not something usually done with OSC. OSC is intended as a "push" protocol, transferring parameter changes when imposed and automatically transferring state changes when those happen.
Hence I doubt the Reaper devs ever will implement any poll protocol on top of OSC .
-Michael
|
That’s probably true for some OSC implementations, but there are many devices in my world that when sent an OSC message without a value, reply with the current value of that message.
Sadly, the Reaper implementation doesn’t support this, and the reason I am still searching for another solution.
|
|
|
03-22-2024, 02:00 PM
|
#21
|
Human being with feelings
Join Date: Jun 2011
Posts: 97
|
Quote:
Originally Posted by mschnell
Scripts can be triggered by OSC messages.
Since some time the "ActionContext" of triggered ReaScripts is supposed to work for OSC as well (while it only did work for Midi before that). So the script can access Parameters of the OSC message.
AFAIU, scripts can send OSC messages.
-Michael
|
How does one trigger a script from and OSC message? I've got the gist of making a ReaScript, but have not figured out yet how to fire that script from an incoming OSC message and pass it's parameters via the get_action_context() function.
I've done a day's searching on this forum and the internet, and asked on other forums, but so far haven't found the secret...
|
|
|
03-22-2024, 02:34 PM
|
#22
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,784
|
AFAIR, the "add" dialog for actions reacts on Midi and OSC messages coming in and remembers those (like key combinations).
|
|
|
03-22-2024, 02:47 PM
|
#23
|
Human being with feelings
Join Date: Jun 2011
Posts: 97
|
Quote:
Originally Posted by mschnell
AFAIR, the "add" dialog for actions reacts on Midi and OSC messages coming in and remembers those (like key combinations).
|
TY, but I've read that you can somehow link a single ReaScript to "any" OSC message, which is exactly what would be ideal.
See here:
https://forum.cockos.com/showpost.ph...1&postcount=26
|
|
|
03-23-2024, 01:07 AM
|
#24
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,784
|
Yep.
A script is automatically assigned to an action it is started by. And then the action can be assigned to an OSC message.
|
|
|
03-23-2024, 05:31 AM
|
#25
|
Human being with feelings
Join Date: Jun 2011
Posts: 97
|
Quote:
Originally Posted by mschnell
Yep.
A script is automatically assigned to an action it is started by. And then the action can be assigned to an OSC message.
|
Ok, I must be missing something. It still sounds like you're still talking about a single OSC message calling a single specific action.
My read of https://forums.cockos.com/showpost.p...1&postcount=26
is that a script can be connected to ANY OSC message, I'm assuming without being connected to a specific action.
|
|
|
03-23-2024, 05:45 AM
|
#26
|
Human being with feelings
Join Date: Jun 2011
Posts: 97
|
Also in the ReaScript manual it refers to this same thing.
Quote:
Action binding
You can query various contextual information about the script, at runtime, using get_action_context()/ reaper.get_action_context() (sorry, no Python support) . You can retrieve MIDI/OSC/mouse-wheel/trackpad input values when the script is bound to MIDI/OSC controllers (both absolute and relative modes are supported), or to the mouse-wheel/trackpad.
Here is a basic Lua example which monitors received MIDI/OSC input values:
Code:
function run()
is_new,name,sec,cmd,rel,res,val = reaper.get_action_context()
if is_new then
reaper.ShowConsoleMsg(name .. "\nrel: " .. rel .. "\nres: " .. res .. "\nval = " .. val .. "\n")
end
reaper.defer(run)
end
function onexit()
reaper.ShowConsoleMsg("<-----\n")
end
reaper.defer(run)
reaper.atexit(onexit)
|
My understanding though is that the get_action_context() function now has an additional parameter at the end "contextstr" which can carry the OSC string.
|
|
|
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 02:43 PM.
|