Thank you! That was very helpful already.
- I was able to import my markers as regions.
- I got the script to split my item using the regions.
- Now the simplest solution (to me) appears to be a loop of "select next item" twice, skipping every other one EDIT: Nope, just once, as one (the one the marker is at) is always skipped, and "ripple delete". I figured out I can just turn ripple on and then the normal remove action ("Remove items/tracks/envelope points") will ripple delete. So... how do I create that loop, and how do I get it to run until the end of the track and then stop?
EDIT: So... I figured out how to create such a loop (I found the SWS cycle editor). Turns out, just removing every other region is not such a bright idea, because not every pause between two subtitles means there is no spoken word*. So... I might be in luck and get my subtitle generator to not add unnecessary pauses, otherwise I'll need something to detect regions with unusually low volume, which is propably a lot harder than what I originally wanted to do and out of the scope of this thread, which can be considered solved.
Summary of what I did:
- convert subtitle file to Reaper-compatible CSV file
- "Markers/Regions: Import markers/regions from file (replace all existing)"
- "Script: X-Raym_Split selected items at regions.lua"
- Turn on ripple remove
- Use SWS cycle editor to create a loop of "Item navigation: Select and move to next item" and "Remove items/tracks/envelope points"
Thanks again for pointing me in the right direction.
* The reason is propably that subtitles can't be too long and when it splits a subtitle into two so it can be displayed, it adds a pause in between them for whatever reason. This pause seems to have a specific length so maybe I am in luck and can remove all pauses of that specific length, but as soon as I miss one or have a false positive, dozens of regions might be deleted errorneously so while what I wanted to achieve works perfectly, the subtitle file is not as much of a help as I thought.