<p dir="ltr">Ah yes, of course, interesting insight about the sieve algorithm.</p>
<p dir="ltr">I like to faff around, Neil. Don't spoil my fun!<br>
Besides, unlike FFT this uses no multiplication or exponentiation, just integer addition, and each thing being added is just added 0, 1, or -1 times. I'd say that's a pretty big win, wouldn't you?</p>
<p dir="ltr">I don't think any important discovery was made without faffing :-)</p>
<br><div class="gmail_quote"><div dir="ltr">On Tue, 22 May 2018 14:07 Tom Wiltshire, <<a href="mailto:tom@electricdruid.net">tom@electricdruid.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You’re basically running the sieve algorithm for finding prime numbers there, so if you find a pattern or a better method, you’re in line for the Fields Medal.<br>
<br>
==================<br>
Electric Druid<br>
Synth & Stompbox DIY<br>
==================<br>
<br>
> On 22 May 2018, at 11:00, cheater00 cheater00 <<a href="mailto:cheater00@gmail.com" target="_blank">cheater00@gmail.com</a>> wrote:<br>
> <br>
> So what I thought might be feasible would be to eg get a single peak at<br>
> 1 Hz, create a 1 Hz comb filter, then subtract a 2 Hz comb from it so<br>
> you're left with peaks at 1, 3, 5, 7, etc Hz, then subtract a 3 Hz<br>
> comb, so you're left with 1, 5, -6, 7, 9, 11, -12, etc Hz, then<br>
> subtract a 5 Hz comb etc. If you look at the first 249 such filters<br>
> (that's what I could quickly calculate), you will get these<br>
> coefficients:<br>
> <br>
> +--0-+-00+-0-++0-0-0++<br>
> -00+00---0+++0-++0---0<br>
> 0+-000+0-0+0++-0-+00+-<br>
> -0+--0-+00+--00+-0+++0<br>
> -0+0+++0-000---0-+-0--<br>
> +0--+00++00++000-0+--0<br>
> ++00---0+++0++00-0-00-<br>
> +0-++0+0-0-+-00-00--00<br>
> ++-0--+0+-+00--0-+-0-0<br>
> -0+++0++00++-0+++0+++0<br>
> +--00+-0---0-0+0+--0-0<br>
> 000-+0<br>
> <br>
> Meaning: 1 * comb at 1 Hz, -1 * comb at 2 Hz, -1 * comb at 3 Hz, 0 *<br>
> comb at 4 Hz, -1 * comb at 5 Hz, 1 * comb at 6 Hz, etc.<br>
> <br>
> I assume this can be found for each nth peak, and a lot of the data<br>
> will be shared. Note you still need (nyquist/f) delays with 1 bucket, 2<br>
> buckets, ..., nyquist buckets. That's a good 468 megabytes at a 44.1<br>
> kHz sampling frequency. I wonder if this too can be shared somehow.<br>
> <br>
> I don't really see a pattern to the coefficients - i used a program to<br>
> find them - does anyone else see any rule?<br>
> <br>
> The program can be found here:<br>
> [1]<a href="https://lpaste.net/6557071818560110592" rel="noreferrer" target="_blank">https://lpaste.net/6557071818560110592</a><br>
> <br>
> You have to use the deepseq package.<br>
> Change endHz to 250 and run firstPeakOnly from the repl. I'm not sure<br>
> if the last coeff will be the same as with 22050, as I haven't<br>
> calculated it up to that number, and I don't really have time to<br>
> optimize this any more.<br>
> <br>
> On Tue, 22 May 2018 07:37 , <[2]<a href="mailto:rsdio@audiobanshee.com" target="_blank">rsdio@audiobanshee.com</a>> wrote:<br>
> <br>
> On May 21, 2018, at 10:04 PM, Corey K <[3]<a href="mailto:coreyker@gmail.com" target="_blank">coreyker@gmail.com</a>> wrote:<br>
>> � � Option 2: write out the Z-transform for your comb filter.<br>
> There will be<br>
>> � � one pole per peak, and these will be spaced at equal angles<br>
> around a<br>
>> � � circle in the complex place. Add a zero to perfectly cancel<br>
> the pole<br>
>> � � corresponding to the peak you want removed. This will in turn<br>
>> � � correspond to an FIR filter that you can run before or after<br>
> your comb<br>
>> � � filter.<br>
> Here�s an exercise that might prove interesting:<br>
> Write out the Z-transform for an ideal comb filter. Then convert<br>
> this to an FIR filter without any modification.<br>
> My question is this: Is the math perfect enough that you�d end up<br>
> with a single delay tap? I mean, that�s what a comb filter is, so I<br>
> wonder whether the Z-transform to FIR would actually guide you to<br>
> the simplest implementation. Granted, the FIR would probably be<br>
> equivalent to a string of individual Z-1 delays, but they�re<br>
> equivalent to a single, long delay so long as nothing taps the<br>
> intermediate samples.<br>
> I have a suspicion that things wouldn�t quite work out so perfectly,<br>
> and there�s be lots of taps, each with their own weight, and it<br>
> wouldn�t come out looking like the simple single-delay-plus-mixer<br>
> circuit.<br>
> Has anyone gone through the exercise to see how it turns out?<br>
> Brian<br>
> _______________________________________________<br>
> Synth-diy mailing list<br>
> [4]<a href="mailto:Synth-diy@synth-diy.org" target="_blank">Synth-diy@synth-diy.org</a><br>
> [5]<a href="http://synth-diy.org/mailman/listinfo/synth-diy" rel="noreferrer" target="_blank">http://synth-diy.org/mailman/listinfo/synth-diy</a><br>
> <br>
> References<br>
> <br>
> 1. <a href="https://lpaste.net/6557071818560110592" rel="noreferrer" target="_blank">https://lpaste.net/6557071818560110592</a><br>
> 2. mailto:<a href="mailto:rsdio@audiobanshee.com" target="_blank">rsdio@audiobanshee.com</a><br>
> 3. mailto:<a href="mailto:coreyker@gmail.com" target="_blank">coreyker@gmail.com</a><br>
> 4. mailto:<a href="mailto:Synth-diy@synth-diy.org" target="_blank">Synth-diy@synth-diy.org</a><br>
> 5. <a href="http://synth-diy.org/mailman/listinfo/synth-diy" rel="noreferrer" target="_blank">http://synth-diy.org/mailman/listinfo/synth-diy</a><br>
> _______________________________________________<br>
> Synth-diy mailing list<br>
> <a href="mailto:Synth-diy@synth-diy.org" target="_blank">Synth-diy@synth-diy.org</a><br>
> <a href="http://synth-diy.org/mailman/listinfo/synth-diy" rel="noreferrer" target="_blank">http://synth-diy.org/mailman/listinfo/synth-diy</a><br>
<br>
</blockquote></div>