this seems like a good idea, because then clips could be moved around between songs and distributed
but maybe a less advanced clip functionality could be scripted for a start, something like EPMClip, “Even Poorer Man’s Clip”
because there seems to me that maybe it’s possible to use the unknown renoise commands Cxxx and Exxx as clip markers (where the clip begins and where it ends) and then attach a number id to the clip
for example:
C-4 00 40 80 E001
[more notes and fx data goes here]
-- -- -- -- E001
everything between the effect column tags E001 and E001 would define EPMClip number 1 (and everything between E303 and E303 would define the 303’th EPMClip’s contents, etc)
since we have a maximum of 8 different effect columns in renoise, there’s plenty of room for other (known) effect commands
then in the pattern editor we could place out another effect marker that is unknown to renoise (but would be known to the script of course):
-- -- -- -- C001
this would place out the contents of EPMClip number 1 in the pattern editor whenever we called a keybinded function clips2pattern()
the script would naturally look for all instances of C001 in the current renoise song and then replace all matches with clip content data (which in this case is the data found between the first pair of E001 markers)
upon this replacement, the effect column clip marker C001 would be placed out by the script in order to keep the position tied to EPMClip 1
(because otherwise the poor man wouldn’t be able to assign new contents in EPMClips and have them automatically changed across the entire song)
if the poor man wanted to make EPMClips static (for example if he would like to assign that clip range to a new clip), he would simply delete the C001 marker manually in the pattern editor to exclude it from clips2pattern() iteration
and since the script would look for the first pair of Exxx in the tree, one could also manually delete the first Exxx and place it out beneth the second Exxx to make an alternative clip (assuming there is note data below the second Exxx marker), something like a clip stack
i don’t know enough lua yet so i can’t estimate how easy or difficult this would be to script, but maybe taktik’s find & replace script code could be adapted for the global find & replace procedures