- Script Code -
dofile(reaper.AZ_GetLuaInitPath())
endTime = reaper.AZ_GetSelectedMediaEndTime(0,0)
length = reaper.AZ_GetSelectedMediaLength(0,0)
mediaInterval = 0.2
if retval then
startPos = endTime+mediaInterval
for i =1,10 do
reaper.AZ_SetSelectedMediaActiveTakeCopy(0,0,0,startPos)
startPos =length+mediaInterval+startPos
end
end
- Warm Up -
Multiple media in a project
- Script Detail -
dofile(reaper.AZ_GetLuaInitPath())
endTime = reaper.AZ_GetSelectedMediaEndTime(0,0)
Set the end position of the selected media to the variable (endTime)
length = reaper.AZ_GetSelectedMediaLength(0,0)
Set the length of the selected media to the variable (length)
mediaInterval = 0.2
Prepare media interval value as a variable
if retval then
If the variable result is retval(true), continue below
startPos = endTime+mediaInterval
Set the variable (endTime) + the media interval value variable (mediaInterval) to the variable (startPos)
for i =1,10 do
Loop 10 times
reaper.AZ_SetSelectedMediaActiveTakeCopy(0,0,0,startPos)
Duplicate the selected media (in this case, a video) to the specified position (startPos)
startPos =length+mediaInterval+startPos
Set the variable (length) + media interval value variable (mediaInterval) + variable (startPos) to the variable (startPos).
end
end
- API LINK -
Media
AZSTOKE_SelectMovieMultiCopy
Copy 10 videos of selected media at 0.2 second intervals
![01_BRONZE_ss_edited.png](https://static.wixstatic.com/media/fc32ca_f22c7b5bae804c8683b4f2724693241a~mv2.png/v1/fill/w_70,h_70,al_c,q_85,enc_avif,quality_auto/01_BRONZE_ss.png)
![01_SILVER_edited_edited.png](https://static.wixstatic.com/media/fc32ca_1625c5e032304acaa48bd613801ac2a2~mv2.png/v1/fill/w_70,h_70,al_c,q_85,enc_avif,quality_auto/01_SILVER_edited_edited.png)
![03_GOLD_edited_edited.png](https://static.wixstatic.com/media/fc32ca_1f36649eb13841bb92f426fa03f31bed~mv2.png/v1/fill/w_70,h_70,al_c,q_85,enc_avif,quality_auto/03_GOLD_edited_edited.png)