![](https://static.wixstatic.com/media/a9283e_6aa743f5c6e840c988bd974971113bab~mv2.png/v1/fill/w_61,h_61,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/01_SILVER_trans.png)
3
![](https://static.wixstatic.com/media/fc32ca_ce420e9bb52c45e180e78eae3346c302~mv2.png/v1/fill/w_61,h_61,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/01_BRONZE.png)
Media
AZSTOKe_sample_CountSelectedMediaItems
Output the number of selected media
RANK
function Msg(param)
reaper.ShowConsoleMsg(tostring(param).."\n")
end
retval,allCount,_ = reaper.AZ_GetSelectedMediaTypeCount(0,"")
for i = 0,allCount-1 do
retval,name = reaper.AZ_GetSelectedMediaName(0,i)
name = name.."_ng"
reaper.AZ_SetSelectedMediaName(0,i,name)
Msg(name)
end
function Msg(param)
reaper.ShowConsoleMsg(tostring(param).."\n")
end
Msg Set the console output function
retval,allCount,_ = reaper.AZ_GetSelectedMediaTypeCount(0,"")
Get the number of selected media (allCount)
for i = 0,allCount-1 do
Loop from 0 to the variable (allCount-1)
retval,name = reaper.AZ_GetSelectedMediaName(0,i)
Save the selected media name in variable (i) in variable (name).
name = name.."_ng"
Add _ng to the variable (name)
reaper.AZ_SetSelectedMediaName(0,i,name)
Set the variable (name) to the media name of the selected media ID (i)
Msg(name)
Prints the media ID to the console
Run allCount times
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.
Multiple media in a project