[PD] Per sampleblock manipulation question

Mathieu Bouchard matju at artengine.ca
Mon Nov 6 16:33:14 CET 2006


On Sun, 5 Nov 2006, thewade wrote:
> Quoting Mathieu Bouchard <matju at artengine.ca>:
> I will poke around in the help files to see if I can find the 
> incorrectly-named help for this object, to see what the related objects are.

It's just named rlshift~ instead. Else it should work fine (unless you 
have additional -path -helppath required, which may happen on some setups)

>> no, convolution is a bunch of sample-wise shifts and [*~] and [+~]
>> together (as many as there are values in the convolution kernel).

> Yes, but conceptually convolution is converting time domain sounds into 
> frequency domain, storing the values in a sample block, and multiplying 
> the two blocks together (and normalizing of course).

Convolution can be defined in two completely equivalent ways: one as 
polynomial product in the time domain (using a "z-series" representation) 
and one as the complex multiplication of two frequency spectra using an 
infinite blocksize.

Almost all of the time, the time-domain representation is taught first. 
This might be especially important as the frequency-domain only becomes 
tangible once some kind of Fourier transform is in place, and the 
polynomial product is certainly easier to explain than the Fourier 
transform. (and that's even more true for realtime)

But if you want to apply convolutions with large kernels and/or large 
pieces of data, you really have to use [fft~] (for sound) or [#fft] (for 
spatial-frequencies of images).

> So if one block has no sound at 300Hz and the other block does, the 
> resulting block does NOT have sound at 300Hz, right?

Right.

> So if your block size was four and you had one FFT block that was: 
> 0,1,0,1 And another that was: 0,0,0,1 The convolved "real" sound block 
> (before going to ifft~) would be 0,0,0,1 Right?

Yes, supposing each of those values is a complex number. But that's 
because "AND" is a special case of multiplication, because:

0*0 = 0
0*1 = 0
1*0 = 0
1*1 = 1

so * over {0,1} is exactly AND.

      _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada


More information about the Pd-list mailing list