If an equation doesn't work it means that assumptions are incorrect. In this case I wrote "q * (v1 - v2) is very small" but turns out it was not. More specifically I was getting rather big v1 & v2 and with different sign. That really upset the filter and made it into noise generator. The cause? I messed up the integrator part, I was assigning wrong value to the "prev_out"... You may kill me now
I'm still not sure about some of the envelope stuff, or when exactly I should be doing sample range saturation, but it seems to work now.