|
lmms
Cross-platform music production software
|
#include <BandLimitedWave.h>
Public Types | |
| enum class | Waveform { BLSaw , BLSquare , BLTriangle , BLMoog , Count } |
Public Member Functions | |
| BandLimitedWave ()=default | |
| virtual | ~BandLimitedWave ()=default |
Static Public Member Functions | |
| static float | freqToLen (float f) |
| This method converts frequency to wavelength. The oscillate function takes wavelength as argument so use this to convert your note frequency to wavelength before using it. | |
| static float | freqToLen (float f, sample_rate_t sr) |
| This method converts frequency to wavelength, but you can use any custom sample rate with it. | |
| static float | pdToLen (float pd) |
| This method converts phase delta to wavelength. It assumes a phase scale of 0 to 1. | |
| static sample_t | oscillate (float _ph, float _wavelen, Waveform _wave) |
| This method provides interpolated samples of bandlimited waveforms. | |
| static void | generateWaves () |
Static Public Attributes | |
| static constexpr auto | NumWaveforms = static_cast<std::size_t>(Waveform::Count) |
| static bool | s_wavesGenerated = false |
| static std::array< WaveMipMap, NumWaveforms > | s_waveforms = { } |
| static QString | s_wavetableDir = "" |
|
strong |
|
default |
|
virtualdefault |
|
inlinestatic |
This method converts frequency to wavelength. The oscillate function takes wavelength as argument so use this to convert your note frequency to wavelength before using it.
|
inlinestatic |
This method converts frequency to wavelength, but you can use any custom sample rate with it.
|
static |
|
inlinestatic |
This method provides interpolated samples of bandlimited waveforms.
| _ph | The phase of the sample. |
| _wavelen | The wavelength (length of one cycle, ie. the inverse of frequency) of the wanted oscillation, measured in sample frames |
| _wave | The wanted waveform. Options currently are saw, triangle, square and moog saw. |
|
inlinestatic |
This method converts phase delta to wavelength. It assumes a phase scale of 0 to 1.
|
staticconstexpr |
|
static |
|
static |
|
static |