New Year Deal!
Get Control Surface Studio Now For Just $62
Time left to get it...
Your shopping cart is empty.

Basic Midi Fighter Twister configuration problems

Submitted by Stakker on Thu, 04/25/2019 - 19:40
Control Surface Studio User


So, I bought CSS and I've been trying to get my Midi Fighter Twister to work, but I can't figure out how to.

I would simply like to bind the 8 macros and all sends of a track to encoders. You know, exactly like how it works out of the box without a custom script, when you simply map the encoders using Ableton's MIDI mapping. BUT with the difference that I can change the active track and the bindings change to the macros & sends of the active track.

What I've gotten to work so far is binding the encoders to the active track macros & sends. So that's cool. But:


The encoders of Midi Fighter Twister function as if they were physical potentiometers. Not as the endless encoders that they are. When I change tracks or edit the macros/sends in Ableton using the mouse, the encoders stay put in their position. I could use the pickup mode to sort of get around this, but this is so cumbersome that it's easier to use the mouse. The relative mode doesn't work, it just moves the macro/send by one step when I rotate the encoder all the way to 127 or 0. I would just like this to work as it works by default with Ableton's own basic MIDI mapping. Is there a way to do this?


Kind of the same thing as problem 1. The LEDs and therefore the state of the Midi Fighter Twister's encoders is not updated to reflect the changes in Ableton (changing track, changing parameter with a mouse, loading a new project). There's some vague documentation about how to accomplish this, but it's pretty damn cryptic. I've done some coding in C++/C# so I'm not easily scared by even actual code, but there just isn't enough info here. (Or at least I haven't found it.)

Help would be appreciated. This is a pretty expensive piece of software, so this kind of basic functionality isn't too much to ask in my opinion.


Topic Category: 

8 Responses


Control Surface Studio User

Just to clarify: I would be perfectly happy if somebody just copypasted the "code" I need for the Reactions.

I've read the two button on/off Reaction tutorials here and understand the logic, but they do not tell me how to point to the current track macro knobs (device 1) and sends. And how do I send the value of the knob in Ableton to the controller. I'm guessing I should capture it in a variable and then send that variable to the controller, but no idea what the syntax for that would be.


John C
Forum Admin

Hi there,

Thank you for your questions, I tested The MIDI Fighter Twister with Selected Track controls last night and understand what you mean by them acting like physical controls. This will be fixed in our upcoming "Automatic / Default LED Feedback" update.

For now, to get something a bit better than the 'jump' you are probably experiencing when you change the selected track and turn a knob, try changing your knobs to use the Take Over Mode: Value Scaling.

At the moment, there's no way of sending LED data when the selected track changes from a Reaction as there is currently no selected track listener available.
So this will need a little bit of coding to achieve :) Here's how to do it:
1. Create all of your LED Feedback Reactions as you normally would - follow this tutorial if you're not sure
Make sure you set them all to the same Listener - I recommend setting their listeners to 'tracks'. Doing this will group all of your Reactions together in one function so you can copy and paste them easily.
2. Install the script and open the .py file for it in your text editor - found in the MIDI Remote Scripts folder
3. In the .py file, seach for the function called: def _mode1_tracks_listener(self):
Note, it may have a different mode number if not mode 1.
4. Add a new function below it called: def _on_selected_track_changed(self):
Copy and paste the contents of _mode1_tracks_listener into _on_selected_track_changed. Make sure that the indentation matches as the script will break if it isn't correct - Python is very anal about that!
5. Save the file and reload / refresh Ableton Live.
Your reactions will now be fired whenever the selected track changes!
See attached screenshot for code example.

Note: Make sure your script doesn't already contain the function _on_selected_track_changed, only 1 of them will fire. If you have 2, paste your reactions into bottom of the one that already exists.

Control Surface Studio User

Hi John,

Thank you for spending some time with this, I appreciate it!

So... I tried replicating the Reactions from the tutorial as far as I could, but it is a bit different situation as the tutorial is simply sending button on/off state but encoders need to receive/display a specific value? I also dug up from your Reactions documentation that selected track sends can be referred to with "view.selected_track.mixer_device.sends[0].value".

So I tried to make a Reaction for selected track send A. (I have set up Controls + Device / Track / Sends / Send A in the Midi Fighter knob.) I created one Reaction in CSS and set the listener to Tracks as you suggested. How I set up the Conditions and Reactions you can read from the code below. I created the "_on_selected_track_changed(self)" function as you suggested:

def _mode1_tracks_listener(self):
if ([0].value == 1):

def _on_selected_track_changed(self):
if ([0].value == 1):

But now nothing happens. The above also doesn't look right to me, because is "value == 1" the right trigger for an encoder? And the value sent to the control probably should be the value of the encoder and not 127?

So, I also randomly tried just having this line inside both functions, but that didn't do any good either:


I can't think of what else to try... if you could tell me what the code inside the functions should actually look like, that would be cool :-)


Control Surface Studio User

PS: The indents were removed by the comments system. I also noticed I had "Show Message" there for some reason, so I changed that to "Knob 3" (which is where the send control is bound), but that actually didn't change anything. The code still read "self.show_message.send_value(127)". (Bug?) I don't know how to refer to knob 3 in code so I edited the code to "self.send_value(127)" but that didn't do any good either.

John C
Forum Admin


Regarding the bug you mentioned about it reverting to 'show_message'. This is a known issue which will be fixed in the next version.

The self.send_value(127) code needs to be added to the control like this: self.midi_cc_ch_10_val_4.send_value(127)

Control Surface Studio User

OK, progress! I got it to send a static value like 127 to the Midi Fighter Twister knob whenever I change active track and the LEDs change accordingly. But this is not yet very useful :-) How do I send the actual value of the track's send?

I tried "self.midi_cc_ch_0_val_3.send_value([0].value)" but no good.


John C
Forum Admin

Hi, yes the value of the first send on the selected track can be sent using:[0].value

Control Surface Studio User

One thing I found to be helpful is to create a "UserConfiguration,txt" file and explicitly note that the device is the MIDI Fighter (along with all the other stuff, I'll attach mine to this post). That will give you LED feedback and non-jumping control. Then you create your CSS stuff, add it to Ableton, and use the CSS file as the Control Surface Area. I'll attach my CSS JSON file as well.
One thing to note is that if you start using listeners it can override the UserConfiguration.txt file (either in part or completely), so it's not a complete solution, but it can be something useful and quick-and-dirty to get something up and running.