Skip to content

Commit

Permalink
hotfix for #112
Browse files Browse the repository at this point in the history
  • Loading branch information
narcode committed Jul 3, 2020
1 parent 4388da6 commit 4c1e948
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CodeKlavier/ckonditionals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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':
Expand Down
4 changes: 3 additions & 1 deletion hybrid/hybrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4c1e948

Please sign in to comment.