Using modifier for sending MIDI velocity value to input

1.57K viewsGeneral
0

Hi,
I’m setting the value of a modifier: self.set_modifier_value(“m1”, “midi_note_ch_0_val_81”)
And then using modifier m1 as MIDI input target to send velocity value: self.get_modifier_value(“m1”).send_value(5)

M1 gets properly set with a value but I get the error when trying to trigger the second action (send midi):

(Launchpad Mini (mk3) TEST) There’s a problem with ‘Action Block 1’ in reaction ‘Mark Pad 1’ (from ‘Button 8 was pressed’ listener) >>
>> ‘str’ object has no attribute ‘send_value’

Do you have any ideas how to fix this?

admin Changed status to publish
Attached Files:
0

In your code, you are saving a string to the modifier and not a value.
What value are you wanting to save to the modifier?

If you’re wanting to store a reference to midi_note_ch_0_val_81
The code would need to look something like this:
self.set_modifier_value(“m1”, self.midi_note_ch_0_val_81)

However, I’m not 100% sure if this will work, as the modifier get/set functions are designed for saving and retrieving values.

admin Changed status to publish
Attached Files:
You are viewing 1 out of 3 answers, click here to view all answers.