Save the position of the pressed drum pad
Hello! I’ve been trying this for a few days and I’m not able to. I hope you can help me.
I would like to save in a modifier the number corresponding to the last drum pad pressed. The reason is that I have an encoder, which depending on which drum pad is pressed, will do a different thing (it will change different modes according to a modifier).
In summary. A modifier with the numbers 1 to 16 according to the last drum pad that was pressed in a drum rack (Kick, Rim, Snare, HH …)
THANK YOU!
First of all, say that I am infinitely grateful for your time and dedication, you are incredible.
Christian / Jhon THANK YOU!!
[…]
Listener:
self.song().tracks[0].devices[0].view.add_selected_drum_pad_listener
Action to print the notes coming out of the racks:
self.show_message(str(self.song().tracks[0].devices[0].view.selected_drum_pad.note))
So, this action, followed by one that prints m1 worked for me when selecting the drum rack pads (or playing from keyboard)
[…]
This part is working like a charm.
I almost screamed sitting here.
But if i add a action like:
if self.song().tracks[0].devices[0].view.selected_drum_pad.note == 36:
self.set_modifier_value(“m1”, 1)
Breaks the complete script.
I’m sure I’m doing something wrong, since I’ve never pasted the code directly. I hope you can help me. Thanks!
attached screenshot 🙂
Sign up
User registration is currently not allowed.