hi scott. i made an example of what i think you want to do. please tell me, if i'm wrong. you can draw a filterkernel of 128 samples (time-domain!) and convolute it with any sound you like, ... you can adapt this to your own needs. see attached patch. marius.
----- Original Message ----- From: "J. Scott Hildebrand" jshildebrand@ucdavis.edu To: zmoelnig@iem.at Cc: "J. Scott Hildebrand" jshildebrand@ucdavis.edu; pd-dev@iem.kug.ac.at Sent: Tuesday, September 03, 2002 9:08 PM Subject: Re: [PD-dev] i need some help with this
i wouldn't mind at all to do the convolution with the built-in fft
stuff. the only problem is that i don't quite understand how it works. what i need is to input x amount of samples, and get out y amount of output, which should be at least 1.5 times the original amount + padded zeros to equal 2 times the original amount. only then can i write an overlap and add method.
scott
On Sat, 31 Aug 2002 zmoelnig@iem.at wrote:
hi scott !
i really recommend that you read the mail i send you when qou first
posted your
piece of code. i really tried to point out all the faulty pieces of code (especially
the
neveroccuring reset of apple) and i again give you one advice: add debugging code like "post()" to
show you
where the error occurs !
i am not going to do the programming for you (and i hope no one else
will do)
- just read the mails. (it's all in there)
and again: is there any major reason not to do the convolution as an abstraction ? to not use pd's built in fft-routines ?
mfg.cd.sar IOhannes
"640K ought to be enough for anybody." -- Bill Gates, 1981
PD-dev mailing list PD-dev@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-dev
hey marius,
thanks a bunch for the patch. i've spent some time going
over it and i think that it'll definitely be possible to modify this a little and make it work. i understand the organization of it but i do have some questions. i don't have any EE background!
you have [; filterarray const 0] in a message box; does that
initialize the elements to 0? and don't i need to create a filterarray array? right now there's 5 arrays, all labeled array1 - array5, but they are all each 100 in size. wouldn't i just need two of those that are of size 256? and then two more size 256 arrays for the filters?
when the actual convolution is happening, i don't quite
understand why i need to use the complex portion of the output. don't i just use the left output of the rfft~ for and then multiply the real portions?
why do i have subtraction on one side and addition on the
other?
i'm not too sure about why i need to do the normalization
either.
and one more thing, when it finally outputs back to the
overlapnadd window there's an input comparing thing. that's just to graph the waveforms right? ok that's it for now. i do appreciate the help immensely, and if anybody is startled by my childishly simplistic questions, well my excuse is that i was dropped a few times when i was an infant :)
k thanks,
scott
On Wed, 4 Sep 2002, marius schebella wrote:
hi scott. i made an example of what i think you want to do. please tell me, if i'm wrong. you can draw a filterkernel of 128 samples (time-domain!) and convolute it with any sound you like, ... you can adapt this to your own needs. see attached patch. marius.
----- Original Message ----- From: "J. Scott Hildebrand" jshildebrand@ucdavis.edu To: zmoelnig@iem.at Cc: "J. Scott Hildebrand" jshildebrand@ucdavis.edu; pd-dev@iem.kug.ac.at Sent: Tuesday, September 03, 2002 9:08 PM Subject: Re: [PD-dev] i need some help with this
i wouldn't mind at all to do the convolution with the built-in fft
stuff. the only problem is that i don't quite understand how it works. what i need is to input x amount of samples, and get out y amount of output, which should be at least 1.5 times the original amount + padded zeros to equal 2 times the original amount. only then can i write an overlap and add method.
scott
On Sat, 31 Aug 2002 zmoelnig@iem.at wrote:
hi scott !
i really recommend that you read the mail i send you when qou first
posted your
piece of code. i really tried to point out all the faulty pieces of code (especially
the
neveroccuring reset of apple) and i again give you one advice: add debugging code like "post()" to
show you
where the error occurs !
i am not going to do the programming for you (and i hope no one else
will do)
- just read the mails. (it's all in there)
and again: is there any major reason not to do the convolution as an abstraction ? to not use pd's built in fft-routines ?
mfg.cd.sar IOhannes
"640K ought to be enough for anybody." -- Bill Gates, 1981
PD-dev mailing list PD-dev@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-dev
"640K ought to be enough for anybody." -- Bill Gates, 1981
hi, this is a very good book i am using http://www.dspguide.com/ you should read about convolution http://www.spectrumsdi.com/ch6.pdf but also chapter18. http://www.spectrumsdi.com/ch18.pdf everything is in there, written very easily and in better english than mine. so i will answer only pd related stuff:
----- Original Message ----- From: "J. Scott Hildebrand" jshildebrand@ucdavis.edu To: "marius schebella" marius.schebella@chello.at Cc: pd-list@iem.kug.ac.at Sent: Thursday, September 05, 2002 12:38 AM Subject: Re: [PD-dev] i need some help with this
hey marius, thanks a bunch for the patch. i've spent some time going
over it and i think that it'll definitely be possible to modify this a little and make it work. i understand the organization of it but i do have some questions. i don't have any EE background!
what is the abbreviation EE?
you have [; filterarray const 0] in a message box; does that
initialize the elements to 0?
not initialize, but simply set to 0
and don't i need to create a filterarray array? right now there's 5 arrays, all labeled array1 - array5, but they are all each 100 in size.
no, they are labeled like their name says, ... array1, filterarray, filter, input, output some of them are 128, some of them 256 right klick and see properties dialog.
wouldn't i just need two of those that are of size 256? and then two more size 256 arrays for the filters?
that was for demonstration, of course, just have in mind, that if you use [tabsend~] from inside a [block~ 128] patch, only 128 samples will be sent, (so if sent to a 256-size array the second half stays always 0).
when the actual convolution is happening, i don't quite
understand why i need to use the complex portion of the output. don't i just use the left output of the rfft~ for and then multiply the real portions?
why do i have subtraction on one side and addition on the
other?
i'm not too sure about why i need to do the normalization
either.
the fft in pd outputs values ranging from 0 to windowsize, (instead of 0 to
128-vectors, i used the normalisation of 128*128 (16384)
and one more thing, when it finally outputs back to the
overlapnadd window there's an input comparing thing. that's just to graph the waveforms right?
yop.
ok that's it for now. i do appreciate the help immensely, and if anybody is startled by my childishly simplistic questions, well my excuse is that i was dropped a few times when i was an infant :)
k thanks, scott
i hope that's it at last... maius.