diff --git a/actions.py b/actions.py index 07202bf..7f272f4 100644 --- a/actions.py +++ b/actions.py @@ -1099,6 +1099,10 @@ class Actions(object): try: #print ("for method_name %s, arguments is %s and len is %s, got method %s" % (method_name, arguments, len(signature(method).parameters), method)) + + # for the case where cc is being used as switch, we ignore note_off + if len(signature(method).parameters) == 0 and not argument: + return if arguments is not None and len(signature(method).parameters)==len(arguments): # only pass arguments if count matches method sig method(*arguments) else: diff --git a/json_objects/midi_action_mapping.json b/json_objects/midi_action_mapping.json index 8193a86..655f224 100644 --- a/json_objects/midi_action_mapping.json +++ b/json_objects/midi_action_mapping.json @@ -89,7 +89,8 @@ "LENGTH_SET": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"], "SHADER_PARAM": ["decrease_this_param", "decrease_shader_param"], - "PLAY_SHADER": ["decrease_this_param", "decrease_shader_param"] + "PLAY_SHADER": ["decrease_this_param", "decrease_shader_param"], + "NAV_WJMX": ["wj_select_previous_command"] }, "note_on 73": { "NAV_BROWSER": ["move_browser_selection_down", "move_browser_selection_page_down"], @@ -100,7 +101,8 @@ "LENGTH_SET": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"], "SHADER_PARAM": ["increase_this_param", "increase_shader_param"], - "PLAY_SHADER": ["increase_this_param", "increase_shader_param"] + "PLAY_SHADER": ["increase_this_param", "increase_shader_param"], + "NAV_WJMX": ["wj_select_next_command"] }, "note_on 74": { "NAV_BROWSER": ["enter_on_browser_selection"], @@ -112,7 +114,11 @@ "SHADER_PARAM": ["return_to_default_control_mode"], "CONFIRM": ["perform_confirm_action"], "NAV_DETOUR": ["toggle_detour_play"], - "PLAY_SHADER": ["toggle_shaders", "toggle_shader_speed"] + "PLAY_SHADER": ["toggle_shaders", "toggle_shader_speed"], + "NAV_LFO": ["toggle_lfo_active"], + "NAV_SND": ["toggle_sound_react_active"], + "NAV_QKSH": ["qksh_toggle_display_live"], + "NAV_WJMX": ["wj_toggle_active"] }, "note_on 75": { "DEFAULT": ["switch_to_next_player", "toggle_player_mode"], @@ -122,13 +128,15 @@ "DEFAULT": ["set_playing_sample_start_to_current_duration", "clear_playing_sample_start_time"], "SHADER_PARAM": ["decrease_param_focus"], "PLAY_SHADER": ["decrease_param_focus"], - "NAV_DETOUR": ["decrease_mix_shader"] + "NAV_DETOUR": ["decrease_mix_shader"], + "NAV_WJMX": ["wj_select_previous_argument"] }, "note_on 77": { "DEFAULT": ["set_playing_sample_end_to_current_duration", "clear_playing_sample_end_time"], "SHADER_PARAM": ["increase_param_focus"], "PLAY_SHADER": ["increase_param_focus"], - "NAV_DETOUR": ["increase_mix_shader"] + "NAV_DETOUR": ["increase_mix_shader"], + "NAV_WJMX": ["wj_select_next_argument"] }, "note_on 78": { "DEFAULT": ["toggle_capture_preview", "toggle_capture_recording"]}, @@ -194,7 +202,8 @@ "LENGTH_SET": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"], "SHADER_PARAM": ["decrease_this_param", "decrease_shader_param"], - "PLAY_SHADER": ["decrease_this_param", "decrease_shader_param"] + "PLAY_SHADER": ["decrease_this_param", "decrease_shader_param"], + "NAV_WJMX": ["wj_select_previous_command"] }, "note_on 37": { "NAV_BROWSER": ["move_browser_selection_down", "move_browser_selection_page_down"], @@ -205,7 +214,8 @@ "LENGTH_SET": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"], "SHADER_PARAM": ["increase_this_param", "increase_shader_param"], - "PLAY_SHADER": ["increase_this_param", "increase_shader_param"] + "PLAY_SHADER": ["increase_this_param", "increase_shader_param"], + "NAV_WJMX": ["wj_select_next_command"] }, "note_on 38": { @@ -218,7 +228,11 @@ "SHADER_PARAM": ["return_to_default_control_mode"], "CONFIRM": ["perform_confirm_action"], "NAV_DETOUR": ["toggle_detour_play"], - "PLAY_SHADER": ["toggle_shaders", "toggle_shader_speed"] + "PLAY_SHADER": ["toggle_shaders", "toggle_shader_speed"], + "NAV_LFO": ["toggle_lfo_active"], + "NAV_SND": ["toggle_sound_react_active"], + "NAV_QKSH": ["qksh_toggle_display_live"], + "NAV_WJMX": ["wj_toggle_active"] }, "note_on 39": { "DEFAULT": ["switch_to_next_player", "toggle_player_mode"], @@ -228,13 +242,15 @@ "DEFAULT": ["set_playing_sample_start_to_current_duration", "clear_playing_sample_start_time"], "SHADER_PARAM": ["decrease_param_focus"], "PLAY_SHADER": ["decrease_param_focus"], - "NAV_DETOUR": ["decrease_mix_shader"] + "NAV_DETOUR": ["decrease_mix_shader"], + "NAV_WJMX": ["wj_select_previous_argument"] }, "note_on 41": { "DEFAULT": ["set_playing_sample_end_to_current_duration", "clear_playing_sample_end_time"], "SHADER_PARAM": ["increase_param_focus"], "PLAY_SHADER": ["increase_param_focus"], - "NAV_DETOUR": ["increase_mix_shader"] + "NAV_DETOUR": ["increase_mix_shader"], + "NAV_WJMX": ["wj_select_next_argument"] }, "note_on 42": { "DEFAULT": ["toggle_capture_preview", "toggle_capture_recording"]}, @@ -301,7 +317,8 @@ "LENGTH_SET": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"], "SHADER_PARAM": ["decrease_this_param", "decrease_shader_param"], - "PLAY_SHADER": ["decrease_this_param", "decrease_shader_param"] + "PLAY_SHADER": ["decrease_this_param", "decrease_shader_param"], + "NAV_WJMX": ["wj_select_previous_command"] }, "control_change 59": { "NAV_BROWSER": ["move_browser_selection_down", "move_browser_selection_page_down"], @@ -312,39 +329,48 @@ "LENGTH_SET": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"], "SHADER_PARAM": ["increase_this_param", "increase_shader_param"], - "PLAY_SHADER": ["increase_this_param", "increase_shader_param"] + "PLAY_SHADER": ["increase_this_param", "increase_shader_param"], + "NAV_WJMX": ["wj_select_next_command"] }, "control_change 43": { "NAV_BROWSER": ["move_browser_selection_up", "move_browser_selection_page_up"], "DEFAULT": ["seek_back_on_player", "decrease_seek_time"], "NAV_SETTINGS": ["move_settings_selection_up", "move_settings_selection_page_up"], "NAV_SHADERS": ["move_shaders_selection_up", "move_shaders_selection_page_up"], - "NAV_PLUGINS": ["enter_on_plugins_selection"], + "NAV_PLUGINS": ["move_plugins_selection_up", "move_plugins_selection_page_up"], "LENGTH_SET": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"], "SHADER_PARAM": ["decrease_this_param", "decrease_shader_param"], - "PLAY_SHADER": ["decrease_this_param", "decrease_shader_param"] + "PLAY_SHADER": ["decrease_this_param", "decrease_shader_param"], + "NAV_WJMX": ["wj_select_previous_command"] }, "control_change 44": { "NAV_BROWSER": ["move_browser_selection_down", "move_browser_selection_page_down"], "DEFAULT": ["seek_forward_on_player", "increase_seek_time"], "NAV_SETTINGS": ["move_settings_selection_down", "move_settings_selection_page_down"], "NAV_SHADERS": ["move_shaders_selection_down", "move_shaders_selection_page_down"], + "NAV_PLUGINS": ["move_plugins_selection_down", "move_plugins_selection_page_down"], "LENGTH_SET": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"], "SHADER_PARAM": ["increase_this_param", "increase_shader_param"], - "PLAY_SHADER": ["increase_this_param", "increase_shader_param"] + "PLAY_SHADER": ["increase_this_param", "increase_shader_param"], + "NAV_WJMX": ["wj_select_next_command"] }, "control_change 42": { "NAV_BROWSER": ["enter_on_browser_selection"], "DEFAULT": ["toggle_action_on_player","toggle_show_on_player"], "NAV_SETTINGS": ["enter_on_settings_selection"], "NAV_SHADERS": ["enter_on_shaders_selection", "map_on_shaders_selection"], + "NAV_PLUGINS": ["enter_on_plugins_selection"], "LENGTH_SET": ["record_fixed_length"], "SHADER_PARAM": ["return_to_default_control_mode"], "CONFIRM": ["perform_confirm_action"], "NAV_DETOUR": ["toggle_detour_play"], - "PLAY_SHADER": ["toggle_shaders", "toggle_shader_speed"] + "PLAY_SHADER": ["toggle_shaders", "toggle_shader_speed"], + "NAV_LFO": ["toggle_lfo_active"], + "NAV_SND": ["toggle_sound_react_active"], + "NAV_QKSH": ["qksh_toggle_display_live"], + "NAV_WJMX": ["wj_toggle_active"] }, "control_change 41": { "DEFAULT": ["switch_to_next_player", "toggle_player_mode"], @@ -354,13 +380,15 @@ "DEFAULT": ["set_playing_sample_start_to_current_duration", "clear_playing_sample_start_time"], "SHADER_PARAM": ["decrease_param_focus"], "PLAY_SHADER": ["decrease_param_focus"], - "NAV_DETOUR": ["decrease_mix_shader"] + "NAV_DETOUR": ["decrease_mix_shader"], + "NAV_WJMX": ["wj_select_previous_argument"] }, "control_change 62": { "DEFAULT": ["set_playing_sample_end_to_current_duration", "clear_playing_sample_end_time"], "SHADER_PARAM": ["increase_param_focus"], "PLAY_SHADER": ["increase_param_focus"], - "NAV_DETOUR": ["increase_mix_shader"] + "NAV_DETOUR": ["increase_mix_shader"], + "NAV_WJMX": ["wj_select_next_argument"] }, "control_change 45": { "DEFAULT": ["toggle_capture_preview", "toggle_capture_recording"]}, diff --git a/json_objects/osc_action_mapping.json b/json_objects/osc_action_mapping.json index 03e8427..b2c26b1 100644 --- a/json_objects/osc_action_mapping.json +++ b/json_objects/osc_action_mapping.json @@ -73,7 +73,8 @@ "LENGTH_SET": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"], "SHADER_PARAM": ["decrease_this_param", "decrease_shader_param"], - "PLAY_SHADER": ["decrease_this_param", "decrease_shader_param"] + "PLAY_SHADER": ["decrease_this_param", "decrease_shader_param"], + "NAV_WJMX": ["wj_select_previous_command"] }, "b": { "NAV_BROWSER": ["move_browser_selection_down", "move_browser_selection_page_down"], @@ -84,8 +85,8 @@ "LENGTH_SET": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"], "SHADER_PARAM": ["increase_this_param", "increase_shader_param"], - "PLAY_SHADER": ["increase_this_param", "increase_shader_param"] - }, + "PLAY_SHADER": ["increase_this_param", "increase_shader_param"], + "NAV_WJMX": ["wj_select_next_command"] }, "c": { "NAV_BROWSER": ["enter_on_browser_selection"], "DEFAULT": ["toggle_action_on_player","toggle_show_on_player"], @@ -96,8 +97,11 @@ "SHADER_PARAM": ["return_to_default_control_mode"], "CONFIRM": ["perform_confirm_action"], "NAV_DETOUR": ["toggle_detour_play"], - "PLAY_SHADER": ["toggle_shaders", "toggle_shader_speed"] - }, + "PLAY_SHADER": ["toggle_shaders", "toggle_shader_speed"], + "NAV_LFO": ["toggle_lfo_active"], + "NAV_SND": ["toggle_sound_react_active"], + "NAV_QKSH": ["qksh_toggle_display_live"], + "NAV_WJMX": ["wj_toggle_active"] }, "d": { "DEFAULT": ["switch_to_next_player", "toggle_player_mode"], "NAV_DETOUR": ["toggle_detour_record", "toggle_detour_record_loop"] @@ -106,13 +110,15 @@ "DEFAULT": ["set_playing_sample_start_to_current_duration", "clear_playing_sample_start_time"], "SHADER_PARAM": ["decrease_param_focus"], "PLAY_SHADER": ["decrease_param_focus"], - "NAV_DETOUR": ["decrease_mix_shader"] + "NAV_DETOUR": ["decrease_mix_shader"], + "NAV_WJMX": ["wj_select_previous_argument"] }, "f": { "DEFAULT": ["set_playing_sample_end_to_current_duration", "clear_playing_sample_end_time"], "SHADER_PARAM": ["increase_param_focus"], "PLAY_SHADER": ["increase_param_focus"], - "NAV_DETOUR": ["increase_mix_shader"] + "NAV_DETOUR": ["increase_mix_shader"], + "NAV_WJMX": ["wj_select_next_argument"] }, "g": { "DEFAULT": ["toggle_capture_preview", "toggle_capture_recording"]},