Comb filter - attenuation
just something to add, there are two kinds of canonical comb filters.  there are those made with only feedforward paths and those that have feedback.  in fact, you can have additional long delay elements of length $\frac{1}{f_0}$ where $f_0$ is the frequency of the spacing between the teeth of the comb.

in fact, a comb filter can be designed as generally as an FIR or IIR filter, but with the unit delay elements replaced by delay elements with delay $\frac{1}{f_0}$.  whatever frequency response you design for a low-pass filter (either FIR or IIR) can be used to design the shape of the teeth of the comb filter.

if you use a delay of half that above, a delay of $\frac{1}{2 f_0}$, your comb filter will be tuned to only the even-numbered harmonics.  in addition, you can instead design for a prototype high-pass filter (again with delay elements of half length $\frac{1}{2 f_0}$) and your comb filter will pass only the odd-numbered harmonics.

in continuous-time, using the Direct Form II, it's

$$ v(t) = x(t) - \sum\limits_{n=1}^N a_n v(t - n/f_0) $$

$$ y(t) = \sum\limits_{n=0}^N b_n v(t - n/f_0) $$

transfer function is

$$ H(s) = \frac{Y(s)}{X(s)} = \frac{\sum\limits_{n=0}^N b_n e^{-n s/f_0}}{1+ \sum\limits_{n=1}^N a_n e^{-n s/f_0}} $$

or frequency response

$$ H(j2 \pi f) = \frac{Y(j2 \pi f)}{X(j2 \pi f)} = \frac{\sum\limits_{n=0}^N b_n e^{-j n 2 \pi f/f_0}}{1+ \sum\limits_{n=1}^N a_n e^{-j n 2 \pi f/f_0}} $$

i gotta go now, but later we can discuss how you might design your LPF prototype that depicts the shape of the teeth.  and also, maybe we should discuss how to do a precision delay that has sub-sample precision so that $f_0$ can be precisely tuned.

in the other answer, the precision delay $D$ would be integer multiples of $\frac{1}{f_0}$ in seconds. and the normalized (to the sample period) precision delay (with integer and fractional part) is

$$ \frac{D}{T} = f_\text{s} D = i_D + f_D = \frac{n f_\text{s}}{f_0} \qquad n=1,2,... N $$

(don't conflate or confuse the symbols $f_\text{s}$, the sample rate, with $f_0$, the fundamental frequency or "pitch", or the fractional delay $f_D$.)