#include <spectrum.h>
Inheritance diagram for SignalTypes::Spectrum:
Public Member Functions | |
const float | bandFrequency (uint band) const |
const float | nyquist () const |
const uint | size () const |
Spectrum (const uint size=1, const float frequency=0, const float step=1) | |
const float | step () const |
Protected Attributes | |
float | theStep |
Step between spectral bands of represented Spectrum. |
This class can be used to describe a signal type that is a vector of elements. The vector can be any size (dimensionality), and has two significant attributes, the frequency by which each individual spectrum arrives from the source, and the stepping between spectral bands.
SignalTypes::Spectrum::Spectrum | ( | const uint | size = 1 , |
|
const float | frequency = 0 , |
|||
const float | step = 1 | |||
) | [inline] |
Create a new SignalType to represent a spectrum.
size | The number of bands in each spectrum. | |
frequency | The number of times the source will emit a spectrum per second of signal time (in Hz). | |
step | The increase in audio frequency (in Hz) per band. It is currently assumed that the signal is a monotonically stepped spectrum. |
const float SignalTypes::Spectrum::bandFrequency | ( | uint | band | ) | const [inline] |
Determines the frequency represented by a specific band.
band | The band index. |
const float SignalTypes::Spectrum::nyquist | ( | ) | const [inline] |
Gets the Nyquist frequency (the highest frequency that can be represented by this spectrum.
const uint SignalTypes::Spectrum::size | ( | ) | const [inline] |
Gets the number of bands in the spectra of the signal to which this type refers.
const float SignalTypes::Spectrum::step | ( | ) | const [inline] |
Gets the difference in audio frequency between each band in the spectra.