ldrolez / clyphx-live11

ClyphX advanced macros and scripting for Ableton Live 12, 11 and 10
GNU Lesser General Public License v3.0
208 stars 19 forks source link

MIDI triggers in free version #35

Open crankedguy opened 2 years ago

crankedguy commented 2 years ago

Hi,

honestly I don't understand if this is just not working in free version or if the description is faulty. In UserSettings.txt there is written : CONTROL_NAME = A unique one-word name (Identifier) for the control. See [IDENTIFIER NOTE] below. MSG_TYPE = The word Note or CC. MIDI_CHANNEL = The MIDI Channel number in the range of 1 - 16 NOTE_OR_CC = The Note or CC number in the range of 0 - 127. ON_ACTION_LIST = The Action List to perform when the control sends an on message.

There is no ON message for a CC midi message. In Glyphx Pro manual there is written "An X-Control will trigger its Action List upon the control sending an on message (a MIDI message with a value that is 34 or higher)" But this seems to be not the case for free version.

I tried simply this vol_trk3 = cc, 1, 16, 3/vol >, 3/vol <

but all it does is turning the volume up, never down, it does not matter if I send 63/65 or 1/127 with the encoder

So please tell me, as this is nowhere documented, if this is not possible in free glyphx because then I do not have to waste anymore time on it

Thanks

ldrolez commented 2 years ago

Hi, from what I see in the code it should work. Maybe a strange character after '<' ? Which editor did you use?

crankedguy commented 2 years ago

Hi, there is no strange character. I am using VSCODE But it doesn't matter too much anymore as I wrote my own control surface in the meanwhile.;

ldrolez commented 2 years ago

Live 10 or 11?

crankedguy commented 2 years ago

11.2.5

ignis32 commented 1 year ago

I guess I know why.

 2023-11-05T07:02:26.083022: info: Python: INFO:_Framework.ControlSurface:82 - LOG: (ClyphX) nativeKONTROL LOG ------- ClyphX v2.7.3 for Live 11 ------- Live Version: 11.3.13 ------- END LOG
2023-11-05T07:02:26.083052: info: RemoteScriptMessage: (ClyphX) nativeKONTROL LOG ------- ClyphX v2.7.3 for Live 11 ------- Live Version: 11.3.13 ------- END LOG
2023-11-05T07:02:26.110221: info: Python: INFO:_Framework.ControlSurface:109 - LOG: (ClyphX)  ------- Attempting to read UserSettings file: C:\apps-mus\Ableton\Live 11 Intro\Resources\MIDI Remote Scripts/ClyphX/UserSettings.txt-------
2023-11-05T07:02:26.110272: info: RemoteScriptMessage: (ClyphX)  ------- Attempting to read UserSettings file: C:\apps-mus\Ableton\Live 11 Intro\Resources\MIDI Remote Scripts/ClyphX/UserSettings.txt------- 
2023

There are two problems in one.

1) It is looking for "MIDI Remote Scripts" but in the user library folder is called just "Remote Scripts", differently. 2) sys.path does not contain any User Library folders, so it is looking only in application installation folder only anyway.

Seems like the following slapdash workaround worked for me: ( looked how AbletonOSC finds it's own log folder within User Library)

Replaced in ClyphX.py:

            mrs_path = ''
            for path in sys.path:
                if 'MIDI Remote Scripts' in path:
                    mrs_path = path
                    break
            user_file = mrs_path + FOLDER + 'UserSettings.txt'

->

            import os
            module_path = os.path.dirname(os.path.realpath(__file__))  
            user_file = module_path + '/UserSettings.txt'

Now it finds UserSettings.txt just fine:

2023-11-05T07:29:18.368806: info: Python: INFO:_Framework.ControlSurface:368 - LOG: (ClyphX)  ------- Attempting to read UserSettings file: C:\Users\Admin\Documents\Ableton\User Library\Remote Scripts\ClyphX/UserSettings.txt-------
2023-11-05T07:29:18.368855: info: RemoteScriptMessage: (ClyphX)  ------- Attempting to read UserSettings file: C:\Users\Admin\Documents\Ableton\User Library\Remote Scripts\ClyphX/UserSettings.txt------- 
2023-11-

X-Controls started to work after that.

p.s. Maybe moving Clyphx to Ableton installation MIDI Remote Scripts folder would work, I did not check it, as I do not like the idea of messing with main installation. Moving only UserSettings.txt there does not work, as it prevents Clyphx from loading at all, probably due to some naming collision.