#include "ame_Math.hpp"
#include "ame_Util.hpp"
#include <algorithm>
#include <array>
#include <atomic>
#include <cassert>
#include <cmath>
#include <concepts>
#include <numeric>
#include <span>
Go to the source code of this file.
|
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...
|
|
- Author
- Akiyuki Okayasu (akiyu.nosp@m.ki.o.nosp@m.kayas.nosp@m.u@gm.nosp@m.ail.c.nosp@m.om)
- Copyright
- Copyright (c) 2021 - Akiyuki Okayasu
AME is released under the MIT license.
◆ makeSineTable()
template<std::floating_point FloatType, size_t N>
constexpr std::array< FloatType, N > ame::makeSineTable |
( |
| ) |
|
|
constexpr |
Sine wave wavetable generator.
- Template Parameters
-
FloatType | float or double |
N | array 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
-
FloatType | float or double |
NumSamples | array size |
Function | function to generate wavetable |
- Note
- Functionの入力は0~1範囲の配列です
- See also
- make_sineTable()