Hi Geoff
Yes Pd is wonderfull!
Attached shows how to do your example the naive way in Pd.
It uses [tabsend~] to get from sig~ domain to message domain.
This is not that efficient but good for testing and development.
More efficient is [z~] from zexy or [delread~] and [delwrite~].
Also look at [biquad~] and the raw filters [czero~] and [cpole~]
mvh/ SLP
Geoff skrev:
Hi
I am new to Pure Data,
I downloaded and have played around with it for the last couple of days
and it is rather wonderful.
I can quite happily create a basic synth inside it without too much strife.
:)
However
The reason I wanted to use Pure Data was to implement some of the maths
that I am learning through a couple of DSP books that I am studying.
*The DSP book I have read gives a simple lowpass filter function as *
*g(n) = (f(n-1) + f(n) + f(n+1))/3*
*i.e the average value of three consecutive samples. I understand how
this is in effect a lowpass filter.*
*How do I implement that in PD?*
I can easily connect a Oscillator (phasor) object to a lowpass filter
object to the DAC and hear it working,
However I want to be able to create my own lowpass filter i.e. try to
really understand how things are put together.
Therefore if in the function above I need 3 consecutive samples, I would
have thought that I need some kind of buffer to hold and call those
samples from,
so that I can then call three samples average them and then output that,
however that would have to move at the same rate/freq as the audio
engine is set up i.e. 44100Hz ..... errrr.
So I am thinking about how to solve the problem I just seem to be
missing how to start.
Any guidance appreciated.
geoff
#N canvas 296 218 804 451 10;
#X obj 34 150 table output 64;
#X obj 35 119 table input 64;
#X obj 35 191 tabreceive~ output;
#X obj 35 305 dac~;
#X obj 39 69 tabsend~ input;
#X obj 486 37 bang~;
#X obj 486 92 64;
#X obj 486 117 until;
#X obj 486 142 f;
#X obj 522 143 + 1;
#X obj 486 62 t b b;
#X obj 531 91 0;
#X obj 344 236 tabread input;
#X obj 344 275 list;
#X obj 344 304 list split 3;
#X obj 344 337 expr ($f1+$f2+$f3)/$f4;
#X msg 517 285 3;
#X floatatom 517 310 5 0 0 0 - - -;
#X obj 486 167 t f f;
#X obj 540 422 tabwrite output;
#X obj 39 19 noise~;
#X obj 35 264 *~ 0;
#X obj 109 245 hsl 128 15 0 100 0 0 empty empty empty -2 -8 0 10 -204786
-1 -1 7500 1;
#X obj 106 265 dbtorms;
#X obj 589 219 loadbang;
#X connect 2 0 21 0;
#X connect 5 0 10 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 8 0 18 0;
#X connect 9 0 8 1;
#X connect 10 0 6 0;
#X connect 10 1 11 0;
#X connect 11 0 8 1;
#X connect 12 0 13 0;
#X connect 13 0 14 0;
#X connect 14 0 13 1;
#X connect 14 0 15 0;
#X connect 14 2 13 1;
#X connect 15 0 19 0;
#X connect 16 0 17 0;
#X connect 17 0 15 3;
#X connect 18 0 12 0;
#X connect 18 1 19 1;
#X connect 20 0 4 0;
#X connect 21 0 3 0;
#X connect 21 0 3 1;
#X connect 22 0 23 0;
#X connect 23 0 21 1;
#X connect 24 0 16 0;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list