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.
Something like this, perhaps?
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 566.3ocuV00biBBE8Y8WACO2MCPD0ru0eGc5rCQIozUPGEmMa6z9aeETSS1Z TiZxKnb4i64bt2Kv6tNvsoG3EPvOAOAbbd20wwZxXvoouCTxNDkvJrSCFkJk bkF9P8XZ9As0dFm86Vi6RUZESxsC7Xtfkb5HEh2rifIqPMlUkRgJgqst.2XL ioidQn1+qbdjtFhjvvp0.vgdlOqCLsDzJD34l0Hhs9Lc6q+.6C+Z2SK0saOx X7CWWSyCyjz4LM+lS50HKao9VNi6kyd2ANyK35aOo8sQ5PzHBzjkizRdQAaO +ajFMLgq8r9uY7ZF.gGA6XzBxfZwl5D.xJpoB3BZApas.OAsXWRZ0lLAhWsP VUFB.tko1ecpPe09DuSp8886KkHraUfLAUPw+S0N9sDBMXGX2bzl5eVZwgRr 4HdlbjKIN92bwoZNBYoDfVMGERnzKVITq9PpOUo2CQoKn9TJ2xymfHX39rJf pLYBA1yAG7pk.aVCE0mp3sbpB+MVbzmWj6Eh8Jizb7uiv4JqFVaokGsssKZQ t4EClGFwjYeBvHzjKGV35f5qR1ro2qUG9lD6xfIB0++DRqmM1OWtJRKyiZIV iO.e47XdgVnXZQp5j4POaNuHhi4pSSqkh3rzp5kFH.dtyP2XQT0gi.7HPDd7 Hh3Y0YbPyC3HcziTW6sgZubuNjLKdXdHvnj1qfHqCBZgG8LvRW.QeHrFdWSC ni.Q92UD4MBDgut34LQDYjHZpZTUmOb+GnnsYAA -----------end_max5_patcher-----------
yes, basically like this, but in the audio domain, if possible.
Thanks a lot though!
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.
Isn’t minmax~ what you are looking for ?
that was exactly what I was looking for!!
Voilà. J’avais oublié celui-là. :) -C
Forums > MaxMSP