filedc

Return the averaged DC level in a soundfile.


Synopsis

dclevel = filedc(“filename”)


Description

filedc returns the averaged DC level of the soundfile filename. filename may be an absolute or relative pathname to the soundfile. This command does not require that the soundfile be previously opened by the rtinput command.

The DC (originally from “Direct Current”) level represents the total averaged amount of zero offset is present in the waveform. A perfectly symmetrical sine wave would return 0.0. The farther positive or negative the value, the more “skewed” off zero the waveform is.


Arguments


Examples

dc_offset = filedc("somesoundfile")

See Also

CHANS, DUR, PEAK, SR, filechans, filepeak, filesr, rtinput, DCBLOCK