summaryrefslogtreecommitdiff
path: root/drumgizmo
diff options
context:
space:
mode:
authorVolker Fischer <corrados@users.noreply.github.com>2021-04-30 17:07:36 +0200
committerVolker Fischer <corrados@users.noreply.github.com>2021-04-30 17:07:36 +0200
commit5be222dee61dc8b28a429d93c39a2500a28de759 (patch)
tree5ba775dbb76aadbb117c7673ebed3f28fb9bda9c /drumgizmo
parentd605a7a9166dce74aa17d33da92e11ca9b467e55 (diff)
parenta15a662bcf6de70cb379bfc582c349f7ff87ee27 (diff)
Merge branch 'distance' into edrumulus
Diffstat (limited to 'drumgizmo')
-rw-r--r--drumgizmo/drumgizmoc.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/drumgizmo/drumgizmoc.cc b/drumgizmo/drumgizmoc.cc
index 8eba4c9..b906c8a 100644
--- a/drumgizmo/drumgizmoc.cc
+++ b/drumgizmo/drumgizmoc.cc
@@ -139,6 +139,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"
+ " position: The importance given to choosing a sample close to\n"
+ " the actual position 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"
@@ -617,6 +619,16 @@ int main(int argc, char* argv[])
}
settings.sample_selection_f_close.store(val);
}
+ else if(token.key == "position")
+ {
+ auto val = atof_nol(token.value.data());
+ if(val < 0 || val > 1)
+ {
+ std::cerr << "position range is [0, 1].\n";
+ return 1;
+ }
+ settings.sample_selection_f_position.store(val);
+ }
else if(token.key == "diverse")
{
auto val = atof_nol(token.value.data());