Merge branch 'feature_plugins' of https://github.com/langolierz/r_e_c_u_r into feature_plugins

This commit is contained in:
Tristan Rowley
2020-03-14 21:17:45 +00:00
6 changed files with 141 additions and 94 deletions

View File

@@ -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 # r_e_c_u_r
an open diy video sampler an open diy video sampler

View File

@@ -351,8 +351,7 @@ class Display(object):
o += self.get_bar(self.shaders.modulation_level[layer][param][slot]) o += self.get_bar(self.shaders.modulation_level[layer][param][slot])
o+= "] " 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, "%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 # todo: this doesnt work but would be a better way to highlight the selected modulation slot/layer
"""self._highlight_this_param( """self._highlight_this_param(
self.shaders.selected_modulation_slot, self.shaders.selected_modulation_slot,

View File

@@ -1,34 +1,58 @@
{ {
"0": { "0": {
"DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous"], "DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous","set_strobe_amount_continuous"],
"NAV_DETOUR": ["set_detour_mix_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": { "1": {
"DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous"], "DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous","set_shader_speed_layer_0_amount"],
"NAV_DETOUR": ["set_detour_speed_position_continuous"] "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": { "2": {
"DEFAULT": ["set_the_shader_param_2_layer_offset_0_continuous"], "DEFAULT": ["set_the_shader_param_2_layer_offset_0_continuous","set_shader_speed_layer_1_amount"],
"NAV_DETOUR": ["set_detour_start_continuous"] "NAV_DETOUR": ["set_detour_end_continuous"],
}, "NAV_WJMX": ["wj_set_colour_T:x"],
"NAV_LFO": ["set_lfo_modulation_2_level"]
},
"3": { "3": {
"DEFAULT": ["set_the_shader_param_3_layer_offset_0_continuous"], "DEFAULT": ["set_the_shader_param_3_layer_offset_0_continuous","set_shader_speed_layer_2_amount"],
"NAV_DETOUR": ["set_detour_end_continuous"] "NAV_WJMX": ["wj_set_colour_T:y"],
}, "NAV_LFO": ["set_lfo_modulation_3_level"]
},
"4": { "4": {
"DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous"], "DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous","set_strobe_amount_continuous"],
"NAV_DETOUR": ["set_detour_mix_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": { "5": {
"DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous"], "DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous","set_shader_speed_layer_0_amount"],
"NAV_DETOUR": ["set_detour_speed_position_continuous"] "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": { "6": {
"DEFAULT": ["set_the_shader_param_2_layer_offset_0_continuous"], "DEFAULT": ["set_the_shader_param_2_layer_offset_0_continuous","set_shader_speed_layer_1_amount"],
"NAV_DETOUR": ["set_detour_start_continuous"] "NAV_DETOUR": ["set_detour_end_continuous"],
}, "NAV_WJMX": ["wj_set_colour_T:x"],
"NAV_LFO": ["set_lfo_modulation_2_level"]
},
"7": { "7": {
"DEFAULT": ["set_the_shader_param_3_layer_offset_0_continuous"], "DEFAULT": ["set_the_shader_param_3_layer_offset_0_continuous","set_shader_speed_layer_2_amount"],
"NAV_DETOUR": ["set_detour_end_continuous"] "NAV_WJMX": ["wj_set_colour_T:y"],
} "NAV_LFO": ["set_lfo_modulation_3_level"]
}
} }

View File

@@ -113,11 +113,21 @@
"PLAY_SHADER": ["play_shader_9","confirm_shutdown"] "PLAY_SHADER": ["play_shader_9","confirm_shutdown"]
}, },
"x_m": { "x_m": {
"DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous"], "DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous","set_strobe_amount_continuous"],
"NAV_DETOUR": ["set_detour_mix_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": { "y_m": {
"DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous"], "DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous","set_shader_speed_layer_0_amount"],
"NAV_DETOUR": ["set_detour_speed_position_continuous"] "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"]
}
} }

View File

@@ -186,20 +186,22 @@
"PLAY_SHADER": ["play_shader_9","confirm_shutdown"] "PLAY_SHADER": ["play_shader_9","confirm_shutdown"]
}, },
"note_on 36": { "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"], "DEFAULT": ["seek_back_on_player", "decrease_seek_time"],
"NAV_SETTINGS": ["move_settings_selection_up"], "NAV_SETTINGS": ["move_settings_selection_up", "move_settings_selection_page_up"],
"NAV_SHADERS": ["move_shaders_selection_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"], "LENGTH_SET": ["return_to_default_control_mode"],
"CONFIRM": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"],
"SHADER_PARAM": ["decrease_this_param", "decrease_shader_param"], "SHADER_PARAM": ["decrease_this_param", "decrease_shader_param"],
"PLAY_SHADER": ["decrease_this_param", "decrease_shader_param"] "PLAY_SHADER": ["decrease_this_param", "decrease_shader_param"]
}, },
"note_on 37": { "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"], "DEFAULT": ["seek_forward_on_player", "increase_seek_time"],
"NAV_SETTINGS": ["move_settings_selection_down"], "NAV_SETTINGS": ["move_settings_selection_down", "move_settings_selection_page_down"],
"NAV_SHADERS": ["move_shaders_selection_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"], "LENGTH_SET": ["return_to_default_control_mode"],
"CONFIRM": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"],
"SHADER_PARAM": ["increase_this_param", "increase_shader_param"], "SHADER_PARAM": ["increase_this_param", "increase_shader_param"],
@@ -211,6 +213,7 @@
"DEFAULT": ["toggle_action_on_player","toggle_show_on_player"], "DEFAULT": ["toggle_action_on_player","toggle_show_on_player"],
"NAV_SETTINGS": ["enter_on_settings_selection"], "NAV_SETTINGS": ["enter_on_settings_selection"],
"NAV_SHADERS": ["enter_on_shaders_selection", "map_on_shaders_selection"], "NAV_SHADERS": ["enter_on_shaders_selection", "map_on_shaders_selection"],
"NAV_PLUGINS": ["enter_on_plugins_selection"],
"LENGTH_SET": ["record_fixed_length"], "LENGTH_SET": ["record_fixed_length"],
"SHADER_PARAM": ["return_to_default_control_mode"], "SHADER_PARAM": ["return_to_default_control_mode"],
"CONFIRM": ["perform_confirm_action"], "CONFIRM": ["perform_confirm_action"],
@@ -294,6 +297,7 @@
"DEFAULT": ["seek_back_on_player", "decrease_seek_time"], "DEFAULT": ["seek_back_on_player", "decrease_seek_time"],
"NAV_SETTINGS": ["move_settings_selection_up", "move_settings_selection_page_up"], "NAV_SETTINGS": ["move_settings_selection_up", "move_settings_selection_page_up"],
"NAV_SHADERS": ["move_shaders_selection_up", "move_shaders_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"], "LENGTH_SET": ["return_to_default_control_mode"],
"CONFIRM": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"],
"SHADER_PARAM": ["decrease_this_param", "decrease_shader_param"], "SHADER_PARAM": ["decrease_this_param", "decrease_shader_param"],
@@ -304,6 +308,7 @@
"DEFAULT": ["seek_forward_on_player", "increase_seek_time"], "DEFAULT": ["seek_forward_on_player", "increase_seek_time"],
"NAV_SETTINGS": ["move_settings_selection_down", "move_settings_selection_page_down"], "NAV_SETTINGS": ["move_settings_selection_down", "move_settings_selection_page_down"],
"NAV_SHADERS": ["move_shaders_selection_down", "move_shaders_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"], "LENGTH_SET": ["return_to_default_control_mode"],
"CONFIRM": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"],
"SHADER_PARAM": ["increase_this_param", "increase_shader_param"], "SHADER_PARAM": ["increase_this_param", "increase_shader_param"],
@@ -314,6 +319,7 @@
"DEFAULT": ["seek_back_on_player", "decrease_seek_time"], "DEFAULT": ["seek_back_on_player", "decrease_seek_time"],
"NAV_SETTINGS": ["move_settings_selection_up", "move_settings_selection_page_up"], "NAV_SETTINGS": ["move_settings_selection_up", "move_settings_selection_page_up"],
"NAV_SHADERS": ["move_shaders_selection_up", "move_shaders_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"], "LENGTH_SET": ["return_to_default_control_mode"],
"CONFIRM": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"],
"SHADER_PARAM": ["decrease_this_param", "decrease_shader_param"], "SHADER_PARAM": ["decrease_this_param", "decrease_shader_param"],

