Algorithm explanation

Source microphone input

FFT analyser

Now we have Array of 512 elements with values from 0 to 255

pow = Frequency power spectrum

var = variance [power diference]

pow(n) - pow(n-1)


nl = noise level (room signal)

On event conditions

Fast:

if pow > nl + 5000 (some constant we add to noise level) we try to grab maximum detected variance (= var_max)on positive variance spike. As soon as variance spike hits in negative direction we check if next 4 variances are inside interval +varmax * 0,4 and -varmax * 0,4.

Slow:

If fast event hasn't triggered .... Check if next 35 pow > nl + 5000 and all variances are bigger than -3000

Off event conditions

Fast:

pow < nl + 2000 and variance spike negative > varmax * 0,4 * 0,5

Slow:

If fast event hasn't triggered .... Check if next 35 pow < nl + 2000

Parameters

On event parameters

Fast:

pow > noise level + && next variables inside interval -/+ max. var *

Slow:

last 35 pow > noise level + 5000 && var > -3000

Off event parameters

Fast:

pow < noise level + &&one of previous 5 variances < (-1) * max.var * 0.4 *

Slow:

last pow < noise level +

Power:Empty

Noise level:Empty

TOF: Empty

Variance: Empty

Max variable:Empty

On var interval:Empty

Off thr var:Empty

Blow status:Empty

Real time microphone Frequency & Time domain

No ExhelationFrequency amplitude window

.... false Frequency amplitude variance

Copy all data into Excel or Spreadsheet go to Data > text to columns and separate by | character