+= object reset in gen~?

    Dec 30 2011 | 3:07 pm
    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?

    • Dec 30 2011 | 3:32 pm
      When bringing it back to the basics, it seems to work.
      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)?
    • Dec 30 2011 | 5:27 pm
      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. Doesn't work.
      Or maybe there is a better way to do this?
      anyway, I'm still searching...
    • Dec 31 2011 | 3:12 am
      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)