Wow this is most unexpectedly great.

I posted in utter despair and now I've got a simple solution that seems to
do what I want.  Just play two AQs.

Jens, thanks for the idea for graphing.  Brian, thanks for steering me away
from offline rendering.

I was hoping to just get by with the AQ built in leveling to display my
waveform.  I'm hoping that I won't need to translate into PCM.  Though the
way I'd do that is with a simple ExtAudioFile write?

I've seen some very pretty waveforms on some GIT projects.  Some that were
based on EZAudio.  Also I think it was SoundCloud that wrote up a detailed
description of a how to get a highly performant graph.  So I'll try those.

Thank you!
Matt

On Wed, Aug 5, 2015 at 7:08 PM, Brian Willoughby <[email protected]>
wrote:

>
> On Aug 5, 2015, at 9:50 AM, Jens Alfke <[email protected]> wrote:
> > On Aug 5, 2015, at 9:41 AM, Brian Willoughby <[email protected]>
> wrote:
> >> The two most common ways to depict audio waveforms are Peak and RMS. I
> don't think there's any standard for displaying cube root - although I'm
> sure it looks interesting. I'd recommend against inventing new math for
> displaying audio waveforms, especially since there are well-established
> standards.
> >
> > I think we’re talking about different things. Peak and RMS describe how
> to reduce a time range of a waveform to a single number. What I was
> referring to is how to transform that number (i.e. a raw amplitude) into a
> volume level that’s meaningful to a human, since our ears’ response to
> sound pressure is highly non-linear.
> >
> > I did some online searching and the two common approaches seem to be
> either logarithmic or cube-root. I experimented with both, and the latter
> seemed to produce a more intuitively-correct display, to me at least.
> (Disclaimer: I could be mis-remembering the formula; it’s been several
> years since I looked at my code for it.)
>
> Ah, yes, the raw samples correspond directly to voltages, and you can
> calculate power amplitude from that, but the perceived loudness is not
> precisely linear compared to the voltage and power in the circuit. So,
> yeah, Peak/RMS are different than what you're talking about.
>
> It's very tricky to get into this area, though, because frequency content
> and frequency distribution significantly affect the relation between what's
> happening in the electronics compared to what's perceived in our brains.
> The formula for a pure tone at a single frequency is exponential or
> logarithmic. But when there are multiple frequencies the translation
> becomes more complex. Take a look at the Bark scale and critical bands. Of
> course, simpler math can get close without being precise.
>
> The advantage of Peak and RMS is that they can be exact. The disadvantage
> of fancier, perception-based loudness displays is that they're much less
> accurate unless you have a lot of information.
>
> Brian Willoughby
> Sound Consulting
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to