title: Detect Greatest Dynamic Range Changes In Audio Sample
body: <p>Forgive/correct any wrong terminology in the below (I hope it makes sense!):</p>
  
  <p>I want to detect the biggest dynamic audio changes in a given sample, (ie. the moments when the sound wave 'grows'/'accelerates' the most). </p>
  
  <p>For example, if the audio goes quiet at some points during the sample, I want to know when the music comes back in after, and order these data points by the relative dynamic range (volume?) increase (largest to smallest).</p>
  
  <p>My audio sample is a buffer of <code>float32[]</code> and sample rate, and I would like a resulting array of objects each containing:</p>
  
  <ul>
  <li>start frame index</li>
  <li>start time (seconds ... <code>frameIndex/sampleRate</code>?)</li>
  <li>end  frame index</li>
  <li>end time (seconds)</li>
  <li>dynamic change value</li>
  </ul>
  
  <p>My naive approach iterates linearly and detects points at which the value starts rising until it is no longer rising, and then calculates the rise over run for each sub interval between those points.. but this is not producing the correct result.</p>
  
  <p>Any ideas or existing algorithms that do this?</p>
  
  <p>Not picky on languages, but anything with syntax like C#, Java, JavaScript preferred!</p>