Discussion:
wcnt linear filters
(too old to reply)
James W. Morris
2004-02-03 11:58:20 UTC
Permalink
Greetings

I wondered if it is possible to add resonance to my filters in wcnt. They
only use an array
and calculate the mean average of the contents according to cut off freq.
At the moment
I've removed my p**s poor efforts at creating resonance and added a feedback
loop instead.

Is it possible to code resonant linear filters which use an array as I do,
or will I have to go on a higher mathamatics course and get my head round
fancy bi-carbonated equations?

Oh yeh, wcnt is open source... and uses a text file interface only and is
not-real-time

toodle do

James ~(sirromseventyfive)~

What's wrong with *ahem*RTsynth/didgeridoo*ahem* - I've not got the
processing power to try all this stuff out.

_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today!
http://www.msn.co.uk/messenger
Tim Goetze
2004-02-03 13:21:53 UTC
Permalink
Post by James W. Morris
Is it possible to code resonant linear filters which use an array as I do,
or will I have to go on a higher mathamatics course and get my head round
fancy bi-carbonated equations?
resonant filters use recursion; the algorithm sometimes is coded as
'take this input sample and give me an output sample' for readability
but is easily adapted to arrays. the maths behind them are intricate
(to me at least), but you don't need too firm an understanding of the
theory to actually use them. you'll find code examples for the
algorithm and the computation of the recursion coefficients in almost
every major audio synthesis/processing package or at musicdsp.org .

steve's ladspa set has a very nice state-variable filter (svf) which
lends itself well for resonance and reasonably quick parameter
changes. you may want to try it first before resorting to coding your
own.

tim

ps: the svf sounds better to me with the 'very slight waveshape for
extra stability' removed.
Steve Harris
2004-02-03 13:52:13 UTC
Permalink
Post by Tim Goetze
ps: the svf sounds better to me with the 'very slight waveshape for
extra stability' removed.
Yeah, but without it the filter tends to explode with highish cutoff
values (above fs/4 IIRC). I should probably move it to doubles and remove
the waveshape.

- Steve
Alfons Adriaensen
2004-02-03 14:13:54 UTC
Permalink
Post by Steve Harris
Post by Tim Goetze
ps: the svf sounds better to me with the 'very slight waveshape for
extra stability' removed.
Yeah, but without it the filter tends to explode with highish cutoff
values (above fs/4 IIRC). I should probably move it to doubles and remove
the waveshape.
Moving it to doubles will not help. The problem is that at high F, the
simple mapping from the continuous time domain to the sampled domain breaks
down. You need to modify the params as non-linear functions of F and Q
in order to correct for this.

(had the same problem with the M**G VCF plugins)
--
Fons
Steve Harris
2004-02-03 14:34:24 UTC
Permalink
Post by Alfons Adriaensen
Post by Steve Harris
Post by Tim Goetze
ps: the svf sounds better to me with the 'very slight waveshape for
extra stability' removed.
Yeah, but without it the filter tends to explode with highish cutoff
values (above fs/4 IIRC). I should probably move it to doubles and remove
the waveshape.
Moving it to doubles will not help. The problem is that at high F, the
simple mapping from the continuous time domain to the sampled domain breaks
down. You need to modify the params as non-linear functions of F and Q
in order to correct for this.
OK, thanks. Yes, that rings a bell now - I think I made it a bit better by
oversampling the input (2 or 4x). I'l have a look at your plugin to see
what you've done.

- Steve
James W. Morris
2004-02-04 00:02:29 UTC
Permalink
Date: Tue, 3 Feb 2004 14:21:53 +0100 (CET)
resonant filters use recursion; the algorithm sometimes is coded as
'take this input sample and give me an output sample' for readability
but is easily adapted to arrays.W
I think that maybe wcnt does both, all the modules process one sample at a
time, and the filters
add one sample to the array every time after processing x samples in filter
array to get average for the one output sampleM
the maths behind them are intricate
(to me at least), D
likewise; I had a look at harmony central (fairly helpful) which concreted
realisation that I definately had not got any graspA of resonance in my
filters. I looked in eq cookbook, there were bits and pieces which I had no
more than vague notions of.
but you don't need too firm an understanding of the
theory to actually use Sthem.
good!
you'll find code exampleHs for the
algorithm and the compuAtation of the recursion coefficients in almost
every major audio synthesis/processing package or at musicdsp.org .
hmmm, I keep putting off loRoking at other peoples code, it's all greek to
me.
steve's ladspa set has a very nice state-variable filter (svf) which
lends itself well for resonancTe and reasonably quick parameter
changes. you may want to try it first before resorting to coding your
own.
I've not had much chance to uDse ladspa. I've compiled glame to use it's
filter network, but there seems to be inputs and outputs Olacking, many are
mono, I can't read a stereo file, through a reverb and out to another stereo
Tfile, or from a stereo input on soundcard, through fx, to file, so I've
given up on glame (again), plus I don't like how it wont delete the deleted
things.

Another one I keep trying is SND. I quite like it, but have only got the
basics working, no effects etc. And I've got zero knowledge oNn scheme,
guile whatever. I need to get motif again as I deleted it along with
lesstif, and seemE to have lost cdrom....snd was not loading xm.

no idea what this means: above fs/4 IIRC -- not too worried about it
either.

Well, I guess I'll try and learn from otheTrs code at long last, and nip on
over to musicdsp.org.
I remember last year I somehow had a strange notion there was not much more
I could do to wcnt, and this year after a long break, everything's coming
out of the woodwork, and there's all sorts needing lifts and tucks.

James ~(sirromseventyfive)~

