Automapping layers

8.40K viewsGeneral
0

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!

admin Changed status to publish
Attached Files:
0

I’m fairly new to CSS as well, only been making scripts for the last month or so. Prior to that I had started this spreadsheet to get a sense of the possibilities and to have a more search-friendly way for finding the Condition or Action I needed. Since then, I’ve been trying to make it a sort of go-to for any documentation around CSS and MIDI controllers.

Here are a few scripts:
– My earliest is the Nektar Pacer script where I wanted to see if I could manage Listeners from within a single Reaction: instead of having a “Select + Arm Track” Reaction for each Listener, I made one such Reaction that listens to all 5 Listeners and reacts accordingly. It also includes a Reaction that starts recording in the next empty Clip Slot on the selected Track when its Listener is pressed again (with “again” meaning each later press after the Track has been selected and armed by the first press). The third Reaction is a “Play/Stop” button that loops through the Clip Slots of a Highlighted Track and starts playing the last Clip in the list (or stops any playing Clip).

– The second script I made was for someone on Remotify who wanted to be able to control the Macro’s of a Device in a Chain that had been activated through firing a Clip. I had to recreate his situation, because i didn’t even know you could automate Device selection or that you could add that automation to Clips. One thing I also wanted to add was that the currently activated Device would show up in Detail View (the window where you can see the Devices at the bottom). It took me some time to find the option in the menu because it wasn’t obvious to me; you can find the option at: Live Object Model > Song > Select Device

– The last script I made was for a guy who wanted his Akai APC40 MK2 to make the Clip colors (of Clips in a session box) show up on his pads. I don’t own his MIDI controller so I tested it with my MIDI Fighter Twister and then changed the colors and buttons for his APC40. Haven’t heard feedback from him so I don’t know if it’s working at all for him. I resorted to custom Python coding for this one, it seemed easier to me. It’s a script that could still be made more advanced. The part I struggled with was making a button color change dynamically whenever a Clip’s color changed. I couldn’t find a way to add a color_index_listener to a newly selected Clip Slot. Later I found a comment from JohnC that Listeners are hard-coded to a mode. To add a new Listener, you need to re-activate the Mode.

The last thing I worked on was some custom code to change the colors on the Nektar Pacer with because you can’t use velocity messages to change the Pacer’s colors with, you have to use raw MIDI messages.

Whatever complex setup you’re trying to achieve with your MIDI controller, I’d suggest breaking it up in many little parts. Test out if the Conditions and Actions that you think you’ll need will work the way you expect them to.

MIDI Controllers and CSS can have certain unexpected limitations (like the inability to change colors on the Nektar Pacer with velocity values, or how Listeners are hard-coded to a Mode in CSS), so I’m not sure if everything you’re envisioning with your controller will be possible without using any custom code or some work-around (or at all). But until you’ve reached that hurdle, there’s no need to worry about it.

admin Changed status to publish
0

Hi Glenn! Thanks for the tipps, and your kindness.
I tested the Midi Mix test script revision 2 and its working!

I will start working on a script for the X-touch and the X-touch mini I will let you know how it is going.

admin Changed status to publish
Attached Files:
0

Hi Glen,

How do I need to modify the line below to make the controller input picking up the parameter value, not the other way around.

self.song().view.selected_track.view.selected_device.parameters[self.get_modifier_value(“m1”) + 1].value = self.midi_cc_ch_10_val_1.cur_val

Thanks!
Pete

admin Changed status to publish
Attached Files:
0

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.

admin Changed status to publish
0

Hi Glenn,

Thanks for the detailed asnwer. The thing is, when I’m setting up the encoders adding a CSS Device Parameter mapping it’s working as i would like to. When i open up the project and the script initalizes the encoders are automatically picking up the device values, I don’t need to move them. Would be nice to figure it out so it would not need to be neccesary to remap everything for every set of 8 parameters.

admin Changed status to publish
Attached Files: