|
HART
0.2.0
High level Audio Regression and Testing
|
Options for colouredNoise() method.
More...
#include <hart_spectrum.hpp>
Public Member Functions | |
| ColouredNoise (float beta) | |
Creates ColouredNoise with a custom beta value. | |
| ColouredNoise | withRandomSeed (uint_fast32_t randomSeed) |
| Sets random seed. | |
| ColouredNoise | withLowCutoff (double lowCutoffFrequencyHz) |
| Sets the lowest meaningful frequency in the spectrum. | |
| ColouredNoise | withNumChannels (size_t numChannels) |
| Sets number of channels. | |
| ColouredNoise | withDuration (size_t signalDurationFrames) |
| Sets duration of time-domain audio that spectrum will represent. | |
| ColouredNoise | withSampleRate (double sampleRateHz) |
| Sets sample rate. | |
Static Public Member Functions | |
| static ColouredNoise | white () |
Creates ColouredNoise instance with beta value for white noise. | |
| static ColouredNoise | pink () |
Creates ColouredNoise instance with beta value for pink noise. | |
| static ColouredNoise | brown () |
Creates ColouredNoise instance with beta value for brown (a.k.a. red, or Brownian) noise. | |
| static ColouredNoise | blue () |
Creates ColouredNoise instance with beta value for blue noise. | |
| static ColouredNoise | violet () |
Creates ColouredNoise instance with beta value for violet noise. | |
Options for colouredNoise() method.
Definition at line 116 of file hart_spectrum.hpp.
|
inlineexplicit |
Creates ColouredNoise with a custom beta value.
For common noise types, use provided factory methods:
| Noise type | Method | beta |
|---|---|---|
| White | white() | 0 |
| Pink | pink() | −1 |
| Brown/Red/Brownian | brown() | −2 |
| Blue | blue() | +1 |
| Violet | violet() | +2 |
| beta | Power-spectrum exponent (slope): |
ColouredNoise options instance Definition at line 132 of file hart_spectrum.hpp.
|
inlinestatic |
Creates ColouredNoise instance with beta value for white noise.
ColouredNoise options instance Definition at line 139 of file hart_spectrum.hpp.
|
inlinestatic |
Creates ColouredNoise instance with beta value for pink noise.
ColouredNoise options instance Definition at line 146 of file hart_spectrum.hpp.
|
inlinestatic |
Creates ColouredNoise instance with beta value for brown (a.k.a. red, or Brownian) noise.
ColouredNoise options instance Definition at line 153 of file hart_spectrum.hpp.
|
inlinestatic |
Creates ColouredNoise instance with beta value for blue noise.
ColouredNoise options instance Definition at line 160 of file hart_spectrum.hpp.
|
inlinestatic |
Creates ColouredNoise instance with beta value for violet noise.
ColouredNoise options instance Definition at line 167 of file hart_spectrum.hpp.
|
inline |
Sets random seed.
| randomSeed | RNG seed. While magnitudes will have ideal values, the real and imaginary parts of bins will be randomized. |
Defaults to global default random seed.
ColouredNoise options instance Definition at line 178 of file hart_spectrum.hpp.
|
inline |
Sets the lowest meaningful frequency in the spectrum.
| lowCutoffFrequencyHz | The starting frequency of the noise. Defaults to 20 Hz. |
ColouredNoise options instance Definition at line 189 of file hart_spectrum.hpp.
|
inline |
Sets number of channels.
| numChannels | Number of channels in the generated spectrum |
Defaults to global default number of input channels.
Definition at line 203 of file hart_spectrum.hpp.
|
inline |
Sets duration of time-domain audio that spectrum will represent.
| signalDurationFrames | Desired duration of the signal this noise represents. Can be arbitrary. If not a power of 2, the spectrum will be padded to the next power of 2, but if converted to time domain via toAudioBuffer(), the desired duration will be respected. |
Defaults to global default render duration.
ColouredNoise options instance Definition at line 218 of file hart_spectrum.hpp.
|
inline |
Sets sample rate.
| sampleRateHz | Sample rate of the generated spectrum in Hertz. |
Defaults to global default sample rate.
ColouredNoise options instance Definition at line 229 of file hart_spectrum.hpp.