PURE DATA forum~

...that deal with pure data

You are not logged in.

#1 2009-04-11 16:39:59

ClaudiusMaximus
Moderator

muug~ nonlinear moog ladder filter

I implemented the filter algorithm described in this paper:

http://dafx04.na.infn.it/WebProc/Proc/P_061.pdf

code is here if anyone's interested:

svn checkout https://code.goto10.org/svn/maximus/2009/muug/

I called it muug~ to distinguish from the moog~ in ggee, which uses a simpler algorithm.

Not very optimized (at least so far) - expect it to use loads of cpu juice for each object.  And a bug: it only works correctly at 44100 sample rate inside a 4x upsampled subpatch, see the help patch for an example.

Offline

 

#2 2009-10-17 02:22:28

Re: muug~ nonlinear moog ladder filter

just built with mingw on windows and it works and sounds great.  only eats up about 37% of my proc.  not bad.  thanks!

Offline

 

#3 2010-03-25 10:38:25

saturno
Member

Re: muug~ nonlinear moog ladder filter

Great work Maximus, this filter sounds great! It even works at high Q values (q=10) the way it should. Good job in implementing Houvilainen's model.

I've noticed in the SVN that you've made a revision after this post. So you've optimized the tanh function and it no longer needs to be upsampler 4x, correct?

I've done an experiment to calculate the error of the tanh table using different table sizes (all multiples of 8) and found that the ttanh function causes an error of about six orders of magnitude since it doesn't round to the nearest integer when calculating the index t (from the sample x). I then decided to try linear interpolation and got slightly better results. The difference between truncation and rounding is significant, the difference between rounding and interpolation is probably not. On my machine, muug's help ran at about 6.5% cpu using rounding, while with interpolation it ran at 8%.

Another thing, the table size should be SIZE+1, but the error caused by that is unmeasurable.


I'm uploading a modified version which allows you to change the default table size of 512 to some other size with a -DMUUG_TILDE_TABLE_SIZE=262144 compiler option. It also lets you change from rounding to linear interpolation with the compiler option -DMUUG_INTERPOLATE=1, the default is 0 (rounding). This version also gets the current sampling rate, it does not assume 44100. I've tested it at 96000 and 4800, works perfectly. Pi is now a literal constant instead of a variable (MUUG_PI). And finally I changed the calculations to double precision with no discernible performance loss.

I'm also including the results of my experiment. It basically ran a large quantity of numbers between -4 and 4 through the table look up tanh and compared it with the actual tanh.

cheers.

Last edited by saturno (2010-03-25 16:03:10)

Offline

 

#4 2010-03-27 01:33:23

saturno
Member

Re: muug~ nonlinear moog ladder filter

Here's a very simple kick drum that uses muug~

Offline

 

#5 2010-03-28 17:33:29

ClaudiusMaximus
Moderator

Re: muug~ nonlinear moog ladder filter

thanks for the interest!  not sure about the current state of my SVN version of muug~; it's essentially an abandoned project/experiment, not enough time on my hands to update it / apply your additions... and there's still a bug in this forum software / setup that means I can't download attachments anyway...

so I suggest you set up a repository on http://gitorious.org or similar and take over this code (there are some tools to convert from svn to git preserving history, email me if you need help), then I can update my SVN version to tell people to get it from your repository instead.

Offline

 

#6 2010-04-04 02:55:42

saturno
Member

Re: muug~ nonlinear moog ladder filter

Did as you said, though I had a hard time converting from SVN to GIT. Since you only performed two commits I just did it by hand, noting your commit dates.

http://gitorious.org/muug/muug#

If we could get someone to compile a windows binary for us that would be great. Maybe Count Binoculars could do so. Tarball is here http://gitorious.org/muug/muug/archive-tarball/master

EDIT: grammar

Last edited by saturno (2010-04-04 03:03:15)

Offline

 

#7 2010-04-07 20:55:52

saturno
Member

Re: muug~ nonlinear moog ladder filter

Managed to get it compiled for windows using MinGW. So far there's a an OS X version (10.5 built with xcode 3.0) and windows 32 (WinXP built with MinGW).

http://gitorious.org/muug/muug/archive-tarball/master

Offline

 

#8 2010-04-10 20:02:34

saturno
Member

Re: muug~ nonlinear moog ladder filter

Made a minimoog using this external. Check it out
http://puredata.hurleur.com/viewtopic.php?pid=17662

Offline

 
  • Index
  •  » extra~
  •  » muug~ nonlinear moog ladder filter

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson


pd.webring info