If I have a midi clip that is, say, 10 measures long, is there a way to programmatically select the notes in the 4th measure in order to replace them?
The live clip api doesn't seem to have a way to do that. It has select_all_notes, which selects everything, but doesn't take any arguments that allow you to narrow down the selection.
What I'm trying to do is fill in the notes, measure-by-measure, ahead of time. If it's the 4th beat of a measure, I want to clear out and populate the next measure. This is straight-forward to do the first time around if the clip starts off empty. However, I'd like to be able to go back to any point within the clip.
I've thought about adding many (many) 1 measure clips to make it possible to clear out, replace the next measure. However, that doesn't seem very practical and I'd prefer to be able to open one long clip to see what was generated over time.
Another approach would be to simply clear out the entire clip before marching down and generating measure-by-measure. The disadvantage is that you lose the previous measures if you are focusing on a later section.
Does anybody have any other ideas?