summaryrefslogtreecommitdiff
path: root/drumgizmo/drumgizmoc.cc
diff options
context:
space:
mode:
authorSander Vocke <sandervocke@gmail.com>2024-07-23 13:23:38 +0200
committerSander Vocke <sandervocke@gmail.com>2024-07-23 13:23:38 +0200
commit0e59f90e2396190ec3e3a7195bac9c79e12fd6cc (patch)
treef7fd25a952c6e64db9108eab2a774e46fd9f0a83 /drumgizmo/drumgizmoc.cc
parent019d478818950f7880d2c0f80d8fc8f963e9736b (diff)
Add CC-controller openness parameter for hi-hats.
Diffstat (limited to 'drumgizmo/drumgizmoc.cc')
-rw-r--r--drumgizmo/drumgizmoc.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/drumgizmo/drumgizmoc.cc b/drumgizmo/drumgizmoc.cc
index bca55d2..5b44e6a 100644
--- a/drumgizmo/drumgizmoc.cc
+++ b/drumgizmo/drumgizmoc.cc
@@ -137,6 +137,8 @@ static std::string arguments()
"Sample selection parameters:\n"
" close: The importance given to choosing a sample close to\n"
" the actual velocity value (after humanization). [0,1]\n"
+ " openness: The importance given to choosing a sample close to\n"
+ " the actual openness value (after humanization). [0,1]\n"
" diverse: The importance given to choosing samples\n"
" which haven't been played recently. [0,1]\n"
" random: The amount of randomness added. [0,1]\n"
@@ -615,6 +617,16 @@ int main(int argc, char* argv[])
}
settings.sample_selection_f_close.store(val);
}
+ else if(token.key == "openness")
+ {
+ auto val = atof_nol(token.value.data());
+ if(val < 0 || val > 1)
+ {
+ std::cerr << "openness range is [0, 1].\n";
+ return 1;
+ }
+ settings.sample_selection_f_openness.store(val);
+ }
else if(token.key == "diverse")
{
auto val = atof_nol(token.value.data());