View Single Post
Old 02-16-2014, 01:22 PM   #83
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Phoenix, AZ
Posts: 2,055
Default

Would like some kind of "get media item ids by position" because currently it gets media items in order of track and then in order of position. But I'd like to get items in order of position.

A not-so-great workaround for this is to move all items that are being processed to the same track, and then recrecrate the list of items. But then you cannot recall what track the item was in... well I guess you could workaround that by doing something crazy like storing the track number in the item name and removing it after the script is done.

OR you can to create two arrays, one for items, one for corresponding track and use sort functions, which EEL does not have built-in, but Justin made quicksort and I also came up with an insertion sort function...

but still........ it'd be nice to have "get media item ids by position"

edit: or maybe I should just create a function "GetMediaItemsByPosition(array_goes_here) (bla bla sort function bla)"
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote