The programming language "Python" can be used for the function "Reascript" that allows you to write your own scripts in the composition software (≒ DAW) REAPER. This time, I will describe a simple procedure and test code regarding the environment construction method. (Since there are few Japanese translation articles related to this, I hope it will help those who are interested.)
Windows10 64bit REAPER v5.27 64bit
Download and install the installer at the URL below. https://www.python.org/downloads/
If you are using the 64-bit version of REAPER, an error will occur in the future process (** step 3 **) if you do not prepare the 64-bit version of Python.
The above file name is strange, but "xx" in "Python" xx ".dll" is the version name. In my case, the version of Python I installed was 3.6.1, so it's named "Python36.dll".
From now on, in order to load "Python36.dll" into REAPER, we need to know its path. This location will vary depending on where you installed step 1. If you don't know, you can find it by searching for "Python" xx ".dll" in Explorer.
By the way, the atmosphere of the folder where "Python36.dll" was placed was like this. (There is "Python3.dll" in the same folder, but please note that this is not used.)
Display the preferences.
ctrl + p
Or from the menu baroptions > preferenecs
Set the following 3 items in "ReaScript". Make settings and describe at the bottom of the screen
Python: No compatible version ofPython was found.
But
Python: python"xx".dll is installed.
If it changes, the reading is successful.
Enable Python for use with ReaScript
Check the left side
Custom path to Python dll directory:
Press `Browse ...`
on the far right and specify the path obtained in step 2-1.
Forse ReaScript to use specific Python dll:
Enter "Python" xx ".dll" on the right side
What do you think.
If the display changes like the yellow highlight in the image, it means that the reading is successful, so press OK
and restart REAPER.
Create a new script file from the action edit screen and edit the script from the editor that appears.
From the menu bar `Actions> Show action list ...`
Click the active button, `New ...`
in the "ReaScript" section
In the "Files of type" section, make sure that REAPER supports the extension **. Py **. If **. Py ** is not displayed here, it is possible that you have installed a different version or loaded a different dll file in step 1.
Enter an appropriate file name, and be sure to enter the extension **. Py ** after it. If it's just the file name,
Extension not supported:""
Please note that you will be angry with "Do not support such extensions (blanks)!". Press Save and you will see a script editor like this.
In this post, I will omit the explanation about the specific notation method, but
If you copy and paste the code below and press Ctrl + S
(save), a message box or console will appear and display" Hello World! ".
test.py
RPR_ClearConsole()
str = "Hello World!"
RPR_ShowMessageBox(str, "title", 0 )
RPR_ShowConsoleMsg(str)
What did you think.
I myself have just started studying programming, In the future, I would like to use Python to make sounds and work on machine learning.
Titles omitted.
"Python 3.4 Creating a Windows 7-64bit environment (for financial time series analysis)" by leihcrev http://qiita.com/leihcrev/items/4971eee4e657be953895 「REASCRIPT API — DOCUMENTATION」 https://www.extremraym.com/cloud/reascript-doc/ 「REAPER-ReaScript」 http://www.reaper.fm/sdk/reascript/reascript.php#reascript_basic
Recommended Posts