Hi,
I am trying to stretch the information in an audio block.
i.e.,
Original: a, b, c, d, e, ... , N (where N is the block size - 1)
Modified: a, 0 , b, 0, c, ... , N/2 (later half of the original block can be trashed)
The target of the manipulation is the output of [rfft~] Are there any efficient ways of such manipulations at audio rate?
BTW, I've lately been enjoying playing with the output of [rfft~] and would also appreciate pointers to resources discussing pitch manipulation using [rfft~] and [z~] or similar concepts not limited to Pd. Not quite sure what term referrers to this method.
Thanks.
-- David Shimamoto
PSPunch wrote:
Hi,
I am trying to stretch the information in an audio block.
i.e.,
Original: a, b, c, d, e, ... , N (where N is the block size - 1)
Modified: a, 0 , b, 0, c, ... , N/2 (later half of the original block can be trashed)
if you upsample a signal in a subpatch, you can get this behaviour by specifying the "zero-padding" upsampling method. however, you will really get: a, 0, b, 0, c, ...., N, 0 (that is 2*N samples)
you can then use this signal to get the desired sample-block...
mgasdr IOhannes
IOhannes,
Thank you.
I tried what you have suggested with the only existing object I could think of which was [switch~ (N) 1 0.5].
Yes, the out put shown on [tabwrite~] is zero-padded but only as long as the signal remains inside of the sub patch.
Can you please tell me if there was a specific procedure you had in mind?
-- David Shimamoto
PSPunch wrote:
Hi,
I am trying to stretch the information in an audio block.
i.e.,
Original: a, b, c, d, e, ... , N (where N is the block size - 1)
Modified: a, 0 , b, 0, c, ... , N/2 (later half of the original block can be trashed)
if you upsample a signal in a subpatch, you can get this behaviour by specifying the "zero-padding" upsampling method. however, you will really get: a, 0, b, 0, c, ...., N, 0 (that is 2*N samples)
you can then use this signal to get the desired sample-block...
mgasdr IOhannes
PSPunch wrote:
IOhannes,
Thank you.
I tried what you have suggested with the only existing object I could think of which was [switch~ (N) 1 0.5].
well, this will actually do downsampling (sample reduction), whereas you want upsampling (sample extrapolation): [block~ 128 1 2]
of course this depends on where (inside a resampled patch or outside a patch) you put the signal source and where (outside or inside) you want to access the resampled data.
Yes, the out put shown on [tabwrite~] is zero-padded but only as long as the signal remains inside of the sub patch.
well ain't this sweet?
of course the main idea is to work within the resampled domain. if for whatever reasons you don't want to do so, you have to somehow "send" the signal from the resampled subpatch to the original patch. as [send~] will refuse to work, you might want to try other global memory sharing structures for signal (hint, hint)
Can you please tell me if there was a specific procedure you had in mind?
like the attached? (too little time to ascii art)
fgm,asdr IOhannes
#N canvas 314 172 450 300 10; #X obj 88 57 inlet~; #X obj 91 250 outlet~; #X obj 214 61 table $0-zeropad 64; #X obj 90 228 tabreceive~ $0-zeropad; #N canvas -12 185 450 300 zeropadder 0; #X obj 147 143 tabsend~ $0-zeropad; #X obj 234 86 block~ 128 1 2; #X obj 146 49 inlet~ zeropadding; #X connect 2 0 0 0; #X restore 87 122 pd zeropadder; #X connect 0 0 4 0; #X connect 3 0 1 0;
#N canvas 0 0 450 300 10; #X obj 116 183 zeropadder~; #X obj 115 143 osc~ 440; #X obj 115 243 tabwrite~ scope~; #X msg 146 215 bang; #X obj 273 140 table scope~ 256; #X connect 0 0 2 0; #X connect 1 0 0 0; #X connect 3 0 2 0;
IOhannes,
Thanks for your help. I must have been miss understanding what goes on inside a re-blocked sub-patch.
With your notes and patch, now I can go spend the rest of the night refreshing my mindset :)
-- David Shimamoto
PSPunch wrote:
IOhannes,
Thank you.
I tried what you have suggested with the only existing object I could think of which was [switch~ (N) 1 0.5].
well, this will actually do downsampling (sample reduction), whereas you want upsampling (sample extrapolation): [block~ 128 1 2]
of course this depends on where (inside a resampled patch or outside a patch) you put the signal source and where (outside or inside) you want to access the resampled data.
Yes, the out put shown on [tabwrite~] is zero-padded but only as long as the signal remains inside of the sub patch.
well ain't this sweet?
of course the main idea is to work within the resampled domain. if for whatever reasons you don't want to do so, you have to somehow "send" the signal from the resampled subpatch to the original patch. as [send~] will refuse to work, you might want to try other global memory sharing structures for signal (hint, hint)
Can you please tell me if there was a specific procedure you had in mind?
like the attached? (too little time to ascii art)
fgm,asdr IOhannes