[PD] Filter design for iPhone

Ed Kelly morph_2016 at yahoo.co.uk
Tue Mar 20 06:57:41 CET 2012


Hi,

I'm trying to design or find a resonant lowpass filter for use with libPd for Openframeworks running on an iPhone 4.

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.

2. I've had a go at implementing the filter from http://www.musicdsp.org/archive.php?classid=3#25 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).

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.

 
Ed


Gemnotes-0.1alpha: Live music notation for Pure Data
http://sharktracks.co.uk/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20120320/88ceb888/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filtertest_list.tar.gz
Type: application/gzip
Size: 5093 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20120320/88ceb888/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mvcf~.tar.gz
Type: application/gzip
Size: 4647 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20120320/88ceb888/attachment-0001.bin>


More information about the Pd-list mailing list