Automapping layers
Hello!:)
I’m an absolute noob and I would like to ask for assistance to set up layered macro automapping.
For instance, my controller would get automapped ( Xtouch mini / Midimix) to the first 8 macro on a device, then switch to the next set of 8 after a press of a button. Where do I need to start?
Thanks!
You can add a Condition that checks if the “Previous Value” of the Slider “is equal to” that line of code (that you posted) in front of the “=” (equal sign). See the picture for an example. The line of code under your condition should read something like this:
self.midi_cc_ch_10_val_1.pre_val == self.song().view.selected_track.view.selected_device.parameters[self.get_modifier_value(“m1”) + 1].value
When you’re repeating this for the other Sliders, keep in mind how I set the script up in the first place. I’m referring to this part —> parameters[self.get_modifier_value(“m1”) + 1] <---
If you can remember, the Slider number is added to the value of the Modifier m1. In this case it’s for Slider 1, which means “self.get_modifier_value(“m1″) + 1”. For Slider 2 it would be “self.get_modifier_value(“m1″) + 2”. I’m just adding it as a reminder.
SOME ISSUES TO KEEP IN MIND
When testing this out, I came across a few issues.
(1) When the script initializes, it does not yet know at which position your sliders are. I.e. the Previous Value of the Slider is set at the default value of 0. If your Parameter’s Value is also at 0 on Script Initialization but your Slider is positioned somewhere else, then the Macro’s value will jump to the Slider’s value that very first time you move the Slider. After that first time, the script will know the last position of the Slider and will work as intended.
The best practice would be to set all your Sliders at position 0 before starting up the script. That way, if the Parameter is at 0 it’s already in line with your Slider, and if the Parameter isn’t 0, it will work as intended (i.e. the Slider will “pick up” the Parameter’s Value).
(2) The Previous Value only updates after a certain time (I’m guessing the time it takes the software to get through a loop; a bit like a Frame in FPS, so if the software runs at 60 FPS it takes 1/60th of a second before Previous Value is updated). This means that, if you were to move the Slider too fast, or the update didn’t happen the moment your Slider passed the point that corresponds to the same value as your Parameter, then the Slider won’t “pick up” the Macro control. It’s a minor issue because all you need to do is to try sliding over that point again, maybe a bit slower, until it eventually picks up. But it’s something to keep in mind.
RECAP
– Set sliders to the bottom before starting the script.
– Do not move Sliders too fast before it has picked up the value of the Parameter.
– If you’re certain it past the point where it should have picked up (but it didn’t), move the Slider back the way you came.
Once the Slider has been picked up, the speed at which you move doesn’t seem to matter anymore.
Maybe there are other, better ways of pulling this off, without the issues I’ve mentioned. If I ever come across such way, I’ll give an update.
Sign up
User registration is currently not allowed.