-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fedd4eb
commit cde57d7
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -365,6 +365,30 @@ declare rms_envelope_t19 copyright "Copyright (C) 2020 Dario Sanfilippo | |
declare rms_envelope_t19 license "MIT-style STK-4.3 license"; | ||
rms_envelope_t19(period, x) = ms_envelope_t19(period, x) : sqrt; | ||
|
||
//-----------------------`(an.)zcr`-------------------------------------------- | ||
// Zero-crossing rate (ZCR) with one-pole lowpass averaging based on the tau | ||
// constant. It outputs an index between 0 and 1 at a desired analysis frame. | ||
// The ZCR of a signal correlates with the noisiness [Gouyon et al. 2000] and | ||
// the spectral centroid [Herrera-Boyer et al. 2006] of a signal. | ||
// For sinusoidal signals, the ZCR can be multiplied by ma.SR/2 and used | ||
// as a frequency detector. For example, it can be deployed as a | ||
// computationally efficient adaptive mechanism for automatic Larsen | ||
// suppression. | ||
// | ||
// #### Usage | ||
// | ||
// ``` | ||
// _ : zcr(tau) : _; | ||
// ``` | ||
// | ||
// Where: | ||
// | ||
// * `tau`: (time to decay by e^-1) sets the averaging frame in seconds. | ||
declare zcr author "Dario Sanfilippo"; | ||
declare zcr copyright "Copyright (C) 2020 Dario Sanfilippo | ||
<[email protected]>"; | ||
declare zcr license "MIT-style STK-4.3 license"; | ||
zcr(period, x) = ma.zc(x) : fi.lptau(period); | ||
|
||
//=============================Spectrum-Analyzers========================================= | ||
// Spectrum-analyzers split the input signal into a bank of parallel signals, one for | ||
|