Modifying CNTRLR script handling of faders
Home › Forums › Livid Scripts › Modifying CNTRLR script handling of faders
- This topic is empty.
-
AuthorPosts
-
September 28, 2020 at 1:24 am #845
Mac_809
ParticipantHey, I have a question: I have been looking at the scripts to and wanting to make a couple changes to default fader functionality. I am looking to make the red box show 8 channels rather than 4, with the 4 right faders assigned to a 2nd bank of 4 tracks rather than to returns/cue/master. However, I can’t find any definitions or the related functionality searching the repo for keywords and browsing source. Could you please point me to code is for the faders? Thanks again!
September 28, 2020 at 7:48 am #959amounra
ParticipantHey there,
Editing the CNTRLR script (and BASE, which is very similar in a lot of ways) is a bit tedious, since there are so many interdependent components. But, the basics:
You have to change the session_ring to accommodate 8 channels:
line 306, in _setup_session_control:
self._session_ring = SessionRingComponent(num_tracks = 8, num_scenes = 4)Then you have to set the faders to control those tracks, which means removing their assignments from the stock ones in the script. Basically, you’re looking for stuff in _setup_mixer_control().
self._mixer.main_faders_layer = AddLayerMode(self._mixer, Layer(priority = 5,
volume_controls = self._fader_matrix.submatrix[:8, :],))self._mixer.master_fader_layer = AddLayerMode(self._mixer.master_strip(), Layer(priority = 5,))
That’s just the start, though, as you’re probably going to want to change the select buttons, also. Let me know if you get that working and we can try the next step.
a
September 29, 2020 at 2:18 am #960Mac_809
ParticipantThanks! OK, I’m right there with you, though the controller interface doesn’t activate now. Not sure if thats intended at this stage. (I made a copy so can still use the OG version)
It also looks like we might want to set the following?
mute_buttons = self._key_matrix.submatrix[:8, 1:],
track_select_buttons = self._key_matrix.submatrix[8:8, 1:],))
self._mixer.set_enabled(False)September 29, 2020 at 10:02 pm #961amounra
ParticipantIf the script isn’t compiling, you’ll want to look in Ableton’s log.txt to see why. It’s a good idea to make one change at a time, make sure that the script compiles after the change, and then proceed to new stuff. If at any point the script breaks, you have to figure out why by using the log.txt as a guide.
I’m horribly busy with packing & moving at the moment, but I’ll try to pull out my CNTRLR once I manage to figure out where it’s packed and see if I can give you better advice.
a
p.s. here’s some info about where to find the log.txt file that Ableton generates:
September 30, 2020 at 8:43 am #962amounra
ParticipantThere’s a problem with the script, it won’t compile unless you comment line362:
def _setup_transport_control(self):
self._transport = TransportComponent(name = ‘Transport’)
# self._transport._play_toggle.view_transform = lambda value: ‘Transport.PlayOn’ if value else ‘Transport.PlayOff’They changed something recently and it snuck past me. I’ll update it in GitHub tomorrow.
Nex, you’ll have to decide how you want to do things. Since there were only 4 tracks in the original script version, there’s really no good way to lay out the buttons for all 8…..you’ll have to sacrifice some things for others if you want to do all 8. I’d probably get rid of the stop clip buttons and set them all as arming track select, something like this:
self._mixer.main_buttons_layer = AddLayerMode(self._mixer, Layer(priority = 5,
mute_buttons = self._key_matrix.submatrix[8:, 1:],
arming_track_select_buttons = self._key_matrix.submatrix[:8, 1:],))Let me know when you get things compiling, you’ll probably have to experiment a bit to find the right ergonomics…..keep in mind that you don’t overlap assignments! (that’s the real danger here, especially with this script because it does so many different things deepening on the mode its in).
a
October 1, 2020 at 4:27 pm #963Mac_809
ParticipantDo you known if Ableton recompiles each time you select a device in Prefs in Live, or does the build happen once when Live starts?
October 1, 2020 at 5:14 pm #964amounra
ParticipantYou have to restart live unfortunately. (Long ago this was not the case, but it changed in live 8 or 9)
November 21, 2020 at 6:02 am #969Mac_809
ParticipantHad a chance to try this out – it’s sort of working!
– 8 channels map across the faders – nice!
– Sends only work on tracks 1-4. I see some stuff in setup_mixer_control() such as send_controlsI tried the commented line and some other things, but couldn’t get them to work.
`self._mixer.main_knobs_layer = AddLayerMode(self._mixer, Layer(priority = 5,
send_controls = self._knob_left_matrix,
# send_controls = self._knob_right_matrix))
eq_gain_controls = self._knob_right_matrix))
`– Transport overlays the track mutes and shift
My idea here is to make the controller more of an 8 channel mixer type controller like a Mackie MCU, without automation but with nice knobs and faders. When I get something working well I’d be happy to send a pull request. I can imagine other people would like to use this?
I thought about how to remap, disabling the current functions of the entire top row of 16 buttons makes the most sense.
The top 1-4 buttons could then be mute/solo for tracks 1-4, and 13-16. Mute/solo would be via shift, like now.
The original 4 mute/solo would be unmapped, as would 5-12 on the top row, thus avail for reuse
The 4×4 clip trigger buttons don’t make sense anymore, being 4×4 in an 8 channel red box, so I’d also like to turn their functions off, too. If they could work as they do in user mode, that would be the best – assignable to whatever you like.I tried but couldn’t turn it off
`self._session.clip_launch_layer = LayerMode(self._session, Layer(priority = 5,
clip_launch_buttons = self._matrix.submatrix[:,:]))
self._session.scene_launch_layer = AddLayerMode(self._session._selected_scene, Layer(priority = 5,
launch_button = self._button[28],))
`I also tried to deactivate all the encoder knobs so they could be assigned (just in that one same layer) as encoder knobs and buttons like they are in User Mode but couldn’t figure out how. It seems like there are a few places?
November 21, 2020 at 8:21 pm #970Mac_809
ParticipantDid some more experimenting and here is where I left off the sends:
I tried all kinds of stuff – setting send_controls to [self._knob_left_matrix, self._knob_right_matrix] and self._knob_left_matrix + self._knob_right_matrix, and all kinds of stuff. I started looking further up to where self._knob_left_matrix/right got defined but couldn’t come up with a good way to get them both assigned.
` if EQS_INSTEAD_OF_MACROS:
self._mixer.main_knobs_layer = AddLayerMode(self._mixer, Layer(priority = 5,
send_controls = self._knob_left_matrix,
eq_gain_controls = self._knob_right_matrix))
else:
self._mixer.main_knobs_layer = AddLayerMode(self._mixer, Layer(priority = 5,
send_controls = self._knob_left_matrix))
# send_controls = self._knob_left_matrix,
# parameter_controls = self._knob_right_matrix))`Thanks again!
November 22, 2020 at 2:57 am #971amounra
ParticipantHey Mac,
You have to create a new matrix to get the mappings you want. The sends get mapped based on the dimension of the matrix you send them, and you can’t combine matrixes the same way you could combine a simple Python array.
In _setup_controls, you need to get all the knob elements into a new matrix, so something like:
self._knob_all_matrix = ButtonMatrixElement(name = ‘Knob_All_Matrix’, rows = [])
for index in range(3):
self._knob_all_matrix.add_row(self._dial_left[index*4:(index*4)+4] + self._dial_right[index*4:(index*4)+4])I didn’t test that code, so you may have to play with it a bit. But that’s the general idea.
Now that you have a matrix that has all the knob elements, you can pass that matrix to the mixer layer as a sends target in _setup_mixer_control:
self._mixer.main_knobs_layer = AddLayerMode(self._mixer, Layer(priority = 5, send_controls = self._knob_all_matrix))
Sorry, not able to test any of this at the moment….does that make sense to you though?
a
November 22, 2020 at 4:59 pm #973Mac_809
ParticipantYes it makes perfect sense. I’ll see what I can do, thanks!
November 25, 2020 at 7:45 am #972amounra
ParticipantI modified the code above, since what I’d originally written was WAY off lol. Let me know if you get anywhere with that, I still haven’t had a chance to test things out as I’m currently trying to update OS on my machine and still haven’t gotten things stable.
April 2, 2021 at 11:50 pm #1016Mac_809
Participant> @amounra said:
> I modified the code above, since what I’d originally written was WAY off lol. Let me know if you get anywhere with that, I still haven’t had a chance to test things out as I’m currently trying to update OS on my machine and still haven’t gotten things stable.Are the instructions about the same for Ableton 11? I moved cross-country and was separated from my machines for a bit. I’d still love to make this work. If I could put it behind a feature flag and make a PR to the repo that would be even better.
Thanks again!
April 3, 2021 at 7:12 am #1017amounra
ParticipantSure, it should work the same. You’ll have to start from scratch with the newer version of the script I published for Live11. The majority of changes for the new scripts are fundamental syntactic things that were required due to the upgrade to Python3.
If you want to set it up in a way that I can incorporate it into the stock script with a flag in Map.py, I’d consider it for a PR. I like the idea of doing that sort of thing with these scripts, its just that it becomes increasingly hard to maintain this stuff with all the constant Live changes (they broke most of my debugging tools with the move to Python3, and some of the framework files won’t decompile now
). As long as I can rely on it being stable, I’m happy to incorporate it. Let me know if you need some more help
a
-
AuthorPosts
- You must be logged in to reply to this topic.