- Script Code -
dofile(reaper.AZ_GetLuaInitPath())
require("reaper_AZSTOKE_SILVER")
require("reaper_AZSTOKE_GOLD")
url = -- URL to the SVN repository
toDir = "F:\\RIGDOCKS\\tmp" --Temporary output folder for files
retval , inputList = reaper.AZ_GetUserInputList("", 1, "Revision", "")
if retval then
revisioln = tonumber(inputList[1])
fileList = reaper.AZ_SVN_Export_CommitOnly(url, toDir, reaper.AZ_FileWriteMode_Overwrite(), revisioln)
originalFilePathList = {}
if reaper.AZ_Wwise_Connect("127.0.0.1", 8080) then
containerPath = "\\Actor-Mixer Hierarchy\\AZ_Voice"
eventFolderPath = "\\Events\\AZ_Voice"
vf_men = reaper.AZ_Wwise_CreateVirtualFolder(containerPath, "men", true)
vf_women = reaper.AZ_Wwise_CreateVirtualFolder(containerPath, "women", true)
vf_ev_men = reaper.AZ_Wwise_CreateVirtualFolder(eventFolderPath, "men", true)
vf_ev_women = reaper.AZ_Wwise_CreateVirtualFolder(eventFolderPath, "women", true)
for i, filePath in pairs(fileList) do
fileName = reaper.AZ_GetPathInfo(filePath)["FileNameWithoutExtension"]
voice = nil
if string.sub(fileName, 7, 9) == "men" then
voice = reaper.AZ_Wwise_CreateSoundVoice(vf_men["Path"], filePath, fileName, "Japanese", "men", true)
event = reaper.AZ_Wwise_CreateEvent(vf_ev_men["Path"], voice["Name"], 1, voice["ID"], true)
elseif string.sub(fileName, 7, 11) == "women" then
voice = reaper.AZ_Wwise_CreateSoundVoice(vf_women["Path"], filePath, fileName, "Japanese", "women", true)
event = reaper.AZ_Wwise_CreateEvent(vf_ev_women["Path"], voice["Name"], 1, voice["ID"], true)
end
reaper.AZ_Wwise_SetProperty(voice["ID"], "IsStreamingEnabled", true)
originalsPath = reaper.AZ_Wwise_GetProperty(voice["ID"], "sound:originalWavFilePath", "Japanese")
table.insert(originalFilePathList, originalsPath)
end
reaper.AZ_Wwise_Disconnect()
end
for i, file in pairs(originalFilePathList) do
reaper.AZ_SVN_Add(reaper.AZ_GetPathInfo(file)["ParentPath"], {".*\\..*"})
reaper.AZ_SVN_Add(file)
end
reaper.AZ_ShowMessageBox_Info("Processing has completed.", "", reaper.AZ_WindowType_OK())
end
- Warm Up -
取得したい音声ファイルが追加/変更されたリビジョンを控えておく
- Script Detail -
dofile(reaper.AZ_GetLuaInitPath())
require("reaper_AZSTOKE_SILVER")
require("reaper_AZSTOKE_GOLD")
・Import SILVER and GOLD
url = -- URL to the SVN repository
toDir = "F:\\RIGDOCKS\\tmp" -- Temporary output folder for files
・Configure the required information
retval , inputList = reaper.AZ_GetUserInputList("", 1, "Revision", "")
if retval then
・Retrieve the specified revision from the input screen. Proceed only if retrieval is successful.
revisioln = tonumber(inputList[1])
・Retrieve the revision number as a numeric value
fileList = reaper.AZ_SVN_Export_CommitOnly(url, toDir, reaper.AZ_FileWriteMode_Overwrite(), revisioln)
・Output files added or updated in the specified revision to the temporary folder.
originalFilePathList = {}
・Prepare an array to store the paths of files imported into Wwise.
if reaper.AZ_Wwise_Connect("127.0.0.1", 8080) then
・Connect to Wwise
containerPath = "\\Actor-Mixer Hierarchy\\AZ_Voice"
eventFolderPath = "\\Events\\AZ_Voice"
・Specify the storage path for sound objects and events
vf_men = reaper.AZ_Wwise_CreateVirtualFolder(containerPath, "men", true)
vf_women = reaper.AZ_Wwise_CreateVirtualFolder(containerPath, "women", true)
vf_ev_men = reaper.AZ_Wwise_CreateVirtualFolder(eventFolderPath, "men", true)
vf_ev_women = reaper.AZ_Wwise_CreateVirtualFolder(eventFolderPath, "women", true)
・Create a virtual folder
for i, filePath in pairs(fileList) do
・Perform the following processing for each file path output to the temporary folder:
fileName = reaper.AZ_GetPathInfo(filePath)["FileNameWithoutExtension"]
・Extract only the filename from the file path
voice = nil
if string.sub(fileName, 7, 9) == "men" then
voice = reaper.AZ_Wwise_CreateSoundVoice(vf_men["Path"], filePath, fileName, "Japanese", "men", true)
event = reaper.AZ_Wwise_CreateEvent(vf_ev_men["Path"], voice["Name"], 1, voice["ID"], true)
・If the 7th to 9th characters of the filename are “men”, create a Sound Voice object and event under the “men” virtual folder.
elseif string.sub(fileName, 7, 11) == "women" then
voice = reaper.AZ_Wwise_CreateSoundVoice(vf_women["Path"], filePath, fileName, "Japanese", "women", true)
event = reaper.AZ_Wwise_CreateEvent(vf_ev_women["Path"], voice["Name"], 1, voice["ID"], true)
・If the 7th to 11th characters of the filename are “women”, create a Sound Voice object and event under the “women” virtual folder.
end
reaper.AZ_Wwise_SetProperty(voice["ID"], "IsStreamingEnabled", true)
・Check the “Stream” box for the created sound voice object
originalsPath = reaper.AZ_Wwise_GetProperty(voice["ID"], "sound:originalWavFilePath", "Japanese")
table.insert(originalFilePathList, originalsPath)
・Retrieve the paths of audio files imported into the Originals folder and store them in an array
end
reaper.AZ_Wwise_Disconnect()
・Wwiseから切断する
end
for i, file in pairs(originalFilePathList) do
・Originalsフォルダ内にインポートされた音声ファイルのパスごとに以下の処理を行う
reaper.AZ_SVN_Add(reaper.AZ_GetPathInfo(file)["ParentPath"], {".*\\..*"})
・音声ファイルの親フォルダをSVNに追加する(フォルダ配下のファイルは除外する)
reaper.AZ_SVN_Add(file)
・音声ファイルをSVNを追加する
end
reaper.AZ_ShowMessageBox_Info("処理が終了しました", "", reaper.AZ_WindowType_OK())
・処理が終了した旨のポップアップ表示を行う
end
- API LINK -
SVN
AZSTOKE_SVN_ImportToWwise_1
音声ファイルをSVNから取得し、Wwiseにインポート



















