Proportional looper advice - how do I time them perfectly?

    Sep 03 2013 | 9:13 pm
    Dear Cycling 74 types.
    I've run into a problem on a relatively simple max patch.
    I'm trying to use tapin~ to make a looping thing - which I've done fine in the past, both with grooveduck and tapin.
    But now I need to build one where each subsequent loop is proportional in length to the first.
    So it should work like this:
    1 - record a loop in free time. 2 - while it's playing back, tell max how many beats/quarternotes this loop contains (say, an arpeggio of 4 notes lasting perhaps 1 second would be 4) 3 - subsequent loops are always made to conform to a whole number of these quarter-notes. So, playing along, and in time, with the arpeggio example above, you could record a loop of a new arpeggio of 5 quarter-notes instead (which would work out to be 1.25 second long), and it would lock perfectly to the first, the whole pattern repeat every 20 quarter-notes.
    I sort of had it working:
    Then realised that I had the fade out line~ happening after the gate had closed, like the proverbial horse. Clicks like crazy. So I tried to improve it:
    Now it's still occasionally clicking and the timing is all off. And I've come to realise it's all about solving the precise timing of each loop (as well as declicking them!) and that's proving too hard for me.
    I would be very very grateful if anyone had any advice. I've read about poke and ipoke. That worth using instead? Don't send me towards groove~ - the tapin method is so elegant for simple loops.....isn't it?
    Lee Morgan