Howdy, Stranger!

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

Sign In with Twitter

Editing the CNTRL:R script to allow banking of left/right knobs and faders

edited April 2014 in Software Discussion

As the CNTRL:R manual says, "NOTE: This User Banking function does not include the left and right side knobs and sliders on the CNTRL:R."

It would be great if this were the case, though! It would really open the device up to mapping.

I took a look at the Python sources for the scripts and in ctrl.py, line 880:

            self._client[index]._control_defs = {'dials':self._dial_matrix, 'buttons':self._dial_button_matrix, 'grid':self._matrix, 'keys':self._button, 'knobs':self._knobs}  #assign controls that raw data will be addressed at

I would have thought the reference to self._knobs in that set should have mapped the left and right knobs based on how they are defined in lines 716-730, and that adding a reference to self._fader would do the trick for the faders, but it seems not. I feel like I'm missing something important here.

Is it possible to modify the script to add CNTRLR_KNOBS_LEFT, CNTRLR_KNOBS_RIGHT, and CNTRLR_FADERS to the bank definitions? I could definitely use some assistance and guidance. Or even a patch. :)

Thank you!

Tagged:

Comments

  • You're definitely looking in the wrong place.....the section you're looking has to do with an addressing system that is used when communicating between our m4l mods and the python script.  I don't even remember how it works at the moment, it was added as an afterthought....


    What you want is:

    def assign_alternate_mappings(self, chan):

    There you'll see that all the controls are reset and their channel is switched depending upon what chan variable is sent to the method.  If you want to add the knobs and faders, you'd do so in that block:

    for fader in self._fader:
    fader.set_channel(chan)
    fader.set_enabled(chan is 0)
    fader.force_next_send()
    for dial in self._dial_right:
    dial.set_channel(chan)
    dial.set_enabled(chan is 0)
    dial.force_next_send()
    for dial in self._dial_left:
    dial.set_channel(chan)
    dial.set_enabled(chan is 0)
    dial.force_next_send()

    All that needs to go in before self.request_rebuild_midi_map().

    However, that may only be PART of what you need to do...it may be necessary that the controls also be deassigned from their functions.  Let me know how this works, and I'll have a look to see if I can help further.
  • Thank you!

    You were right about controls needing to be deassigned, unassigned knobs and faders still controlled mixer functionality (sends, pans, channel volume, etc) I added a line to call release_parameter() in each for loop, that did it. Thanks again!

            for fader in self._fader:
                fader.release_parameter()
                fader.set_channel(chan)
                fader.set_enabled(chan is 0)
                fader.force_next_send()
            for dial in self._dial_right:
                dial.release_parameter()
                dial.set_channel(chan)
                dial.set_enabled(chan is 0)
                dial.force_next_send()
            for dial in self._dial_left:
                dial.release_parameter()
                dial.set_channel(chan)
                dial.set_enabled(chan is 0)
                dial.force_next_send()


  • Hi! im looking exactly the same thing, but i have no idea about programming .. is there any patch to do this?? THANK YOU!

  • No, but all the info you need to make it happen is in this post.  You should give it a try, just make sure to back up the original script before you do.  Happy to answer any questions or concerns ;)


    a

  • So i need to add these lines after this one

    def assign_alternate_mappings(self, chan):

    for fader in self._fader:
                fader.release_parameter()
                fader.set_channel(chan)
                fader.set_enabled(chan is 0)
                fader.force_next_send()
            for dial in self._dial_right:
                dial.release_parameter()
                dial.set_channel(chan)
                dial.set_enabled(chan is 0)
                dial.force_next_send()
            for dial in self._dial_left:
                dial.release_parameter()
                dial.set_channel(chan)
                dial.set_enabled(chan is 0)
                dial.force_next_send()
  • That's the bit, yes.  Insert that code right in between whats already there but before the last line of that method, self.request_rebuild_midi_map, and make sure the indenting matches the pattern of the rest of the code, and you should be good!


    Let me know if you have any trouble, I'm glad to help.

    a

  • I've implemented this in my script and it works great. However, would it be possible to let the different mod pages listen to different midi channels?


    For example if I map an encoder on the second mod page, it seems that the main page is also controlling it.

    Would deb nice if you could tell me what scripting I need to add to achieve this, since I have no clue how to do it and just followed the copy and paste instructions on this page to achieve this extra mapping functionality.
  • I'm confused.....this code should do precisely what you want.  


    It should be changing the send/receive channel (actually, retranslating it within the script)  depending upon what mod button is enabled.  Can you give me more details about what is going on?

    a

  • Hi Amounra, i added those lines to the script but when i did it the script didn't work anymore, i can see the option LIVID CNTRLR in Ableton on CONTROL SURFACE, MDI IN and MIDI OUT but nothing happens...

    I went back to the back up i had of the file Cntrlr.py and now it is working again... but obviously without the midi channels changes that i wanted... 

    This is how i did it... but it's not working

    def assign_alternate_mappings(self, chan):
    chan = min(16, max(chan, 0))
    for index in range(8):
    self._encoder_button[index + 4].set_channel(chan) #set the contols channel to the methods second argument
    self._encoder_button[index + 4].set_enabled(chan is 0) #if the channel is not 0, we need to disable the control so that it 
    self._encoder_button[index + 4].force_next_send()
    for encoder in self._encoder: #is forwarded to Live, but not used by the script for internal processing
    encoder.set_channel(chan)
    encoder.set_enabled(chan is 0)
    encoder.force_next_send()
    for button in self._button:
    button.set_channel(chan)
    button.set_enabled(chan is 0)
    button.force_next_send()
    for cell in self._grid:
    cell.set_channel(chan)
    cell.set_enabled(chan is 0)
    cell.force_next_send()
    for fader in self._fader:
                fader.release_parameter()
                fader.set_channel(chan)
                fader.set_enabled(chan is 0)
                fader.force_next_send()
            for dial in self._dial_right:
                dial.release_parameter()
                dial.set_channel(chan)
                dial.set_enabled(chan is 0)
                dial.force_next_send()
            for dial in self._dial_left:
                dial.release_parameter()
                dial.set_channel(chan)
                dial.set_enabled(chan is 0)
                dial.force_next_send()
    self.request_rebuild_midi_map()
  • i got the firmware 100 BLACK... because the 111 version didn't work at all

  • What I wanted to do is map some buttons to control the browser with midiStroke, but midi stroke doesn't see the difference in the mods, since these are virtual midi channels only recognized by Ableton.

    So what happens is the following:

    I go to mod 2, map a button with midiStroke to control the up arrow. This works fine BUT, when I go back to the live page also the button on that page controls the up arrow, so I got the controls working, but both buttons are receiving this message and when I change the channel in midiStroke nothing happens at all.

    I have now enabled the banking in the CNTRL:R and I will use this for this extra mapping, because it is nice to have some control over the browser without touching the trackpad when dj-ing and looking for a specific track or loop on the fly.

    If there is another work around, just let me know.

    Keep It Spinnin'

    Mike Bosch

  • i just don't know why don't you let us put the channels, cc, and all the data we want in the Bank that we want... come on, 750 Euros for a controller with a lot of bugs, and without let us doing what we want with it...? It would be so much easier for you and for us let me tell you... im very disappointed... 

  • and another thing, not everybody can waste ENTIRE DAYS programming! I AM NOT A PROGRAMMER, i am a musician, and this controller is suppose to be a tool to improve my skills NOT the oposite... 

    Seriously i can't waste more time checking codes and all that work that YOU MUST DO, not me ;)
  • @ mike:


    MidiStroke is directly listening to the output of the CNTRLR, I'm assuming.  Since the script only remaps the channel (i.e. translates) internally within Live, it won't help you in this situation.  You'll need to use the banking capabilities of the hardware itself I'm afraid.  It sounds like you've already figured this out.

    @ alexisdel79:

    It looks like you've indented something wrong.  If you post a copy of your log.txt then I can see what the problem is.

    I believe I've mentioned elsewhere already that we will include this functionality with the next version of the script we publish.


  • @ Amounra:


    Yeah I already thought so, but thanks for your reply anyway. I will leave this out at the moment, because I have other (more important) ideas with the banks, but if I have one left I will definitely do this.

    At the moment I have one bank filled with the Traktor Ultimate Tool mapping.

    Also I have used the first mod page for a remapping of the Will Marshall DJ Template, that was made for the Ohm 64 and RGB, I just bought it and looked at  the youtube explanation about it and then used that to map the controls of the CNTRL:R to the template and added some extra effects of my own. It is almost perfect now and I really fall in love with this controller for the second time after it was finished (it's finished, but just want to change a few things during time).

    At the moment it is really the brain fro my sets with Ableton and I'm not even finished with the rest of the things that I want to add to my template, because I also have some ideas to put hex, drumsteppr or accent in it and another page for some other controls. If possible I also want to see if I can use one of the banks for Reason and then another one for RDM, so I would never have to disconnect the controller from one program to use it with another, but just switch banks when needed.

    Keep It Spinnin'

    Mike Bosch
  • edited June 2014

    @alexisdel79

    You can set the channel for each bank to any you want using the editor.

    See: http://wiki.lividinstruments.com/wiki/Ohm64_Editor#Banking_.28OhmRGB_and_CNTRL:R.29

    I have no problem with OS 111 (silver shaft) and the script mods. Did you try a factory reset?

  • @alexisdel79


    What bugs did you come across? I haven't had any problems at all and as adamm mentioned, you can change the channels for the banks in the editor, it is just a matter of clicking and choosing your channel. Just make sure you save it and send it to the CNTRL:R.

    I think the CNTRL:R is the best and most versatile controller I ever bought, you can adapt it to any type of situation, and with the banking options you can even control several applications at the same time by just mapping them to the different banks. As I mentioned before in one of my banks I got the Ultimate Traktor Tool from Stewe and it works great this way if you want to sync and route the audio from Traktor to Ableton and control your effects and channels in ableton.

    I am now looking for a way to sync RDM from Stretta to Ableton and then let RDM listen to one of the other midi channels of my banks, so I can use that together with Ableton, since I never really sync Traktor and Ableton together. (simply because Ableton is a very good tool to DJ with on it's own.
  • @Amounra


    Can I also use this modification in the AumTroll script?

    Also I have three AumTroll scripts in the monomodular folder, it seems that the AumTroll G is the most recent one and also looks different compared to the other ones (other led colours). I would like to use that one, but I have realized that there is a play button, but no stop button is that correct? Also it is not possible to use the Livid Stepprs with the AumTroll script?

    Looking forward to your reply and hopefully this modification is possible.

    Keep It Spinnin'

    Mike Bosch
  • You should be able to do things the same way in regard to the banking modification.


    The main difference between the AumTroll and CNTRLR scripts is that the AumTroll connects to Monomodular's mods, whereas the CNTRLR does not.  However, the most current version of CNTRLR in the github repository (the one in "Python Scripts" folder) works with both the stepprs and the Monomodular mods.  I haven't finished updating the mods or stepprs for the new version though, so some things might work better than others.

    Other than that, CNTRLR and AumTroll behave identically unless you happen to have a secondary, compatible control surface connected at the same time.  I will try to sit down and make a wiki page explaining the differences, but suffice it to say they are all quirky things that apply to my own setup.

    The AumTroll_G script is a commissioned script I wrote for someone, based around the CNTRLR script.  It's a completely different script, but will continue to get updated as it's just a subclass of the main CNTRLR script.  I'm not sure what the arrangement is, its been a while since I looked at it....perhaps I can find it's owner's description, I'll have a looksee....

    a



  • i did the update of the firmware with the last one CNTRL:R v. 0.1.1.1

    Im using the new ONLINE EDITOR. But still, i can't change the CHANNEL of every knob/button/encoder! i just can change the CC, and i need to change also the CHANNEL... 
  • ok awesome, and NOW the encoder lights turn in the opposite direction!!!! The black ones in the middle, and not just the light... the values instead of increase they decrease..... wtf?????

  • @ Alexisdel79


    You might want to contact Livid to report this, and check your unit, because I have a fine working unit here and never had a problem with it. The only problem I had was when Ableton was messing up the remote scripts with the 9.1.2 update, but that was sorted in a couple of days by our fine Amounra.


  • It's not the unit.... the problem is that i don't know why but even charging like 700 EUR this company is not able to do some BASIC programming like the BCR 2000 where you can change both the CHANNEL and the CC of every single rotary knob at the page you want... I don't see the point on changing the BANK but the channel is changing just for group of rotaries of the middle section... faders and potentiometers are still on channel 1... WTF? 



  • About the rotary moving in the oposite direction.. there is an option in the online editor (i don't know why they still give the option of the installed version... c'mon men, take it out!!!) where you can FLIP their behaviour ;)

  • @alexisdel79


    Have you also checked the script you are using? and also which version of Ableton are you using (if you are using it with Ableton)?


  • edited July 2014

    I think the reversed encoder direction may be due to your recent reflashing of your unit's firmware.  There are two types of hardware, one has black plastic encoder shafts and the other has silver metal encoder shafts.  If you look under the cap of the encoder, you should be able to tell which one you have.  There were two different firmwares depending on which unit you have, my hunch is that you've installed the wrong one?


    a

  • Amounra, there is a new "universal" firmware, it doesnt matter which shaft you have... 


    Mikebosch: im not a programmer, i have NO IDEA about scripts or anything like that. Im using ableton 9.1.

    Mark from Livid support told me that there is no way to choose the Midi channel for individual knobs/faders/encoders/whatever... 
    Seriously it is a shame, how is it possible that (as i told you before about bcr2000) a controller that was released on 2005 (Behringer) had already that feature and this "super top" (because of the price) CNTRLR didn't have it?! 
    Unbelievable!

  • @alexisdel79: with looking at the script I mean, looking which version you are using. Because since 9.1.2 the script was changed. You can still have separate channels with banking or using the mods in Live. I know it is not what you are looking for, but it is the only solution I know of.

Sign In or Register to comment.