code: def geometric_delay(sig, dur, copies, pamp=.5):
    
    out = Streamix()
    sig = thub(sig, copies + 1)
    out.add(0, sig * pamp) # Original
    remain = 1 - pamp
    for unused in xrange(copies):
      gain = remain * pamp
      out.add(dur / copies, sig * gain)
      remain -= gain
    return out
docs: Delay effect by copying data (with Streamix).
  
    Parameters
    ----------
    sig:
      Input signal (an iterable).
    dur:
      Duration, in samples.
    copies:
      Number of times the signal will be replayed in the given duration. The
      signal is played copies + 1 times.
    pamp:
      The relative remaining amplitude fraction for the next played Stream,
      based on the idea that total amplitude should sum to 1. Defaults to 0.5.