Quote:
Originally Posted by X-Raym
Hi !
Is there any way to modify take playback with eel script ? I don't find functions on this in the API.
|
Hi,
Do you mean "take playback rate"?
(takes can get random rates from 0 to 2 in this script)
Code:
function rand_take_pb_rate() local(i, item, take)
(
i = 0;
loop(CountSelectedMediaItems(0),
(item = GetSelectedMediaItem(0, i)) ? (
(take = GetActiveTake(item)) ? (
//GetMediaItemTakeInfo_Value(take, "D_PLAYRATE");
SetMediaItemTakeInfo_Value(take, "D_PLAYRATE", rand(2));
SetMediaItemTakeInfo_Value(take, "B_PPITCH", floor(rand(1) + 0.5)); // random "preserve pitch"
);
);
i += 1;
);
UpdateArrange(); // refresh arrange view
Undo_OnStateChange("Randomize take playback rate");
);
rand_take_pb_rate();
EDIT: added: random "preserve pitch"