normalize audio sample values to a specified maximum amplitude
Array, Vector, or Matrix containing the audio data to normalize
(optional) the peak amplitude of the result
(optional) specifies how a DC offset should be handled
The Normalize command adjusts the amplitude of samples in a recording so the maximum amplitude of any one sample is as specified.
The audArray parameter specifies the audio data to normalize, and must be a dense, rectangular, one or two dimensional Array, Vector, or Matrix with datatype=float.
The amplitude=value option specifies the maximum amplitude that any sample may have. If omitted, this defaults to 1.0.
The offset=mode option specifies what is to be done if the audio has a DC offset. Three modes are available:
offset='scale', which is the default, treats the audio data as if the offset were zero. The resulting audio will contain at least one sample with a value of amplitude or -amplitude, and the offset will have been scaled.
offset='remove' specifies that any DC offset is to be removed before normalizing. The resulting audio will contain at least one sample with a value of amplitude or -amplitude.
offset='ignore' completely ignores the offset. The audio data will be scaled so that at least one sample will have the value amplitude, and one will have the value -amplitude. The offset will have been shifted and scaled.
Both the remove and ignore modes have the potential to introduce a DC offset if the arithmetic mean of all the samples is not zero. Thus it is best to use scale mode if the DC offset is known to be zero.
The Normalize command is often useful after performing other audio processing operations that may have produced out-of-bound values or very low amplitudes.
aud≔Sample Rate22050File FormatPCM File Bit Depth8Channels2Samples/Channel19962Duration0.90531⁢s
The offset option is new in Maple 2020.
Download Help Document
What kind of issue would you like to report? (Optional)