Cryptic gen~ error message
I was working on a FIR-based reverb algorithm in gen~ when the following error message came up:
gen_domain: dsp.gen: [string "gen2.Module"]:151: invalid replacement value (a nil)
The patch is supposed to generate a random string of 1 and -1, which are then used as coefficients in a FIR. This amounts to convolution with a particular kind of noise, but requires far fewer computations. The FIR requires 2205 multiplications (by either 1 or -1) and subsequent additions. I've attached the patch so you can see how I've structured this. Is there a more efficient way to do this than what I've come up with?
The gen code itself is missing from the patch. I think with 'Select All' and 'Copy Compressed' it should work fine.
Thank you for pointing that out. This patch should work now.
Still not, I realize the gen~ object is referring to an external file. Without it, the object defaults to adding together two inputs. Easiest probably is zipping the gendsp file and attaching it here.
Okay. This should work. I didn't notice that, as when I opened it, it naturally found the relevant file and everything worked fine.
I'll also make a zip file with both the patch and the gendsp file:
Hopefully, one of these will work.
Yes, can open it now. Probably the error is the result of going over a limit of what gen~ can do. That limit appears to be at around 1700 delays. This generates then almost 14000 lines of gendsp code. After that it breaks. Maybe one of the developers has something more informative to say about this.
Anyway, your approach appears to be highly inefficient. Did you take a look at the gen~.buffir example? It must be possible to realize what you're thinking of using codebox and a for-loop.