Import Python Modules in Control Surfaces

Discuss music production with Ableton Live.
Post Reply
Oneiroi
Posts: 34
Joined: Sat May 30, 2015 6:34 pm

Import Python Modules in Control Surfaces

Post by Oneiroi » Mon Jan 18, 2021 2:11 am

Not sure if this is the best place to ask this, but I don't know of any Ableton Python programmers community... I'm trying to add keystroke events in my control surface script for controlling things not possible with the current Live API. I've installed pynput and it works fine, but when I try it with Live, the log file says it can't find the module. Is there any way to use external Python libraries in Live?

I'm fairly new at scripting, so some of these concepts are beyond me, but I can get around with controlling most of Live's objects through Control Surface scripts. Thanks for your help!

hdrpbx
Posts: 70
Joined: Fri Jan 16, 2009 12:05 pm
Location: Italy
Contact:

Re: Import Python Modules in Control Surfaces

Post by hdrpbx » Wed Jan 20, 2021 7:51 pm

I have never tested it but you could try this

https://pypi.org/project/pyinstaller/

Oneiroi
Posts: 34
Joined: Sat May 30, 2015 6:34 pm

Re: Import Python Modules in Control Surfaces

Post by Oneiroi » Mon Jan 25, 2021 2:27 am

Hhmm, thanks for the tip. Unfortunately it gave me this error:

Code: Select all

ImportError: bad magic number in 'clyphx_pro': b'\x03\xf3\r\n'
That magic number sounds very interesting.

The Rabbits
Posts: 137
Joined: Tue Apr 07, 2020 2:23 pm

Re: Import Python Modules in Control Surfaces

Post by The Rabbits » Mon Jan 25, 2021 5:01 am

I've been working on a script over the last week and one thing I noticed was Clyphx is generating errors and won't load. Might have something to do with the problem you're having.

I'm learning python as well as the live object model all at the same time, so I can't help with the details at the moment.

The Rabbits
Posts: 137
Joined: Tue Apr 07, 2020 2:23 pm

Re: Import Python Modules in Control Surfaces

Post by The Rabbits » Mon Jan 25, 2021 5:02 am

I've been working on a script over the last week and one thing I noticed was Clyphx is generating errors and won't load. Might have something to do with the problem you're having.

I'm learning python as well as the live object model all at the same time, so I can't help with the details at the moment.

I'm working in the Live 11 beta as well.

S4racen
Posts: 5895
Joined: Fri Aug 24, 2007 4:08 pm
Location: Dunstable
Contact:

Re: Import Python Modules in Control Surfaces

Post by S4racen » Mon Jan 25, 2021 12:10 pm

Live 11 uses a newer version of Python.

Cheers
D

The Rabbits
Posts: 137
Joined: Tue Apr 07, 2020 2:23 pm

Re: Import Python Modules in Control Surfaces

Post by The Rabbits » Mon Jan 25, 2021 12:35 pm

Yes. I think that's what broke Clyphx.

Oneiroi
Posts: 34
Joined: Sat May 30, 2015 6:34 pm

Re: Import Python Modules in Control Surfaces

Post by Oneiroi » Wed Feb 03, 2021 2:27 pm

S4racen wrote:
Mon Jan 25, 2021 12:10 pm
Live 11 uses a newer version of Python.

Cheers
D
Should we expect a newer version of ClyphX as well?

Post Reply