Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
modal_bank.hpp File Reference
#include <pulp/signal/denormal.hpp>
#include <pulp/signal/simd_buffer.hpp>
#include <algorithm>
#include <cmath>
#include <span>

Go to the source code of this file.

Classes

struct  pulp::signal::ModalMode
 One resonant mode of a vibrating object: frequency, decay time, and impulse-response amplitude. More...
struct  pulp::signal::ModalShape
 The spatial eigenfunction of one mode along a body's normalized length coordinate x in [0, 1]: phi(x) = sin(pi * half_waves * x + end_phase). More...
class  pulp::signal::ModalBankT< SampleType >
 Bank of two-pole modal resonators, stored structure-of-arrays in lane groups so the per-sample state update auto-vectorizes across modes. More...

Namespaces

namespace  pulp
namespace  pulp::signal

Typedefs

using pulp::signal::ModalBank = ModalBankT<float>
using pulp::signal::ModalBank64 = ModalBankT<double>

Functions

template<typename SampleType = float>
void pulp::signal::fill_strike_pulse (std::span< SampleType > dst, SampleType velocity)
 Fill dst with a raised-cosine contact pulse, peak-normalized to velocity.
float pulp::signal::mode_shape_at (const ModalShape &shape, float position)
 Evaluate a mode's shape at a normalized position along the body.
void pulp::signal::fill_ideal_string_shapes (std::span< ModalShape > dst)
 Fill dst with the mode shapes of an ideal string fixed at both ends: dst[i] describes the (i+1)-th transverse mode, phi_m(x) = sin(m*pi*x), whose nodes are at x = k/m.
template<typename SampleType = float>
void pulp::signal::fill_mode_weights (std::span< SampleType > dst, std::span< const ModalShape > shapes, float position)
 Sample every shape in shapes at position, writing phi_m(position) to dst.