top of page
中島 健太郎

[REAPDOCK-Python-]-002-Sort all media in ascending order

Updated: 2 days ago

 
Reapdock Sort Ascending
 
 

[ Python ]REAPDOCK/APIDOCK documentation update notification

 

Good evening.

This is Nakajima from AZSTOKE Co., Ltd.


Today is the weekly document update Friday - Python edition. "Sort all media (waveforms) in ascending order"

This is the script.


Here are some points to note when creating a script.
  • The API output values are always in order. Therefore, use [_] to get the items you want to output in the order you want. Example: retval,_,_,mediaList[i]["name"],_= AZ_GetMediaName(0,i,"",1024)


  • This time, we are using sorted to sort the names in ascending order. Since the array to be sorted must be a normal array, we create a separate sortList and sort the mediaList in ascending order in conjunction with that sortList.


  • When setting a type such as ["name"] to an array, you can extract the variable by simply using mediaList[i]["name"].


 

Next episode: 2/28

[REAPDOCK] Set "_NG" to the file name of all selected media: LUA version

 
 

LINK

 
New to Reaper/those considering subscribing to a plan
ReaScript Bronze free code AZBRONZE0207
For detailed documentation of [REAPDOCK]Script, see below.

>Reference materials

[APIDOCK] See below for the APIs used in the script

AZ_GetMediaTypeCount > Count of all media (including the number of specified formats) AZ_GetMediaItemSelect

> Get media (select media acquisition method)

> Get the media name of the specified media ID AZ_GetMediaLength

>Get the length (in seconds) of the specified media

> Set the start time of a specific media item



 

REAPDOCK List

 





3 views0 comments

Kommentare


bottom of page