Provides methods to help calculate the frequency response of a filter.
More...
#include <FrequencyResponseHelper.h>
|
static std::vector< double > | logspace (double start, double end, int num_points) |
| Creates a logarithmically spaced vector.
|
|
static std::vector< double > | calculate_frequency_response (const std::vector< double > &B, const std::vector< double > &A, double sample_rate, const std::vector< double > &frequencies) |
| Calculates the frequency response of a filter given its coefficients.
|
|
Provides methods to help calculate the frequency response of a filter.
◆ calculate_frequency_response()
std::vector< double > FrequencyResponseHelper::calculate_frequency_response |
( |
const std::vector< double > & |
B, |
|
|
const std::vector< double > & |
A, |
|
|
double |
sample_rate, |
|
|
const std::vector< double > & |
frequencies |
|
) |
| |
|
static |
Calculates the frequency response of a filter given its coefficients.
- Parameters
-
B | The B coefficients of the filter. |
A | The A coefficients of the filter. |
sample_rate | The sample rate used in the filter. |
frequencies | The frequencies at which to calculate the response. |
- Returns
- A vector containing the gain in decibels at each frequency.
◆ logspace()
std::vector< double > FrequencyResponseHelper::logspace |
( |
double |
start, |
|
|
double |
end, |
|
|
int |
num_points |
|
) |
| |
|
static |
Creates a logarithmically spaced vector.
- Parameters
-
start | The start value of the vector. |
end | The end value of the vector. |
num_points | The number of points in the vector. |
- Returns
- A logarithmically spaced vector.
The documentation for this class was generated from the following files: