Forums > MaxMSP

### poly~ upsampling methods

Apr 08 2007 | 7:25 pm

I just noticed that if I have a poly patch within a parent patch that downsamples by two, it’s output is simply the downsampled values repeated.

Ie the sequence 1 2 3 4 5 becomes 1 1 3 3 5 5.

Is there a way to specify how the output of poly is upsampled to produce its output in the parent patch say to get something like 1 0 3 0 5 0 (ie zero padding). Or possible interpolating…

I seem to remember talking with somebody about this a while back but I can’t seem to find any info in the forum.

Apr 08 2007 | 8:14 pm

weird, i think poly~ has its own signal vector? check the documentation.

Apr 09 2007 | 3:31 am

Ok I see what your saying. When you downsample by 2 within poly the signal vector size becomes half of that of the parent patch. I made a workaround by using a count~ to multiply the output of the poly~ so that every second sample is set to zero.

Apr 09 2007 | 4:36 pm

Quote: Tyler Nitsch wrote on Sun, 08 April 2007 21:31
—————————————————-
> Ok I see what your saying. When you downsample by 2 within poly the signal vector size becomes half of that of the parent patch. I made a workaround by using a count~ to multiply the output of the poly~ so that every second sample is set to zero.
—————————————————-

you would have to interpolate it yourself – outside the poly
patcher.
it was about 2 years ago here in the list where someone
gave an example, but i cant find it anymore. it was something
using count~ so that you know where you are …

Apr 13 2007 | 4:33 pm

Tyler Nitsch schrieb:
> Ie the sequence 1 2 3 4 5 becomes 1 1 3 3 5 5.

which is what you would have to expect, you throw away information…

> Is there a way to specify how the output of poly is upsampled to
> porduce its output in the parent patch say to get something like 1 0
> 3 0 5 0 (ie zero padding). Or possible interpolating…

zero padding would screw your signal completely, why would you want that?…
Interpolating is just a low pass filter of half the samplerate (outside
of the poly~)…

Stefan

Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
— _|_)—-|—–()————–
———-()——–www.ccmix.com

Apr 13 2007 | 7:02 pm

Hey Stefan,

In a lot of DSP literature they all deal with upsampling thru zero insertion. I was trying to develope a multirate system that was based off of the perfect reconstruction filters. I used haar filters. The idea is to split a signals spectrum in half with the analysis filters… downsample each half and then upsample and filter using the resynthesis filters. Basically a one level realtime wavelet system. When you repeat sample values in the system I created it increases the overall power of the resultant signal which rendered the resythesis part of the patch inaccurate… after doing the zero insertion it worked. Unfortuneatly I cant’ get more than one stage to work properly….

Viewing 6 posts - 1 through 6 (of 6 total)

Forums > MaxMSP