Limitations
Known constraints in Margrete RPC, and how to work around them.
Scroll-speed event scanning
Because of a limitation in the Margrete plugin SDK, Margrete.open_edit() scans for scroll-speed events (TimelineSpeedEvent) instead of reading them directly. This has two practical consequences:
- Events far past the last note may not be read. By default, the scan covers up to 19200 ticks beyond the last note.
- Charts with many scroll-speed events can be slow to open. Dead Soul is a known example.
Workarounds
Use the open_edit parameters described in Edit Transactions to control the scan:
with m.open_edit(
# ticks to scan past the last note (default: 19200)
event_scan_lookahead_ticks=1920 * 4,
) as tx:
...Or provide an explicit list of timeline IDs to scan:
with m.open_edit(event_scan_til_ids=[0, 1, 2]) as tx:
...Pass event_scan_til_ids=[] to scan all default timelines (0 through 15) without note-based filtering.
Undo and note deletion
When a Python-scripted edit deletes notes, pressing Undo in Margrete may restore those notes in a duplicated state instead of cleanly reversing the deletion.
Additions and modifications can be undone safely. Only deletions are affected, so note-cleanup scripts should use the deletion workflow in Edit Transactions with this limitation in mind.
Workarounds
- Prefer designs that add or modify notes rather than delete them.
- Use
Margrete.undo()instead of Margrete's built-in Undo. It removes duplicates automatically.