-
manuels
@Element-S I can't help you with the Pultec EQP-1 implementation, but since you're talking about being late to the party it might be worth pointing out that at least some of [bob~]'s weaknesses, mentioned in this thread, may have been the result of a bug, that was fixed around three years ago. If I remember correctly, the output wasn't taken after the fourth stage of the filter but before the first (= input + feedback). So no surprise, that this was considered a bad implementation of the Moog ladder filter.
Edit: Had to look it up ... It was actually a bit different from what I remembered: The incorrect output was the first instead of the fourth state variable. So the output was taken AFTER the first stage.
-
manuels
@trummerschlunk Here's my implementation of the 2nd (more accurate) version: dynamic-smoothing.pd
Not tested yet, so I'm not sure that it actually works ... -
manuels
@trummerschlunk I made a little test patch for the different options that you described, hope it's helpful in some way ... crossover-filter-test.pd
The version with shelving filters shouldn't be more cpu-expensive (it might even be cheaper), and the math for the gains is quite simple. Or am I missing something?
But I don't think any of these approaches is suitable for as much as 32 bands! Wouldn't you need much steeper filter slopes for that? Of course, you could use higher order Butterworth shelving filters, but that's gonna be really expensive! So maybe, as @jameslo suggested, you should go for frequency domain techniques in that case.
-
manuels
@melter If I understand correctly what your abstraction is doing, you would have to apply its output (the desired rms value) to the analyzed signal after you have divided it by the actual rms value ....
BUT: That's much too complicated! You don't even have to analyze the signal with [env~]. Under the link that you posted there's a table from which you can see, that doubling the distance corresponds to a decrease of sound pressure by 6dB, which is 1/4 power or 1/2 amplitude. So I guess all you have to do is to multiply the signal with d1/d2.
-
manuels
@jameslo said:
Teach a man to fish: you know this because you looked at source code, or some other way?
I just compared the output of both filters, and it turned out to be exactly the same.
Oh look, and they take the cube root for vcf_hp6~ when they chain 3 filters. I wasn't aware that Q worked that way. Do you know what they are doing with the cutoff freq signal, [iem_cot4~]?
Not sure if you can say in general that Q works this way. It might depend on how the filter is normalized. [vcf~], for example, has unit gain at the resonant frequency, but other filters produce higher gains at the resonant frequency. So if you put them in series the gains potentiate, and there has to be some compensation for that. What the [iem_cot4~] does, I don't know. Unfortunately I can't read C code.
-
manuels
@jameslo With just vanilla objects that's gonna be difficult, because you'd have to use the raw filters like [cpole~]. Since the iemlib filter is a series of two 2nd order filters, my first guess would be to do the same with ELSE's [highpass~], which is also 2nd order. Its exact formula might be different though.
Edit: It actually seems to be the same, but you also have to take the square root of the Q factor!
-
manuels
So here's the fixed version: velvet-noise-fixed.pd
It wasn't just the issue with small floating point numbers, but more importantly it now didn't work with integer periods. In this case, of course, the period must never be reduced by one sample!
-
manuels
@ben.wes Thanks again for testing, really helpful!
Yes, it's true, that I didn't care about consecutive non-zero samples. For now I'm not sure what's more important: to comply to this constraint or to behave properly above nyquist.
The problems with frequencies above nyquist, that you found, probably have to do with the representation of small floating point numbers. I should have used [expr~ int($v1)] to get real zero values. Can't fix it right now, but I'll try tomorrow ...
-
manuels
@porres said:
I'm trying to find a better and more sophisticated idea for the algorithm. We need to find the number of samples in a period and then randomly choose where to place it.
I'm not in C, but I think I kind of did exactly that in my latest version, trying to solve the problem with non-integer periods. Here it is (commented in the patch) ...
Could certainly be optimized in some ways (especially using ELSE objects). But does it even work? I don't have a good method to test it, unfortunately.
-
manuels
@ben.wes Thanks! So no surprise that it doesn't work ....