Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::drum::FmWaveTable Struct Reference

A compact, license-clean bank of 26 phase-readable FM waves. More...

#include <fm_tables.hpp>

Static Public Member Functions

static double read (int wave, double phase, double phase_increment=0.0)
static double warp (double phase, double amount)
 Casio-family phase warp: amount zero is identity; one moves the bend point close to the start of the cycle and produces a saw-like spectrum.

Static Public Attributes

static constexpr int wave_count = 26
static constexpr int harmonic_count = 4
static constexpr std::array< std::array< double, harmonic_count >, wave_count > harmonics

Detailed Description

A compact, license-clean bank of 26 phase-readable FM waves.

Each row is an authored four-harmonic spectrum. Reading the table at a phase offset makes it suitable for phase modulation; normalizing by the coefficient L1 norm keeps every row bounded without a runtime limiter.

Member Function Documentation

◆ read()

double pulp::signal::drum::FmWaveTable::read ( int wave,
double phase,
double phase_increment = 0.0 )
inlinestatic

◆ warp()

double pulp::signal::drum::FmWaveTable::warp ( double phase,
double amount )
inlinestatic

Casio-family phase warp: amount zero is identity; one moves the bend point close to the start of the cycle and produces a saw-like spectrum.

Member Data Documentation

◆ harmonic_count

int pulp::signal::drum::FmWaveTable::harmonic_count = 4
staticconstexpr

◆ harmonics

std::array<std::array<double, harmonic_count>, wave_count> pulp::signal::drum::FmWaveTable::harmonics
staticconstexpr
Initial value:
{{
{{1.00, 0.00, 0.000, 0.00}},
{{1.00, 0.50, 0.333, 0.25}},
{{1.00, -0.50, 0.333, -0.25}},
{{1.00, 0.00, 0.333, 0.00}},
{{1.00, 0.00, -0.111, 0.00}},
{{1.00, 0.70, 0.000, 0.00}},
{{1.00, -0.70, 0.000, 0.00}},
{{1.00, 0.00, 0.700, 0.00}},
{{1.00, 0.00, -0.700, 0.00}},
{{1.00, 0.00, 0.000, 0.70}},
{{1.00, 0.00, 0.000, -0.70}},
{{0.50, 1.00, 0.000, 0.00}},
{{0.50, 0.00, 1.000, 0.00}},
{{0.50, 0.00, 0.000, 1.00}},
{{1.00, 0.50, -0.333, 0.25}},
{{1.00, -0.50, -0.333, -0.25}},
{{1.00, 0.25, 0.750, 0.125}},
{{1.00, -0.25, 0.750, -0.125}},
{{0.75, 1.00, 0.500, 0.25}},
{{0.75, -1.00, 0.500, -0.25}},
{{1.00, 1.00, 1.000, 1.00}},
{{1.00, -1.00, 1.000, -1.00}},
{{1.00, 0.80, 0.400, 0.10}},
{{1.00, 0.10, 0.400, 0.80}},
{{0.25, 0.50, 0.750, 1.00}},
{{1.00, -0.25, -0.500, 0.75}},
}}

◆ wave_count

int pulp::signal::drum::FmWaveTable::wave_count = 26
staticconstexpr

The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/signal/include/pulp/signal/drum/fm_tables.hpp