06-10-2021, 05:34 PM
Be careful messing around with the markers in the console. They're stored in a complicated data structure, to reduce CPU use when playing the song.
Changing marker values, or toggling blending in the console is ok. Changing marker instrument, setting, or time via the console will break things.
There's not even an easy way of listing all the markers in the song, because of that data structure. So what I do is use the selection instead. I select the markers I want to mess with, then iterate over selection.markers instead:
for (const m in selection.markers) console.log(m);
The only marker function that you could reasonably use from the console is this one:
addMarker(time, setting, instrument, value, blend)
If people have ideas for other console commands, they're easy enough to add. I should probably add something like selectNotesIf for markers.
Changing marker values, or toggling blending in the console is ok. Changing marker instrument, setting, or time via the console will break things.
There's not even an easy way of listing all the markers in the song, because of that data structure. So what I do is use the selection instead. I select the markers I want to mess with, then iterate over selection.markers instead:
for (const m in selection.markers) console.log(m);
The only marker function that you could reasonably use from the console is this one:
addMarker(time, setting, instrument, value, blend)
If people have ideas for other console commands, they're easy enough to add. I should probably add something like selectNotesIf for markers.