Re: NSSound taper
Re: NSSound taper
- Subject: Re: NSSound taper
- From: Brian Willoughby <email@hidden>
- Date: Thu, 12 Jun 2008 13:29:17 -0700
I suspect (and perhaps someone can confirm) that NSSound would have a
linear gain. If you want consistent dB steps, you'll have to do a
little math. Your example only allows ten steps, by jumping 0.1 in
level each time, but the implementation could have infinitely more
precision than that.
I Googled "Daven audio attenuator" and found a lot of hardware for
sale. 1 dB steps, 2 dB steps, 10 dB steps, and slide attentuators as
well as rotary. Some mention "taper off and cue" which is not
documented. Personally, I don't think it's very critical what
happens at the bottom, but I could be wrong.
You don't need a lookup table because the linear to dB conversion can
be handled with logarithms. Another possibility is that you could
step by powers of two - e.g. 6 dB, 12 dB, 18 dB, etc. - and this
would avoid introducing quantization noise. 6 dB steps are large,
especially considering that you were using 2 dB steps as an example,
but the Daven parts are also available in 1 dB and 10 dB steps, so 6
dB is not completely out of the useful range.
In any event, I suspect that you're rather limited with NSSound. If
you were to build a full AUGraph, then you could insert various
mixers or other AudioUnits which implement volume in a stepped
fashion rather than a continuous control, or you could select log
taper rather than linear.
Brian Willoughby
Sound Consulting
On Jun 12, 2008, at 08:34, ghe wrote:
Does anyone know what the taper of NSSound is when setting the
level to
1.0, 0.9, 0.8, etc.?
And does anyone remember the steps of the old Daven audio attenuator?
IIRC, it was 2 db per step most of the way down, but at the bottom the
steps got quite a bit larger, and I can't find how many steps like
that
there were or what the values were. And I don't have one around to
measure.
I expect OS X's audio software can do quite a bit better,
resolution-wise, with a 100 element lookup table. But I suspect there
was a good reason for that stuff at the bottom -- decent audio was
hard
back in those days.
I can't find anything about it on Google, and Daven itself doesn't
seem
to exist anymore.
- --
Glenn English
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden