diff options
author | Sander Vocke <sandervocke@gmail.com> | 2024-07-23 12:22:30 +0200 |
---|---|---|
committer | Sander Vocke <sandervocke@gmail.com> | 2024-07-23 12:22:30 +0200 |
commit | 23f625be77c925569dfea8700103aff89d513b50 (patch) | |
tree | e9e794b31b3314bafc856c8da9c6eb0733e10eb7 /drumgizmo | |
parent | ddd12cae8a21eba52a4d8fae9dced18878e0e055 (diff) |
Add openness CC control for hi-hats.distance_openness
Diffstat (limited to 'drumgizmo')
-rw-r--r-- | drumgizmo/drumgizmoc.cc | 12 | ||||
-rw-r--r-- | drumgizmo/input/jackmidi.cc | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/drumgizmo/drumgizmoc.cc b/drumgizmo/drumgizmoc.cc index 62b527e..44bbbbb 100644 --- a/drumgizmo/drumgizmoc.cc +++ b/drumgizmo/drumgizmoc.cc @@ -139,6 +139,8 @@ static std::string arguments() " 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" + " 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" @@ -627,6 +629,16 @@ int main(int argc, char* argv[]) } settings.sample_selection_f_position.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()); diff --git a/drumgizmo/input/jackmidi.cc b/drumgizmo/input/jackmidi.cc index 7081bf1..d64e8c4 100644 --- a/drumgizmo/input/jackmidi.cc +++ b/drumgizmo/input/jackmidi.cc @@ -3,7 +3,7 @@ * jackmidi.cc * * Mo 25. Jan 11:26:06 CET 2016 - * Copyright 2016 Christian Glöckner + * Copyright 2016 Christian Gl�ckner * cgloeckner@freenet.de ****************************************************************************/ @@ -50,7 +50,7 @@ bool JackMidiInputEngine::init(const Instruments& instruments) { if(!loadMidiMap(midimap_file, instruments)) { - std::cerr << "[MidifileInputEngine] Failed to parse midimap '" + std::cerr << "[JackMidiInputEngine] Failed to parse midimap '" << midimap_file << "'\n"; return false; } @@ -114,7 +114,7 @@ void JackMidiInputEngine::process(jack_nframes_t num_frames) // It might not be though in case the system is under heavy load. // Make room for both the new and old events to make sure we don't throw // anything away. - events.reserve(events.size() + num_events); + // FIXME events.reserve(events.size() + num_events); for(jack_nframes_t i = 0; i < num_events; ++i) { |