Old 04-09-2019, 04:02 AM   #41
Centauria
Human being with feelings
 
Join Date: Apr 2019
Posts: 3
Default

Hey bro, when I ran python -m reapy, it can't find python.dll

================================================== =
(py36) C:\Users\Administrator>python -m reapy
D:\PF\Anaconda3\envs\py36\lib\site-packages\reapy\tools\dist_program.py:14: Disa
bledDistAPIWarning: Can't reach distant API. Please start REAPER, or call reapy.
config.enable_dist_api() from inside REAPER to enable distant API.
warnings.warn(DisabledDistAPIWarning())

======================
reapy config infos
======================

Python DLL
----------
Can't find python DLL...

Enable or disable reapy dist API
--------------------------------
Enable dist API
D:\PF\Anaconda3\envs\py36\lib\site-packages\reapy\reascripts\enable_dist_api
.py

Disable dist API
D:\PF\Anaconda3\envs\py36\lib\site-packages\reapy\reascripts\disable_dist_ap
i.py
==================================================





and I ran into an issue when I was trying to run enable_dist_api.py in REAPER


================================================== =
Script execution error

Traceback (most recent call last):
File "enable_dist_api.py", line 12, in <module>
import reapy
ModuleNotFoundError: No module named 'reapy'
================================================== =

why can't find the module reapy?
I am sure about the version of python is the one REAPER uses.
Help...
Centauria is offline   Reply With Quote
Old 04-09-2019, 04:40 AM   #42
romeo_despres
Human being with feelings
 
Join Date: Jan 2019
Posts: 35
Default

@nir.arad

To be honest I am puzzled by your bug... I'll let you know if I find out where that comes from.

@Centauria

It seems you have installed reapy through Anaconda? I am not an Anaconda expert but from your traceback I am guessing REAPER might have trouble finding the path to your conda environment... Could you try running the following inside REAPER and show us the result?

Code:
import sys
RPR_ShowConsoleMsg(sys.path)
romeo_despres is offline   Reply With Quote
Old 04-09-2019, 05:09 AM   #43
Centauria
Human being with feelings
 
Join Date: Apr 2019
Posts: 3
Default

The output is


['C:/Users/Administrator/AppData/Roaming/REAPER/Scripts', 'C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python36_64\\Lib', 'C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python36_64\\DLLs', 'D:\\PF\\REAPER (x64)', 'C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python36_64', 'C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python36_64\\lib\\site-packages', 'D://PF//REAPER (x64)//Plugins']

thx.
Centauria is offline   Reply With Quote
Old 04-09-2019, 05:23 AM   #44
romeo_despres
Human being with feelings
 
Join Date: Jan 2019
Posts: 35
Default

Thanks. So you can see that the place where reapy is located (D:\PF\Anaconda3\envs\py36\lib\site-packages) is not in sys.path by default when you run Python outside Anaconda. That explains why REAPER can't find it.

You can extend sys.path permanently by creating a path configuration file.

In your case, go to C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages and create a .pth file (for instance, "anaconda_env.pth") containing the following:

Code:
D:\PF\Anaconda3\envs\py36\lib\site-packages
If I'm not missing anything about Anaconda, you should now be able to import reapy from inside REAPER and thus to enable the distant API.

Last edited by romeo_despres; 04-09-2019 at 05:29 AM.
romeo_despres is offline   Reply With Quote
Old 04-09-2019, 09:27 AM   #45
Centauria
Human being with feelings
 
Join Date: Apr 2019
Posts: 3
Default

It worked!
Thank you
Centauria is offline   Reply With Quote
Old 04-21-2019, 12:29 PM   #46
chabErch
Human being with feelings
 
Join Date: Feb 2017
Posts: 1
Default

Hi @romeo_despres, great work!

Is it possible to run sws scripts with reapy?
chabErch is offline   Reply With Quote
Old 04-21-2019, 03:15 PM   #47
fladd
Human being with feelings
 
fladd's Avatar
 
Join Date: May 2006
Posts: 945
Default

This is great! I already thought I'm the only one who cares about pep8 :-)
__________________
www.fladd.de/sound
fladd is online now   Reply With Quote
Old 05-13-2019, 08:59 AM   #48
romeo_despres
Human being with feelings
 
Join Date: Jan 2019
Posts: 35
Default

Quick update: thanks to chabErch's contribution, SWS functions can now be run from outside REAPER with reapy. More precisely, if the SWS extension is installed, then reapy.reascript_api contains all functions in sws_python; otherwise it only contains native ReaScript functions.
romeo_despres is offline   Reply With Quote
Old 05-13-2019, 10:31 AM   #49
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,117
Default

@romeo_despres
Cool !


Does it also contains JS_ReaScript and Reapack API functions ?
X-Raym is offline   Reply With Quote
Old 05-14-2019, 02:48 AM   #50
romeo_despres
Human being with feelings
 
Join Date: Jan 2019
Posts: 35
Default

I have only recently discovered these and haven't been able to make them work yet (I posted a related question recently but didn't get any reply...) But it would definitely make sense to include them as well
romeo_despres is offline   Reply With Quote
Old 05-14-2019, 03:53 AM   #51
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,117
Default

Ok so it is not an automatic way to load all extensions API.
Thanks for the infos !
X-Raym is offline   Reply With Quote
Old 05-14-2019, 06:01 AM   #52
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,197
Default

Quote:
Originally Posted by romeo_despres View Post
I have only recently discovered these and haven't been able to make them work yet (I posted a related question recently but didn't get any reply...) But it would definitely make sense to include them as well
Maybe post in the related threads (here and here) for them to not miss it.
nofish is online now   Reply With Quote
Old 05-14-2019, 06:39 AM   #53
romeo_despres
Human being with feelings
 
Join Date: Jan 2019
Posts: 35
Default

Quote:
Originally Posted by X-Raym
Ok so it is not an automatic way to load all extensions API.
Thanks for the infos !
That's what I was trying to do in the first place... Someday hopefully

@nofish

Thanks you're right I'll do that!
romeo_despres is offline   Reply With Quote
Old 05-14-2019, 08:01 AM   #54
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,197
Default

@romeo_despres

Not sure if it helps, but SWS uses a Pearl script to generate the Python function wrappers:
https://github.com/reaper-oss/sws/bl...ript_python.pl
nofish is online now   Reply With Quote
Old 05-14-2019, 11:08 AM   #55
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,690
Default

Somebody made one for JS-extension, even if it's a little outdated. Just browse through the JS-extension-thread. Maybe you can use it and update it.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 05-28-2019, 01:22 AM   #56
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,117
Default

Quote:
Great I'm glad it eventually worked! About your "command window" problem, I have found this which seems to answer your question (I wasn't aware of that technique and haven't tried it though).
I confirm that running a reapy script on windows by double cliking on it on WIndows is possible without having CMD window by having extension set to .pyw instead of .py.


--
Here is a minimal tkinter code snippet for reapy:


https://github.com/ReaTeam/ReaScript...er%20reapy.pyw

It is not extra quick to launch (count 1-2 seconds), I don't know if it is reapy limitation or just python. Script run from action list are quicker (but they still keyboard focus).
X-Raym is offline   Reply With Quote
Old 05-28-2019, 02:58 AM   #57
romeo_despres
Human being with feelings
 
Join Date: Jan 2019
Posts: 35
Default

Quote:
Originally Posted by X-Raym View Post
It is not extra quick to launch (count 1-2 seconds), I don't know if it is reapy limitation or just python. Script run from action list are quicker (but they still keyboard focus).
On my computer, both are quite slow: starting Python itself, but also importing reapy from outside REAPER. It indeed requires several interactions with the REAPER Web Interface, which is pretty slow.
romeo_despres is offline   Reply With Quote
Old 05-28-2019, 04:07 AM   #58
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,117
Default

Quote:
On my computer, both are quite slow: starting Python itself, but also importing reapy from outside REAPER. It indeed requires several interactions with the REAPER Web Interface, which is pretty slow.

It is not that a problem if the scripts seems complex (like have a nice polish GUI with lots of elements), but it really feels not good if it is just a single user input.


But I don't think anything can be done on this so we'll live with it.
It still have a lot of advantage compare to native way (like allowing all kind of python dependencies and not stealing keyboard focus).
X-Raym is offline   Reply With Quote
Old 05-28-2019, 05:21 AM   #59
romeo_despres
Human being with feelings
 
Join Date: Jan 2019
Posts: 35
Default

Indeed one probably has to wonder which option is best depending on the complexity of the program. For a simple user input, I guess it's better to use the ReaScript function "GetUserInputs" from inside REAPER. It makes me realize there is no reapy counterpart to this function, which is once again not very easy to use for a standard Python programmer... I'll try to add one soon!
romeo_despres is offline   Reply With Quote
Old 06-06-2019, 01:38 AM   #60
Kostik Vento
Human being with feelings
 
Join Date: Nov 2013
Location: Yekaterinburg, Russia
Posts: 11
Default

Quote:
Originally Posted by romeo_despres View Post
I think this project can become interesting only if other people in the community provide feedback and improvement, on the code itself as well as the documentation, structure, etc. So please don't hesitate to try it out and report bugs or missing features. And if you feel like coding yourself, feel free to fork the repository! As a Python ReaScripter, I know you dream like me of a well-established community-based REAPER API!
That's about me)) I like both Python and Reaper, I do dream, so I've forked ))
And I do have some suggestions about improvements, would you prefer to discuss them here or on GitHub?

Quote:
Originally Posted by romeo_despres View Post
P.P.S. reapy should be cross-platform but since I have only tested it on Windows I couldn't swear. Yet I do think this is an important feature. We all love REAPER for Linux.
I've tried on MacOSX Sierra, it works fine for me. There are, still, minor bugs, I've opened pull requests for them, hope to see them reviewed soon))
And there's a serious bug I've almost run into — if your reaper.ini contains non-ASCII chars, rewriting config would crash half-way with the rest of your settings gone( My luck was to have the file opened in a text editor which had the full copy of the lost contents.

P.S. I made it work under Python2 (except enable/disable_dist_api), but the resulting code lost its pythonicity a bit, so I'll keep refactoring. And alas, you can't use reapy.print in Python2 because print is reserved there and cannot be used as identifier.

Last edited by Kostik Vento; 06-06-2019 at 01:54 AM.
Kostik Vento is offline   Reply With Quote
Old 06-06-2019, 05:41 AM   #61
romeo_despres
Human being with feelings
 
Join Date: Jan 2019
Posts: 35
Default

Thank you a lot for your help! I think the simplest is to communicate on GitHub as you did. I've seen your requests but been very busy lately so I haven't been able to review them in detail... But they seem to fix a lot of important issues! I'll try to reply to you asap there
romeo_despres is offline   Reply With Quote
Old 10-03-2019, 03:10 PM   #62
tparker24
Human being with feelings
 
Join Date: Dec 2017
Posts: 56
Default How invoke?

I'm a little confused on how to invoke the python script that uses reapy.

I actually want the script to run OUTSIDE of Reaper, but I want to be able to invoke the script from WITHIN Reaper, say via an Action item (or a Button and/or a shortcut).

Would I need a small script to call it, that just runs maybe one of these:
ExecProcess()
or
reaper.CF_ShellExecute()
and supplying the full path name to my python script, e.g.
Code:
ExecProcess("C:\some\path\to\my_python_script.py")
Or am I making this too hard?
tparker24 is offline   Reply With Quote
Old 10-06-2019, 09:23 AM   #63
romeo_despres
Human being with feelings
 
Join Date: Jan 2019
Posts: 35
Default

I think you're right, the correct way to do that would be to have two scripts, one that runs inside REAPER and looks like:

Code:
RPR_ExecProcess('py path/to/external_script.py', -1)
and a second one (external_script.py) which is the actual reapy app.
romeo_despres is offline   Reply With Quote
Old 10-06-2019, 10:01 AM   #64
tparker24
Human being with feelings
 
Join Date: Dec 2017
Posts: 56
Default

Ok, thanks for confirming.

I've just started using reapy, and I'm very impressed! It was easy to install and seems very straightforward to use. Running python outside of Reaper really opens up some possibilities, because some python things don't run too well (or at all) inside the Reaper environment ... for example PyQt or wXPthon, two powerful GUI programs.

reapy kind of unleashes python. Thanks for making it available.


Quote:
Originally Posted by romeo_despres View Post
I think you're right, the correct way to do that would be to have two scripts, one that runs inside REAPER and looks like:

Code:
RPR_ExecProcess('py path/to/external_script.py', -1)
and a second one (external_script.py) which is the actual reapy app.
tparker24 is offline   Reply With Quote
Old 10-10-2019, 11:33 AM   #65
tparker24
Human being with feelings
 
Join Date: Dec 2017
Posts: 56
Default reapy.Project.n_selected_tracks

I thought reapy.Project.n_selected_tracks was supposed to return an integer, but I'm getting a property object instead:

Code:
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

>>> import reapy
>>> reapy.Project.n_selected_tracks
 <property object at 0x0000000003148F48>
BTW, I get the exact same output, if there are 0, 1, or more tracks selected.
tparker24 is offline   Reply With Quote
Old 10-10-2019, 12:07 PM   #66
tparker24
Human being with feelings
 
Join Date: Dec 2017
Posts: 56
Default reapy.Project.n_selected_tracks

I got it to work by adding some parens:

Code:
>>> reapy.Project().n_selected_tracks
 1
Or another way:

Code:
>>> my_project = reapy.Project()
>>> my_project.n_selected_tracks
1
tparker24 is offline   Reply With Quote
Old 10-10-2019, 04:13 PM   #67
tparker24
Human being with feelings
 
Join Date: Dec 2017
Posts: 56
Default play_state problem

This might be a little bug:


Code:
File <my script...>
  if project.play_state == "pause":

File "C:\Users\Tom Parker\AppData\Local\Programs\Python\Python37\lib\site-packages\reapy\core\project\project.py", line 690, in play_state

  state = states[RPR.GetPlayStateEx(self.id)]
KeyError: 0
tparker24 is offline   Reply With Quote
Old 10-10-2019, 05:49 PM   #68
tparker24
Human being with feelings
 
Join Date: Dec 2017
Posts: 56
Default Track objects

I've noticed that reapy uses a slightly different format for the track object than does RPR:

Code:
project.get_selected_track()  
Track("(MediaTrack*)0x000000000395E870")   # reapy

RPR.GetSelectedTrack(0,0)    
(MediaTrack*)0x000000000395E870            # RPR
And Reaper doesn't like the reapy format, for example:

Code:
x = RPR.GetSelectedTrack(0,0)   # RPR format of track_id
RPR.GetMediaTrackInfo_Value(x, 'IP_TRACKNUMBER')  # Returns the correct 10.0
 

 
x = project.get_selected_track()   # reapy format of track_id
RPR.GetMediaTrackInfo_Value(x, 'IP_TRACKNUMBER')  # Returns incorrect 0
This causes me a little problem, because I have to use some reapy and some RPR. In particular, there are no direct reapy counterparts for RPR.NF_GetSWSTrackNotes and RPR.NF_SetSWSTrackNotes.

So to use those two, I guess I will have to first get the RPR form of track id, using RPR.GetSelectedTrack(0,0).

Just a small annoyance, but something to be aware of.

Do I have this right?
tparker24 is offline   Reply With Quote
Old 10-10-2019, 11:12 PM   #69
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,213
Default

Is Romeo still with us ?

Will Reapy be able to replace Beyond so that the Pyton API is identical for internal Reaper (script) use as for external/networked Beyond-alike access to Reaper ?

Can/will Reapy be released and documented via ReaPack ?

-Michael
mschnell is offline   Reply With Quote
Old 10-11-2019, 10:42 AM   #70
tparker24
Human being with feelings
 
Join Date: Dec 2017
Posts: 56
Default Sockets?

If my python script (running outside of Reaper) has certain problems, I do a sys.exit() to terminate the script. When that happens I get the following:

Code:
Exception ignored in: <socket.socket fd=488, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 50268), raddr=('127.0.0.1', 2306)>
ResourceWarning: unclosed <socket.socket fd=488, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 50268), raddr=('127.0.0.1', 2306)>
I'm wondering if this might be related to reapy. If so, do I need to somehow shutdown reapy more gracefully, before I sys.exit() ?
tparker24 is offline   Reply With Quote
Old 10-12-2019, 11:50 AM   #71
jahudka
Human being with feelings
 
