I'm working through Johannes Kreidler's book on Pd. I don't understand why the size of the array for windowing is set at the phasor rate * 22050. It seems it should be * 44100 - that doesn't work though. Can anyone tell me why?
-
Windowing
-
the 'crown' array is 22050 samples long. if you set that to 44100 samples, then it would work.
i don't really see why it needs to be related to sample rate though. a simple 100 point array, with [*~ 100] should be ok for windowing.
-
Ya, you're right - thanks again. Is the crown simply dropping the amplitude at the beginning and end of each cycle of the [phasor~]?
-
yeah, the amplitude is enveloped in exactly the same shape as the crown graph. so you can see in that graph that the amplitude goes from 0 to 1 at the start, and then from 1 to 0 at the end.
-
Since the crown in this patch is basically used to declick a sample, having a good size array is probably not a terrible idea. With a smaller array you'll be more prone to the error introduced by the 4-point interpolation of [tabread4~], particularly around the corners of the crown. The longer the sample, the more noticeable it might be.