[PD] Help - filters & band limited oscillators!

Roman Haefeli reduzierer at yahoo.de
Thu Mar 15 23:29:50 CET 2007


On Wed, 2007-03-14 at 11:52 -0600, David Powers wrote:
> Hi Roman, I get the following error from your patch, for many of the tables:
> error: 1002-square33: number of points (512) not a power of 2 plus three
> 
> Along with this error, it seems to stop playing somewhere above 360 Hz...
> 
> Thanks for your help, I'm sorry to sound grumpy, it's just that in
> searching the archives mostly all I found was my old query for a year
> ago. Plus everyone says to use [blosc~] but I posted in my first post,
> that [blosc~] is broken, and I believe that it's known, ie here is
> says:
> http://blog.soundsorange.net/index.php/archives/2006/09/28/exploring-pd-extended/
> "exploring pd extended
> 27/9/2006
> CPU load rating
> blosc~ - intriguing band limited oscillators, but patch is self
> referential and not working"
> 
> Again, a reminder that this isn't really for me, but rather, it's the
> list members chance to sell other people on PD being useful, or not,
> to the outside world. [vst~] is working great so I can demonstrate
> subtractive synthesis with VST's within pure data, but that's
> suggesting to people that PD isn't really good for  traditional
> synthesis... So if you think PD is good for synthesis, let me know
> about it!!!
> 
> ***Note: I personally don't use PD with Gem for VJing, and to make
> weird generative MIDI sequences, mostly... I never really considered
> synthesis a strong point for PD, for reasons that should now be
> obvious.

i disagree with you in this point. i admit, that you'd need to make some
effort and bring some knowledge about the topic, but that doesn't prove
that pd isn't good in synthesis. however, subtractive synthesis is one
of many synthesing methods you can do in pd. if it would be impossible
to do subtractive synthesis in pd, it would still be wrong to consider
pd as unsuitable for synthesis generally. 

anyhow, like often in a technical world, faults happen because human
beeings are not perfect. i am sorry, that after all even my patch did
not work on your computer. actually it is a very easy fix. for some
reason my pd (0.40.2) didn't complain about my mistake. i changed the
table-size to 515 now. it switches around 360Hz from raw_square to
bandlimited square, that is why you didn't hear anything above that
frequency. i really hope, it works now.

cheers
roman





