mapping to macro variations in audio effect rack

870 viewsCSS Questionsbutton mapping
1

Apologies if this has been asked and answered many times. I’m new to CSS and am struggling to map a button to a macro variation in Live 12’s Audio Effect Racks. How do I find out what the parameter numbers are for the macro variations?

MartinJ Answered question
0

Or maybe there is another way to do it in in CSS without knowing the parameters numbers? Would love to know if anyone has suggestions.

Drew Answered question
0

Hi Drew,

The macro variations are not in the LOM, so it is not possible in that way.

But there are certainly M4L devices who can access the macro variations and those M4L devices can be accessed by CSS.

That’s my 2 cents 😉

Greetings Wim

Wim Answered question
2

Actual LOM lists in a “Rack Device” properties for variations:

variation_count        int   read-only  observe
The number of currently stored macro variations.

Available since Live 11.0.

selected_variation_index        int
Get/set the currently selected variation.

Available since Live 11.0.

and functions:

store_variation
Stores a new variation of the values of all currently mapped macros.

Available since Live 11.0.

recall_selected_variation
Recalls the currently selected macro variation.

Available since Live 11.0.

recall_last_used_variation
Recalls the macro variation that was recalled most recently.

Available since Live 11.0.

delete_selected_variation
Deletes the currently selected macro variation. Does nothing if there is no selected variation.

Available since Live 11.0.

So within a reaction you should have access to variations, e.g. set the variation index by:

self.song().view.selected_track.view.selected_device.selected_variation_index = 7

or get the index by

var_int = self.song().view.selected_track.view.selected_device.selected_variation_index

I haven´t tried it myself. Good luck.

Dieter

Wim Posted new comment

There was a slight error in your code example. I’ve updated it 🙂

Very cool, I missed that, thanks for letting us know Dieter!

0

Thanks everyone for these answers. I found a device by AbletonDrummer (select +MAP)that works will to map to to macro variations and I’m accessing that device with CSS. It’s working well. I’ll dive into the code example that Dieter sent once I get a bit more familiar with CSS.

Drew Answered question
0

Thank you very much for the hints. I managed to select and recall macro variations using following actions:

  1. action: set modifier mX > cur_val of a switch (Open Stage Control widget) sending MIDI cc
  2. action: self.song().appointed_device.selected_variation_index = self.get_modifier_value(“mX”)
  3. action: self.song().appointed_device.recall_selected_variation()

Bonus: randomize macros: self.song().appointed_device.randomize_macros()

Regards, mj

MartinJ Edited answer