keep maximum~

    Nov 19 2010 | 5:42 pm
    Hi all, I got two question that might be easy for some of you, but it's been giving me a headache, and I couldn't find a thread on it in the forum.
    How can I have a patch, that keeps the maximum of an audio signal stream (not like maximum~ comparing 2 values). I kind of managed to do that - but then I had trouble being able to reset the maximum value to 0 again.
    Thank you!!!! Frank

    • Nov 19 2010 | 6:47 pm
      Something like this, perhaps?
    • Nov 19 2010 | 6:51 pm
      Hi Christopher, yes, basically like this, but in the audio domain, if possible. Thanks a lot though! Best Frank
    • Nov 20 2010 | 4:42 pm
      Do you really require updating on every single sample? If so, my first question would be "Why?" But if you do, that would mean that every output sample y would depend on the previous output sample y-1, which implies that you'd either need a signal vector size of 1 (inefficient) or that the process would have to take place within a single msp~ object (written in C or Java). However, if you don't really require an update every sample, set the time interval of peakamp~ to the update time you do need, then send the output to a sig~ object (or smooth it with a line~ object, or curve~, or rampsmooth~) to get it back into the MSP audio signal world.
    • Nov 20 2010 | 5:04 pm
      Isn't minmax~ what you are looking for ?
    • Nov 20 2010 | 5:10 pm
      Hi Roald, that was exactly what I was looking for!! Thanks! Frank
    • Nov 20 2010 | 5:28 pm
      Voilà. J'avais oublié celui-là. :) -C