bbc-vamp-plugins
1.0
|
Calculates the intensity of a signal and the intensity ratio for a number of sub-bands. More...
#include <Intensity.h>
Protected Member Functions | |
void | calculateBandFreqs () |
Calculates the upper frequency for each of a given number of sub-bands. | |
Protected Attributes | |
int | numBands |
float * | bandHighFreq |
Calculates the intensity of a signal and the intensity ratio for a number of sub-bands.
The intensity features are based on those published in [1], section 3A.
Firstly the signal is divided into \(i\) sub-bands with the following frequency ranges.
\[ \left(0,\frac{F_s}{2^i}\right) , \left(\frac{F_s}{2^i},\frac{F_s}{2^{i-1}}\right) , \ldots \left(\frac{F_s}{2^2},\frac{F_s}{2^1}\right) \]
The intensity of each frame \(n\) is calculated by summing the magnitude \(A\) of each frequency bin \(k\).
\[ I(n) = \displaystyle\sum\limits_{k=0}^{F_s/2} A(n,k) \]
For each sub-band \(i\) with a frequency range from \(L_i\) to \(H_i\), the intensity ratio is the ratio of that sub-band's intensity to the overall intensity.
\[ D_i(n) = \frac{1}{I(n)} \displaystyle\sum\limits_{k=L_i}^{H_i} A(n,k) \]
[1] Lu, L., Liu, D., & Zhang, H.-J. (2006). Automatic Mood Detection and Tracking of Music Audio Signals. IEEE Transactions on Audio, Speech and Language Processing (Vol. 14, pp. 5-18).
void Intensity::calculateBandFreqs | ( | ) | [protected] |
Calculates the upper frequency for each of a given number of sub-bands.
BBC Vamp plugin collection
Copyright (c) 2011-2013 British Broadcasting Corporation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
float* Intensity::bandHighFreq [protected] |
Upper frequency range of each sub-band
int Intensity::numBands [protected] |
Number of sub-bands to use