top of page

AZSTOKE/ALGAZODIK

GameAudio & Art

2

Handautomer

AZSTOKE_HANDAUTOMER2

"HANDAUTOMER" Part 2 Reduce work costs by 90% - Fully automatic - From insert to region

RANK
SNS SHARE

os = reaper.GetOS()

if "Win" == string.match(os,"(Win)") then 

   package.cpath = package.cpath .. ";"..reaper.GetResourcePath() .."/UserPlugins/?.dll"

else

   package.cpath = package.cpath .. ";"..reaper.GetResourcePath() .."/UserPlugins/?.dylib"

end

require("reaper_AZSTOKE_SILVER")


function Msg(param)

 reaper.ShowConsoleMsg(tostring((param)).."\n")

end


retval,inputList = AZ_SILVER.AZ_GetUserInputList("AZWavList",2,"Path :,Loundness :","D:\\,-21")


if retval then

   _,color = reaper.AZ_GetRandomColor()

   retval,fileList = AZ_SILVER.AZ_GetFilePathList(inputList[1],"wav")

   startPos = 0

   for i, value in pairs(fileList) do

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

       _,endPos = reaper.AZ_GetMediaItemEndTime(item)

       _,name = reaper.AZ_GetMediaItemName(item)

       reaper.AZ_SetMediaItemHANDAUTOMER(item,2)

       reaper.AZ_SetMediaItemLoudnessMaxMomentary(item,tonumber(inputList[2]))

       reaper.AZ_AddRegionMarker(0,startPos,endPos,name,i,color)

       startPos = endPos + 1

   end

end

package.cpath = package.cpath .. "; "..reaper.GetResourcePath() .."/UserPlugins/?.dll"

require("reaper_AZSTOKE_SILVER")


・Silver API settings


function Msg(param)

reaper.ShowConsoleMsg(tostring((param)).."\n")

end


・Debugging console output function


retval,inputList = AZ_SILVER.AZ_GetUserInputList("AZWavList",2,"Path :,Loundness :","D:\\,-21")


・Output SimpleUI, enter the folder path and loudness value, and assign it to inputList


if retval then


- Check if OK was pressed in the UI


_,color = reaper.AZ_GetRandomColor()


・Get a random color and assign it to color


retval,fileList = AZ_SILVER.AZ_GetFilePathList(inputList[1],"wav")


- Get all file paths in "wav" format in the input folder path and assign them to fileList


startPos = 0


・Set the starting position of the media. Assign "0" to startPos.


for i, value in pairs(fileList) do


・Play fileList in loop


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


- Specify the track ID and arrange the media according to the path information and startPos (start position) of the fileList.

Assign the inserted media item to item


_,endPos = reaper.AZ_GetMediaItemEndTime(item)


・Get the end point of the item and assign it to endPos


_,name = reaper.AZ_GetMediaItemName(item)


・Get the name of the item and assign it to name


reaper.AZ_SetMediaItemHANDAUTOMER(item,2)


・Execute "HANDAUTOMER" with compression type 2 on item


reaper.AZ_SetMediaItemLoudnessMaxMomentary(item,tonumber(inputList[2]))


・Set the loudness value of inputList to item by converting it to a number using toNumber


reaper.AZ_AddRegionMarker(0,startPos,endPos,name,i,color)


-Add a RegionMarker by specifying the start and end positions, name, ID, and color of the item.


startPos = endPos + 1


- Add +1 second to the inserted end position to set the start position


end

end

To use the API, you need to sign up for a plan.

Download the dedicated API

need to do it.

*SILVER is scheduled to be released in May.

  • Prepare the Wav waveform you want to adjust in a folder

  • Prepare the track


- Script Code -
- Script Image -
- Warm Up -
- Script Detail -
- API -

LUA

AZ_SILVER.AZ_GetUserInputList

reaper.AZ_GetRandomColor

AZ_SILVER.AZ_GetFilePathList

reaper.AZ_InsertMediaTrackIdSecond

reaper.AZ_GetMediaItemEndTime

reaper.AZ_SetMediaItemHANDAUTOMER

reaper.AZ_SetMediaItemLoudnessMaxMomentary

reaper.AZ_AddRegionMarker

​ReaScript File Download 👇

* A dedicated API is required to run this

- Script Image -
bottom of page