<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>mvcf~ - Well, it breaks when the Q is high and freq is moderately high, or at high freq and Q, but it seems to be that the higher you get with either frequency or Q it has a greater probability of breaking (all &nbsp;dac~ outputs at 1 (or possibly 1e+07), no more audio can be played by the patch.</span></div><div>&nbsp;</div><div>What I mean is that with the noise~ object as the input, the filter breaks after about 1-3 seconds when Q=0.70-0.8, f=0.7-0.8, and there are variations on this depending on the settings. Something is profoundly un-robust about this filter, but it's cpu load is very low. I want to have a stable version for not much more CPU.</div><div><br></div><div>I will look at the RJDJ filters mentioned also. I would like not to have to worry about filters when programming libpd audio engines. It would be
 nice to get a really efficient IIR with a musical response that uses low CPU into the core - I am not an expert at using poles and zeroes however (but I'm working on my higher math often these days, with the Khan academy :) Some of this is subjective, perhaps the "musical" nature of filters, but certain types of filter are assumed by many (musicians, DJs etc) in this part of the world to be normally available. The 24dB lowpass resonant filter a la Moog is one of them, and a fundamental analogue processor as well. I understand the analogue better than the discrete, so I'm anxious to know what limit is reached in the coefficients of the filter that causes the undefined result (NaN).</div><div><br></div><div>But I'll try the other rjlib filters first!</div><div>Ed</div><div><br></div><div>Gemnotes-0.1alpha: Live music notation for Pure Data<br>http://sharktracks.co.uk/<br></div>  <div style="font-size: 12pt; font-family: 'times new roman', 'new york',
 times, serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Joe White &lt;joe@rjdj.me&gt;<br> <b><span style="font-weight: bold;">To:</span></b> Ed Kelly &lt;morph_2016@yahoo.co.uk&gt; <br><b><span style="font-weight: bold;">Cc:</span></b> PD List &lt;pd-list@iem.at&gt;; pddev &lt;pd-dev@iem.at&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, 20 March 2012, 17:50<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [PD-dev] Filter design for iPhone<br> </font> </div> <br><div id="yiv1185921975">Hi Ed,<div><br></div><div>I just tested your filtertest_list patch in RjDj and it worked exactly as expected. As Rich suggested maybe you're using an outdated version of libpd?</div><div><br></div><div>If Frank's around I'm sure he would know for certain but if I remember
 rightly the [u_lowpass] / [u_beequad] combination is not really designed for dynamically changing parameters. Maybe take a look at [e_reslop], [e_lop2] and [e_lop4] for some other filter implementations.&nbsp;</div>

<div><br></div><div>Regarding your second attempt, at what frequency does it 'break' and what's your sampling rate?</div><div><br></div><div>Cheers,</div><div>Joe<br><br><div class="yiv1185921975gmail_quote">On 20 March 2012 05:57, Ed Kelly <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:morph_2016@yahoo.co.uk" target="_blank" href="mailto:morph_2016@yahoo.co.uk">morph_2016@yahoo.co.uk</a>&gt;</span> wrote:<br>

<blockquote class="yiv1185921975gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div><span>Hi,</span></div><div><br>
<span></span></div>
<div><span>I'm trying to design or find a resonant lowpass filter for use with libPd for Openframeworks running on an iPhone 4.</span></div><div><span><br></span></div><div><span>1. I've tried the rjlib filter attached (filtertest_list.tar.gz) and it works fine in Pd, but instantly breaks when I run it on the iPhone - all other playing audio cuts out, and it is impossible to reset. I suspect that the buffers fb1 fb2 ff1 ff2 ff3 are hitting NAN values and staying there, but I haven't tested this.</span></div>

<div><br><span></span></div><div><span>2. I've had a go at implementing the filter from <a rel="nofollow" target="_blank" href="http://www.musicdsp.org/archive.php?classid=3#25">http://www.musicdsp.org/archive.php?classid=3#25</a> as a Pd external (mvcf~.tar.gz) and it is very
 efficient CPU-wise. However, higher values of f or q cause the internal filter buffers to hit NAN and stay there (tested in Pd - I haven't tried this on the iPhone yet).</span></div><div><br><span></span></div><div>

<span>I would ideally like to find out why the second attempt breaks at high q and/or f, as what I want is a 24dB/Octave moog-ish filter. I'm sure those of you with higher math skills will intuitively know why, but I'm just learning calculus now (my early education was a bit chaotic). I'm also limited by the fact that this is for a commercial project (although I'll be happy to share the code :) so I can't just take a GPL external and recompiled libpd with it.<br>

</span></div><div>&nbsp;<br>Ed<br><br></div><div>Gemnotes-0.1alpha: Live music notation for Pure Data<br><a rel="nofollow" target="_blank" href="http://sharktracks.co.uk/">http://sharktracks.co.uk/</a></div></div></div><br>_______________________________________________<br>


Pd-dev mailing list<br>
<a rel="nofollow" ymailto="mailto:Pd-dev@iem.at" target="_blank" href="mailto:Pd-dev@iem.at">Pd-dev@iem.at</a><br>
<a rel="nofollow" target="_blank" href="http://lists.puredata.info/listinfo/pd-dev">http://lists.puredata.info/listinfo/pd-dev</a><br>
<br></blockquote></div><br></div>
</div><br><br> </div> </div>  </div></body></html>