View File

@@ -1,71 +1,91 @@
{ {
"/shaderparam0": { "/shaderparam0": {
"DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous"], "DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous","set_strobe_amount_continuous"],
"NAV_DETOUR": ["set_detour_mix_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": { "/shaderparam1": {
"DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous"], "DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous","set_shader_speed_layer_0_amount"],
"NAV_DETOUR": ["set_detour_speed_position_continuous"] "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": { "/shaderparam2": {
"DEFAULT": ["set_the_shader_param_2_layer_offset_0_continuous"], "DEFAULT": ["set_the_shader_param_2_layer_offset_0_continuous","set_shader_speed_layer_1_amount"],
"NAV_DETOUR": ["set_detour_start_continuous"] "NAV_DETOUR": ["set_detour_end_continuous"],
}, "NAV_WJMX": ["wj_set_colour_T:x"],
"NAV_LFO": ["set_lfo_modulation_2_level"]
},
"/shaderparam3": { "/shaderparam3": {
"DEFAULT": ["set_the_shader_param_3_layer_offset_0_continuous"], "DEFAULT": ["set_the_shader_param_3_layer_offset_0_continuous","set_shader_speed_layer_2_amount"],
"NAV_DETOUR": ["set_detour_end_continuous"] "NAV_WJMX": ["wj_set_colour_T:y"],
}, "NAV_LFO": ["set_lfo_modulation_3_level"]
"/shaderparam4": { },
"DEFAULT": ["set_the_shader_param_0_layer_offset_1_continuous"] "/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": { "/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": { "/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": { "/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": { "/shaderparam8": {
"DEFAULT": ["set_the_shader_param_0_layer_offset_2_continuous"] "DEFAULT": ["set_the_shader_param_0_layer_offset_2_continuous"]
}, },
"/shaderparam9": { "/shaderparam9": {
"DEFAULT": ["set_the_shader_param_1_layer_offset_2_continuous"] "DEFAULT": ["set_the_shader_param_1_layer_offset_2_continuous"]
}, },
"/shaderparam10": { "/shaderparam10": {
"DEFAULT": ["set_the_shader_param_2_layer_offset_2_continuous"] "DEFAULT": ["set_the_shader_param_2_layer_offset_2_continuous"]
}, },
"/shaderparam11": { "/shaderparam11": {
"DEFAULT": ["set_the_shader_param_3_layer_offset_2_continuous"] "DEFAULT": ["set_the_shader_param_3_layer_offset_2_continuous"]
}, },
"/shaderparam12": { "/shaderparam12": {
"DEFAULT": ["set_strobe_amount_continuous"] "DEFAULT": ["set_strobe_amount_continuous"]
}, },
"a": { "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"], "NAV_BROWSER": ["move_browser_selection_down", "move_browser_selection_page_down"],
"DEFAULT": ["seek_forward_on_player", "increase_seek_time"], "DEFAULT": ["seek_forward_on_player", "increase_seek_time"],
"NAV_SETTINGS": ["move_settings_selection_down", "move_settings_selection_page_down"], "NAV_SETTINGS": ["move_settings_selection_down", "move_settings_selection_page_down"],
"NAV_SHADERS": ["move_shaders_selection_down", "move_shaders_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"], "LENGTH_SET": ["return_to_default_control_mode"],
"CONFIRM": ["return_to_default_control_mode"], "CONFIRM": ["return_to_default_control_mode"],
"SHADER_PARAM": ["increase_this_param", "increase_shader_param"], "SHADER_PARAM": ["increase_this_param", "increase_shader_param"],
"PLAY_SHADER": ["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": { "c": {
"NAV_BROWSER": ["enter_on_browser_selection"], "NAV_BROWSER": ["enter_on_browser_selection"],
"DEFAULT": ["toggle_action_on_player","toggle_show_on_player"], "DEFAULT": ["toggle_action_on_player","toggle_show_on_player"],
@@ -147,8 +167,8 @@
}, },
"s": { "s": {
"DEFAULT": ["load_slot_9_into_next_player","confirm_shutdown"], "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": { "toggle_x3": {
"DEFAULT": ["toggle_x3_as_speed"] "DEFAULT": ["toggle_x3_as_speed"]
}, },