> ~David
> 
> On 3/14/07, Roman Haefeli <reduzierer at yahoo.de> wrote:
> > hello again
> >
> > i improved guenter's bandlimited square a bit. i noticed that it is
> > hardcoded to 48kHz and accidently i was running pd at 48kHz, that's why
> > it sounded quite good here. however, how far i can see it, the part,
> > that selects the appropriate table, is not working as it should. i
> > couldn't completely follow, how it works, but it seems to switch only
> > correct from tab1 to tab2. for other tabs it switches at too high
> > frequencies, which might introduce a bit aliasing.
> > in my version the tables are generated on loadbang, which makes the file
> > much smaller and easier to adapt for other waveforms. the tabselector is
> > now dependent on the sampling rate, so it should sound well at different
> > rates now.  in order to provide the full spectrum even in low
> > frequencies, i added a raw square generator. below a certain frequency,
> > the oscillator switches to the raw square version, so that it should
> > sound good at arbitrary low frequencies. the number of tables generated
> > on loadbang can be changed. a bigger value lowers the frequency, at
> > which the oscillator switches to the raw version and vice versa.
> >
> > i hope you'll have fun with it.
> >
> > roman
> >
> >
> > On Wed, 2007-03-14 at 04:46 -0600, David Powers wrote:
> > > I found those, but are they really band-limited? I'm fairly sure I
> > > hear ugly digital artifacts in the saw. The square appears to be
> > > broken, unless I made a mistake cutting and pasting those 1500 lines
> > > of code into my text editor (kinda hard to tell).
> > >
> > > It's 5 30 am here and I've not slept yet :-(
> > >
> > > I can't believe there's STILL no readily available
> > > external/abstraction for such a common synthesis task, I just want a
> > > "nice sounding" example that will compare with the VST's which I will
> > > be hosting from within PD; right now "ASynth" sounds about 100x better
> > > than anything made in PD itself ...
> > >
> > > Oh and I don't see any "J" example PD patches, my PD patches don't go
> > > that high.
> > >
> > >  ~David
> > >
> > > On 3/14/07, Roman Haefeli <reduzierer at yahoo.de> wrote:
> > > > hello david
> > > >
> > > > i found examples for a bandlimited saw and bandlimited square by g.
> > > > geiger in the archives. might this is what you are looking for.
> > > >
> > > > http://lists.puredata.info/pipermail/pd-list/2006-05/038681.html
> > > >
> > > > cheers
> > > > roman
> > > >
> > > > On Wed, 2007-03-14 at 03:05 -0600, David Powers wrote:
> > > > > Hello everyone,
> > > > >
> > > > > I tried google and it was no help, and the server for the list archive
> > > > > seems to be down temporarily.
> > > > >
> > > > > Anyway, I'm giving a free (as in free beer) workshop in Chicago in
> > > > > about 16 hours, on the basics of digital synthesis. I have decided to
> > > > > use Pure Data to give my presentation, and use mostly non-commercial
> > > > > software.
> > > > >
> > > > > However, I'm still missing the following for demonstrating "proper"
> > > > > subtractive synthesis:
> > > > > 1. Good, out of the box "analog-sounding" filters. I'm using [moog~]
> > > > > right now, but I'm not all that satisfied with the sound compared to
> > > > > the filters in my favorite VST's ...
> > > > > 2. Band-limited square and sawtooth waveforms.
> > > > >
> > > > > For teaching purposes PD is great, and ideal for my demonstrations.
> > > > > But as it is, I'm having to use VST's within PD in order to
> > > > > demonstrate a "nice sounding" synth. It would be nice to show that PD
> > > > > can do it without using stuff built in Steinberg's format. That would
> > > > > also let the Mac people replicate my work, if they are interested.
> > > > > Note, nobody in the workshop has ever tried Linux, except me, so Linux
> > > > > plugins are not helpful in this case.
> > > > >
> > > > > I will post my patches after I give the workshop, though they are
> > > > > nothing fancy ... just basic:
> > > > > sequencer - oscillator - vca - filter. Good for demoing though, I'm
> > > > > starting with additive first, then subtractive.
> > > > >
> > > > > ~David
> > > > >
> > > > > _______________________________________________
> > > > > PD-list at iem.at mailing list
> > > > > UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ___________________________________________________________
> > > > Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
> > > >
> > > >
> > >
> > > _______________________________________________
> > > PD-list at iem.at mailing list
> > > UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
> >
> >
-------------- next part --------------
#N canvas 454 17 528 492 10;
#N canvas 647 5 291 900 lookup-tables 0;
#X restore 20 53 pd lookup-tables;
#N canvas 0 0 505 412 lookup-table-creation 0;
#N canvas 535 94 265 461 bandlimited_square_sinesum 0;
#X obj 43 67 until;
#X obj 21 38 t b f b;
#X obj 84 67 1;
#X obj 43 99 f 1;
#X obj 84 99 + 1;
#X obj 43 125 t f f;
#X obj 43 153 % 2;
#X obj 43 176 sel 0 1;
#X obj 43 203 0;
#X obj 69 203 f;
#X obj 69 227 t b f;
#X obj 69 249 pack 1 f;
#X obj 69 274 /;
#X obj 43 306 list prepend;
#X obj 142 307 list;
#X obj 21 335 list;
#X obj 154 252 b;
#X obj 21 380 list trim;
#X obj 21 16 inlet;
#X obj 21 402 outlet;
#X obj 21 358 list prepend sinesum 512;
#X connect 0 0 3 0;
#X connect 1 0 15 0;
#X connect 1 1 0 0;
#X connect 1 2 2 0;
#X connect 1 2 16 0;
#X connect 2 0 3 1;
#X connect 3 0 4 0;
#X connect 3 0 5 0;
#X connect 4 0 3 1;
#X connect 5 0 6 0;
#X connect 5 1 9 1;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 7 1 9 0;
#X connect 8 0 13 0;
#X connect 9 0 10 0;
#X connect 10 0 11 0;
#X connect 10 1 11 1;
#X connect 11 0 12 0;
#X connect 12 0 13 0;
#X connect 13 0 14 0;
#X connect 13 0 15 1;
#X connect 14 0 13 1;
#X connect 15 0 20 0;
#X connect 16 0 15 1;
#X connect 16 0 13 1;
#X connect 17 0 19 0;
#X connect 18 0 1 0;
#X connect 20 0 17 0;
#X restore 19 327 pd bandlimited_square_sinesum;
#X obj 19 92 until;
#X obj 19 114 f;
#X obj 54 114 + 1;
#X obj 62 92 1;
#X obj 19 135 * 2;
#X obj 19 157 - 1;
#X obj 84 293 s pd-lookup-tables;
#X obj 135 220 makefilename \$0-square%d;
#X obj 84 242 pack f s;
#X obj 19 70 t f b b;
#X msg 140 167 clear;
#X obj 84 218 * 10;
#X obj 19 179 t b f f;
#X obj 19 304 f;
#X obj 19 371 send;
#X obj 19 44 r \$0-num_of_tables;
#X obj 319 35 loadbang;
#X obj 319 61 \$0;
#X msg 319 86 \; \$1-num_of_tables 30;
#X msg 84 271 obj 10 \$1 table \$2 515;
#X connect 0 0 15 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 0 5 0;
#X connect 3 0 2 1;
#X connect 4 0 2 1;
#X connect 5 0 6 0;
#X connect 6 0 13 0;
#X connect 8 0 9 1;
#X connect 8 0 15 1;
#X connect 9 0 20 0;
#X connect 10 0 1 0;
#X connect 10 1 4 0;
#X connect 10 2 11 0;
#X connect 11 0 7 0;
#X connect 12 0 9 0;
#X connect 13 0 14 0;
#X connect 13 1 12 0;
#X connect 13 2 8 0;
#X connect 13 2 14 1;
#X connect 14 0 0 0;
#X connect 16 0 10 0;
#X connect 17 0 18 0;
#X connect 18 0 19 0;
#X connect 20 0 7 0;
#X restore 20 28 pd lookup-table-creation;
#X floatatom 25 109 5 0 0 0 - - -;
#X obj 28 379 dac~;
#X obj 28 88 hsl 128 15 20 17000 1 0 empty empty empty -2 -8 0 10 -262144
-1 -1 8800 1;
#X obj 27 350 *~;
#X obj 97 304 pow 2;
#X obj 100 279 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X obj 25 152 line~;
#X obj 97 350 line~;
#X obj 97 327 pack f 20;
#N canvas 340 190 333 233 bandlimited_square 0;
#N canvas 314 100 500 478 number_of_harmonics_allowed 0;
#X obj 135 68 / 2;
#X obj 15 151 /;
#X obj 15 174 int;
#X obj 135 44 samplerate~;
#X obj 15 241 * 0.5;
#X obj 15 261 int;
#X obj 15 282 * 2;
#X obj 15 221 - 1;
#X obj 15 305 + 1;
#X obj 15 397 makefilename \$0-square%d;
#X obj 15 373 change;
#X obj 15 199 change;
#X msg 15 422 set \$1;
#X obj 15 98 t b f;
#X text 241 49 sr / 2 = nyquist frequency;
#X obj 15 450 outlet;
#X obj 206 370 b;
#X obj 239 371 b;
#X obj 206 392 0;
#X obj 239 392 1;
#X obj 206 420 change;
#X obj 206 444 outlet;
#X obj 14 18 inlet~;
#X obj 15 121 f;
#X obj 135 21 loadbang;
#X text 119 216 harmonics never should exceed the nyquist frequency
;
#X obj 15 49 snapshot~;
#X obj 78 21 bang~;
#X obj 15 72 change;
#X obj 15 329 moses;
#X obj 78 263 r \$0-num_of_tables;
#X obj 78 287 * 2;
#X obj 78 309 + 1;
#X connect 0 0 23 1;
#X connect 1 0 2 0;
#X connect 2 0 11 0;
#X connect 3 0 0 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 0 8 0;
#X connect 7 0 4 0;
#X connect 8 0 29 0;
#X connect 9 0 12 0;
#X connect 10 0 9 0;
#X connect 11 0 7 0;
#X connect 12 0 15 0;
#X connect 13 0 23 0;
#X connect 13 1 1 1;
#X connect 16 0 18 0;
#X connect 17 0 19 0;
#X connect 18 0 20 0;
#X connect 19 0 20 0;
#X connect 20 0 21 0;
#X connect 22 0 26 0;
#X connect 23 0 1 0;
#X connect 24 0 3 0;
#X connect 26 0 28 0;
#X connect 27 0 26 0;
#X connect 28 0 13 0;
#X connect 29 0 10 0;
#X connect 29 0 16 0;
#X connect 29 1 17 0;
#X connect 30 0 31 0;
#X connect 31 0 32 0;
#X connect 32 0 29 1;
#X restore 87 61 pd number_of_harmonics_allowed;
#X obj 190 90 == 0;
#N canvas 499 174 280 152 raw_square 0;
#N canvas 186 124 192 145 switchable_part 0;
#X obj 17 38 <~ 0.5;
#X obj 17 62 -~ 0.5;
#X obj 17 84 *~ 1.9;
#X obj 17 109 outlet~;
#X obj 109 48 inlet;
#X obj 109 73 switch~;
#X obj 17 12 inlet~;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 4 0 5 0;
#X connect 6 0 0 0;
#X restore 20 66 pd switchable_part;
#X obj 19 13 inlet~;
#X obj 19 91 outlet~;
#X obj 141 34 inlet;
#X obj 19 39 phasor~;
#X connect 0 0 2 0;
#X connect 1 0 4 0;
#X connect 3 0 0 1;
#X connect 4 0 0 0;
#X restore 89 143 pd raw_square;
#N canvas 0 0 305 193 bandlimited_square 0;
#X obj 16 31 inlet~;
#X obj 71 36 inlet;
#X obj 17 74 tabosc4~ \$0-square1;
#X obj 162 44 inlet;
#X obj 17 132 outlet~;
#X obj 16 105 *~;
#X connect 0 0 2 0;
#X connect 1 0 2 0;
#X connect 2 0 5 0;
#X connect 3 0 5 1;
#X connect 5 0 4 0;
#X restore 40 111 pd bandlimited_square;
#X obj 40 20 inlet~;
#X obj 39 175 outlet~;
#X connect 0 0 3 1;
#X connect 0 1 1 0;
#X connect 0 1 2 1;
#X connect 1 0 3 2;
#X connect 2 0 5 0;
#X connect 3 0 5 0;
#X connect 4 0 3 0;
#X connect 4 0 0 0;
#X connect 4 0 2 0;
#X restore 26 232 pd bandlimited_square;
#X obj 25 129 pack f 100;
#X floatatom 241 111 5 0 0 0 - - -;
#X obj 244 381 dac~;
#X obj 244 90 hsl 128 15 20 17000 1 0 empty empty empty -2 -8 0 10
-262144 -1 -1 0 1;
#X obj 243 352 *~;
#X obj 313 306 pow 2;
#X obj 316 281 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X obj 241 154 line~;
#X obj 313 352 line~;
#X obj 313 329 pack f 20;
#X obj 241 131 pack f 100;
#N canvas 499 174 280 152 raw_square 0;
#X obj 18 16 inlet~;
#X obj 17 128 outlet~;
#X obj 18 39 phasor~;
#X obj 18 61 <~ 0.5;
#X obj 18 85 -~ 0.5;
#X obj 18 107 *~ 1.9;
#X connect 0 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 1 0;
#X restore 242 236 pd raw_square;
#X connect 2 0 12 0;
#X connect 4 0 2 0;
#X connect 5 0 3 0;
#X connect 5 0 3 1;
#X connect 6 0 10 0;
#X connect 7 0 6 0;
#X connect 8 0 11 0;
#X connect 9 0 5 1;
#X connect 10 0 9 0;
#X connect 11 0 5 0;
#X connect 12 0 8 0;
#X connect 13 0 22 0;
#X connect 15 0 13 0;
#X connect 16 0 14 0;
#X connect 16 0 14 1;
#X connect 17 0 21 0;
#X connect 18 0 17 0;
#X connect 19 0 23 0;
#X connect 20 0 16 1;
#X connect 21 0 20 0;
#X connect 22 0 19 0;
#X connect 23 0 16 0;


More information about the Pd-list mailing list