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!
Hi guys,
Just chiming in on this, I believe Christian’s approach is the way to do it – meaning, you will need to use button/pad presses on your midi controller as listeners. Drumpads themselves don’t have listeners…
I was thinking ‘live object model > song > selected parameter’ could do the job, until I tested it and realised – doh, drumpads aren’t parameters.
Then I thought – what about using ‘selected drumpad > name changed’ as the listener, then checked and – doh again, drumpads don’t have a ‘selected drum pad’ option.
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 🙂
Hello again !
I almost have it but in the last step something fails. I have done a test with the first 4 pads (out of a total of 16).
– I have four reactions. Each one saves the last pad pressed to m1 (that works)
– If you see the screenshot “test1” it works but not how I want it, this is just a test to test the modifier.Switches between parameters 1, 2, 3 and 4
– If you see the screenshot “test2” it works as I want, without using modifiers
– If you see the screenshot “test3” (this is what I want) it doesn’t work. For some reason, it is always playing on chain 5 of the Drum Rack and it does not change.
– Screenshot “Drum Rack” displays the Drum Rack configuration
Do you have any idea what i’m doing wrong?
Thanks in advance!!!
Thank you very much again 🙂 I see that I am close to achieving something that I am really looking forward to, thanks to you. It’s amazing.
I just read my last answer, written last night, and I saw that there is an error in the screenshot “test3”. I am attaching the correct one (I am not on that computer now, so I have edited it by hand) with the real problem that it does not work.
This is the last step, which I do not understand what I am doing wrong.
Thank you very much friends, awesome.
I’m not 100% sure on the code for selected chain but if it exists, you’re close, but missing a full stop before ‘view’
Try this: self.song().tracks[0].devices[0].view.selected_chain.devices[0].parameters[0].value = self.midi_cc_ch_0_val_16.cur_val
Sign up
User registration is currently not allowed.