mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-11 19:00:04 +01:00
rename MidiActionsTestPlugin to generic TestPlugin, remove mention of it in feedback plugin
This commit is contained in:
51
plugins/TestPlugin.py
Normal file
51
plugins/TestPlugin.py
Normal file
@@ -0,0 +1,51 @@
|
||||
import data_centre.plugin_collection
|
||||
from data_centre.plugin_collection import ActionsPlugin, SequencePlugin
|
||||
|
||||
class TestPlugin(ActionsPlugin,SequencePlugin):
|
||||
disabled = False
|
||||
|
||||
def __init__(self, plugin_collection):
|
||||
super().__init__(plugin_collection)
|
||||
|
||||
@property
|
||||
def parserlist(self):
|
||||
return [
|
||||
( r"test_plugin", self.test_plugin ),
|
||||
( r"cycle_shaders", self.cycle_shaders ),
|
||||
( r"run_automation", self.run_automation ),
|
||||
( r"stop_automation", self.stop_automation ),
|
||||
( r"toggle_pause_automation", self.toggle_pause_automation ),
|
||||
( r"pause_automation", self.pause_automation ),
|
||||
( r"toggle_loop_automation", self.toggle_loop_automation ),
|
||||
]
|
||||
|
||||
def test_plugin(self):
|
||||
print ("TEST PLUGIN test_plugin CALLED!!")
|
||||
# can now access various parts of recur via self.pc
|
||||
|
||||
cycle_count = 0
|
||||
def cycle_shaders(self):
|
||||
print ("Cycle shaders!!!")
|
||||
if self.cycle_count>9:
|
||||
self.cycle_count = 0
|
||||
|
||||
for i,shader in enumerate(self.pc.message_handler.shaders.selected_shader_list):
|
||||
self.pc.actions.call_method_name(
|
||||
"play_shader_%s_%s" % (i, self.cycle_count), None
|
||||
)
|
||||
self.pc.actions.call_method_name(
|
||||
"start_shader_layer_%s" % i, None
|
||||
)
|
||||
self.cycle_count += 1
|
||||
|
||||
duration = 5000
|
||||
frequency = 50
|
||||
def run_sequence(self, position):
|
||||
self.pc.actions.call_method_name(
|
||||
"set_the_shader_param_0_layer_0_continuous", position
|
||||
)
|
||||
|
||||
self.pc.actions.call_method_name(
|
||||
"set_the_shader_param_1_layer_0_continuous", position
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user