Re: Normalize samples?
Re: Normalize samples?
- Subject: Re: Normalize samples?
- From: Urs Heckmann <email@hidden>
- Date: Wed, 17 Nov 2004 13:09:30 +0100
Hiya Tim,
Thanks for the fast reply! I've heard of "brick wall limiters" being
used to eliminate high peaks (i.e. only allow amplitudes below some
threshold), but never for the reverse (allowing only samples above a
certain amplitude threshold).
Oooops... after re-reading your first post I found that I partially
misunderstood your question. In fact, it's been a bit confusing because
you are looking for 2 things: Normalization ( something to get levels
between -1 and 1 ) and Noise Elimination ( process only samples above a
certain threshold ).
If I'm not completely mistaken, this is the typical application of
microphone treatment in studios.
Here's a list of things you're probably looking for:
1.) Highpass filter at approximately 70Hz to eliminate subsonic noise (
not on your list, but useful )
2.) Noise Gate - zeros out low level sound
3.) Compressor - used to reduce the dynamical range between quite input
and loud regions, smoothing the overall level, first step to
normalization
4.) Limiter with "target gain" option - emphasizes the signal a bit and
then cuts everything above a certain threshold, used to eliminate any
peaks that the compressor doesn't suppress
Nevertheless, I assume that you will still need some user interaction
to calibrate your input device. A simple 2-step dialog - i.e. like
Apple's excellent monitor calibration utility - will probably do: For
one thing to ask for silence and to estimate the level of the noise
floor, and a second step to estimate the volume of what the user thinks
is the "normal operation level". From that, you should be able to
derive the settings for all above thresholds and amplification levels
(needs thorough experimentation though...)
If AUPeakLimiter is capable of such a thing, then my job just got a
lot easier. Do you know of any example code or documentation online?
A Google search doesn't turn up anything useful.
AUPeakLimiter should already sit on any up-to-date MacOS X Machine.
It's one of the Audio Units that come with the system. There are also
Hipassfilters and the "AUDynamicsProcessor" which comes with presets
for noise gate operation and gentle compression.
To make use of them within your application, you have to create an
AUGraph (if you don't have that anyways) and add the AUs to it, or you
can alternatively host the AUs (easy job btw., compared to other plugin
formats) and process your buffers directly. Sample code for both ways
is available with the Developer Tools examples.
However, if you do not want to use the Apple AU plugins, writing those
algorithms isn't rocket science unless you're heading for audio
professionals (they need "that certain sound" :-p ). There should be
good example code (and links to such) for many things at
http://www.musicdsp.org - I'd also recommend subscribing to their
mailing list where coincidentally the topic of compression has been
discussed to death for newbees within the last few days.
If you need more information about what the heck all these things do,
here's some great info:
http://www.harmony-central.com/Effects/effects-explained.html
Cheers,
;) Urs
urs heckmann
email@hidden
www.u-he.com
_______________________________________________
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