cannam@255: cannam@255: Vamp Example Plugins cannam@255: ==================== cannam@255: cannam@255: The vamp-example-plugins library contains a number of Vamp audio cannam@255: analysis plugins provided as part of the Vamp plugin SDK. cannam@255: cannam@255: These are simple, but sometimes useful, plugins whose source code you cannam@255: are free to study and reuse in any proprietary or non-proprietary cannam@255: plugins of your own without any licensing obligation. cannam@255: cannam@255: User documentation for the individual plugins in this library follows. cannam@255: cannam@255: cannam@255: Amplitude Follower cannam@255: ================== cannam@255: cannam@255: System identifier: vamp-example-plugins:amplitudefollower cannam@255: RDF URI: http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#amplitudefollower cannam@255: cannam@255: Amplitude Follower tracks and returns the amplitude of the audio cannam@255: signal, block by block. It uses a method from the SuperCollider audio cannam@255: processing language, implemented as a Vamp plugin by Dan Stowell. cannam@255: cannam@255: Parameters cannam@255: ---------- cannam@255: cannam@255: Attack time (seconds) cannam@255: Release time (seconds) cannam@255: cannam@255: Outputs cannam@255: ------- cannam@255: cannam@255: Amplitude cannam@255: ~~~~~~~~~ cannam@255: cannam@255: The estimated peak amplitude (in volts) for the current processing block. cannam@255: cannam@255: cannam@255: Simple Fixed Tempo Estimator cannam@255: ============================ cannam@255: cannam@255: System identifier: vamp-example-plugins:fixedtempo cannam@255: RDF URI: http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#fixedtempo cannam@255: cannam@255: Simple Fixed Tempo Estimator analyses a fragment of audio and cannam@255: estimates its tempo. It assumes that its input is of fixed tempo, and cannam@255: it analyses only the first (small but configurable number of) seconds cannam@255: before returning a result, discarding all subsequent input. cannam@255: cannam@255: The plugin calculates an overall energy rise function across a series cannam@255: of short frequency-domain input frames, takes the autocorrelation of cannam@255: this function, filters it to stress possible metrical patterns, cannam@255: locates peaks, and converts from autocorrelation lag to the cannam@255: corresponding tempo. cannam@255: cannam@255: The filtering process involves searching for peaks at simple cannam@255: metrically related intervals (at a given autocorrelation lag as well cannam@255: as at 0.5, 2, and 4 times that lag), boosting each peak that shows cannam@255: strong related peaks. A simplistic perceptual curve is also applied cannam@255: in order to increase the probability of detecting a "likely" tempo. cannam@255: For improved tempo precision, each tempo with strong related peaks is cannam@255: averaged with the tempi calculated from those peaks. cannam@255: cannam@255: The method is mainly tuned for 4/4 pop and dance rhythms. cannam@255: cannam@255: This plugin returns many of its intermediate calculations as cannam@255: additional outputs, as well as the most favoured tempo. Although as a cannam@255: tempo estimator it's still fairly primitive, it is intended to provide cannam@255: a useful example of a slightly more complex feature extraction plugin cannam@255: than the other examples, as well as one that returns several different cannam@255: types of output at a time. cannam@255: cannam@255: Parameters cannam@255: ---------- cannam@255: cannam@255: Minimum estimated tempo, Maximum estimated tempo (bpm) - These cannam@255: parameters control the range of values within which the tempo cannam@255: estimator will return its estimate. cannam@255: cannam@255: Input duration to study (seconds) - The tempo estimator uses only the cannam@255: first part of its input, discarding any that follows. This parameter cannam@255: controls how much input it will use. There is no value in increasing cannam@255: this beyond 8x the duration of the slowest returned beat. The default cannam@255: of 10 seconds is likely to be appropriate for most purposes. cannam@255: cannam@255: Outputs cannam@255: ------- cannam@255: cannam@255: Tempo cannam@255: ~~~~~ cannam@255: cannam@255: The tempo estimator's best guess at the tempo of its input, in beats cannam@255: per minute. cannam@255: cannam@255: This is returned as a feature whose timestamp and duration cover the cannam@255: range of the input which was used in estimating the tempo, with a cannam@255: single value containing the tempo. cannam@255: cannam@255: Tempo candidates cannam@255: ~~~~~~~~~~~~~~~~ cannam@255: cannam@255: Several guesses at the possible tempo. This output is returned as a cannam@255: single feature whose timestamp and duration cover the range of the cannam@255: input which was used in estimating the tempo, with up to 10 bins cannam@255: containing one tempo value in each bin, with the "best guess" tempo in cannam@255: bin 0. cannam@255: cannam@255: Detection function cannam@255: ~~~~~~~~~~~~~~~~~~ cannam@255: cannam@255: The basic onset detection function used in tempo estimation. cannam@255: cannam@255: Autocorrelation function cannam@255: ~~~~~~~~~~~~~~~~~~~~~~~~ cannam@255: cannam@255: The autocorrelation of the onset detection function. cannam@255: cannam@255: Filtered Autocorrelation cannam@255: ~~~~~~~~~~~~~~~~~~~~~~~~ cannam@255: cannam@255: The autocorrelation after filtering to boost values with possible cannam@255: metrically related peaks and to apply perceptual weighting. The peak cannam@255: value of this function is the one that will be used as the "best cannam@255: guess". cannam@255: cannam@255: cannam@255: Simple Percussion Onset Detector cannam@255: ================================ cannam@255: cannam@255: System identifier: vamp-example-plugins:percussiononsets cannam@255: RDF URI: http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets cannam@255: cannam@255: Simple Percussion Onset Detector estimates the locations of percussive cannam@255: onsets in the audio signal. It uses a method described in "Drum cannam@255: Source Separation using Percussive Feature Detection and Spectral cannam@255: Modulation" by Dan Barry, Derry Fitzgerald, Eugene Coyle and Bob cannam@255: Lawlor, ISSC 2005. cannam@255: cannam@255: The principle is to exploit the broadband nature of noisy percussive cannam@255: onsets by identifying only those frames in which the energy rise shows cannam@255: a broadband profile. cannam@255: cannam@255: The plugin takes a series of frequency domain frames, and examines cannam@255: each frame to count the number of bins whose energy content has cannam@255: increased by more than a certain threshold since the prior frame. cannam@255: Frames in which this number is at a peak relative to prior and cannam@255: following frames and also exceeds another threshold value are cannam@255: classified as percussive onsets. cannam@255: cannam@255: Parameters cannam@255: ---------- cannam@255: cannam@255: Energy rise threshold (dB) - The rise in energy within a bin from one cannam@255: frame to the next that is required for a bin to be counted toward the cannam@255: detection function's bin count. This roughly corresponds to how cannam@255: "loud" a percussive sound must be in order to be detected. cannam@255: cannam@255: Sensitivity (%) - The proportion of bins that must exceed the energy cannam@255: rise threshold in order for an onset to be detected (at frames in cannam@255: which the detection function peaks). This roughly corresponds to how cannam@255: "noisy" a percussive sound must be in order to be detected. cannam@255: cannam@255: Outputs cannam@255: ------- cannam@255: cannam@255: Onsets cannam@255: ~~~~~~ cannam@255: cannam@255: The estimated onset locations. cannam@255: cannam@255: Detection Function cannam@255: ~~~~~~~~~~~~~~~~~~ cannam@255: cannam@255: The energy rise detection function whose peaks were used to estimate cannam@255: onset locations. cannam@255: cannam@255: cannam@255: Simple Power Spectrum cannam@255: ===================== cannam@255: cannam@255: System identifier: vamp-example-plugins:powerspectrum cannam@255: RDF URI: http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#powerspectrum cannam@255: cannam@255: Simple Power Spectrum returns a power spectrum calculated from cannam@255: windowed short-time Fourier transforms of the input audio. (The power cannam@255: spectrum for a frame consists of a sequence of the squares of the cannam@255: magnitudes of the complex values for each frequency bin in the result cannam@255: of the Fourier transform.) cannam@255: cannam@255: This very simple plugin is an illustration of the fact that if a cannam@255: plugin requests frequency-domain input, its input will already be in cannam@255: the form needed for a spectrum such as this. The plugin has no work cannam@255: left to do except to calculate the squared magnitude from the cannam@255: cartesian complex representation. cannam@255: cannam@255: This plugin also illustrates how to return "grid-type" visualisation cannam@255: data from a Vamp plugin. cannam@255: cannam@255: Parameters cannam@255: ---------- cannam@255: cannam@255: None. cannam@255: cannam@255: Outputs cannam@255: ------- cannam@255: cannam@255: Power Spectrum cannam@255: ~~~~~~~~~~~~~~ cannam@255: cannam@255: The power spectrum calculated from the input frame. This output cannam@255: returns a single feature per processing block, containing cannam@255: blocksize/2+1 power values corresponding to the FFT bins from DC to cannam@255: Nyquist inclusive. The DC bin is always returned. cannam@255: cannam@255: cannam@255: Spectral Centroid cannam@255: ================= cannam@255: cannam@255: System identifier: vamp-example-plugins:spectralcentroid cannam@255: RDF URI: http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#spectralcentroid cannam@255: cannam@255: Spectral Centroid calculates the "centre of gravity" of the frequency cannam@255: spectrum for each input frame. cannam@255: cannam@255: Parameters cannam@255: ---------- cannam@255: cannam@255: None. cannam@255: cannam@255: Outputs cannam@255: ------- cannam@255: cannam@255: Log Frequency Centroid cannam@255: ~~~~~~~~~~~~~~~~~~~~~~ cannam@255: cannam@255: The centroid of the log-weighted frequency spectrum. That is, the sum cannam@255: across Fourier transform output bins of the logarithm of the bin cannam@255: frequency multiplied by the bin magnitude, divided by the sum of the cannam@255: bin magnitudes, and the inverse logarithm taken so as to give the cannam@255: result as a frequency in Hz. cannam@255: cannam@255: Linear Frequency Centroid cannam@255: ~~~~~~~~~~~~~~~~~~~~~~~~~ cannam@255: cannam@255: The centroid of the linear-weighted frequency spectrum. That is, the cannam@255: sum across Fourier transform output bins of the bin frequency cannam@255: multiplied by the bin magnitude, divided by the sum of the bin cannam@255: magnitudes. The result is a frequency in Hz. cannam@255: cannam@255: cannam@255: Zero Crossings cannam@255: ============== cannam@255: cannam@255: System identifier: vamp-example-plugins:zerocrossing cannam@255: RDF URI: http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#zerocrossing cannam@255: cannam@255: Zero Crossings calculates the positions and density of "zero-crossing" cannam@255: points in an audio waveform. For the purposes of this plugin, that cannam@255: means those positions at which the sampled value switches from cannam@255: zero-or-less to greater-than-zero, or vice versa. cannam@255: cannam@255: Parameters cannam@255: ---------- cannam@255: cannam@255: None. cannam@255: cannam@255: Outputs cannam@255: ------- cannam@255: cannam@255: Zero Crossing Counts cannam@255: ~~~~~~~~~~~~~~~~~~~~ cannam@255: cannam@255: The number of zero-crossing points found in the current block of cannam@255: samples, as a single-valued feature returned per processing block. cannam@255: cannam@255: Zero Crossings cannam@255: ~~~~~~~~~~~~~~ cannam@255: cannam@255: The locations of zero-crossing points, returning one feature cannam@255: timestamped to the zero-crossing location, without values, for each cannam@255: crossing point. cannam@255: