mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-13 11:50:12 +01:00
refactor shader calling slightly, added the start of apckey25 mapping
This commit is contained in:
313
json_objects/midi_action_mapping_apckey25.json
Normal file
313
json_objects/midi_action_mapping_apckey25.json
Normal file
@@ -0,0 +1,313 @@
|
||||
{
|
||||
"control_change 0": {
|
||||
"DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_mix_continuous"]
|
||||
},
|
||||
"control_change 1": {
|
||||
"DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_speed_position_continuous"]
|
||||
},
|
||||
"control_change 2": {
|
||||
"DEFAULT": ["set_the_shader_param_2_layer_offset_0_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_start_continuous"]
|
||||
},
|
||||
"control_change 3": {
|
||||
"DEFAULT": ["set_the_shader_param_3_layer_offset_0_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_end_continuous"]
|
||||
},
|
||||
"control_change 4": {
|
||||
"DEFAULT": ["set_the_shader_param_0_layer_offset_1_continuous"]
|
||||
},
|
||||
"control_change 5": {
|
||||
"DEFAULT": ["set_the_shader_param_1_layer_offset_1_continuous"]
|
||||
},
|
||||
"control_change 6": {
|
||||
"DEFAULT": ["set_the_shader_param_2_layer_offset_1_continuous"]
|
||||
},
|
||||
"control_change 7": {
|
||||
"DEFAULT": ["set_the_shader_param_3_layer_offset_1_continuous"]
|
||||
},
|
||||
"control_change 8": {
|
||||
"DEFAULT": ["set_the_shader_param_0_layer_offset_2_continuous"]
|
||||
},
|
||||
"control_change 9": {
|
||||
"DEFAULT": ["set_the_shader_param_1_layer_offset_2_continuous"]
|
||||
},
|
||||
"control_change 10": {
|
||||
"DEFAULT": ["set_the_shader_param_2_layer_offset_2_continuous"]
|
||||
},
|
||||
"control_change 11": {
|
||||
"DEFAULT": ["set_the_shader_param_3_layer_offset_2_continuous"]
|
||||
},
|
||||
"control_change 48": {
|
||||
"DEFAULT": ["set_the_shader_param_0_layer_offset_0_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_speed_position_continuous"]
|
||||
},
|
||||
"control_change 49": {
|
||||
"DEFAULT": ["set_the_shader_param_1_layer_offset_0_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_start_continuous"]
|
||||
},
|
||||
"control_change 50": {
|
||||
"DEFAULT": ["set_the_shader_param_2_layer_offset_0_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_end_continuous"]
|
||||
},
|
||||
"control_change 51": {
|
||||
"DEFAULT": ["set_the_shader_param_3_layer_offset_0_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_end_continuous"]
|
||||
},
|
||||
"control_change 52": {
|
||||
"DEFAULT": ["set_the_shader_param_0_layer_offset_1_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_speed_position_continuous"]
|
||||
},
|
||||
"control_change 53": {
|
||||
"DEFAULT": ["set_the_shader_param_1_layer_offset_1_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_start_continuous"]
|
||||
},
|
||||
"control_change 54": {
|
||||
"DEFAULT": ["set_the_shader_param_2_layer_offset_1_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_end_continuous"]
|
||||
},
|
||||
"control_change 55": {
|
||||
"DEFAULT": ["set_the_shader_param_3_layer_offset_1_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_end_continuous"]
|
||||
},
|
||||
"control_change 56": {
|
||||
"DEFAULT": ["set_the_shader_param_0_layer_offset_2_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_speed_position_continuous"]
|
||||
},
|
||||
"control_change 57": {
|
||||
"DEFAULT": ["set_the_shader_param_1_layer_offset_2_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_start_continuous"]
|
||||
},
|
||||
"control_change 58": {
|
||||
"DEFAULT": ["set_the_shader_param_2_layer_offset_2_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_end_continuous"]
|
||||
},
|
||||
"control_change 59": {
|
||||
"DEFAULT": ["set_the_shader_param_3_layer_offset_2_continuous"],
|
||||
"NAV_DETOUR": ["set_detour_end_continuous"]
|
||||
},
|
||||
|
||||
"note_on 0": {
|
||||
"DEFAULT": ["play_shader_0_0"]
|
||||
},
|
||||
"note_on 1": {
|
||||
"DEFAULT": ["play_shader_1_0"]
|
||||
},
|
||||
"note_on 2": {
|
||||
"DEFAULT": ["play_shader_2_0"]
|
||||
},
|
||||
|
||||
|
||||
|
||||
"control_change 12": {
|
||||
"DEFAULT": ["set_strobe_amount_continuous"]
|
||||
},
|
||||
"note_on 72": {
|
||||
"NAV_BROWSER": ["move_browser_selection_up"],
|
||||
"DEFAULT": ["seek_back_on_player", "decrease_seek_time"],
|
||||
"NAV_SETTINGS": ["move_settings_selection_up"],
|
||||
"NAV_SHADERS": ["move_shaders_selection_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 73": {
|
||||
"NAV_BROWSER": ["move_browser_selection_down"],
|
||||
"DEFAULT": ["seek_forward_on_player", "increase_seek_time"],
|
||||
"NAV_SETTINGS": ["move_settings_selection_down"],
|
||||
"NAV_SHADERS": ["move_shaders_selection_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"]
|
||||
|
||||
},
|
||||
"note_on 74": {
|
||||
"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"],
|
||||
"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"]
|
||||
},
|
||||
"note_on 75": {
|
||||
"DEFAULT": ["switch_to_next_player", "toggle_player_mode"],
|
||||
"NAV_DETOUR": ["toggle_detour_record", "toggle_detour_record_loop"]
|
||||
},
|
||||
"note_on 76": {
|
||||
"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"]
|
||||
},
|
||||
"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"]
|
||||
},
|
||||
"note_on 78": {
|
||||
"DEFAULT": ["toggle_capture_preview", "toggle_capture_recording"]},
|
||||
"note_on 79": {
|
||||
"DEFAULT": ["cycle_display_mode", "cycle_display_mode_back"]
|
||||
},
|
||||
"note_on 80": {
|
||||
"DEFAULT": ["toggle_function"]
|
||||
},
|
||||
"note_on 81": {
|
||||
"DEFAULT": ["load_slot_0_into_next_player","previous_bank"],
|
||||
"PLAY_SHADER": ["play_shader_0","previous_shader_layer"],
|
||||
"NAV_SHADERS": ["play_shader_0","previous_shader_layer"],
|
||||
"NAV_DETOUR": ["switch_to_detour_0", "set_the_detour_mix_0"]
|
||||
},
|
||||
"note_on 82": {
|
||||
"DEFAULT": ["load_slot_1_into_next_player","next_bank"],
|
||||
"PLAY_SHADER": ["play_shader_1","next_shader_layer"],
|
||||
"NAV_SHADERS": ["play_shader_1","next_shader_layer"],
|
||||
"NAV_DETOUR": ["switch_to_detour_1", "set_the_detour_mix_1"]
|
||||
},
|
||||
"note_on 83": {
|
||||
"DEFAULT": ["load_slot_2_into_next_player","clear_all_slots"],
|
||||
"PLAY_SHADER": ["play_shader_2","clear_shader_bank"],
|
||||
"NAV_SHADERS": ["play_shader_2","clear_shader_bank"],
|
||||
"NAV_DETOUR": ["switch_to_detour_2", "clear_this_detour"]
|
||||
},
|
||||
"note_on 84": {
|
||||
"DEFAULT": ["load_slot_3_into_next_player"],
|
||||
"PLAY_SHADER": ["play_shader_3"],
|
||||
"NAV_DETOUR": ["switch_to_detour_3"]
|
||||
},
|
||||
"note_on 85": {
|
||||
"DEFAULT": ["load_slot_4_into_next_player"],
|
||||
"PLAY_SHADER": ["play_shader_4"]
|
||||
},
|
||||
"note_on 86": {
|
||||
"DEFAULT": ["load_slot_5_into_next_player","toggle_screen_mirror"],
|
||||
"PLAY_SHADER": ["play_shader_5", "toggle_screen_mirror"]
|
||||
},
|
||||
"note_on 87": {
|
||||
"DEFAULT": ["load_slot_6_into_next_player","toggle_shaders"],
|
||||
"PLAY_SHADER": ["play_shader_6","toggle_shaders"]
|
||||
},
|
||||
"note_on 88": {
|
||||
"DEFAULT": ["load_slot_7_into_next_player", "toggle_detour_mode"],
|
||||
"PLAY_SHADER": ["play_shader_7","toggle_detour_mode"]
|
||||
},
|
||||
"note_on 89": {
|
||||
"DEFAULT": ["load_slot_8_into_next_player", "toggle_feedback"],
|
||||
"PLAY_SHADER": ["play_shader_8", "toggle_feedback"]
|
||||
},
|
||||
"note_on 90": {
|
||||
"DEFAULT": ["load_slot_9_into_next_player","confirm_shutdown"],
|
||||
"PLAY_SHADER": ["play_shader_9","confirm_shutdown"]
|
||||
},
|
||||
"note_on 36": {
|
||||
"NAV_BROWSER": ["move_browser_selection_up"],
|
||||
"DEFAULT": ["seek_back_on_player", "decrease_seek_time"],
|
||||
"NAV_SETTINGS": ["move_settings_selection_up"],
|
||||
"NAV_SHADERS": ["move_shaders_selection_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"],
|
||||
"DEFAULT": ["seek_forward_on_player", "increase_seek_time"],
|
||||
"NAV_SETTINGS": ["move_settings_selection_down"],
|
||||
"NAV_SHADERS": ["move_shaders_selection_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"]
|
||||
|
||||
},
|
||||
"note_on 38": {
|
||||
"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"],
|
||||
"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"]
|
||||
},
|
||||
"note_on 39": {
|
||||
"DEFAULT": ["switch_to_next_player", "toggle_player_mode"],
|
||||
"NAV_DETOUR": ["toggle_detour_record", "toggle_detour_record_loop"]
|
||||
},
|
||||
"note_on 40": {
|
||||
"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"]
|
||||
},
|
||||
"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"]
|
||||
},
|
||||
"note_on 42": {
|
||||
"DEFAULT": ["toggle_capture_preview", "toggle_capture_recording"]},
|
||||
"note_on 43": {
|
||||
"DEFAULT": ["cycle_display_mode", "cycle_display_mode_back"]
|
||||
},
|
||||
"note_on 44": {
|
||||
"DEFAULT": ["toggle_function"]
|
||||
},
|
||||
"note_on 45": {
|
||||
"DEFAULT": ["load_slot_0_into_next_player","previous_bank"],
|
||||
"PLAY_SHADER": ["play_shader_0","previous_shader_layer"],
|
||||
"NAV_SHADERS": ["play_shader_0","previous_shader_layer"],
|
||||
"NAV_DETOUR": ["switch_to_detour_0", "set_the_detour_mix_0"]
|
||||
},
|
||||
"note_on 46": {
|
||||
"DEFAULT": ["load_slot_1_into_next_player","next_bank"],
|
||||
"PLAY_SHADER": ["play_shader_1","next_shader_layer"],
|
||||
"NAV_SHADERS": ["play_shader_1","next_shader_layer"],
|
||||
"NAV_DETOUR": ["switch_to_detour_1", "set_the_detour_mix_1"]
|
||||
},
|
||||
"note_on 47": {
|
||||
"DEFAULT": ["load_slot_2_into_next_player","clear_all_slots"],
|
||||
"PLAY_SHADER": ["play_shader_2","clear_shader_bank"],
|
||||
"NAV_SHADERS": ["play_shader_2","clear_shader_bank"],
|
||||
"NAV_DETOUR": ["switch_to_detour_2", "clear_this_detour"]
|
||||
},
|
||||
"note_on 48": {
|
||||
"DEFAULT": ["load_slot_3_into_next_player"],
|
||||
"PLAY_SHADER": ["play_shader_3"],
|
||||
"NAV_DETOUR": ["switch_to_detour_3"]
|
||||
},
|
||||
"note_on 49": {
|
||||
"DEFAULT": ["load_slot_4_into_next_player"],
|
||||
"PLAY_SHADER": ["play_shader_4"]
|
||||
},
|
||||
"note_on 50": {
|
||||
"DEFAULT": ["load_slot_5_into_next_player","toggle_screen_mirror"],
|
||||
"PLAY_SHADER": ["play_shader_5", "toggle_screen_mirror"]
|
||||
},
|
||||
"note_on 51": {
|
||||
"DEFAULT": ["load_slot_6_into_next_player","toggle_shaders"],
|
||||
"PLAY_SHADER": ["play_shader_6","toggle_shaders"]
|
||||
},
|
||||
"note_on 52": {
|
||||
"DEFAULT": ["load_slot_7_into_next_player", "toggle_detour_mode"],
|
||||
"PLAY_SHADER": ["play_shader_7","toggle_detour_mode"]
|
||||
},
|
||||
"note_on 53": {
|
||||
"DEFAULT": ["load_slot_8_into_next_player", "toggle_feedback"],
|
||||
"PLAY_SHADER": ["play_shader_8", "toggle_feedback"]
|
||||
},
|
||||
"note_on 54": {
|
||||
"DEFAULT": ["load_slot_9_into_next_player","confirm_shutdown"],
|
||||
"PLAY_SHADER": ["play_shader_9","confirm_shutdown"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,14 +112,17 @@ class Shaders(object):
|
||||
self.shaders_menu_list = self.generate_shaders_list()
|
||||
return is_file, is_selected_shader, selected_shader
|
||||
|
||||
def play_this_shader(self, slot):
|
||||
print(self.data.shader_bank_data[self.data.shader_layer])
|
||||
if self.data.shader_bank_data[self.data.shader_layer][slot]['path']:
|
||||
self.selected_shader_list[self.data.shader_layer] = self.data.shader_bank_data[self.data.shader_layer][slot]
|
||||
self.selected_shader_list[self.data.shader_layer]['slot'] = slot
|
||||
def play_that_shader(self, bank, slot):
|
||||
if self.data.shader_bank_data[bank][slot]['path']:
|
||||
self.selected_shader_list[bank] = self.data.shader_bank_data[bank][slot]
|
||||
self.selected_shader_list[bank]['slot'] = slot
|
||||
self.load_selected_shader()
|
||||
else:
|
||||
self.message_handler.set_message('INFO', 'this slot is empty')
|
||||
self.message_handler.set_message('INFO', "shader slot %s:%s is empty"%(bank,slot))
|
||||
|
||||
def play_this_shader(self, slot):
|
||||
print(self.data.shader_bank_data[self.data.shader_layer])
|
||||
self.play_that_shader(self.data.shader_layer, slot)
|
||||
|
||||
def increase_this_param(self, amount_change):
|
||||
param = self.focused_param
|
||||
|
||||
Reference in New Issue
Block a user