Old 12-07-2019, 09:59 AM   #1
darnskewered
Human being with feelings
 
Join Date: Nov 2019
Posts: 16
Default Change output file name for the render command IDs?

I'm making great progress based on advice received here towards writing a script to automate rendering out all my piano midi files. Here's what I have so far:

Code:
RENDER = 40015
RENDER_RECENT_SETTINGS = 41824
RENDER_RECENT_SETTINGS_AND_CLOSE_DIALOG = 42230

reaper.Main_openProject("C:/Users/derek/AppData/Roaming/REAPER/TrackTemplates/improvtemplate.RTrackTemplate")
reaper.InsertMedia("C:/Users/derek/Dropbox/Music/midi/2009/2009 May 25 05.mid",8)

proj = reaper.EnumProjects(1)
reaper.Main_OnCommandEx(RENDER, 0, proj)

track = reaper.GetTrack(0, 0)
reaper.DeleteTrack(track)
I'm experimenting with the render actions. RENDER_RECENT_SETTINGS_AND_CLOSE_DIALOG is the one I ultimately will use once I enumerate all the files I want to render. However, my current question is:

How do I parameterize the output file name for the render? Right now it is untitled.mp3. Although I suppose if I use wildcards there and use the same "use most recent settings" command, perhaps I can achieve the effect I'm looking for.
darnskewered is offline   Reply With Quote
Old 12-07-2019, 10:37 AM   #2
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,284
Default

the relevant functions for render settings are:
GetSetProjectInfo / GetSetProjectInfo_String
for render filename: RENDER_PATTERN

https://www.extremraym.com/cloud/rea...SetProjectInfo
nofish is offline   Reply With Quote
Old 12-08-2019, 04:23 AM   #3
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,807
Default

Use my Ultraschall-API for that. There are many things easy to do in Reaper's own API but others hard or not doable at all without ugly hacking.
I already did that stuff for you, so you have rendering full-featured, including render-presets, all checkboxes and dropdownlists in the Render to File-dialog.
And you can customize the render-output-format completely, without having the hassle dealing with BASE64-strings(believe me, it's ugly).

https://mespotin.uber.space/Ultrasch...1_Introduction

If you have any questions in how to do it, feel free to ask. I made all that stuff for use-cases like yours
__________________
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
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 04:39 PM.


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