-
Notifications
You must be signed in to change notification settings - Fork 10
sig.zerocross
Olivier Lartillot edited this page Jan 28, 2018
·
2 revisions
Counting the number of times the input signal crosses the X-axis (or, in other words, changes sign).
If used directly on audio waveform, this offers a simple indicator of noisiness of the sound. But actually sig.zerocross
accepts any input data type.
sig.zerocross(..., ‘Frame’, ...) performs first a frame decomposition, with by default a frame length of 50 ms and half overlapping. For the specification of other frame configuration using additional parameters, cf sig.frame.
- sig.zerocross(..., ‘Per’, p) precises the temporal reference for the rate computation. Possible values:
- p = ‘Second’: number of sign-changes per second (Default).
- p = ‘Sample’: number of sign-changes divided by the total number of samples. The ‘Second’ option returns a result equal to the one returned by the ‘Sample’ option multiplied by the sampling rate.
- sig.zerocross(..., ‘Dir’, d) precises the definition of sign change. Possible values:
- d = ‘One’: number of sign-changes from negative to positive only (or, equivalently, from positive to negative only). (Default)
- d = 'Both': number of sign-changes in both ways. The 'Both' option returns a result equal to twice the one returned by the 'One’ option.