Last time I looked, [average~] didn't take rms as an argument. Hence the [loadmess rms] in my patch. This may have changed (indeed, [average~] on Max 6 doesn't complain).
OTOH, I think averaging once per millisecond then taking a snapshot every 20ms may be counter-productive. I'm just averaging every 100ms, converting the signal to a float, and then comparing (btw, the comparison value in my patch is too high, it probably needs to be more like 0.6 or so to be effective).
Also note that in your patch the third inlet to reson~ is not set at instantiation time. This may or may not be a problem, depending on how you use the abstraction. Farnell's example has the center frequency set at instantiation time, and I'm following that convention in my abstraction.
Thanks alot! Awesome!
But just one more question what means #1 in reson~ object. As i guessed it is something like $1? I would be really thankful if you point me where i could find more info about this.
Also, if you are intrested, here is my version of decoder from Farnells book made in max4live.