mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-12 11:20:15 +01:00
tidy up display control mappings and other fixes
This commit is contained in:
@@ -114,16 +114,8 @@ class MidiInput(object):
|
||||
|
||||
def run_action_for_mapped_message(self, message_name, mapped_message_value):
|
||||
this_mapping = self.midi_mappings[message_name]
|
||||
#if self.data.function_on and "FN_%s"%self.data.control_mode in this_mapping:
|
||||
# mode = "FN_%s"%self.data.control_mode
|
||||
#el
|
||||
#print ("got mapping %s" % this_mapping)
|
||||
if self.data.control_mode in this_mapping:
|
||||
mode = self.data.control_mode
|
||||
elif self.data.display_mode in this_mapping:
|
||||
mode = self.data.display_mode
|
||||
#elif self.data.function_on and "FN_DEFAULT" in this_mapping:
|
||||
# mode = "FN_DEFAULT"
|
||||
elif 'DEFAULT' in this_mapping:
|
||||
mode = 'DEFAULT'
|
||||
|
||||
@@ -133,8 +125,8 @@ class MidiInput(object):
|
||||
else:
|
||||
method_name = this_mapping[mode][0]
|
||||
|
||||
print('[][][][][ in mode {}, the action being called is {} from message_name {} in control_mode {}'
|
||||
.format(mode, method_name, message_name, self.data.control_mode))
|
||||
#print('[][][][][ in mode {}, the action being called is {} from message_name {} in control_mode {}'
|
||||
# .format(mode, method_name, message_name, self.data.control_mode))
|
||||
if mapped_message_value is not None:
|
||||
norm_message_value = mapped_message_value/127
|
||||
|
||||
|
||||
@@ -43,12 +43,14 @@ class NumpadInput(object):
|
||||
|
||||
if self.data.function_on and len(this_mapping[mode]) > 1:
|
||||
print('the action being called is {}'.format(this_mapping[mode][1]))
|
||||
getattr(self.actions, this_mapping[mode][1])()
|
||||
#getattr(self.actions, this_mapping[mode][1])()
|
||||
self.actions.call_method_name(this_mapping[mode][1])
|
||||
if self.data.settings['sampler']['FUNC_GATED']['value'] == 'off':
|
||||
self.data.function_on = False
|
||||
else:
|
||||
print('the action being called is {}'.format(this_mapping[mode][0]))
|
||||
getattr(self.actions, this_mapping[mode][0])()
|
||||
#getattr(self.actions, this_mapping[mode][0])()
|
||||
self.actions.call_method_name(this_mapping[mode][0])
|
||||
|
||||
self.display.refresh_display()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user