set_locator
Add or remove an Arrangement cue locator at a specified beat. Preview with confirm=false to see whether it creates or deletes, then apply with confirm=true.
Instructions
Place or remove an Arrangement cue locator. Requires confirm=True.
This toggles, and that is the whole difficulty with it. Live offers one call,
``song.set_or_delete_cue``, which adds a locator where none exists at that beat
and deletes the one that does, so the same arguments twice leave nothing behind.
Call with confirm=False first to see which of the two would happen.
Returns:
Dictionary reporting the toggle, and the cue points and their count after it.
Note:
A locator marks a position for a human reading the Arrangement. It does not
move the playhead. Use set_arrangement_time to move that, and set_loop to
mark a region rather than a point.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name for a locator this call creates. Ignored when the call deletes one, because there is nothing left to name. | |
| at_beat | Yes | Position on the Arrangement timeline in beats from the start, where beat 0 is the beginning of the song. Fractional beats are accepted, so 33.5 is the second half of bar 9 in 4/4. | |
| confirm | No | True carries the toggle out. False changes nothing and reports the locators that already exist, which is how to tell in advance whether this call would add one or delete one. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||