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
sbl::dsp::pm::TableFriction Class Reference

Detailed Description

Definition at line 85 of file table_friction.hpp.

#include <table_friction.hpp>

Public Member Functions

void set_bow (const float *family, const float *limits, uint8_t slices, uint16_t size, uint16_t stride, float dv_max=1.0f)
 Install a bow: a lute-solved family and its per-slice limits.
 
void set_bow (const BowTable &bow)
 Install a bow described in one value.
 
void set_force_su (float su)
 Bow force across the family [0, 1]; crossfades adjacent slices.
 
float process (float dv_free)
 One sample: relative velocity in, injection force out.
 
bool sticking () const
 True while the string travels with the bow.
 
float limit () const
 Static-friction limit at the current bow force — where the string releases.
 
void reset ()
 
diagram::Ports describe (diagram::Graph &g, uint8_t group, const char *name="bow friction") const
 One Junction node: the friction nonlinearity. Never called from audio code (AP-037).
 

Member Function Documentation

◆ set_bow() [1/2]

void sbl::dsp::pm::TableFriction::set_bow ( const float *  family,
const float *  limits,
uint8_t  slices,
uint16_t  size,
uint16_t  stride,
float  dv_max = 1.0f 
)
inline

Install a bow: a lute-solved family and its per-slice limits.

Note
All public methods are ISR-safe — bounded computation, no I/O.
Parameters
familyforce_slices rows of stride floats, light bow first
limitsone static-friction limit per slice
slicesnumber of force slices
sizesamples per row spanning dv_free in [0, dv_max]
striderow pitch (size + guard points)
dv_maxrelative velocity the last sample corresponds to

Definition at line 99 of file table_friction.hpp.

References set_force_su().

Referenced by sbl::dsp::pm::HybridFriction::set_bow(), and set_bow().

◆ set_bow() [2/2]

void sbl::dsp::pm::TableFriction::set_bow ( const BowTable &  bow)
inline

◆ set_force_su()

void sbl::dsp::pm::TableFriction::set_force_su ( float  su)
inline

Bow force across the family [0, 1]; crossfades adjacent slices.

Definition at line 117 of file table_friction.hpp.

Referenced by set_bow(), sbl::dsp::pm::TableSet::set_force_su(), and sbl::dsp::pm::HybridFriction::set_force_su().

◆ process()

float sbl::dsp::pm::TableFriction::process ( float  dv_free)
inline

One sample: relative velocity in, injection force out.

Parameters
dv_freev_bow - v_incoming, in wave variables

Definition at line 136 of file table_friction.hpp.

Referenced by sbl::dsp::pm::TableSet::process(), and sbl::dsp::pm::HybridFriction::process().

◆ sticking()

bool sbl::dsp::pm::TableFriction::sticking ( ) const
inline

True while the string travels with the bow.

Definition at line 152 of file table_friction.hpp.

Referenced by sbl::dsp::pm::HybridFriction::process(), sbl::dsp::pm::TableSet::sticking(), and sbl::dsp::pm::HybridFriction::sticking().

◆ limit()

float sbl::dsp::pm::TableFriction::limit ( ) const
inline

Static-friction limit at the current bow force — where the string releases.

Definition at line 155 of file table_friction.hpp.

Referenced by sbl::dsp::pm::TableSet::limit(), and sbl::dsp::pm::HybridFriction::limit().

◆ reset()

void sbl::dsp::pm::TableFriction::reset ( )
inline

◆ describe()

diagram::Ports sbl::dsp::pm::TableFriction::describe ( diagram::Graph &  g,
uint8_t  group,
const char *  name = "bow friction" 
) const
inline

The documentation for this class was generated from the following file: