Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
measure.hpp File Reference

Measuring a rendered signal (Cross-cutting — host only) More...

Detailed Description

Measuring a rendered signal (Cross-cutting — host only)

Definition in file measure.hpp.

#include <cmath>
#include <cstdint>
#include <vector>

Go to the source code of this file.

Classes

struct  sbl::dsp::analysis::Period
 
struct  sbl::dsp::analysis::Profile
 
struct  sbl::dsp::analysis::Measure
 
struct  sbl::dsp::analysis::Reflectance
 
struct  sbl::dsp::analysis::Decay
 

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs code.
 
namespace  sbl::dsp
 
namespace  sbl::dsp::analysis
 Host-only measurement.
 

Enumerations

enum class  sbl::dsp::analysis::Window { sbl::dsp::analysis::Rectangular , sbl::dsp::analysis::Hann }
 

Functions

template<typename T >
double sbl::dsp::analysis::projection_power (const T *x, int n, double hz, double fs, Window window)
 
template<typename T >
double sbl::dsp::analysis::bin_energy (const T *x, int n, double hz, double fs)
 
template<typename T >
double sbl::dsp::analysis::bin_power (const T *x, int n, double hz, double fs)
 
template<typename T >
double sbl::dsp::analysis::mean_power (const T *x, int n)
 
template<typename T >
Period sbl::dsp::analysis::autocorr_period (const T *x, int n, double expected, double tolerance)
 
template<typename T >
Profile sbl::dsp::analysis::harmonic_profile (const T *x, int n, double f0, double fs, int harmonics)
 
template<typename T >
Measure sbl::dsp::analysis::measure_window (T *x, int n, double nominal_period, double fs, int stick, int slips, int harmonics)
 
bool sbl::dsp::analysis::helmholtz (const Measure &m, double min_slips=0.9, double max_slips=1.1)
 One release per period, give or take a window edge.
 
template<typename F >
double sbl::dsp::analysis::magnitude_at (double hz, double fs, F &&process, int settle=4000, int n=20000)
 
template<typename F >
Reflectance sbl::dsp::analysis::reflectance (double hz, double fs, F &&reflect, int settle=-1, int n=-1)
 A termination's reflection for a unit sine arriving at hz.
 
template<typename T >
Decay sbl::dsp::analysis::decay_fit (const T *x, int n, double hz, int window, double fs, double floor=1e-12)
 

Variables

constexpr double sbl::dsp::analysis::PI = 3.14159265358979323846
 
constexpr int sbl::dsp::analysis::MAX_HARMONICS = 16