    : *(trig : trigger(freq2samples(freq)))
                            : resonator(freq2samples(freq), att)
    with {
        resonator(d,a)  = (+ : @(d-1)) ~ (average : *(a));
        average(x)      = (x*(1+coef)+x'*(1-coef))/2;
        trigger(n)      = upfront : + ~ decay(n) : >(0.0);
        upfront(x)      = (x-x') > 0.0;
        decay(n,x)      = x - (x>0.0)/n;
        freq2samples(f) = 44100.0/f;
        att             = pow(0.001,1.0/(freq*t60)); // attenuation coefficient
        random        