filepeak

Return soundfile peak amplitude information.


Synopsis

peakval = filepeak(“filename”[, starttime[, endtime[, chan]]])

Parameters inside the [brackets] are optional.


Description

filepeak returns the peak amplitude value for 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 optional starttime parameter can be used to set a starting point to scan for the peak amplitude. Similarly, the endtime optional parameter can set an endpoint for the scan. The optional chan parameter may be used to specify which channel of a multi-channel soundfile to scan, otherwise the peak among all channels will be returned.


Arguments


Examples

   peak = filepeak("somesoundfile")
   peak = filepeak("somesoundfile", 77.8, 98.2, 1))

See Also

CHANS, DUR, PEAK, SR, filechans, filedur, filesr, rtinput