[REAPDOCK-Lua-]-002-Sort all media in ascending order
All postsREAPDOCK👇Sort all media in ascending order
[ LUA ]REAPDOCK/APIDOCK document update notification
Good evening.
This is Takeda from AZSTOKE Co., Ltd.
Today is the weekly document update Wednesday (LUA). This time, it's a script that sorts all media (waveforms) in ascending order .
This is one of the scripts I use in game sound production. I put hundreds of voices into Reaper, but the order is all messed up and I can't play them according to the script... I want to sort random SE media names in ascending order, etc.
It is a hassle to check the waveform names one by one visually during inspection or audio adjustment. This will solve such problems with the push of a button .
However, this is aimed at intermediate users. As a beginner, it was too difficult for me and gave me a headache... Before studying this script, you need to understand the following document.
If/for/tabel are essential knowledge, so this document is designed to help those who understand the following four documents take a step forward. *A plan subscription is required to view this document.
- *1: [AZ_for_loop: executes a specified number of loops]
- *2: [AZ_{}: Array within an array]
- *3: [[AZ_tableSort(name): Sorts based on elements in an array]](https://www.azstoke.jp/reapdock-lua-bronze/az_tablesort(name%29)
- *4: [AZ_if: Conditional test using if]
By using BRONZE's API, you can achieve this with just a few lines of code!
Next episode: 2/23
[REAPDOCK] Sort all media in ascending order: PYTHON version
LINK
New to Reaper/those considering subscribing to a plan
Complete Guide to Reaper - From Installing Reaper to Creating Reascript -
For detailed documentation of [REAPDOCK]Script, see below.
[ REAPDOCK table of contents page ]
Sort all media in ascending order
>Reference materials
- *1: [AZ_for_loop: executes a specified number of loops]
- *2: [AZ_{}: array within array]
- *3: [[AZ_tableSort(name): Sorts based on elements in an array]](https://www.azstoke.jp/reapdock-lua-bronze/az_tablesort(name%29)
- *4: [AZ_if: Conditional test using if]
[APIDOCK] See below for the APIs used in the script
[ APIDOCK table of contents page ]
AZ_GetMediaTypeCount > Count of all media (including the number of specified formats) AZ_GetMediaItemSelect
> Get media (select media acquisition method)
AZ_GetMediaName
> Get the media name of the specified media ID AZ_GetMediaLength
>Get the length (in seconds) of the specified media
AZ_SetMediaItemStartTimeSeconds
> Set the start time of a specific media item


