- 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
parentPath = "\\Events"
workunit = reaper.AZ_Wwise_CreateWorkUnit(parentPath, "PL0000")
event = reaper.AZ_Wwise_CreateEvent(workunit.ID,container.Name,2,container.ID)
reaper.AZ_Wwise_AddActionToEvent(event.ID,1,container.ID)
parentPath = "\\SoundBanks\\Default Work Unit"
soundBank = reaper.AZ_Wwise_CreateObject(parentPath, "AZ_Bank", "SoundBank")
reaper.AZ_Wwise_AddObjectToSoundBank(soundBank.ID, workunit.ID)
reaper.AZ_Wwise_Disconnect()
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")
・Handle enabling RIGDOCKS
reaper.AZ_DeleteAllRegion(0)
・Delete all current regions
itemList = reaper.AZ_GetSelectedMediaItemList(0)
・Get the selected media items as an array
color = reaper.AZ_GetRandomColor()
・Get a color at random
--Region setting
for i, value in pairs(itemList) do
・Loop over the selected waveforms
startPos = reaper.AZ_GetMediaItemStartTimeSeconds(value)
・Get the media start position
endPos = reaper.AZ_GetMediaItemEndTime(value)
・Get the media end position
name = reaper.AZ_GetMediaItemName(value)
・Get the media name
reaper.AZ_AddRegionMarker(0,startPos,endPos,name,0,color)
・Set a region per media using the retrieved info
end
--render setting
renderPath = reaper.AZ_SetResoucePathFolder("AZData//Render",0)
・Get the full-path info of the render path
renderFileName = "render"
・Create the render file name as a variable
jsonStr = reaper.AZ_ReadFile(renderPath,renderFileName..".txt")
・Load the render file
render = reaper.AZ_Json_Deserialize(jsonStr)
・Convert the loaded file into the render settings file
path = reaper.AZ_SetProjectPathFolder("Rec",3)
・Set the export destination folder in the project file
render.OutputDir = path
・Set the render output destination
--render
fileList = reaper.AZ_RenderToAudioFile(0,render)
・Run the render and get the path info
if reaper.AZ_Wwise_Connect("127.0.0.1", 8080) then
・Connect to Wwise
parentPath = "\\Actor-Mixer Hierarchy\\Default Work Unit"
・Set the parent path where you want to create the work unit
workunit = reaper.AZ_Wwise_CreateWorkUnit(parentPath, "PL0000")
・Generate the PL0000 work unit
mixer = reaper.AZ_Wwise_CreateActorMixer(workunit.Path,"pl0000")
・Generate the pl0000 Actor-Mixer
container = reaper.AZ_Wwise_CreateContainer(mixer.ID,reaper.AZ_Wwise_ContainerType_Blend(),"pl0000_az")
・Generate the pl0000_az Blend Container
for i, value in pairs(fileList) do
・Loop over the export files to register in the Blend
splitList = reaper.AZ_GetStringSplitList(value, "\\")
・Split from the full-path info
wwiseObj = reaper.AZ_Wwise_CreateSoundSFX(container.ID,value,splitList[#splitList],"PL0000")
・Generate an SFX inside the Blend Container and set the file name
end
parentPath = "\\Events"
・Set the parent path for Event generation
workunit = reaper.AZ_Wwise_CreateWorkUnit(parentPath, "PL0000")
・Generate the PL0000 work unit
event = reaper.AZ_Wwise_CreateEvent(workunit.ID,container.Name,2,container.ID)
・Generate an Event under the work unit and set the Blend Container with Stop
reaper.AZ_Wwise_AddActionToEvent(event.ID,1,container.ID)
・Add a Play container to the added event
parentPath = "\\SoundBanks\\Default Work Unit"
・Set the SoundBank path
soundBank = reaper.AZ_Wwise_CreateObject(parentPath, "AZ_Bank", "SoundBank")
・Generate the [AZ_Bank] bank at the path
reaper.AZ_Wwise_AddObjectToSoundBank(soundBank.ID, workunit.ID)
・Set the work unit that contains the event on the bank
reaper.AZ_Wwise_Disconnect()
・Handle disconnecting from Wwise
end
- API LINK -
AZ_DeleteAllRegion
AZ_GetSelectedMediaItemList
AZ_GetRandomColor
AZ_GetMediaItemStartTimeSeconds
AZ_GetMediaItemEndTime
AZ_GetMediaItemName
AZ_AddRegionMarker
AZ_SetResoucePathFolder
AZ_ReadFile
AZ_Json_Deserialize
AZ_SetProjectPathFolder
AZ_RenderToAudioFile
AZ_Wwise_Connect
AZ_Wwise_CreateWorkUnit
AZ_Wwise_CreateActorMixer
AZ_Wwise_CreateContainer
AZ_GetStringSplitList
AZ_Wwise_CreateSoundSFX
AZ_Wwise_CreateWorkUnit
AZ_Wwise_CreateEvent
AZ_Wwise_AddActionToEvent
AZ_Wwise_CreateObject
AZ_Wwise_AddObjectToSoundBank
AZ_Wwise_Disconnect
- API LINK -
Wwise
AZSTOKE_Wwise_FullAuto_Bank_4
Automated Bank Creation and Linking - Improved Version 3 -

















