Using modifier for sending MIDI velocity value to input
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?
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.
What I’m trying to achieve is to send certain velocity value to Launchpad’s button that was pressed last. I thought I could do this by storing midi address of a last pressed pad to a modifier, since modifiers can also store text, and then retrieve it in action “send MIDI velocity value to input”.
What you’re doing is storing the text string “” to a modifier and then attempting to send a midi value to it. Obviously its just a text string so this won’t work which is why you’re seeing the message: >> ‘str’ object has no attribute ‘send_value’
Sign up
User registration is currently not allowed.