mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-05 16:00:06 +01:00
improve manipulate plugin a little, has rand() and better access to sin cos etc, examples in json_objects/midi_action_mapping_APC Key 25.json
This commit is contained in:
@@ -1093,7 +1093,11 @@ class Actions(object):
|
||||
return
|
||||
if arguments is not None and len(signature(method).parameters) == len(arguments): # only pass arguments if count matches method sig
|
||||
method(*arguments)
|
||||
elif arguments is not None and len(signature(method).parameters) == len(arguments)+1: # need to send in a dummy value
|
||||
arguments += [ None ]
|
||||
method(*arguments)
|
||||
else:
|
||||
print ("method_name %s: arguments is '%s'" % (method_name, arguments))
|
||||
method()
|
||||
except:
|
||||
print("Exception calling action for '%s' with arguments ( %s ) " % (method_name, arguments))
|
||||
|
||||
@@ -281,10 +281,10 @@
|
||||
"DEFAULT": ["function_off"]
|
||||
},
|
||||
"note_on 91": {
|
||||
"DEFAULT": ["send_serial_macro_0","send_serial_macro_1"]
|
||||
"DEFAULT": ["f:float(0):|seek_to_location_on_player&&send_serial_macro_0","f:float(0.25):|seek_to_location_on_player&&send_serial_macro_1"]
|
||||
},
|
||||
"note_on 93": {
|
||||
"DEFAULT": ["set_display_mode_settings","set_display_mode_shader"]
|
||||
"DEFAULT": ["f:float(0.5):|seek_to_location_on_player&&set_display_mode_settings","f:rand():|seek_to_location_on_player&&set_display_mode_shader"]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
from data_centre.plugin_collection import ActionsPlugin, DisplayPlugin, ModulationReceiverPlugin # , SequencePlugin
|
||||
|
||||
# import math
|
||||
import math ## DO NOT REMOVE -- IS REQUIRED FOR THE 'FORMULA' FUNCTION TO BE ABLE TO ACCESS pi AND random ETC
|
||||
import random
|
||||
from math import pi, sin, atan, cos, tan
|
||||
from random import random as rand
|
||||
|
||||
"""
|
||||
add to midi or osc mapping
|
||||
|
||||
Reference in New Issue
Block a user