MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
Reed.hpp File Reference

Quasi-static single reed and its same-sample coupling to the bore. More...

Include dependency graph for Reed.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MayaFlux::Kinesis::Acoustics::ReedChannel
 Geometry and constants of the reed channel. More...

Namespaces

namespace  MayaFlux
 Main namespace for the Maya Flux audio engine.
namespace  MayaFlux::Kinesis
namespace  MayaFlux::Kinesis::Acoustics

Functions

std::tuple< double, double, double > MayaFlux::Kinesis::Acoustics::dynamic_reed_mouth_step (const ReedChannel &reed, double resonance, double damping, double reed_area, double time_step, std::array< double, 2 > &motion, double end_pressure_gain, double mouth_pressure, double end_pressure, double downstream_flow) noexcept
 Couple a reed with its own dynamics to the first cell of the bore.
bool MayaFlux::Kinesis::Acoustics::reed_coupling_is_unique (const ReedChannel &reed, double gain) noexcept
 Whether a coupling gain keeps the solution unique.
double MayaFlux::Kinesis::Acoustics::reed_flow (const ReedChannel &reed, double difference) noexcept
 Volume velocity through the channel for a pressure difference.
double MayaFlux::Kinesis::Acoustics::reed_flow_coefficient (const ReedChannel &reed) noexcept
 w H sqrt(2 / rho), the flow per unit of (1 - d / pM) sign(d) sqrt|d|.
std::tuple< double, double, double, RootStatus > MayaFlux::Kinesis::Acoustics::reed_mouth_step (const ReedChannel &reed, double &warm_start, double end_pressure_gain, double mouth_pressure, double end_pressure, double downstream_flow) noexcept
 Couple the reed to the first cell of the bore for one sample.

Detailed Description

Quasi-static single reed and its same-sample coupling to the bore.

The reed channel opens by H (1 - d / pM) for a mouth to bore pressure difference d, and shuts once d reaches the closing pressure pM. Through the opening the flow is Bernoulli:

U(d) = w H (1 - d / pM) sign(d) sqrt(2 |d| / rho)

It rises with d until a third of pM, then falls to zero at pM, and that falling part is what lets the bore drive the reed into oscillation.

Coupled to the first cell of the bore the equation d + gain U(d) = target has a slope of infinity at d = 0 in d, which stalls Newton steps there. With s = sign(d) sqrt(|d|), so d = s |s|, the flow is a polynomial in s,

s |s| + gain w H sqrt(2 / rho) s (1 - s |s| / pM) = target

which is smooth through zero, and for either sign of the target the solution is held in an interval known beforehand, so the search is bracketed from its first step and typically needs two or three evaluations from the previous sample's solution.

Definition in file Reed.hpp.