12#ifndef SBL_DSP_PM_HYBRID_FRICTION_HPP_
13#define SBL_DSP_PM_HYBRID_FRICTION_HPP_
38 force_su_ = su < 0.0f ? 0.0f : (su > 1.0f ? 1.0f : su);
49 const float force = table_.
process(dv_free);
50 const float a = std::fabs(dv_free);
51 const float fa = std::fabs(force);
66 return table_.
describe(g, group, name);
72 float force_su_ = 1.0f;
75static_assert(is_friction_law_v<HybridFriction>,
"HybridFriction is a friction law (physical-modeling.md §4.5)");
const ThermalFriction & rosin() const
ThermalFriction & rosin()
The rosin, for its parameters (ThermalFriction::set_rosin, set_fast_cooling).
diagram::Ports describe(diagram::Graph &g, uint8_t group, const char *name="friction (hybrid)") const
float temperature() const
void set_bow(const BowTable &bow)
The table read, and the cold limits the rosin warms.
void set_force_su(float su)
float process(float dv_free)
One sample: relative velocity in, force out (wave units).
float process(float dv_free)
One sample: relative velocity in, injection force out.
float limit() const
Static-friction limit at the current bow force — where the string releases.
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.
bool sticking() const
True while the string travels with the bow.
void set_force_su(float su)
Bow force across the family [0, 1]; crossfades adjacent slices.
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).
float temperature() const
Contact temperature as a fraction of the range over which the rosin softens.
float mu_rel() const
Friction relative to cold, from the temperature: 1 cold down to mu_ratio hot.
void set_limits(const float *limits, uint8_t slices)
The cold static limit per force slice — the friction-curve bow's limits
void reset()
Cold and stuck.
void set_force_su(float su)
Bow force across the slices [0, 1]; the cold limit interpolates between them.
void advance(float force, float v_slip)
Advance the contact one sample from a force and sliding speed found elsewhere.
What a load, an exciter, a termination and a friction law provide (Physical modeling — cross-cutting)
A model's wiring, as data (AP-037)
Physical modeling: laws, bows, junctions, loads, resonators, strings (docs/conventions/physical-model...
The ports a component exposes after describing itself, so an owner can wire them.
One bow: a lute-solved family and the shape of its arrays.
const float * limits
static-friction limit per slice
A bow: friction solved against the string (Physical modeling — primitive)
A bow whose friction remembers: the thermal model (Physical modeling — primitive)