- Script Code -
allCount = reaper.AZ_GetMediaTypeCount(0,"")
for i = allCount-1,0,-1 do
muteType = reaper.AZ_GetMediaMute(0,i)
if (muteType) then
reaper.AZ_DeleteMedia(0,i)
end
end
- Warm Up -
Multiple media in a project
Place muted media
- Script Detail -
allCount = reaper.AZ_GetMediaTypeCount(0,"")
Output the number of media and assign it to the allCount variable
for i = allCount-1,0,-1 do
Rotate the media several sentences For.
In this case, by adding -1 do, the number of media is subtracted from the number of For loops. For example, 5.4.3.2.1.0, where i is decreased from the final value.
muteType = reaper.AZ_GetMediaMute(0,i)
Get the mute type (bool) of the ID media for i
if (muteType) then
If muted, execute the following process
reaper.AZ_DeleteMedia(0,i)
Delete the media ID of i
end
end