"Zero crossing factor". High values > .4 indicate hissing sounds. For example a microphone rubbing against a clothing. These types of signals indicate the audio should be ignored. Low zero crossing factors (with loud sound) indicate that there is organized sound like that coming from music. This is so cheap to calculate it's done automatically. It should be one of the first signals to reject or ac
| 148 | // Returns: a value -> [0.0f, 1.0f) |
| 149 | // O(1) - pre-computed in constructor |
| 150 | float zcf() const FL_NOEXCEPT { |
| 151 | const fl::size n = pcm().size(); |
| 152 | if (n < 2) { |
| 153 | return 0.f; |
| 154 | } |
| 155 | return float(mZeroCrossings) / static_cast<float>(n - 1); |
| 156 | } |
| 157 | |
| 158 | // Root mean square amplitude of the audio signal |
| 159 | // Returns: RMS value (computed lazily on first access) |