Skip to content

Commit

Permalink
curretn architecture support
Browse files Browse the repository at this point in the history
  • Loading branch information
narcode committed Aug 7, 2020
1 parent 5c504b3 commit 6ca6f77
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CodeKlavier/ckalculator_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def parse_midi(self, event, section, ck_deltatime_per_note=0, ck_deltatime=0,

if f['body']['arg1'].__name__ == 'succ1':
if function_to_call.__name__ == 'shift_mapping':
self.shift_mapping(f['body']['arg1'])
self.shift_mapping(trampolineRecursiveCounter(f['body']['arg1']))
else:
self.append_successor(f['body']['arg1'])
self.zeroPlusRec(False, True) ## check 2nd argument
Expand Down Expand Up @@ -1041,6 +1041,7 @@ def shift_mapping(self, offset=0, shift_type='interval', target_note='', configf
self.mapscheme.formatAndSend('Wrong note!\n'+shift_type, display=3, syntax_color='error:')

if shift_type == 'interval':
print('interval shift triggered by', offset)
for mapping in mappings:
LambdaMapping[mapping[0]] = list(map(lambda x:
self._pianoRange[(x + offset) % len(
Expand Down
9 changes: 6 additions & 3 deletions ck_functions.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[functions]


function1: 74,75,78,79 -> (shift_mapping 'C' x)
function2: 74,75,78,80 -> (shift_mapping 'C' x)
function1: 75,78,80,82 -> (add 4 x)
function2: 75,78,80,83 -> (add 4 x)
function3: 63,66,68,69 -> (shift_mapping 2 x)
function4: 70,63,66,68 -> (shift_mapping 2 x)
function5: 51,54,56,58 -> (shift_mapping 1 x)
function6: 51,54,56,57 -> (shift_mapping 1 x)
2 changes: 1 addition & 1 deletion default_setup.ini
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ random2: -2, 10
#NOTE: random2 multiplies by a value extracted from the function where it is used

[ckalculator]
shift: off
shift: on
wrong_note_tolerance: 1

[lambda]
Expand Down

0 comments on commit 6ca6f77

Please sign in to comment.