What you say - could work with xstream, or should I start trying to make my own tool for this?
xStream is primarily designed for realtime use, the ability to transform/write to the pattern is done in a linear fashion, with time as the driving factor.
But from what you describe, it sounds like you’re looking for something that is more like sitting in the background, quietly monitoring any part of the pattern and acting on specific changes to the pattern data.
This kind of thing is actually not that to achieve with “plain” lua scripting, and you would probably end up with something which is more focused and practical to use.
I would advice you to check out the line notifier, that would be the key for unlocking this kind of workflow.
For example:
- Tool starts, it scans the pattern to find a suitable “template” track (any sequencer track, basically)
- If a suitable candidate is found, it somehow needs to resolve a target track (?)
- If both source and target can be found, it attaches line notifiers and starts to monitor changes.
- Repeat step 1 every time you navigate to a new pattern (don’t forget to detach existing line notifiers)