top of page
- Script Code -

dofile(reaper.AZ_GetLuaInitPath())

require("reaper_AZSTOKE_SILVER")


retval,inputList = reaper.AZ_GetUserInputList("insertMedia",1,"path:","D:/")


if retval then

filePathList = reaper.AZ_GetFilePathList(inputList[1],"wav")


addPath = reaper.AZ_SetProjectPathFolder("AZSTOKE",3)

beforePath,afterPath = reaper.AZ_SetProjectInfoRecAddPath(0,addPath)


startPos = 0


for i, value in pairs(filePathList) do

item = reaper.AZ_InsertMediaTrackIdSecond(0,1,filePathList[i],0,startPos)

endTime = reaper.AZ_GetMediaItemEndTime(item)

startPos = endTime + 1

end


reaper.AZ_SetProjectInfoRecPath(0,beforePath)

end

- Warm Up -

  • Prepare the media to be inserted

- Script Detail -

dofile(reaper.AZ_GetLuaInitPath())

require("reaper_AZSTOKE_SILVER")


・Enable use of SilverAPI


retval,inputList = reaper.AZ_GetUserInputList("insertMedia",1,"path:","D:/")


・Enter the text input screen into the inputList using UserInput


if retval then


・When you press OK in the text box, execute the following


filePathList = reaper.AZ_GetFilePathList(inputList[1],"wav")



- Output the file that is included in the path information entered as text


reaper.AZ_SetProjectPathFolder("AZSTOKE",3)


- Create a dedicated folder in the project's recording folder and add the current time to the folder name.


beforePath,afterPath = reaper.AZ_SetProjectInfoRecAddPath(0,addPath)


- Set the folder you created as the project recording folder


startPos = 0


- Set the starting position to 0


for i, value in pairs(filePathList) do


- Loop playback for the file path


item = reaper.AZ_InsertMediaTrackIdSecond(0,1,filePathList[i],0,startPos)


- Insert media into the specified track ID and for the specified number of seconds


endTime = reaper.AZ_GetMediaItemEndTime(item)


- Output the end time of the inserted media and save it to endTime


startPos = endTime + 1


- Add 1 second from the end time and set it as StartPos

end


reaper.AZ_SetProjectInfoRecPath(0,beforePath)


- Added support for returning the recording folder in project settings to the previous folder

end

- API LINK -

File/Folder

AZSTOKE_InsertMediaOrinalFolderCreate

Folder Creation Part 1 - Creating a dedicated folder for media inserts

01_BRONZE_ss_edited.png
01_SILVER_edited_edited.png
03_GOLD_edited_edited.png
bottom of page