|
|
|
10-13-2017, 06:11 PM
|
#1
|
Human being with feelings
Join Date: Feb 2014
Posts: 615
|
Script request? Reason project file launcher
Fairly simple in concept, just a way to automatically launch a particular Reason project file immediately after opening a Reaper project.
The point is basically to reduce the inconvenience of using Reason rewired with Reaper. You have to always open Reason after Reaper then navigate to the correct Reason project file that is associated with the Reaper project. What I'd really like is a way to automate this process, so that the Reason file will be associated to the Reaper project, and will automatically be launched when the Reaper project is loaded.
This may be outside the scope of scripting, but I figured I'd post here to see if anyone could help me out, either to code something like this or to give any information about how one could accomplish this.
Also I'd be willing to pay to have this done. Currently I'm always so reluctant to use Reason in a project because of having to do this, and I would love to be able to overcome this inconvenience.
|
|
|
10-14-2017, 02:14 PM
|
#2
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,984
|
Associate lua script
Code:
path = 'C:/file.txt'
if reaper.GetOS():find("OSX") then os.execute('open "" "' .. path .. '"') else os.execute('start "" "' .. path .. '"') end
with SWS project startup action
|
|
|
10-16-2017, 04:32 PM
|
#3
|
Human being with feelings
Join Date: Feb 2014
Posts: 615
|
Thank you MPL, it works! My only concern is that I have to code the project name in the script, which works fine if I'm only opening a general template. However, if I have a separate Reason project associated with each Reaper project, this then requires loading an instance of this script for each project in order to link it to the respective Reason project. Those script instances would build up quickly and then require their own file folder structure to be maintained in order to organize them.
Is it possible to have a single instance of the script work using a wildcard method, whereby when a saved Reaper project is loaded, the script will look in the specified Reason project file folder for the matching *.reason file? I always save the Reaper and Reason project files to share the same filename
|
|
|
10-16-2017, 08:58 PM
|
#4
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,984
|
and same folder? Give example of reaper and reason project paths for one project.
|
|
|
10-17-2017, 04:34 PM
|
#5
|
Human being with feelings
Join Date: Feb 2014
Posts: 615
|
Different folder paths
Reason project path is C:/Users/username/Documents/Reason/Song/Reaper Rewire/projectname.reason
Reaper project path is C:/Users/username/Documents/Reaper/Projects/projectname.rpp
Not sure if it would need to remember the Reaper project folder, or whether it would be sufficient just to check the Reason project folder for a .reason file with the same title as the active Reaper project?
|
|
|
10-18-2017, 06:53 AM
|
#6
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,984
|
Code:
path = 'C:/Users/username/Documents/Reason/Song/Reaper Rewire/'
retval, projfn = reaper.EnumProjects( -1, '' )
if projfn:lower():find('.rpp') then
projfn = projfn:reverse():match('(.-)[%/\\]'):reverse():gsub('.RPP','')
filename = path..projfn..'.reason'
if reaper.GetOS():find("OSX") then os.execute('open "" "' .. filename .. '"') else os.execute('start "" "' .. filename .. '"') end
end
|
|
|
10-18-2017, 08:53 PM
|
#7
|
Human being with feelings
Join Date: Feb 2014
Posts: 615
|
YES!
I changed the fourth line where it says .RPP to lowercase, and it works perfectly! Thank you so much for this MPL, now Reason is that much closer to behaving like a integrated part of my Reaper project.
This means alot to me, and to show my appreciation I'm going to make a donation!
|
|
|
10-20-2017, 07:13 AM
|
#8
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,984
|
Thank you very much!
I don`t know why, but mostly my rpp are uppercase so in case you want to disrespect (right word?) case, you can use something like
projfn = projfn:reverse():match('(.-)[%/\\]'):reverse():gsub('.RPP',''):gsub('.rpp','')
|
|
|
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 07:43 PM.
|