Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Twitter

Modifying CNTRL:R's Ableton Live Remote Script (removing auto-mapping of encoders)

Hey guys!


So I just bought a CNTRL:R and I love the Live Remote Script. There's a few things in it I'd like to tweak, but one thing is driving me crazy.

I did some digging and found that the scripts are all in Python! This is fantastic news for me as Im a hobbyist programmer and python is the language I'm most comfortable in. That said, I'm still kind of overwhelmed by all the annotation-free scripts. 

What I want to do is simply to remove the auto-mapping that the top 12 encoder buttons do. When you switch tracks or click a plugin, right now the encoder knobs all auto-assign to that plugin. By turning 'Track' on in Live, I've overwritten most of them, but the trouble is that when I focus a new track or plugin, the encoders' forget' where I am on the manually-assigned ones. 

Example: I use one of them for a high-pass filter sweep. I'll be sweeping up when I'll click the track I'm mixing into to see where I am in that, and the filter encoder's LED rings disappear, and as far as the controller is concerned, the knob is back at 0. When I go to keep twisting it to continue the filter sweep, it jumps back down to 0 and the filter vanishes. Terrible sounding when I'm using it to effectively fade-out a song. 

I thought changing takeover mode to pickup would help, but for some reason this doesn't work.


Anyway thanks for reading all my text! If anyone could even just let me know which python file to modify/delete, I'd be grateful!

-Josh

Comments

  • Sorry for the late reply...I think maybe the script is zero-ing the values when you pick another track?  I need to look into this for several users, I'll try to get back to you asap with more info.


    a

  • edited February 2013

    I figured it out! Well, at least in a way that accommodates my needs.


    I had reassigned the bottom 8 encoders manually, using Live's MIDI Map, and so the auto-mapping to whichever plugin was selected was useless for me. So I just deleted that whole feature in the python scripts. Now the encoders don't auto-assign to anything.

    Open cntrlr.py (located in Live 8 / Resources / MIDI Remote Scripts / CNTRLR), control-F to find the line 'def _setup_device_control(self):', and delete everything indented below, replacing it with 'pass' so it can still call the method without calling an error. Recompile the file and youre done.

    A better solution, of course, would involve not affecting any encoders manually assigned using Ableton Live's Midi Mapping, but this is a good shortcut for DJs like me who never use the auto-assigning encoders feature.


  • That might appear to work at the outset, but is problematic because eventually the script will call the DeviceComponent instance that is established in that method, and will consequently halt on the error because it's a null assignment. 


    You can of course use that method, but you also need to go through and remove all references to  self._device in the script.  

    The easiest way to accomplish what you want is to leave the _setup_device_control() alone, and instead find all instances of:

    self._device.set_parameter_controls()

    and comment them.  The DeviceComponent won't do anything if it doesn't have any controls linked to it.

    Also, in the _deassign_live_controls() method, there are some reset commands, you may need to change some of these (I think these are more likely the ones giving you problems anyway, if you've used MIDI Learn in Live, the controls that are "learned" should be ignored by the script completely).

    for index in range(12):
    self._device._parameter_controls = None
    self._encoder[index].release_parameter()
    self._encoder[index].send_value(0, True) #turn off all the encoder rings.  We send it the second argument, True, so that it is forced to update regardless of its last_sent property
    self._encoder[index].clear_send_cache()

    Hope that helps!

    a

Sign In or Register to comment.