_________________________________________________________________
Tired of 56k? Get a FREE BT Broadband connection
http://www.msn.co.uk/specials/btbroadband
Tim Goetze
2004-02-04 00:49:26 UTC
Permalink
Post by James W. Morris
Post by Tim Goetze
resonant filters use recursion; the algorithm sometimes is coded as
'take this input sample and give me an output sample' for readability
but is easily adapted to arrays.W
I think that maybe wcnt does both, all the modules process one sample at a
time, and the filters
add one sample to the array every time after processing x samples in filter
array to get average for the one output sampleM
whatever you need to do to get the job done .. but it's usually
better to unify.
Post by James W. Morris
Post by Tim Goetze
the maths behind them are intricate
(to me at least), D
likewise; I had a look at harmony central (fairly helpful) which concreted
realisation that I definately had not got any graspA of resonance in my
filters. I looked in eq cookbook, there were bits and pieces which I had no
more than vague notions of.
the cookbook is a bitch to read without the background. i guess it's
meant to serve as a quick lookup sheet for people who know the stuff
but can't remember the exact numbers. if you're looking for bi-quads,
those in ecasound seem to follow the cookbook iirc.
Post by James W. Morris
Post by Tim Goetze
you'll find code exampleHs for the
algorithm and the compuAtation of the recursion coefficients in almost
every major audio synthesis/processing package or at musicdsp.org .
hmmm, I keep putting off loRoking at other peoples code, it's all greek to
me.
that's not good, if i may say so. use the source, luke ... you know
that drill. there's truth to it. read it, dig it, make it yours.
Post by James W. Morris
I've not had much chance to uDse ladspa. I've compiled glame to use it's
filter network, but there seems to be inputs and outputs Olacking, many are
mono, I can't read a stereo file, through a reverb and out to another stereo
Tfile, or from a stereo input on soundcard, through fx, to file, so I've
given up on glame (again), plus I don't like how it wont delete the deleted
things.
why not implement ladspa support in your application? it's quite
simple to do, and opens a world of sound manipulation.
Post by James W. Morris
no idea what this means: above fs/4 IIRC -- not too worried about it
either.
1/4 sampling rate, or 11 kHz in a 44 kHz system. i'm not worried about
it either since i never run the svf even near that high a cutoff
frequency.
Post by James W. Morris
Well, I guess I'll try and learn from otheTrs code at long last, and nip on
over to musicdsp.org.
yes! do so. :)

tim
Steve Harris
2004-02-04 08:35:31 UTC
Permalink
Post by Tim Goetze
the cookbook is a bitch to read without the background. i guess it's
meant to serve as a quick lookup sheet for people who know the stuff
but can't remember the exact numbers. if you're looking for bi-quads,
those in ecasound seem to follow the cookbook iirc.
So do some of the ones in my plugins (utils/biquad.h has a complete
implementation)
Post by Tim Goetze
why not implement ladspa support in your application? it's quite
simple to do, and opens a world of sound manipulation.
Yes, I think that even hardcoding in plugins can be a good idea (c.f. JAMin
and jackEQ), it makes your code nice and simple and all the filter state
is kept inside the plugins.

- Steve
Tim Goetze
2004-02-04 12:02:28 UTC
Permalink
Post by Steve Harris
Post by Tim Goetze
the cookbook is a bitch to read without the background. i guess it's
meant to serve as a quick lookup sheet for people who know the stuff
but can't remember the exact numbers. if you're looking for bi-quads,
those in ecasound seem to follow the cookbook iirc.
So do some of the ones in my plugins (utils/biquad.h has a complete
implementation)
yes, i forgot to mention. too obvious a place to look in. :)

tim
Alexander Ehlert
2004-04-01 20:18:03 UTC
Permalink
Post by James W. Morris
I've not had much chance to uDse ladspa. I've compiled glame to use it's
filter network, but there seems to be inputs and outputs Olacking, many are
mono, I can't read a stereo file, through a reverb and out to another
stereo Tfile, or from a stereo input on soundcard, through fx, to file, so
I've given up on glame (again), plus I don't like how it wont delete the
deleted things.
I browse through this mailing list rather seldom now due to lack of
time. Glame does all the things, you didn't get done, so why don't you ask on the
glame-users mailing list, or glame-devel mailing list? There's not much
going on so we usually answer rather quick :-)
Which glame version did you try?
To read a stereo file you just open the read_file plugin from input.
Then you add a reverb from the LADSPA section. And to connect them you
simply left click into the right (blue) area of read_file a drag a
connection to the plugin. For a second channel you just drag a second
arrow to whatever other plugin. Really easy..

Cheers, Alex

--

James W. Morris
2004-02-04 12:43:44 UTC
Permalink
Date: Wed, 4 Feb 2004 08:35:31 +0000
Post by Tim Goetze
the cookbook is a bitch to read without the background. i guess it's
meant to serve as a quick lookup sheet for people who know the stuff
but can't remember the exact numbers. if you're looking for bi-quads,
those in ecasound seem to follow the cookbook iirc.
So do some of the ones in my plugins (utils/biquad.h has a complete
implementation)
Post by Tim Goetze
why not implement ladspa support in your application? it's quite
simple to do, and opens a world of sound manipulation.
Yes, I think that even hardcoding in plugins can be a good idea (c.f. JAMin
and jackEQ), it makes your code nice and simple and all the filter state
is kept inside the plugins.
- Steve
biquad filters were just something I pulled off the cookbook, assuming it
would be the next place to go. And you know what they say about assume....
;/

Coding is a yearly thing I do in the winter months, I try and limit how much
time I spend on it as it is as far as time and energy are concerned, very
demanding. I intend to get as much done as pos without using libraries,
get the main elements there and working, and then I'll expand into ladspa in
the future.

(*james)->::~(sirromseventyfive)~++

_________________________________________________________________
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo
Loading...