This is an old revision of the document!
Linked Segments
What is it?
The ability to have segments linked together. In its simplest form, linked segments would appear identical - the events in one would appear to be the same as the events in the others to which it was linked. Edits to a linked segment would be reflected in its siblings.
It's been discussed to be able to have relative transpositions or time stretches or squashes on the linked segments. It remains to be seen whether these will be implementable in practice.
Why implement it?
Various users have asked for it on the tracker
It would be very useful for drums or electronica in general
In classical work it might be useful where various different instruments play the same sequence
The current mechanism for coordinating segment content is doing a load of tedious copying every time to want to change some small aspect of some motif or drum pattern. Anything which could automate is hopefully a good thing!
It has potential to be used to be able to view repeating segments in the notation editor (Yves is working on this)
How do I try it?
There's a branch called linked_segments_ian which has the beginnings of a working implementation of this. It will be merged on to the trunk eventually but this is where it is for the time being.
Compile branch and run
Make segment, put some notes in
control-middle-mouse-click-drag the segment (yeah, sorry about that cryptic key/mouse kung-fu, an alternative strategy's in the process of being implemented)
Open both segments in notation and/or matrix, edit and see the other edit itself accordingly
There's some functionality in there for putting relative transpostions on indivitual linked segments, but it's a bit raw and subject to reworking imminently, so I'll spare you a tutorial on that here.
How's it done?
…(write something about the code implementing the linkage here)…
Roadmap
To do:
Transposition
Repeating Segments
Ui enhancements
Suggestion from Chris - when creating a linked segment by dragging, get ctrl-drag to pop up a menu when you release asking whether you want to copy or link. Michael suggests: Why don't we try it that way first and see how people react?
Provide a “Paste as link” type menu and keyboard option
Make an “unlink” command for linked segments, and some way of firing it
Checks
check changes of segment copy ctor to clone function, whether they need to be deep or shallow copies (i.e. including the link or not)
check cut/copy/paste of linked segments on the composition canvas is behaving sensibly
Bugs
resizing of linked segments, particularly from the left, has variable effects
cut/copy/paste range with linked segments goes hilariously wrong at the moment if you try it
Wishlist