14 const CalcPatternMod _pmod = Stream;
15 const std::string name =
"StreamMod";
16 const int _tap_size = single;
22 float prop_buffer = 1.F;
23 float prop_scaler = 1.41F;
25 float jack_pool = 4.F;
26 float jack_comp_min = 0.5F;
27 float jack_comp_max = 1.F;
29 float vibro_flag = 1.F;
31 float tht_scaler = .0F;
32 float tht_cv_threshold = 0.5F;
33 float tht_trill_buffer = 1.4F;
34 float tht_trill_scaler = 1.F;
35 float tht_jump_buffer = 1.F;
36 float tht_jump_scaler = 0.5F;
37 float tht_jump_weight = 0.0F;
38 float tht_min_prop = 0.0F;
39 float tht_max_prop = 1.F;
41 const std::vector<std::pair<std::string, float*>> _params{
43 {
"min_mod", &min_mod },
44 {
"max_mod", &max_mod },
45 {
"prop_buffer", &prop_buffer },
46 {
"prop_scaler", &prop_scaler },
48 {
"jack_pool", &jack_pool },
49 {
"jack_comp_min", &jack_comp_min },
50 {
"jack_comp_max", &jack_comp_max },
52 {
"vibro_flag", &vibro_flag },
54 {
"2ht_scaler", &tht_scaler },
55 {
"2ht_cv_threshold", &tht_cv_threshold },
56 {
"2ht_trill_buffer", &tht_trill_buffer },
57 {
"2ht_trill_scaler", &tht_trill_scaler },
58 {
"2ht_jump_buffer", &tht_jump_buffer },
59 {
"2ht_jump_scaler", &tht_jump_scaler },
60 {
"2ht_jump_weight", &tht_jump_weight },
61 {
"2ht_min_prop", &tht_min_prop },
62 {
"2ht_max_prop", &tht_max_prop },
64#pragma endregion params and param map
66 float prop_component = 0.F;
67 float jack_component = 0.F;
73 trillsequencer.set_params(tht_cv_threshold,
83 void advance_sequencing(
const float& ms_now,
const unsigned& notes) {
84 trillsequencer(ms_now, notes);
88 trillsequencer.reset();
93 const auto& itvi = mitvi._itvi;
96 if (itvi.total_taps < 2) {
100 if (itvi.taps_by_size.at(_tap_size) == 0) {
113 static_cast<float>(itvi.taps_by_size.at(_tap_size) + prop_buffer) /
114 static_cast<float>(
static_cast<float>(itvi.total_taps) -
119 jack_component = std::clamp(
120 jack_pool - mitvi.actual_jacks, jack_comp_min, jack_comp_max);
121 pmod = fastsqrt(prop_component * jack_component);
124 const auto tht_prop = trillsequencer.
get(mitvi);
125 pmod *= (1 - (tht_prop * tht_scaler));
126 trillsequencer.reset();
128 pmod = std::clamp(base + pmod, min_mod, max_mod);
130 if (mitvi.basically_vibro) {
131 if (mitvi.num_var == 1) {
132 pmod *= 0.5F * vibro_flag;
133 }
else if (mitvi.num_var == 2) {
134 pmod *= 0.9F * vibro_flag;
135 }
else if (mitvi.num_var == 3) {
136 pmod *= 0.95F * vibro_flag;
float get(const metaItvInfo &mitvi)
numerical output (kind of like a proportion. 1 is "all trills")
Definition TrillSequencing.h:262