ZEROCROSS
From STX Wiki
Jump to navigationJump to search
Compute zero crossing rate.
[SPU ZEROCROSS X SR XMIN TYPE OUT Y]
input | description | data type | value type | default value |
---|---|---|---|---|
X | signal vector | vector | variable | |
SR | sampling rate in Hz | number | constant | 1 |
XMIN | signal amplitude threshold | number | constant | 0
|
TYPE | type of output value ( DENSITY, FREQUENCY, PERIODE, COUNT ) |
number (int.), string | 0 (= DENSITY )
| |
output | description | data type | value type | comment |
Y | zero crossing rate converted to the selected value | number | variable |
- Description
In this atom the zero crossings Z of the signal X are counted and than converted to the value selected by TYPE. If XMIN=0 all zero crossings, i.e. changes of signs, are counted. If XMIN>0 the absolute signal magnitude has to exceed this value between two zero crossings. To get more exact density, frequency and periode values, also the index (position) of the first (I1) and last (IN) zero crossing is computed.
TYPE | Y | description |
---|---|---|
0 or DENSITY
|
number of zero crossings per second | |
1 or FREQUENCY
|
frequeny in Hz | |
2 or PERIODE
|
periode duration in seconds | |
3 or COUNT
|
number of zero crossings |
Note: If Z is lower than 2, the output Y is set to zero.
- See also
<SP-atoms>