View Single Post
Old 05-15-2019, 11:39 AM   #5
earhax
Human being with feelings
 
earhax's Avatar
 
Join Date: Nov 2015
Location: earth
Posts: 471
Default

I can imagine how to do this mostly using existing scripting and actions, but am not code savvy enough to script it myself.

Basically, the steps would be:

- get the path and filename of the first selected item on selected track (source_file)
- set time selection to selected items
- glue items, including leading fade-in and trailing fade-out (glued_file)
- rename glued_file to source_file filename
- select all items in project using the source_file
- freeze selected items (source_file no longer being used in project, so not locked by the reaper.exe process)
- copy glued_file to source_file location (overwrite source)
- unfreeze and delete freeze files to recycle bin (thus restoring the source_file use to unfrozen items, which will now be the glued_file that was renamed and copied over the source file)
- replace glued_file in project with the overwritten source_file (renamed glued_file)
- delete renamed glued_file in project directory that is no longer being used

Hopefully I will get the time to make this work in script one of these days. Or maybe someone else will beat me to it (looking at you, @X-Raym or @cfillion ).
earhax is offline   Reply With Quote