50 float gain(
float velocity)
const {
51 const float v = std::clamp(velocity, 0.0f, 1.0f);
52 return std::pow(10.0f, (
level_db * (v - 1.0f)) / 20.0f);
56 float bend(
float velocity)
const {
How hard a hit changes the sound, beyond changing how loud it is.
Definition velocity.hpp:33
float level_db
Attenuation at velocity 0, in decibels below a full-velocity hit.
Definition velocity.hpp:35
float noise_balance
Shift toward the noise layer at full velocity, 0 to 1.
Definition velocity.hpp:47
float noise_shift(float velocity) const
Amount to add to a body-versus-noise balance in [0, 1].
Definition velocity.hpp:66
float bend_octaves
Extra pitch-envelope depth at full velocity, in octaves.
Definition velocity.hpp:40
float brightness_octaves
Extra exciter brightness at full velocity, in octaves of filter corner.
Definition velocity.hpp:43
float brightness_scale(float velocity) const
Multiplier to apply to an exciter or filter frequency.
Definition velocity.hpp:61
float bend(float velocity) const
Pitch-envelope depth to add, in octaves.
Definition velocity.hpp:56
float gain(float velocity) const
Amplitude multiplier for velocity in [0, 1].
Definition velocity.hpp:50