set_item_length
Adjust a media item's length in REAPER by specifying seconds or musical measures, with items identified by track index and either position or direct ID.
Instructions
Set the length of a media item.
Item Identification - Accepts BOTH types:
track_pos_idx (integer): Simple index like 0, 1, 2
direct_item_id (string): Internal ID like "MediaItem*0x..."
Args: track_index: Index of the track item_id: EITHER integer track_pos_idx OR string direct_item_id length_time: Length in seconds from start of item (optional if length_measure is provided) length_measure: Length as "measure:beat,fraction" from start of item(optional if length_time is provided)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_id | Yes | ||
| length_time | No | ||
| track_index | Yes | ||
| length_measure | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |