|
|
|
01-01-2012, 11:14 AM
|
#1
|
Human being with feelings
Join Date: Oct 2006
Location: Southampton, England
Posts: 191
|
ReaScript Render
Is there a way I can script a Render from ReaScript without popping up the render dialog? I want to be able to specify the output filename and settings in the script, and perform the render without user intervention. I can't see anything in the ReaScript API that does this.
thanks
|
|
|
03-19-2012, 05:26 PM
|
#2
|
Human being with feelings
Join Date: Mar 2012
Posts: 3
|
I guess there isn't? I would find this feature extremely useful.
|
|
|
06-10-2012, 08:35 AM
|
#3
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
+1
would be cool
|
|
|
12-05-2012, 11:54 PM
|
#4
|
Human being with feelings
Join Date: Dec 2012
Posts: 8
|
I want to script a Render as well...I want to generate lots of audios automatically... Isn't there any method to do this?
|
|
|
12-06-2012, 01:33 AM
|
#5
|
Human being with feelings
Join Date: Dec 2012
Posts: 8
|
Quote:
Originally Posted by markheath
Is there a way I can script a Render from ReaScript without popping up the render dialog? I want to be able to specify the output filename and settings in the script, and perform the render without user intervention. I can't see anything in the ReaScript API that does this.
thanks
|
It seems that this command: RPR_Main_OnCommand(40788,0) # Render
might help.
I found a helpful resource:
https://stash.reaper.fm/v/14367/Smart...20rendering.py
we can learn something from its code.
|
|
|
09-01-2017, 02:14 AM
|
#6
|
Human being with feelings
Join Date: Feb 2017
Location: Belgrade, Serbia
Posts: 338
|
Is there still no way to do this via Reascript???
|
|
|
09-01-2017, 05:21 AM
|
#7
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by nikolalkc
Is there still no way to do this via Reascript???
|
I don't think so...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
09-01-2017, 07:03 AM
|
#8
|
Human being with feelings
Join Date: Feb 2017
Location: Belgrade, Serbia
Posts: 338
|
Where exactly should I post feature request for this kind of functionality?
I really need this.
|
|
|
09-01-2017, 07:41 AM
|
#9
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
|
Seems you could do it from the command line though.
https://forum.cockos.com/showthread.php?t=147691
And isn't there a way in Lua to pass command line arguments (with os.execute) ?
Didn't try this myself yet.
edit:
Just tried, it basically works.
No way to set the render settings or output filename programatically though it seems (it uses last saved render settings), so doesn't help much probably.
https://i.imgur.com/oB00mW5.gif
Last edited by nofish; 09-01-2017 at 11:13 AM.
|
|
|
01-07-2018, 04:37 AM
|
#10
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
At least, being able to set a render preset from ReaScript would be already very useful.
|
|
|
01-09-2018, 08:57 PM
|
#11
|
Human being with feelings
Join Date: Oct 2017
Location: China
Posts: 60
|
Agree.
Sincerely hope we can render through ReaScript.
This feature is so useful (and very COOL)
|
|
|
01-10-2018, 02:03 AM
|
#12
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
You can't script filename in the render settings but there is wildcards than can satisfy a lot of needs already.
There is also a render Action which doesn't display the popup.
You may succeed what you are looking for with this two tricks.
|
|
|
10-28-2018, 05:41 AM
|
#13
|
Human being with feelings
Join Date: Apr 2018
Posts: 10
|
I've also looked for this functionality.
The only flexibility I found is using
Code:
Main_OnCommand(action_id)
with redering predefined action IDs.
The IDs are in the Actions window (column Command ID). Some of render actions:
- Render project to disk
- Render project, using most recent render settings
- Render project, using most recent render settings, with a new target file name
------------
Also I found AddProjectMarker function which allows to add a named region for the selection.
I wanted to export multiple regions on the same track to different files. So my sequence was:
- open "Render to file" dialog and set all the settings there
- select "Master mix" and "Time selection" at the top
- put "$region" into the "File name" field and press "Save changes"
- then in the script (Python):
Code:
beat1 = 2
beat2 = 10
render_last_action_id = 41824
start = RPR_TimeMap2_beatsToTime(0, 0, beat1-1)[0]
end = RPR_TimeMap2_beatsToTime(0, 0, beat2-1)[0]
RPR_GetSet_LoopTimeRange(True, False, start, end, False)
RPR_AddProjectMarker(0, True, start, end, 'export_file', -1)
RPR_Main_OnCommand(render_last_action_id, 0)
This will convert beats to time in seconds for the selection to export, then add a region with the same bounds as the selection and with the name of the output file, then it executes the "Render project, using most recent render settings" command without opening the Render dialog.
Last edited by mortalis; 10-28-2018 at 08:11 AM.
|
|
|
10-29-2018, 01:41 AM
|
#14
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Short answer: Soon.
|
|
|
10-29-2018, 07:22 AM
|
#15
|
Human being with feelings
Join Date: Aug 2017
Posts: 336
|
Quote:
Originally Posted by mespotine
Short answer: Soon.
|
Soon as in this year, this month, this week, or today? lol
|
|
|
10-30-2018, 10:03 AM
|
#16
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
When it's done
Though I intend, this year...
|
|
|
10-30-2018, 12:07 PM
|
#17
|
Human being with feelings
Join Date: Jun 2015
Posts: 685
|
You're working on a smart render script? That'll be really useful! Will it be able to differentiate between stereo and mono tracks, to prevent unnecessary stereo renders? Like there's the tickbox in the Render window to only render tracks with mono media to mono.
|
|
|
10-30-2018, 12:27 PM
|
#18
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Not script but functions.
You would be able to customize your renderscript with most of the settings availabe in the RenderDialog.
Still working on some details and bugfixes, though. But it's running already...
|
|
|
10-30-2018, 02:39 PM
|
#19
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Looking forward to it!
|
|
|
11-03-2018, 01:49 PM
|
#20
|
Human being with feelings
Join Date: May 2018
Location: Los Angeles
Posts: 1,719
|
Quote:
Originally Posted by mespotine
Short answer: Soon.
|
__________________
Cheers... Andrew K
Reaper v6.80+dev0621 - June 21 2023 • Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
|
|
|
11-03-2018, 02:59 PM
|
#21
|
Human being with feelings
Join Date: Nov 2010
Posts: 2,436
|
Quote:
Originally Posted by mespotine
Not script but functions.
You would be able to customize your renderscript with most of the settings availabe in the RenderDialog.
Still working on some details and bugfixes, though. But it's running already...
|
Where will you publish it, ReaPack or via forum? Sorry for asking, but this sounds really interesting but I'm not on the forums much but this is something I would definitely use and donate for so I don't want to miss the launch
|
|
|
11-03-2018, 06:34 PM
|
#22
|
Human being with feelings
Join Date: Aug 2017
Posts: 336
|
Are these functions going to be .dll / COM object based, directly with Reaper code, or some kind of external modifiers like AHK?
|
|
|
11-04-2018, 01:28 PM
|
#23
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Pure Lua, including months of heavy reverse-engineering of data-structures of a projectfile.
Will be released through the forum and on it's own website. Reapack? Dunno yet, depends on ReaPack-internal-factors I haven't checked for yet.
|
|
|
11-04-2018, 01:33 PM
|
#24
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
@Thonex
That's what I'm looking like for months now
|
|
|
11-04-2018, 04:45 PM
|
#25
|
Human being with feelings
Join Date: Nov 2010
Posts: 2,436
|
Quote:
Originally Posted by mespotine
Pure Lua, including months of heavy reverse-engineering of data-structures of a projectfile.
Will be released through the forum and on it's own website. Reapack? Dunno yet, depends on ReaPack-internal-factors I haven't checked for yet.
|
My deepest condolences, reverse engineering is the hardest, most potent, deadly and equally addictive endeavor. I hope you made it through alive.
It's hard following all the releases without a proper channel. Would be great if Justin&Co finally decided to get someone who's active on the forums and pay him to create newsletter or something
|
|
|
11-06-2018, 10:19 AM
|
#26
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Quote:
Originally Posted by Breeder
My deepest condolences, reverse engineering is the hardest, most potent, deadly and equally addictive endeavor. I hope you made it through alive.
It's hard following all the releases without a proper channel. Would be great if Justin&Co finally decided to get someone who's active on the forums and pay him to create newsletter or something
|
If you're interested and don't know it yet: I publish my reverse-engineering-work including my RE-tools into the thread Reaper-Internals: https://forum.cockos.com/showthread.php?t=207635
|
|
|
11-06-2018, 04:18 PM
|
#27
|
Human being with feelings
Join Date: Aug 2017
Posts: 336
|
Quote:
Originally Posted by mespotine
When it's done
Though I intend, this year...
|
FEEED MEEEEE!!!!
If you can get this all accomplished with all of the many other things you've already provided recently, man you are gonna be a hero 'round here!!
|
|
|
11-06-2018, 05:06 PM
|
#28
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Quote:
Originally Posted by tXShooter
If you can get this all accomplished with all of the many other things you've already provided recently, man you are gonna be a hero 'round here!!
|
Dusting off my old Superman-cape ^^
Just finishing docs and tweaking things here and there. 30 documentation-chapters to go...
And yes, I like teasing
|
|
|
11-29-2018, 02:25 PM
|
#29
|
Human being with feelings
Join Date: Aug 2011
Posts: 517
|
Any update? I just dream about rendering with a keystroke...
|
|
|
11-30-2018, 01:38 AM
|
#30
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Before Christmas.
|
|
|
11-30-2018, 02:18 AM
|
#31
|
Human being with feelings
Join Date: Aug 2011
Posts: 517
|
thanks dude!
|
|
|
11-30-2018, 03:02 PM
|
#32
|
Human being with feelings
Join Date: Aug 2017
Posts: 336
|
Quote:
Originally Posted by mespotine
Before Christmas.
|
OH BOY!!
__________________
"But be ye doers of the word, and not hearers only, deceiving your own selves."
|
|
|
11-30-2018, 10:54 PM
|
#33
|
Human being with feelings
Join Date: Oct 2017
Location: China
Posts: 60
|
Quote:
Originally Posted by mespotine
Not script but functions.
You would be able to customize your renderscript with most of the settings availabe in the RenderDialog.
Still working on some details and bugfixes, though. But it's running already...
|
Sounds amazing, Thanks for doing this!
I wanna give you my deep appreciate <3
Last edited by Moy; 11-30-2018 at 11:00 PM.
|
|
|
12-01-2018, 02:13 AM
|
#34
|
Human being with feelings
Join Date: Feb 2017
Posts: 76
|
This sounds amazing.
I'm a relative n00b to this so forgive me if this isn't in the scope of your work, but if there is any kind of queue capability, pre-roll for automatic/queued renders would be ***outstanding***. The existing render queue is unusable without pre-roll due to random glitches etc that don't occur when rendering manually.
All that aside, thanks for your work, it sounds intense...
|
|
|
12-01-2018, 12:45 PM
|
#35
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
What do you mean by pre-roll in the context of rendering? That the "playback" starts before the actual rendering during the rendering process?
|
|
|
12-03-2018, 04:09 PM
|
#36
|
Human being with feelings
Join Date: Feb 2017
Posts: 76
|
I'm a mastering engineer, so saving all renders until the end of the day when I'm tired is kind of essential
When I use the render queue to render, I get skips/jumps/glitches in the first second or two of some exported files. It's completely random, meaning if I use the render queue I have to recheck all the exported files, and then re-render offending files manually. This is an enormous pain in the arse, so I just don't bother. So I have to sit and export each of the day's projects manually. Urgh.
The problem doesn't happen if I open a project, and play a second or two of each track, and then render through the render dialogue. So presumably it is due to some plugin buffer needing to be filled somewhere, or something similar (I use a lot of item FX, btw, if that matters). BTW the 'delay queued renders...' option has no effect on this.
Therefore if Reaper could 'play' a second or two of each file before beginning the actual export, it might fix the problem. I'm referring to it as pre-roll, but perhaps there's a better term.
I know there's a feature request to this effect on this forum, but it seems to have fallen on deaf ears.
Hope this makes sense. If you could address this it would actually literally improve my daily life immeasurably, and would get you a sizable beer token...
|
|
|
12-03-2018, 04:27 PM
|
#37
|
Human being with feelings
Join Date: Aug 2017
Posts: 336
|
Quote:
Originally Posted by Macc
I'm a mastering engineer, so saving all renders until the end of the day when I'm tired is kind of essential
When I use the render queue to render, I get skips/jumps/glitches in the first second or two of some exported files. It's completely random, meaning if I use the render queue I have to recheck all the exported files, and then re-render offending files manually. This is an enormous pain in the arse, so I just don't bother. So I have to sit and export each of the day's projects manually. Urgh.
The problem doesn't happen if I open a project, and play a second or two of each track, and then render through the render dialogue. So presumably it is due to some plugin buffer needing to be filled somewhere, or something similar (I use a lot of item FX, btw, if that matters). BTW the 'delay queued renders...' option has no effect on this.
Therefore if Reaper could 'play' a second or two of each file before beginning the actual export, it might fix the problem. I'm referring to it as pre-roll, but perhaps there's a better term.
I know there's a feature request to this effect on this forum, but it seems to have fallen on deaf ears.
Hope this makes sense. If you could address this it would actually literally improve my daily life immeasurably, and would get you a sizable beer token...
|
Are you talking about that first few seconds of a rendered file's playback where it would seem like the CPU just hasn't caught up to the processing needs of the effects (and other mods like automation) yet, and that wreaks all kinds of havoc on a clean sounding render? And this doesn't happen when you're playing back from within Reaper... just on the output of the render?
__________________
"But be ye doers of the word, and not hearers only, deceiving your own selves."
|
|
|
12-03-2018, 11:52 PM
|
#38
|
Human being with feelings
Join Date: Feb 2017
Posts: 76
|
- It only occurs in rendered files rendered via the render queue.
- It *may* happen in rendered files where no audio has been played since opening the project, before rendering. I need to check that, but I'm in the habit of flicking through all the audio now (to be safe!).
- Yep, it sounds like the computer 'catching up'. Typically what happens is the first ~1 second is delayed by a tiny amount (there is a small bit of silence that wasn't there before), before the audio jumps back into time where it should be. It 'catches up', if you like.
|
|
|
12-05-2018, 04:50 AM
|
#39
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
You can try the following test:
Write a script that loads a project that usually causes that problem you encounter and that also runs the action 41824.
The script should look something like this:
Code:
my_project="Projectname_with_path"
reaper.Main_openProject(my_project)
reaper.Main_OnCommand(41824, 0)
you can also try the same with multiple projects:
Code:
my_project1="Projectname1_with_path"
my_project2="Projectname2_with_path"
my_project3="Projectname3_with_path"
my_project4="Projectname4_with_path"
my_project5="Projectname5_with_path"
reaper.Main_openProject(my_project1)
reaper.Main_OnCommand(41824, 0)
reaper.Main_openProject(my_project2)
reaper.Main_OnCommand(41824, 0)
reaper.Main_openProject(my_project3)
reaper.Main_OnCommand(41824, 0)
reaper.Main_openProject(my_project4)
reaper.Main_OnCommand(41824, 0)
reaper.Main_openProject(my_project5)
reaper.Main_OnCommand(41824, 0)
If that renders without any problems, then my render-functions are a solution for you.
|
|
|
12-05-2018, 02:08 PM
|
#40
|
Human being with feelings
Join Date: Feb 2017
Posts: 76
|
Thanks ever so much for that - I'm pretty much a scripting n00b but I'll have a shufty.
It occurs to me that I could tuck another action/script in there, that makes it play each item on a certain track for a second or two before doing the render. So open project > play each item for 2 seconds > render using last settings.
Maybe I'll have a look at building an action that does that. Food for thought - thank you!
|
|
|
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 12:55 PM.
|