Join Date: Jul 2010
Posts: 36
Default Sends & receives & envelopes

@tparker24, just as a side note about the compatibility of reapy.Track and the native MediaTrack - the native MediaTrack object should be available as track.id if I'm reading reapy source well - so you should be able to do this:

Code:
x = project.get_selected_track()
RPR.GetMediaTrackInfo_Value(x.id, 'IP_TRACKNUMBER')
Anyway, I wanted to ask about APIs for track send / receive envelopes. When I'm working on a larger project with lots of aux busses for stuff like reverbs and delays I often need to toggle visibility for a lot of send volume envelopes, preferably with a single keystroke. I've tried writing a ReaScript for that, but I'm stuck because the ReaScript API doesn't have nice methods for working with send / receive envelopes' states - there is just the RPR_SetEnvelopeStateChunk method for setting the state as XML, but that's just such a pain to work with.. So I'd like to ask if you have any pointers about working with the XML chunk (like a documentation link), and also suggest a couple of features for reapy which would allow me to do this (and which might be of interest to others as well):
  • Implement __eq__ magic methods throughout the API to allow checking object identity ("is this track from project.tracks the same as this track from project.selected_tracks?")
  • Add reapy.Track.receives (now there's only Track.sends, which I believe doesn't include receives)
  • Add methods to reapy.Envelope to allow changing envelope state (active, visible, armed)
  • Add reapy.Send.envelopes and reapy.FX.envelopes - those two would be awesome, but also I think they'd be the hardest to implement, because from the ReaScript perspective there's no such thing as a send's envelope - it's the track's envelope - so I think these envelope lists should somehow proxy and filter the owning track's envelopes list (but not sure how you'd do that since I'm not sure you can check that a given track's envelope actually corresponds to a given send's or effect's parameter)

Also I'm loving this API! Truly amazing work, sir, even though I'm not all too proficient in Python I can appreciate how much easier it would be to develop custom actions and extensions using reapy than the native API. Thank you for all the time and effort you're putting into this!
jahudka is offline   Reply With Quote
Old 10-12-2019, 02:33 PM   #72
tparker24
Human being with feelings
 
Join Date: Dec 2017
Posts: 56
Default Track objects

Quote:
Originally Posted by jahudka View Post
@tparker24, just as a side note about the compatibility of reapy.Track and the native MediaTrack - the native MediaTrack object should be available as track.id if I'm reading reapy source well - so you should be able to do this:

Code:
x = project.get_selected_track()
RPR.GetMediaTrackInfo_Value(x.id, 'IP_TRACKNUMBER')

@jahudka,

Yes, indeed, that did it! Thank you very much!
tparker24 is offline   Reply With Quote
Old 11-21-2019, 11:35 AM   #73
kkecm
Human being with feelings
 
Join Date: Nov 2019
Posts: 2
Default Inserting points in envelope or automatizing fx

Reapy is running seamlessly so far and has a lot of functionality. Thanks for this great contribution! @romeo_despres
I was able to extract all envelope values from Reaper from outside. However when I try to do the inverse process (modify the envelopes from an external script) there is no change at all.
I understand that reascript_api.InsertEnvelopePoint cannot be invoked from outside as this is a dynamic library. Then I tried to set the cursor_position at some value, change the automation mode to write and modify the fx parameter. This action moves the knob but no point is inserted until I make the Reaper window active again.
However, as I want to insert multiple points along the envelope this methods is not useful. After setting the fx parameter at multiple cursor positions and coming back to the Reaper window the only envelope point inserted is the corresponding to the last value.
Is there any other way to write to an envelope from Reapy? Or in the worst case, is there any method to keep the Reaper window active? I tried to change the automatization mode inside the loop, selecting tracks with no luck.
Thanks!
kkecm is offline   Reply With Quote
Old 11-23-2019, 08:11 AM   #74
romeo_despres
Human being with feelings
 
Join Date: Jan 2019
Posts: 35
Default

Hi everyone, sorry for missing your messages for a while, I must have accidentally disabled notifs on this thread...! Thanks to all of you for being interested in the project

@tparker24

You're right, Project.play_state was buggy. I have replaced it in the latest version with four properties:
  • Project.is_stopped
  • Project.is_playing
  • Project.is_paused
  • Project.is_recording
Hopefully no more bugs with those

Regarding your sys.exit() issue, I have not been able to reproduce it locallly. Maybe you could provide a sample code? Anyway, from what I see it's only a warning that you get, and not an error, right? So it shouldn't break your scripts, does it?

@mschnell
I'm not entirely sure I understand your question. I believe reapy can already replace Beyond. In which case would it not?

I have felt uncomfortable so far with distributing reapy via ReaPack. Since one aim of reapy is to comply with the Python community uses and conventions, it makes more sense to distribute it through pip (standard for distributing Python packages). On the other hand, ReaPack has its own way of specifying version and documentation by adding custom headers at the top of files. Those are definitely not conventional in the Python community, and probably violate PEP recommendations. Thus I have not, so far, been eager to make reapy available for ReaPack.

@jahudka

I actually am totally lost with this XML chunks thing, which is why I haven't developed a nicer API to those so far... I dream of someone providing us with the documentation you asked for! But I would be very happy to wrap all that in a cleaner API, if only I knew where to start.

The __eq__ magic you suggest is already implemented on most reapy classes. It does work for tracks.

I understand your feature ideas, they seem great! The best would maybe be to post them as a GitHub issue rather than on this forum, as it would be easier to remember them and keep track of their development. To be sure I understand your thought: when you refer to FX.envelopes, you refer to the subset of the track envelopes that apply to the parameters of a given FX? What would Send.envelopes then be? If it is only the envelopes of the sending track, how is it better than Send.source_track.envelopes?

Oh and I love the way you use grey for highlighting. I'll steal that from you.

And thanks for the compliments

@kkecm
Why exactly do you not want to use reapy.reascript_api.InsertEnvelopePoint? I do agree that it would be better to have a nicer function for this purpose, but it should still work, even from the outside.
romeo_despres is offline   Reply With Quote
Old 11-23-2019, 02:50 PM   #75
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,213
Default

Quote:
Originally Posted by romeo_despres View Post
@mschnell
I'm not entirely sure I understand your question. I believe reapy can already replace Beyond. In which case would it not?
Maybe I am wrong. I understand that reapy provides the Reaper API for Python scrips that work called up (and hence internal of) Reaper, While Beyond provides the Reaper API for stand alone Python programs that are to be connected to Reaper (running on the same or on a different PC) via Network (i.e. tunneled through the OSC protocol).

So they target different purposes.

-Michael
mschnell is offline   Reply With Quote
Old 11-24-2019, 09:36 AM   #76
romeo_despres
Human being with feelings
 
Join Date: Jan 2019
Posts: 35
Default

No, ReaScript functions can also be run from outside REAPER with reapy (they are available in reapy.reascript_api). For now, reapy can only control a REAPER instance that is on the same computer, but I'm currently working on extending this to include distant slave machines.
romeo_despres is offline   Reply With Quote
Old 11-24-2019, 11:50 AM   #77
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,213
Default

Quote:
Originally Posted by romeo_despres View Post
For now, reapy can only control a REAPER instance that is on the same computer,
What communication protocol is used between the Reaper instance and the Python program that is running separate from Reaper ?

-Michael
mschnell is offline   Reply With Quote
Old 11-24-2019, 01:00 PM   #78
d.vyd
Human being with feelings
 
Join Date: Dec 2017
Posts: 66
Default

Hi Folks,

Looks like this is the correct place to post about reapy. I've been posting code here: https://forum.cockos.com/showthread....69#post2206669. I'm glad I found you folks!

I'm using reapy in Visual Studio Code. I've encountered two problems: (1) MIDI notes do not show up in the main Reaper window until I double click on the take and click on a note. (2) rendering the project pops up a GUI window, which prevents me from automating everything via Python. Can anyone offer ideas for how to overcome these issues?

-da'ud vyd
d.vyd is offline   Reply With Quote
Old 11-24-2019, 02:27 PM   #79
romeo_despres
Human being with feelings
 
Join Date: Jan 2019
Posts: 35
Default

Quote:
Originally Posted by mschnell View Post
What communication protocol is used between the Reaper instance and the Python program that is running separate from Reaper ?
It's just JSON messages sent over the local network. Outer-reapy tells inner-reapy which fonctions it needs him to call, then inner-reapy sends the results back to outer-reapy.
romeo_despres is offline   Reply With Quote
Old 11-24-2019, 02:28 PM   #80
romeo_despres
Human being with feelings
 
Join Date: Jan 2019
Posts: 35
Default

@d.vyd
I'll take a look as soon as i can and let you know what I've found.

EDIT: Done on the original thread.

Last edited by romeo_despres; 11-27-2019 at 01:22 PM.
romeo_despres 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:08 PM.


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