Old 01-01-2012, 11:14 AM   #1
markheath
Human being with feelings
 
Join Date: Oct 2006
Location: Southampton, England
Posts: 160
Default 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
__________________
Mark
Soundcloud | Bandcamp | My dev blog
markheath is offline   Reply With Quote
Old 03-19-2012, 05:26 PM   #2
Rikharthu
Human being with feelings
 
Join Date: Mar 2012
Posts: 3
Default

I guess there isn't? I would find this feature extremely useful.
Rikharthu is offline   Reply With Quote
Old 06-10-2012, 08:35 AM   #3
Viente
Human being with feelings
 
Viente's Avatar
 
Join Date: Feb 2012
Posts: 1,972
Default

+1
would be cool
Viente is offline   Reply With Quote
Old 12-05-2012, 11:54 PM   #4
Mincong
Human being with feelings
 
Join Date: Dec 2012
Posts: 8
Default

I want to script a Render as well...I want to generate lots of audios automatically... Isn't there any method to do this?
Mincong is offline   Reply With Quote
Old 12-06-2012, 01:33 AM   #5
Mincong
Human being with feelings
 
Join Date: Dec 2012
Posts: 8
Default

Quote:
Originally Posted by markheath View Post
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.
Mincong is offline   Reply With Quote
Old 09-01-2017, 02:14 AM   #6
nikolalkc
Human being with feelings
 
nikolalkc's Avatar
 
Join Date: Feb 2017
Location: Belgrade, Serbia
Posts: 117
Default

Is there still no way to do this via Reascript???
nikolalkc is offline   Reply With Quote
Old 09-01-2017, 05:21 AM   #7
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 7,451
Default

Quote:
Originally Posted by nikolalkc View Post
Is there still no way to do this via Reascript???
I don't think so...
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 09-01-2017, 07:03 AM   #8
nikolalkc
Human being with feelings
 
nikolalkc's Avatar
 
Join Date: Feb 2017
Location: Belgrade, Serbia
Posts: 117
Default

Where exactly should I post feature request for this kind of functionality?
I really need this.
nikolalkc is offline   Reply With Quote
Old 09-01-2017, 07:41 AM   #9
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,232
Default

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.
nofish is offline   Reply With Quote
Old 01-07-2018, 04:37 AM   #10
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,217
Default

At least, being able to set a render preset from ReaScript would be already very useful.
X-Raym is offline   Reply With Quote
Old 01-07-2018, 12:28 PM   #11
doppelganger
Human being with feelings
 
Join Date: Feb 2017
Posts: 269
Default

+1, necessary thing.
it was requested before at least 1 time here:
https://forum.cockos.com/showthread.php?t=191596
doppelganger is offline   Reply With Quote
Old 01-09-2018, 08:57 PM   #12
Moy
Human being with feelings
 
Moy's Avatar
 
Join Date: Oct 2017
Location: China
Posts: 32
Default

Agree.
Sincerely hope we can render through ReaScript.
This feature is so useful (and very COOL)
Moy is offline   Reply With Quote
Old 01-10-2018, 02:03 AM   #13
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,217
Default

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.
X-Raym is offline   Reply With Quote
Old 10-28-2018, 05:41 AM   #14
mortalis
Human being with feelings
 
Join Date: Apr 2018
Posts: 9
Default

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.
mortalis is offline   Reply With Quote
Old 10-29-2018, 01:41 AM   #15
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 587
Default

Short answer: Soon.
__________________
Lua Coders of the world: UNITE!
This Saturday, 11am NewYorkCity time, head over to this thread:
https://forum.cockos.com/showthread....98#post2067798
mespotine is offline   Reply With Quote
Old 10-29-2018, 07:22 AM   #16
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 220
Default

Quote:
Originally Posted by mespotine View Post
Short answer: Soon.
Soon as in this year, this month, this week, or today? lol
tXShooter is offline   Reply With Quote
Old 10-30-2018, 10:03 AM   #17
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 587
Default

When it's done

Though I intend, this year...
__________________
Lua Coders of the world: UNITE!
This Saturday, 11am NewYorkCity time, head over to this thread:
https://forum.cockos.com/showthread....98#post2067798
mespotine is offline   Reply With Quote
Old 10-30-2018, 12:07 PM   #18
Sju
Human being with feelings
 
Join Date: Jun 2015
Posts: 601
Default

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.
Sju is offline   Reply With Quote
Old 10-30-2018, 12:27 PM   #19
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 587
Default

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...
__________________
Lua Coders of the world: UNITE!
This Saturday, 11am NewYorkCity time, head over to this thread:
https://forum.cockos.com/showthread....98#post2067798
mespotine is offline   Reply With Quote
Old 10-30-2018, 02:39 PM   #20
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 1,299
Default

Looking forward to it!
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is offline   Reply With Quote
Old 11-03-2018, 01:49 PM   #21
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 452
Default

