How do we get Relative control working?
Hi,
you mentioned “Relatve #2” so i guess you use an Arturia Controller, right?
Try the Python code below (keep attention to correct indentation) in a reaction (listener “encoder 1” MIDI Channel 7, CC 20)
A step size ist stored In global modifier “m20”, with fixed step sizes 1,2,3,4 or 8 and dynamic behaviour (knob acceleration) is set by m20 = 0
The index of the device which parameters you want to change is stored in “m18”.
# step size
step = self.get_modifier_value(“m20”)
# instrument device index
idi = self.get_modifier_value(“m18”)
# update device parameter 1
# get value of encoder 1
c = self.midi_cc_ch_7_val_20.cur_val
# get values of device parameter 1
a = self.song().view.selected_track.devices[idi].parameters[1].value
# encoder right (with overflow handling)
if c < 8:
if step == 0:
s = c
else:
s = step
a = min(127,a+s)
# encoder left (with underflow handling)
elif c > 121:
if step == 0:
s = c
else:
s = 128 – step
a = max(0,a-128+s)
# update device parameter 1
self.song().view.selected_track.devices[idi].parameters[1].value = a
My experience with Arturia Controllers is, that the encoders wear out relatively fast. So the behaviour is not very reliable, there are lots of jumps in the CC values
Dieter
Sign up
User registration is currently not allowed.