convolution in gen again!


    Jan 12 2013 | 4:50 pm
    Hello! Last night i have been trying to implement convolution inside gen~. very long.. Ok the first issue: i've read here on the forums that peek/poke are not working inside loops. Is this still true? It seems to kind of work. As there has been a post on this already in which many people said "why? You don't need that" I want to say, i want it. I want to do it myself in order to understand it on a deeper level and maybe also to experiment with changes in the structure, once it's finished.
    If i give my little convolver a unit sample it kind of works, but i get some zippering noise sometimes. If i give it an ir with multiple delayed unit samples, it's zippering all the time. It also seems to be related to the vector size, but i don't know.
    i know, the patch is a chaos, but inside gen it's quite tidy, and that's where i would need help. In general, am i doing something completely wrong here? Did i maybe misunderstand something about convolution in general? If it seems comletely absurd what i'm trying to do in there i can also elabourate on my understanding of the whole thing and the structure i was trying to build there, so you could tell me what i am misunderstanding. Thank you very much!

    • Jan 13 2013 | 7:19 am
      Hi there --
      I played around with rebuilding buffir~ in gen~ a month or two ago. I was filling around with peek / poke pairs like that, then it dawned on me that the input indexing is the same as what a delay line needs, so it turns out to be a lot simpler just by using a delay read inside a for loop. The patcher I've been working on is below. It sounds a bit rough sometimes though, I'm not 100% sure why.
      The usual caveats apply: a time-domain convolution (which is what buffir~ does) only makes sense for convolution sizes similar to or less than the current block size, beyond that a partitioned convolution will perform significantly better. Anything sexy like convolution reverb is not going to work well without partitioning. But the time-domain only method (buffir~) works ok for convolving with finite impulse responses around or less than 100 samples.
      But exposing time-domain convolution in gen~ does open up some interesting possibilites for experimentation...
    • Jan 13 2013 | 2:43 pm
      Hello Graham! Thank you very much!! I learned a lot there! Cheers!