Quote:
Originally Posted by mespotine View Post
Short answer: Soon.
__________________
Cheers,
Andrew K
Reaper 5.95/64 Mac 10.12.+, i7 Quad 2.9GHz, 24GB
Thonex is offline   Reply With Quote
Old 11-03-2018, 02:59 PM   #22
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Location: Croatia
Posts: 1,857
Default

Quote:
Originally Posted by mespotine View Post
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
Breeder is offline   Reply With Quote
Old 11-03-2018, 06:34 PM   #23
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 220
Default

Are these functions going to be .dll / COM object based, directly with Reaper code, or some kind of external modifiers like AHK?
tXShooter is offline   Reply With Quote
Old 11-04-2018, 01:28 PM   #24
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 587
Default

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.
__________________
Lua Coders of the world: UNITE!
This Saturday, 11am NewYorkCity time, head over to this thread:
https://forum.cockos.com/showthread....98#post2067798
mespotine is offline   Reply With Quote
Old 11-04-2018, 01:33 PM   #25
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 587
Default

@Thonex

That's what I'm looking like for months now
__________________
Lua Coders of the world: UNITE!
This Saturday, 11am NewYorkCity time, head over to this thread:
https://forum.cockos.com/showthread....98#post2067798
mespotine is offline   Reply With Quote
Old 11-04-2018, 04:45 PM   #26
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Location: Croatia
Posts: 1,857
Default

Quote:
Originally Posted by mespotine View Post
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
Breeder is offline   Reply With Quote
Old 11-04-2018, 05:26 PM   #27
doppelganger
Human being with feelings
 
Join Date: Feb 2017
Posts: 269
Default

Quote:
Originally Posted by mespotine View Post
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.
that's awesome!
Was always frustrated, that reaper doesn't have render functions, ones of the most important.
doppelganger is offline   Reply With Quote
Old 11-06-2018, 10:19 AM   #28
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 587
Default

Quote:
Originally Posted by Breeder View Post
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
__________________
Lua Coders of the world: UNITE!
This Saturday, 11am NewYorkCity time, head over to this thread:
https://forum.cockos.com/showthread....98#post2067798
mespotine is offline   Reply With Quote
Old 11-06-2018, 04:18 PM   #29
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 220
Default

Quote:
Originally Posted by mespotine View Post
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!!
tXShooter is offline   Reply With Quote
Old 11-06-2018, 05:06 PM   #30
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 587
Default

Quote:
Originally Posted by tXShooter View Post
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
__________________
Lua Coders of the world: UNITE!
This Saturday, 11am NewYorkCity time, head over to this thread:
https://forum.cockos.com/showthread....98#post2067798
mespotine is offline   Reply With Quote
Old 11-29-2018, 02:25 PM   #31
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 68
Default

Any update? I just dream about rendering with a keystroke...
reapero is offline   Reply With Quote
Old 11-30-2018, 01:38 AM   #32
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 587
Default

Before Christmas.
__________________
Lua Coders of the world: UNITE!
This Saturday, 11am NewYorkCity time, head over to this thread:
https://forum.cockos.com/showthread....98#post2067798
mespotine is offline   Reply With Quote
Old 11-30-2018, 02:18 AM   #33
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 68
Default

thanks dude!
reapero is offline   Reply With Quote
Old 11-30-2018, 03:02 PM   #34
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 220
Default

Quote:
Originally Posted by mespotine View Post
Before Christmas.

OH BOY!!
__________________
"But be ye doers of the word, and not hearers only, deceiving your own selves."
tXShooter is offline   Reply With Quote
Old 11-30-2018, 10:54 PM   #35
Moy
Human being with feelings
 
Moy's Avatar
 
Join Date: Oct 2017
Location: China
Posts: 32
Default

Quote:
Originally Posted by mespotine View Post
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
__________________
Nice to meet REAPER.
My Chinese tutorials of RAEPER: https://zhuanlan.zhihu.com/reaper

Last edited by Moy; 11-30-2018 at 11:00 PM.
Moy is offline   Reply With Quote
Old 12-01-2018, 02:13 AM   #36
Macc
Human being with feelings
 
Join Date: Feb 2017
Posts: 71
Default

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...
Macc is offline   Reply With Quote
Old 12-01-2018, 12:45 PM   #37
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 587
Default

What do you mean by pre-roll in the context of rendering? That the "playback" starts before the actual rendering during the rendering process?
__________________
Lua Coders of the world: UNITE!
This Saturday, 11am NewYorkCity time, head over to this thread:
https://forum.cockos.com/showthread....98#post2067798
mespotine is offline   Reply With Quote
Old 12-03-2018, 04:09 PM   #38
Macc
Human being with feelings
 
Join Date: Feb 2017
Posts: 71
Default

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...
Macc is offline   Reply With Quote
Old 12-03-2018, 04:27 PM   #39
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 220
Default

Quote:
Originally Posted by Macc View Post
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."
tXShooter is offline   Reply With Quote
Old 12-03-2018, 11:52 PM   #40
Macc
Human being with feelings
 
Join Date: Feb 2017
Posts: 71
Default

- 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.
Macc 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 09:04 PM.


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