mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-12 03:10:17 +01:00
fixes to example plugin !
This commit is contained in:
@@ -30,10 +30,10 @@ class MidiActionsTestPlugin(ActionsPlugin,SequencePlugin):
|
|||||||
self.cycle_count = 0
|
self.cycle_count = 0
|
||||||
|
|
||||||
for i,shader in enumerate(self.pc.message_handler.shaders.selected_shader_list):
|
for i,shader in enumerate(self.pc.message_handler.shaders.selected_shader_list):
|
||||||
self.pc.midi_input.call_method_name(
|
self.pc.actions.call_method_name(
|
||||||
"play_shader_%s_%s" % (i, self.cycle_count), None
|
"play_shader_%s_%s" % (i, self.cycle_count), None
|
||||||
)
|
)
|
||||||
self.pc.midi_input.call_method_name(
|
self.pc.actions.call_method_name(
|
||||||
"start_shader_layer_%s" % i, None
|
"start_shader_layer_%s" % i, None
|
||||||
)
|
)
|
||||||
self.cycle_count += 1
|
self.cycle_count += 1
|
||||||
@@ -41,11 +41,11 @@ class MidiActionsTestPlugin(ActionsPlugin,SequencePlugin):
|
|||||||
duration = 5000
|
duration = 5000
|
||||||
frequency = 50
|
frequency = 50
|
||||||
def run_sequence(self, position):
|
def run_sequence(self, position):
|
||||||
self.pc.midi_input.call_method_name(
|
self.pc.actions.call_method_name(
|
||||||
"set_the_shader_param_0_layer_0_continuous", position
|
"set_the_shader_param_0_layer_0_continuous", position
|
||||||
)
|
)
|
||||||
|
|
||||||
self.pc.midi_input.call_method_name(
|
self.pc.actions.call_method_name(
|
||||||
"set_the_shader_param_1_layer_0_continuous", position
|
"set_the_shader_param_1_layer_0_continuous", position
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class MidiFeedbackAPCKey25Plugin(MidiFeedbackPlugin):
|
|||||||
|
|
||||||
def get_note(self,action,default):
|
def get_note(self,action,default):
|
||||||
bind = self.pc.midi_input.find_binding_for_action(action)
|
bind = self.pc.midi_input.find_binding_for_action(action)
|
||||||
if 'note ' in bind:
|
if bind and 'note ' in bind:
|
||||||
return int(play_bind.split(' ')[1])
|
return int(play_bind.split(' ')[1])
|
||||||
else:
|
else:
|
||||||
return default
|
return default
|
||||||
@@ -128,7 +128,8 @@ class MidiFeedbackAPCKey25Plugin(MidiFeedbackPlugin):
|
|||||||
colour = self.COLOUR_OFF
|
colour = self.COLOUR_OFF
|
||||||
self.set_status(command='note_on', note=self.NOTE_CLIP_STATUS_ROW+i, velocity=colour)
|
self.set_status(command='note_on', note=self.NOTE_CLIP_STATUS_ROW+i, velocity=colour)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print ("Warning: Failed when running plugin feedback for ShaderLoopRecordPlugin:\t%s" % str(e))
|
pass
|
||||||
|
#print ("Warning: Failed when running plugin feedback for ShaderLoopRecordPlugin:\t%s" % str(e))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from plugins.ShaderQuickPresetPlugin import ShaderQuickPresetPlugin
|
from plugins.ShaderQuickPresetPlugin import ShaderQuickPresetPlugin
|
||||||
@@ -148,7 +149,8 @@ class MidiFeedbackAPCKey25Plugin(MidiFeedbackPlugin):
|
|||||||
colour += self.BLINK
|
colour += self.BLINK
|
||||||
self.set_status(command='note_on', note=pad, velocity=colour)
|
self.set_status(command='note_on', note=pad, velocity=colour)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print ("Warning: Failed when running plugin feedback for ShaderQuickPresetPlugin:\t%s" % str(e))
|
pass
|
||||||
|
#print ("Warning: Failed when running plugin feedback for ShaderQuickPresetPlugin:\t%s" % str(e))
|
||||||
|
|
||||||
BLINK = 1
|
BLINK = 1
|
||||||
COLOUR_OFF = 0
|
COLOUR_OFF = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user