[PD] problem with switch~ and downsampling in 0.38-0test7

IOhannes m zmoelnig zmoelnig at iem.at
Mon Feb 21 17:50:44 CET 2005

Matthias Blau wrote:
> Hi all,

> Therefore I made a subpatch with [switch~ 64 1 0.5] which works most of 
> Sometimes however, I get strong high frequency disturbances. I suspect a 
> bug in switch, but maybe I am missing something?

you might have problems with aliasing.
the up/downsampling does very little (to no) pre-filtering.
upsampling: depending on the argument the iolet~s will do linear 
interpolation between 2 original samples at the best(!!!); this is not 
very good; the default is zero-padding which is really awful (but is 
there by intent, as you will very soon notice, that "something" is going on)
downsampling: if i remember correctly, it just takes every nth sample 
(even if you specify "linear" there is no smoothing or whatever)

so make sure that you filter your signal before/after down/upsampling.


More information about the Pd-list mailing list