Math operations on a whole buffer

    Jan 08 2012 | 5:30 pm
    Hello forum,
    Though I'm a Max user for a whole decade this is my first post, so I'd like to say hi, and it's a privilege to be part of the community.
    I was wondering if there is any obvious way to do some math on a whole buffer of arbitrary size. As a very simple example, finding out the maximum of a buffer in one pass... I know it can be done in realtime but I'm interested in faster than realtime. I can think up a couple of ways to do this, but they are so convoluted that I believe there must be some simple approach.
    Best regards,

    • Jan 08 2012 | 6:12 pm
      not obvious, but possible,
      go to DSP preferences, you will find a nonrealtime driver there.
      eventually you also might want to put the audio in a poly~, where you could process it
      using 8 or 16 times upsampling, which ist still faster than without.
    • Jan 08 2012 | 6:41 pm
      Look at "mxj buf.Op" and it's help file for this kind of thing, it's super super fast and comes as standard with Max.
      The stock object covers a multitude of buffer operations including getting a peak buffer value.
      It's written in java so you can modify the code to suit your needs.
    • Jan 08 2012 | 6:51 pm
      Thanks, but.Op solves it, should have thought about mxj
      The non realtime driver would be a crafty solution, but I need realtime audio on my patch as well.
      All the best
    • Jan 08 2012 | 6:56 pm
      Be careful of un-licenced but.Op's! They can be deadly.