Amplitude-based trigger logic for different processing paths... not sure how to implement


#1

Hi all,

I'm a newbie both to axoloti as well as audio processing, so I think I'm having trouble figuring out how to do this just because my vocabulary isn't right. It is a straightforward idea.

What I want to do is this: I want to evaluate the information in a short audio buffer/table and if the mean or max(abs()) of the table elements (some test statistic basically capturing an overall amplitude) exceeds some value, I want to do one processing path, and if it is below that value, I want a different processing path. The concept is "are you giving me something loud? then I'm going to do blah blah blah. Did you get quiet? then I'll do this other thing."

The part I can't figure out how to do (or if I can do it with existing objects) is calculating a test statistic based on values in a short buffer. Am I missing something obvious? Or is this harder than it seems like it should be for some reason?

As always, the first few questions from someone working within a wholly new framework are usually quite "stupid" so thanks in advance for your time and patience!


#2

the 'easy' way to do this, is to use an envelope follower... this gives the output level of a 'real time' audio stream.


#3

Aha, vocabulary barrier strikes again! "Envelope follower" indeed looks like what I need and I just didn't guess that from the name. Thank you for taking the time to respond!