diff --git a/CodeKlavier/ckonditionals.py b/CodeKlavier/ckonditionals.py index 9a4570c..a434bb8 100644 --- a/CodeKlavier/ckonditionals.py +++ b/CodeKlavier/ckonditionals.py @@ -180,7 +180,7 @@ def parseFlags(snippet_name, boolean, value, mapping, mainmotifs, conditional): mapping.result(snippet_name, boolean) -def set_parameters(value, conditional_func, mapping=None, parameters=None, debug=False): +def set_parameters(value, conditional_func, mapping=None, parameters=None, ini_param=None, debug=False): """ function to parse a full range tremolo. This value can be used as a param for the other functions. @@ -196,7 +196,7 @@ def set_parameters(value, conditional_func, mapping=None, parameters=None, debug print('thread started for parameter set', 'func:', conditional_func) if conditional_func == 'note_count': - mapping.customPass('more than 100 notes played in the next ' + str(value) + ' seconds?', flash=True) + mapping.customPass('more than ' + str(ini_param) + ' notes played in the next ' + str(value) + ' seconds?', flash=True) elif conditional_func in ('range_more_than', 'range_less_than'): mapping.customPass('range set to: ' + str(value) + ' semitones...', flash=True) elif conditional_func == 'gomb': diff --git a/hybrid/hybrid.py b/hybrid/hybrid.py index 45b0ab7..ee5249d 100644 --- a/hybrid/hybrid.py +++ b/hybrid/hybrid.py @@ -225,11 +225,13 @@ def main(): perpetual = bool(int(conditional_settings[1].strip())) if len(conditional_settings) > 2: totalNotes = int(conditional_settings[2]) + else: + totalNotes = None threads['set_param'] = Thread(target=ckonditionals.set_parameters, name='set timer value', args=(conditional_params, cond_type, - mapping, parameters) ) + mapping, parameters, totalNotes) ) threads['set_param'].start() if ckonditionals.param_interval > 0: