AME
ame_Oscillator.hpp File Reference
#include "ame_Math.hpp"
#include "ame_Util.hpp"
#include <algorithm>
#include <array>
#include <atomic>
#include <cassert>
#include <cmath>
#include <concepts>
#include <numeric>
#include <span>
Include dependency graph for ame_Oscillator.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ame::WavetableOscillator< FloatType, N >
 Wavetable oscillator. More...
 
class  ame::SineOscillator< FloatType >
 Sine wave oscillator. More...
 

Functions

template<std::floating_point FloatType, size_t NumSamples, class Function >
constexpr std::array< FloatType, NumSamples > ame::makeWaveTable (Function func)
 Wavetable generator. More...
 
template<std::floating_point FloatType, size_t N>
constexpr std::array< FloatType, N > ame::makeSineTable ()
 Sine wave wavetable generator. More...
 

Detailed Description

Author
Akiyuki Okayasu (akiyu.nosp@m.ki.o.nosp@m.kayas.nosp@m.u@gm.nosp@m.ail.c.nosp@m.om)

AME is released under the MIT license.

Function Documentation

◆ makeSineTable()

template<std::floating_point FloatType, size_t N>
constexpr std::array< FloatType, N > ame::makeSineTable ( )
constexpr

Sine wave wavetable generator.

Template Parameters
FloatTypefloat or double
Narray size
Returns
constexpr std::array<float, N> sine wave table

◆ makeWaveTable()

template<std::floating_point FloatType, size_t NumSamples, class Function >
constexpr std::array< FloatType, NumSamples > ame::makeWaveTable ( Function  func)
constexpr

Wavetable generator.

Template Parameters
FloatTypefloat or double
NumSamplesarray size
Functionfunction to generate wavetable
Note
Functionの入力は0~1範囲の配列です
See also
make_sineTable()