From 1863655c095d420815df5c6c1779812c8638ae3d Mon Sep 17 00:00:00 2001 From: langolierz Date: Sat, 14 Mar 2020 17:14:28 +0000 Subject: [PATCH] updated mappings and small fixes --- README.md | 12 --- data_centre/data.py | 2 +- display_centre/display.py | 3 +- json_objects/analog_action_mapping.json | 72 ++++++++++------ json_objects/keypad_action_mapping.json | 22 +++-- json_objects/midi_action_mapping.json | 18 ++-- json_objects/osc_action_mapping.json | 108 ++++++++++++++---------- 7 files changed, 142 insertions(+), 95 deletions(-) diff --git a/README.md b/README.md index 3d0d868..f8e37c7 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,3 @@ -This is doctea's experimental 'plugins' branch, including 'shader gadget' plugins. - -Documentation for some of these features on the wiki here: -* https://github.com/langolierz/r_e_c_u_r/wiki/using-the-modulation-parameters -* https://github.com/langolierz/r_e_c_u_r/wiki/Plugins - -Some quick notes, including about how the modulation features work:- - -* Demo useful plugins are here in this shader gadgets branch, demonstrating shader presets and automation recording - -Any questions ask me doctea@gmail.com, find me on facebook or open an issue or something :) - # r_e_c_u_r an open diy video sampler diff --git a/data_centre/data.py b/data_centre/data.py index 6e3763c..21ee858 100644 --- a/data_centre/data.py +++ b/data_centre/data.py @@ -466,7 +466,7 @@ class Data(object): if self.settings['video']['VIDEOPLAYER_BACKEND']['value'] != 'omxplayer' and self.settings['shader']['USE_SHADER']['value'] == 'enabled': display_modes.append(["SHADERS",'NAV_SHADERS']) if self.settings['shader']['USE_SHADER_BANK']['value'] == 'enabled' and ["SHADERS",'NAV_SHADERS'] in display_modes: - display_modes.append(["SHDRBNK",'PLAY_SHADER']) + display_modes.append(["SHDR_BNK",'PLAY_SHADER']) if self.settings['shader']['USE_SHADER_MOD']['value'] == 'enabled' and ["SHADERS",'NAV_SHADERS'] in display_modes: display_modes.append(["SHDR_MOD","NAV_MOD"]) ## allow override, but fall back to PLAY_SHADER controls if self.settings['detour']['TRY_DEMO']['value'] == 'enabled': diff --git a/display_centre/display.py b/display_centre/display.py index 978a032..d6d6991 100644 --- a/display_centre/display.py +++ b/display_centre/display.py @@ -351,8 +351,7 @@ class Display(object): o += self.get_bar(self.shaders.modulation_level[layer][param][slot]) o+= "] " self.display_text.insert(END, "%s %s:\t%s\n\n"%(">" if layer==self.data.shader_layer else " ", layer, o)) - - + self.display_text.insert(END, '\n') # todo: this doesnt work but would be a better way to highlight the selected modulation slot/layer """self._highlight_this_param( self.shaders.selected_modulation_slot, diff --git a/json_objects/analog_action_mapping.json b/json_objects/analog_action_mapping.json index a022ac7..6555b0a 100644 --- a/json_objects/analog_action_mapping.json +++ b/json_objects/analog_action_mapping.json @@ -1,34 +1,58 @@ { "0": { - "DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous"], - "NAV_DETOUR": ["set_detour_mix_continuous"] - }, + "DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous","set_strobe_amount_continuous"], + "NAV_DETOUR": ["set_detour_speed_position_continuous"], + "NAV_WJMX": ["wj_set_position_N:x"], + "NAV_MANI": ["set_variable_A"], + "NAV_LPRC": ["set_automation_speed"], + "NAV_LFO": ["set_lfo_modulation_0_level"], + "NAV_SND": ["sound_set_config_energy_gain"] + }, "1": { - "DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous"], - "NAV_DETOUR": ["set_detour_speed_position_continuous"] - }, + "DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous","set_shader_speed_layer_0_amount"], + "NAV_DETOUR": ["set_detour_start_continuous"], + "NAV_WJMX": ["wj_set_position_N:y"], + "NAV_MANI": ["f:sin(x*pi):|set_variable_SIN"], + "NAV_LFO": ["set_lfo_modulation_1_level"], + "NAV_SND": ["sound_set_config_energy_threshold"] + }, "2": { - "DEFAULT": ["set_the_shader_param_2_layer_offset_0_continuous"], - "NAV_DETOUR": ["set_detour_start_continuous"] - }, + "DEFAULT": ["set_the_shader_param_2_layer_offset_0_continuous","set_shader_speed_layer_1_amount"], + "NAV_DETOUR": ["set_detour_end_continuous"], + "NAV_WJMX": ["wj_set_colour_T:x"], + "NAV_LFO": ["set_lfo_modulation_2_level"] + }, "3": { - "DEFAULT": ["set_the_shader_param_3_layer_offset_0_continuous"], - "NAV_DETOUR": ["set_detour_end_continuous"] - }, + "DEFAULT": ["set_the_shader_param_3_layer_offset_0_continuous","set_shader_speed_layer_2_amount"], + "NAV_WJMX": ["wj_set_colour_T:y"], + "NAV_LFO": ["set_lfo_modulation_3_level"] + }, "4": { - "DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous"], - "NAV_DETOUR": ["set_detour_mix_continuous"] - }, + "DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous","set_strobe_amount_continuous"], + "NAV_DETOUR": ["set_detour_speed_position_continuous"], + "NAV_WJMX": ["wj_set_position_N:x"], + "NAV_MANI": ["set_variable_A"], + "NAV_LPRC": ["set_automation_speed"], + "NAV_LFO": ["set_lfo_modulation_0_level"], + "NAV_SND": ["sound_set_config_energy_gain"] + }, "5": { - "DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous"], - "NAV_DETOUR": ["set_detour_speed_position_continuous"] - }, + "DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous","set_shader_speed_layer_0_amount"], + "NAV_DETOUR": ["set_detour_start_continuous"], + "NAV_WJMX": ["wj_set_position_N:y"], + "NAV_MANI": ["f:sin(x*pi):|set_variable_SIN"], + "NAV_LFO": ["set_lfo_modulation_1_level"], + "NAV_SND": ["sound_set_config_energy_threshold"] + }, "6": { - "DEFAULT": ["set_the_shader_param_2_layer_offset_0_continuous"], - "NAV_DETOUR": ["set_detour_start_continuous"] - }, + "DEFAULT": ["set_the_shader_param_2_layer_offset_0_continuous","set_shader_speed_layer_1_amount"], + "NAV_DETOUR": ["set_detour_end_continuous"], + "NAV_WJMX": ["wj_set_colour_T:x"], + "NAV_LFO": ["set_lfo_modulation_2_level"] + }, "7": { - "DEFAULT": ["set_the_shader_param_3_layer_offset_0_continuous"], - "NAV_DETOUR": ["set_detour_end_continuous"] - } + "DEFAULT": ["set_the_shader_param_3_layer_offset_0_continuous","set_shader_speed_layer_2_amount"], + "NAV_WJMX": ["wj_set_colour_T:y"], + "NAV_LFO": ["set_lfo_modulation_3_level"] + } } diff --git a/json_objects/keypad_action_mapping.json b/json_objects/keypad_action_mapping.json index ff62ca5..b1f8d89 100644 --- a/json_objects/keypad_action_mapping.json +++ b/json_objects/keypad_action_mapping.json @@ -113,11 +113,21 @@ "PLAY_SHADER": ["play_shader_9","confirm_shutdown"] }, "x_m": { - "DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous"], - "NAV_DETOUR": ["set_detour_mix_continuous"] - }, + "DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous","set_strobe_amount_continuous"], + "NAV_DETOUR": ["set_detour_speed_position_continuous"], + "NAV_WJMX": ["wj_set_position_N:x"], + "NAV_MANI": ["set_variable_A"], + "NAV_LPRC": ["set_automation_speed"], + "NAV_LFO": ["set_lfo_modulation_0_level"], + "NAV_SND": ["sound_set_config_energy_gain"] + }, "y_m": { - "DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous"], - "NAV_DETOUR": ["set_detour_speed_position_continuous"] - } + "DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous","set_shader_speed_layer_0_amount"], + "NAV_DETOUR": ["set_detour_start_continuous"], + "NAV_WJMX": ["wj_set_position_N:y"], + "NAV_MANI": ["f:sin(x*pi):|set_variable_SIN"], + "NAV_LFO": ["set_lfo_modulation_1_level"], + "NAV_SND": ["sound_set_config_energy_threshold"] + } + } diff --git a/json_objects/midi_action_mapping.json b/json_objects/midi_action_mapping.json index cdfd8a3..8193a86 100644 --- a/json_objects/midi_action_mapping.json +++ b/json_objects/midi_action_mapping.json @@ -186,20 +186,22 @@ "PLAY_SHADER": ["play_shader_9","confirm_shutdown"] }, "note_on 36": { - "NAV_BROWSER": ["move_browser_selection_up"], + "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"], - "NAV_SHADERS": ["move_shaders_selection_up"], + "NAV_SETTINGS": ["move_settings_selection_up", "move_settings_selection_page_up"], + "NAV_SHADERS": ["move_shaders_selection_up", "move_shaders_selection_page_up"], + "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"] }, "note_on 37": { - "NAV_BROWSER": ["move_browser_selection_down"], + "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"], - "NAV_SHADERS": ["move_shaders_selection_down"], + "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"], @@ -211,6 +213,7 @@ "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"], @@ -294,6 +297,7 @@ "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": ["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"], @@ -304,6 +308,7 @@ "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"], @@ -314,6 +319,7 @@ "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"], "LENGTH_SET": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"], "SHADER_PARAM": ["decrease_this_param", "decrease_shader_param"], diff --git a/json_objects/osc_action_mapping.json b/json_objects/osc_action_mapping.json index 60a2c94..03e8427 100644 --- a/json_objects/osc_action_mapping.json +++ b/json_objects/osc_action_mapping.json @@ -1,71 +1,91 @@ { "/shaderparam0": { - "DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous"], - "NAV_DETOUR": ["set_detour_mix_continuous"] - }, + "DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous","set_strobe_amount_continuous"], + "NAV_DETOUR": ["set_detour_speed_position_continuous"], + "NAV_WJMX": ["wj_set_position_N:x"], + "NAV_MANI": ["set_variable_A"], + "NAV_LPRC": ["set_automation_speed"], + "NAV_LFO": ["set_lfo_modulation_0_level"], + "NAV_SND": ["sound_set_config_energy_gain"] + }, "/shaderparam1": { - "DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous"], - "NAV_DETOUR": ["set_detour_speed_position_continuous"] - }, + "DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous","set_shader_speed_layer_0_amount"], + "NAV_DETOUR": ["set_detour_start_continuous"], + "NAV_WJMX": ["wj_set_position_N:y"], + "NAV_MANI": ["f:sin(x*pi):|set_variable_SIN"], + "NAV_LFO": ["set_lfo_modulation_1_level"], + "NAV_SND": ["sound_set_config_energy_threshold"] + }, "/shaderparam2": { - "DEFAULT": ["set_the_shader_param_2_layer_offset_0_continuous"], - "NAV_DETOUR": ["set_detour_start_continuous"] - }, + "DEFAULT": ["set_the_shader_param_2_layer_offset_0_continuous","set_shader_speed_layer_1_amount"], + "NAV_DETOUR": ["set_detour_end_continuous"], + "NAV_WJMX": ["wj_set_colour_T:x"], + "NAV_LFO": ["set_lfo_modulation_2_level"] + }, "/shaderparam3": { - "DEFAULT": ["set_the_shader_param_3_layer_offset_0_continuous"], - "NAV_DETOUR": ["set_detour_end_continuous"] - }, - "/shaderparam4": { - "DEFAULT": ["set_the_shader_param_0_layer_offset_1_continuous"] - }, + "DEFAULT": ["set_the_shader_param_3_layer_offset_0_continuous","set_shader_speed_layer_2_amount"], + "NAV_WJMX": ["wj_set_colour_T:y"], + "NAV_LFO": ["set_lfo_modulation_3_level"] + }, + "/shaderparam04": { + "DEFAULT": ["set_the_shader_param_0_layer_offset_1_continuous","set_param_0_layer_offset_0_modulation_level_continuous"], + "NAV_WJMX": ["wj_set_mix","wj_set_current_modulation_slot_0_level"], + "NAV_LFO": ["set_lfo_speed"], + "NAV_SND": ["sound_set_modulation_energy_slot_0_level"] + }, "/shaderparam5": { - "DEFAULT": ["set_the_shader_param_1_layer_offset_1_continuous"] - }, + "DEFAULT": ["set_the_shader_param_1_layer_offset_1_continuous","set_param_1_layer_offset_0_modulation_level_continuous"], + "NAV_WJMX": ["wj_set_back_colour:h","wj_set_current_modulation_slot_1_level"], + "NAV_SND": ["sound_set_modulation_energy_slot_1_level"] + }, "/shaderparam6": { - "DEFAULT": ["set_the_shader_param_2_layer_offset_1_continuous"] - }, + "DEFAULT": ["set_the_shader_param_2_layer_offset_1_continuous","set_param_2_layer_offset_0_modulation_level_continuous"], + "NAV_WJMX": ["wj_set_back_colour:s","wj_set_current_modulation_slot_2_level"], + "NAV_SND": ["sound_set_modulation_energy_slot_2_level"] + }, "/shaderparam7": { - "DEFAULT": ["set_the_shader_param_3_layer_offset_1_continuous"] - }, + "DEFAULT": ["set_the_shader_param_3_layer_offset_1_continuous","set_param_3_layer_offset_0_modulation_level_continuous"], + "NAV_WJMX": ["wj_set_back_colour:v","wj_set_current_modulation_slot_3_level"], + "NAV_SND": ["sound_set_modulation_energy_slot_3_level"] + }, "/shaderparam8": { - "DEFAULT": ["set_the_shader_param_0_layer_offset_2_continuous"] - }, + "DEFAULT": ["set_the_shader_param_0_layer_offset_2_continuous"] + }, "/shaderparam9": { - "DEFAULT": ["set_the_shader_param_1_layer_offset_2_continuous"] - }, + "DEFAULT": ["set_the_shader_param_1_layer_offset_2_continuous"] + }, "/shaderparam10": { - "DEFAULT": ["set_the_shader_param_2_layer_offset_2_continuous"] - }, + "DEFAULT": ["set_the_shader_param_2_layer_offset_2_continuous"] + }, "/shaderparam11": { - "DEFAULT": ["set_the_shader_param_3_layer_offset_2_continuous"] - }, + "DEFAULT": ["set_the_shader_param_3_layer_offset_2_continuous"] + }, "/shaderparam12": { "DEFAULT": ["set_strobe_amount_continuous"] }, "a": { + "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": ["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"] + }, + "b": { "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_up", "move_plugins_selection_page_up"], + "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"] }, - "b": { - "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": ["move_plugins_selection_down", "move_plugins_selection_page_down"], - "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"] - }, "c": { "NAV_BROWSER": ["enter_on_browser_selection"], "DEFAULT": ["toggle_action_on_player","toggle_show_on_player"], @@ -147,8 +167,8 @@ }, "s": { "DEFAULT": ["load_slot_9_into_next_player","confirm_shutdown"], - "PLAY_SHADER": ["play_shader_9","confirm_shutdown"] - }, + "PLAY_SHADER": ["play_shader_9","confirm_shutdown"] + }, "toggle_x3": { "DEFAULT": ["toggle_x3_as_speed"] },