wiffbi / Selected_Track_Control

MIDI Remote Script to control the currently selected track in Ableton Live with common MIDI messages.
http://stc.wiffbi.com/
Other
69 stars 18 forks source link

rel2comp issue #4

Closed fraej closed 6 years ago

fraej commented 6 years ago

Hey!

I've just discovered this amazing script and thanks for sharing it but I have a problem with my MIDI controller and the rel2comp configuration. I am using MIDIOX to debug the MIDI messages and it sends 0x01(1) when I move an encoder clockwise and sends 0x41(65) when I move it counterclockwise but on Ableton only works clockwise (adds 1 to the current value), when I move it counterclockwise it goes back to 0. I use Live 9.7 btw.

Thanks

wiffbi commented 6 years ago

Hey!

According to the numbers your debugging, I think your MIDI controller sends its CCs in a mode called „RELATIVE_SIGNED_BIT“ (1 up to 64 to increase and 65 up to 127 to decrease). As a default, STC uses „RELATIVE_TWO_COMPLIMENT“ (or rel2comp). You could change STC to „RELATIVE_SIGNED_BIT“ on each MIDI mapping individually in settings.py, but if you want to use STCs default settings and just change it from „RELATIVE_TWO_COMPLIMENT“ to „RELATIVE_SIGNED_BIT“, then there is an easy way:

In the file MIDI.py (NOT .pyc!) go to line 70 and change the line from

def __init__(self, cc, mode = RELATIVE_TWO_COMPLIMENT, channel = DEFAULT_CHANNEL):

to

def __init__(self, cc, mode = RELATIVE_SIGNED_BIT, channel = DEFAULT_CHANNEL):

With this change, you change STC’s default MIDI relative mode behavior.

Don’t forget: Since Live 9, you need to restart Live to have changes in MIDI Remote Scripts take effect.

I hope that helps!

Richard