mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-16 05:10:04 +01:00
wj_reset_modulation action to reset all modulation levels set in WJSendPlugin.
This commit is contained in:
@@ -152,7 +152,8 @@
|
|||||||
"DEFAULT": ["switch_to_preset_7","select_preset_7"]
|
"DEFAULT": ["switch_to_preset_7","select_preset_7"]
|
||||||
},
|
},
|
||||||
"note_on 81": {
|
"note_on 81": {
|
||||||
"DEFAULT": ["","reset_selected_modulation"]
|
"DEFAULT": ["","reset_selected_modulation"],
|
||||||
|
"NAV_WJMX": ["","wj_reset_modulation"]
|
||||||
},
|
},
|
||||||
"note_on 82": {
|
"note_on 82": {
|
||||||
"DEFAULT": ["toggle_shader_layer_0","select_shader_modulation_slot_0"]
|
"DEFAULT": ["toggle_shader_layer_0","select_shader_modulation_slot_0"]
|
||||||
|
|||||||
@@ -275,9 +275,14 @@ class WJSendPlugin(ActionsPlugin, SequencePlugin, DisplayPlugin, ModulationRecei
|
|||||||
( r"^wj_select_next_command$", self.select_next_command ),
|
( r"^wj_select_next_command$", self.select_next_command ),
|
||||||
( r"^wj_select_previous_command$", self.select_previous_command ),
|
( r"^wj_select_previous_command$", self.select_previous_command ),
|
||||||
( r"^wj_select_next_argument$", self.select_next_argument ),
|
( r"^wj_select_next_argument$", self.select_next_argument ),
|
||||||
( r"^wj_select_previous_argument$", self.select_previous_argument )
|
( r"^wj_select_previous_argument$", self.select_previous_argument ),
|
||||||
|
( r"^wj_reset_modulation$", self.reset_modulation_levels )
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def reset_modulation_levels(self):
|
||||||
|
for cmd,struct in self.commands.items():
|
||||||
|
struct['modulation'] = [{},{},{},{}]
|
||||||
|
|
||||||
def set_modulation_command_argument_level(self, command_name, argument_name, slot, level):
|
def set_modulation_command_argument_level(self, command_name, argument_name, slot, level):
|
||||||
if self.DEBUG: print("set_modulation_command_argument_level(%s, %s, %s, %s)" % (command_name, argument_name, slot, level))
|
if self.DEBUG: print("set_modulation_command_argument_level(%s, %s, %s, %s)" % (command_name, argument_name, slot, level))
|
||||||
if not argument_name: self.commands[command_name]['arg_names'][0] #argument_name = 'v'
|
if not argument_name: self.commands[command_name]['arg_names'][0] #argument_name = 'v'
|
||||||
@@ -325,6 +330,7 @@ class WJSendPlugin(ActionsPlugin, SequencePlugin, DisplayPlugin, ModulationRecei
|
|||||||
def modulate_arguments(self, command, args):
|
def modulate_arguments(self, command, args):
|
||||||
args = args.copy()
|
args = args.copy()
|
||||||
#if self.DEBUG: print("modulate_arguments passed %s and\n\t%s" % (command,args))
|
#if self.DEBUG: print("modulate_arguments passed %s and\n\t%s" % (command,args))
|
||||||
|
# TODO: rewrite this so that it combines multiple inputs and averages them
|
||||||
for slot in range(0,4):
|
for slot in range(0,4):
|
||||||
modlevels = command.get('modulation',[{},{},{},{}])[slot]
|
modlevels = command.get('modulation',[{},{},{},{}])[slot]
|
||||||
#if self.DEBUG: print("\tfor modulate_arguments for slot %s got modlevels: %s" % (slot, modlevels))
|
#if self.DEBUG: print("\tfor modulate_arguments for slot %s got modlevels: %s" % (slot, modlevels))
|
||||||
|
|||||||
Reference in New Issue
Block a user