• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting average power / peak power (sound monitoring)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting average power / peak power (sound monitoring)


  • Subject: Re: Getting average power / peak power (sound monitoring)
  • From: "Neil Clayton" <email@hidden>
  • Date: Tue, 20 Jun 2006 13:10:51 +0100 (BST)
  • Importance: Normal

Haha. Thanks. That's useful, I might take a look at that, purely from a
learning perspective.  Strangely enough, it does sound fun!

The bigger question is - where do I get the samples from, for the incoming
audio?
> on 06/06/19 12:45, Neil Clayton at email@hidden wrote:
>
>> Does anyone know how to get a level (avg power, peak power) meter
>> reading from some kind of sound input device?
>
> If CoreAudio is too heavyweight, and no one on the list offers a better
> solution, you roll your own algorithm...
>
> Average Power:  Average of the squares of the magnitude samples over a
> given
> period, the "window".  In real time, as each new sample appears, you
> subtract the oldest sample from the sum and add in the new one.  For
> further
> smoothing, process the result with an first-order infinite impules
> response
> (IIR) filter.
>
> Peak Power: Same idea, except you use the maximum of the squares
> (MAX(newSampleSquared,oldMaxSquare)) instead of their average.
>
> In either case, you adjust the window length and IIR filter time constant
> ("beta" factor) to get the desired smoothing, which depends on how often
> you're going to update your display.
>
> Probably the most fun you'll have all week!

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Getting average power / peak power (sound monitoring) (From: Neil Clayton <email@hidden>)
 >Re: Getting average power / peak power (sound monitoring) (From: Jerry Krinock <email@hidden>)

  • Prev by Date: NSImageView redraws
  • Next by Date: Re: Slice a .txt file in lines
  • Previous by thread: Re: Getting average power / peak power (sound monitoring)
  • Next by thread: how do I put boolean variables in a NSDictionary?
  • Index(es):
    • Date
    • Thread