+= object reset in gen~?
I’m new to gen, and I have some troubles using the += object.
I need to sometimes reset to zero the accumulated sum, to begin again a new calculation.
How should I do it?
I’ve seen that sending a non zero value to the right inlet seems to reset the accumulated sum to zero, but even sending a zero value after sending the non zero one, the sum stays to zero…
Is it a bug or a misunderstanding on my part?
BTW is there a Gen forum? Or should all gen related question be in the Max/MSP forum?
When bringing it back to the basics, it seems to work.
----------begin_max5_patcher---------- 841.3oc2WF0aZCCDG+4vmhH+ZYnXm.cLo9MXOOMIzTkIwDbavNJwzRWU6m84 XGmXCIz.rV0sWnk6rOe2Oe9uMOOxCrjuiTB7+l+BeOumG44oLUYvq96dfM3c wY3R0v.K2JDbFXr1EeqHiHDOkSzw.rDyRA9+p1cNVDulxRusfDKziHDhlDL1 GhBp9S6mMyglnVG9x69xLyxv1tgxjKjJEfsF0Ku1ZkwWFMp5iwCrVjQXIo30 dKlRZJCmAF6CVkwwh15ZCOQMFT+0I55YpRaptbC95wJzHSJrhyDL7FUvA+fT jfY3NgfYkkoX0WqvXWTAYE2R5uUwEBmDbNvh7nLUMIifrSUnUIvq9v2BgGqi .EEX0QDM6XfJ7jAUOcKu6bINiFe+qWBWLmThhTbI5XbA8OCWRIrKhJlyUAZp bT8C3YerZXTwNKIE0rnFFxQSyHOPJJoR4x1f3Av44Vl8rlREAuiqBzrwMlnL sofFSEjGnl4izFk6KiLNMnZpBNyUfZVf9z0TKTI2ASi4Y5nuPpgLer6G1CLi GeOIwNO.7bBixxKHkDl.KpSnF2IjU3sYha6lZt9WgiI8N4d147.oEzDNqJMb lakYyBtv2beiccqFACm2wjKkUx1xk3hJDuLyVlW1Ey4YttZ1UkGFvL5FrfHn 5zEEzDT5l7BJS3rPDFVFi0kwE7rLmPo87PGdRja7wjGoIh0Np9UdjCmla1D. MLJglRJEt1D3zx8rPE55Arko9+DfUg09BA6lUaA.G6GSHvULfxZt5naAgFof 9jCz83PUOdHbewf9DDdKQgCEFBbcbn3PuxldFoy5iouKTDcYTLLX5ofQz+kX 7patLHB02LAilqnHZxziSwvylhnOwTTlLtmo6mTQP0ihCm+V8aQmMof8RpfS iTs2cjQY8oGpJ0J+civR91hXS6TsbjuaQKkwETVycoKZ5T1abqoIItWbo05K qt4PeK8f1tO0LFcBYL7SQFGNvLN5uDiaaTRHx2VHiP7S2FikOPr6dllV4qtY xlc71NYfQ6AP+N9m.qEXT6RV+lb0h51Ypeh99zp9g5GPoY1UeODxYu+P5bHY N3GLLzrANfrI5CKaBGP1.+vxFz.yF3YjMxVqWF8GU.j3U. -----------end_max5_patcher-----------
There might be something else going on. In the case you want to reset based on the output level of +=, do you use the history object (to allow feedback)?
Thanks a lot for your answer,
it works indeed… I didn’t knew the click~ object, which is better for testing than my other attempts…
It seems my problem is not related to this then, and I have to search again.
So now it no more += directly related.
My goal is to perform some sort of integration on an audio signal. and the range of integration could be changed by the user.
So I simply use an += object which add each arriving sample, and substract each arriving sample from a delayed copy of the signal.
it works well, except when I try to change the range of integration (i.e. the value of the delay object). I also need to reset the += object to restart a new integration with a new range.
Or maybe there is a better way to do this?
anyway, I’m still searching…
Post your code and we can be of more help…
I’d look at change -> != 0 attached to your range value (actually, I’d probably do change -> == 0 -> delta -> == 1 (which is: send a pulse when you stop changing)