top of page
- Script Code -

dofile(reaper.AZ_GetLuaInitPath())

require("reaper_AZSTOKE_BRONZE")  

require("reaper_AZSTOKE_SILVER")   


workPath = "D:\\reapdock\\Recording"


function CreateTracks()


    retval, inputList = reaper.AZ_GetUserInputList("", 1, "soound name", "")

    

    if retval == false then return end

    

    soundName = inputList[1]

    

    if soundName == "" then reaper.AZ_ShowMessageBox_Error("Enter sound name", "Error", reaper.AZ_WindowType_OK()) return end

    


    text = reaper.AZ_ReadFile(workPath, "MikeList.txt")

    

    mikeList = reaper.AZ_GetStringSplitList(text, "\n")

    

    if mikeList[#mikeList] == "" then table.remove(mikeList, #mikeList) end

    

    mikeListCSV = reaper.AZ_ReplaceSearchString(text, "\n", ",")

    

    defaultList = ""

    for i, mike in pairs(mikeList) do

    

        defaultList = defaultList .. "1,"

    end

    

    retval, inputList = reaper.AZ_GetUserInputList("Using mike(using: 1)", #mikeList, mikeListCSV, defaultList)

    

    if retval == false then return end

    

    mikeUseList = inputList

    

    

    trackPos = reaper.CountTracks()


    soundTrack = reaper.AZ_InsertTrackSearchUniqueOnly(0, soundName)

    

    color = reaper.AZ_GetRandomColor()

    

    reaper.AZ_SetTrackItemColor(soundTrack, color)

    

    reaper.AZ_SetTrackItemDepth(soundTrack, 0)

    

    for i = 1, #mikeList do

        if mikeUseList[i] == "1" then

            reaper.AZ_InsertUniqueChildTrack(soundTrack, mikeList[i])

        end

    

    end

end


CreateTracks()

- Warm Up -

List the microphones to use in the MikeList.txt file

- Script Detail -

dofile(reaper.AZ_GetLuaInitPath())

require("reaper_AZSTOKE_BRONZE")  

require("reaper_AZSTOKE_SILVER")


・Import RIGDOCKS


workPath = "D:\\reapdock\\Recording"


・Specify the working folder


function CreateTracks()


    retval, inputList = reaper.AZ_GetUserInputList("", 1, "soound name", "")

    

    if retval == false then return end

    

    soundName = inputList[1]


・Get the sound name from user input

    

    if soundName == "" then reaper.AZ_ShowMessageBox_Error("Enter sound name", "Error", reaper.AZ_WindowType_OK()) return end

    

・If the sound name is empty, show an error message and exit


    text = reaper.AZ_ReadFile(workPath, "MikeList.txt")


・Load the mic list file

    

    mikeList = reaper.AZ_GetStringSplitList(text, "\n")


    if mikeList[#mikeList] == "" then table.remove(mikeList, #mikeList) end


・Split by line breaks to create the mic list. If the last element is an empty string, remove it

    

    mikeListCSV = reaper.AZ_ReplaceSearchString(text, "\n", ",")


・Create a comma-separated mic list

    

    defaultList = ""

    for i, mike in pairs(mikeList) do

    

        defaultList = defaultList .. "1,"

    end


・Create a default value list (all set to used); 1 if the mic is used

    

    retval, inputList = reaper.AZ_GetUserInputList("Using mike(using: 1)", #mikeList, mikeListCSV, defaultList)

    

    if retval == false then return end

    

    mikeUseList = inputList



・Get the microphone selection from user input


           

    trackPos = reaper.CountTracks()


・Get the track count and determine the position to append at the end


    soundTrack = reaper.AZ_InsertTrackSearchUniqueOnly(0, soundName)


・Create a track named after the sound (if it exists, search and get it)

    

    color = reaper.AZ_GetRandomColor()

    

    reaper.AZ_SetTrackItemColor(soundTrack, color)


・Set the track item color randomly


    reaper.AZ_SetTrackItemDepth(soundTrack, 0)


・Set the track item depth to 0 (frontmost)

    

    for i = 1, #mikeList do


・Loop over the mic list


        if mikeUseList[i] == "1" then

            reaper.AZ_InsertUniqueChildTrack(soundTrack, mikeList[i])

        end


・For a microphone that is used (when 1), create a child track

    

    end


end


CreateTracks()


・Run the function


- API LINK -
- API LINK -

Track

AZSTOKE_Recording_CreateTracks

Prepare recording tracks per microphone

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