- Script Code -
dofile(reaper.AZ_GetLuaInitPath())
require("reaper_AZSTOKE_BRONZE")
require("reaper_AZSTOKE_SILVER")
require("reaper_AZSTOKE_GOLD")
reaper.AZ_DeleteAllRegion(0)
itemList = reaper.AZ_GetSelectedMediaItemList(0)
color = reaper.AZ_GetRandomColor()
--Region setting
for i, value in pairs(itemList) do
startPos = reaper.AZ_GetMediaItemStartTimeSeconds(value)
endPos = reaper.AZ_GetMediaItemEndTime(value)
name = reaper.AZ_GetMediaItemName(value)
reaper.AZ_AddRegionMarker(0,startPos,endPos,name,0,color)
end
--render setting
renderPath = reaper.AZ_SetResoucePathFolder("AZData//Render",0)
renderFileName = "render"
jsonStr = reaper.AZ_ReadFile(renderPath,renderFileName..".txt")
render = reaper.AZ_Json_Deserialize(jsonStr)
path = reaper.AZ_SetProjectPathFolder("Rec",3)
render.OutputDir = path
--render
fileList = reaper.AZ_RenderToAudioFile(0,render)
if reaper.AZ_Wwise_Connect("127.0.0.1", 8080) then
parentPath = "\\Actor-Mixer Hierarchy\\Default Work Unit"
workunit = reaper.AZ_Wwise_CreateWorkUnit(parentPath, "PL0000")
mixer = reaper.AZ_Wwise_CreateActorMixer(workunit.Path,"pl0000")
container = reaper.AZ_Wwise_CreateContainer(mixer.ID,reaper.AZ_Wwise_ContainerType_Blend(),"pl0000_az")
for i, value in pairs(fileList) do
splitList = reaper.AZ_GetStringSplitList(value, "\\")
wwiseObj = reaper.AZ_Wwise_CreateSoundSFX(container.ID,value,splitList[#splitList],"PL0000")
end
end
- Warm Up -
- Arrange the files you want to export in the Reaper project.
- Generate a file for rendering
※ Click here to learn how to export the Render settings file.
- Script Detail -
dofile(reaper.AZ_GetLuaInitPath())
require("reaper_AZSTOKE_BRONZE")
require("reaper_AZSTOKE_SILVER")
require("reaper_AZSTOKE_GOLD")
・Settings to enable API
reaper.AZ_DeleteAllRegion(0)
・Remove Region Marker
itemList = reaper.AZ_GetSelectedMediaItemList(0)
・Output selected media as an array
color = reaper.AZ_GetRandomColor()
・Get a random color
--Region setting
for i, value in pairs(itemList) do
・For loop through list of selected media
startPos = reaper.AZ_GetMediaItemStartTimeSeconds(value)
・Get the start position (in seconds) of the selected media
endPos = reaper.AZ_GetMediaItemEndTime(value)
・Get the end position (seconds) of the selected media
name = reaper.AZ_GetMediaItemName(value)
・Get the name of the selected media
reaper.AZ_AddRegionMarker(0,startPos,endPos,name,0,color)
・Add a region and configure it based on various information
end
--render setting
renderPath = reaper.AZ_SetResoucePathFolder("AZData//Render",0)
・Get the full path information of the render file path
renderFileName = "render"
・Set the file name to be retrieved
jsonStr = reaper.AZ_ReadFile(renderPath,renderFileName..".txt")
・Get a text file and convert the contents to a string
render = reaper.AZ_Json_Deserialize(jsonStr)
・Switch to an array that can use the converted string
path = reaper.AZ_SetProjectPathFolder("Rec",3)
・Set a dedicated path for the project's resource folder.
*A new folder is always generated because the date, time, minute, and second are set.
render.OutputDir = path
・Set a new path for the export render
--render
fileList = reaper.AZ_RenderToAudioFile(0,render)
・Export and get the exported path information
if reaper.AZ_Wwise_Connect("127.0.0.1", 8080) then
・Connect to Wwise
parentPath = "\\Actor-Mixer Hierarchy\\Default Work Unit"
・Set the path of the parent you want to add
workunit = reaper.AZ_Wwise_CreateWorkUnit(parentPath, "PL0000")
・Create a work unit "PL0000"
mixer = reaper.AZ_Wwise_CreateActorMixer(workunit.Path,"pl0000")
・Create "pl0000" ActorMixer
container = reaper.AZ_Wwise_CreateContainer(mixer.ID,reaper.AZ_Wwise_ContainerType_Blend(),"pl0000_az")
・Create a blend container under the actor-mixer you created.
for i, value in pairs(fileList) do
・For loop for the exported file list
splitList = reaper.AZ_GetStringSplitList(value, "\\")
・Support for extracting a hierarchical array from a full path
wwiseObj = reaper.AZ_Wwise_CreateSoundSFX(container.ID,value,splitList[#splitList],"PL0000")
・Generate Sound SFX and set filename
*splitList[#splitList]This allows you to get the last waveform name from the full path information.
end
end
- API LINK -
AZ_GetSelectedMediaItemList
Wwise
AZSTOKE_Wwise_FullAuto_Blend_1
Automate the process from export to blend container generation


