Giter Club home page Giter Club logo

Comments (6)

egasimus avatar egasimus commented on June 8, 2024

Maybe you need to do your init code within a with self.component_guard(): block? I can't remember if this was the exact issue I was having but I do remember ending up with somewhat similarly cryptic error message if I forgot my component guards.

from abletonlive9_remotescripts.

kithara avatar kithara commented on June 8, 2024

Hi egasimus,

Thanks for your response. It turns out there is something new in relation to that with component_guard() statement. I did some more googling and found this on the Ableton forums which solved my problem:
https://forum.ableton.com/viewtopic.php?f=1&t=200513&start=0

The missing piece was this:
from future import with_statement #compatibility for Live 9, need to be written at the first line of script

So of course I inspected the source on GitHub and I find the same import statement in the Axiom_DirectLink.py and yet neither the current decompile, or the one I did the other day from the 9.1.5 scripts directory works for different reasons.

Well, I will have to sleuth further, but at least for now my hello world example is working.
Kithara

from abletonlive9_remotescripts.

egasimus avatar egasimus commented on June 8, 2024

Ah yes, the from __future__ import is there because Live uses Python 2.5 internally. So you neeed to do that in order to make it actually undestand the with statement which AFAIK was first implemented in 2.5 but enabled by default only in 2.6. It's a Python thing, not an Ableton thing per se.

For reference, here's what component_guard looks like. Hmmm...

from abletonlive9_remotescripts.

kithara avatar kithara commented on June 8, 2024

So far, I'm having success starting from scratch with a hello world script however, when I try to work with any decompiled Axiom Directlink script found in this repo (9.1.4), or my own decompiled version (9.1.5) of the scripts I have zero luck so far.

I am wondering if I am missing something basic. What I have done is:

  • Backup Axiom Directlink pyc files from MIDI Remote Scripts folder in my current Live Resources folder.
  • Copy the 9 *.py files from my clone of this repo to the MIDI Remote Scripts folder.
  • Restart Live... The py files are all compiled to byte code.
  • 'No blue lights' on my Axiom 61 indicating updates to the axiom,j the faders don't work etc. The keyboard sends midi ok.

When I check the logs, I get:

27212 ms. RemoteScriptMessage: (Axiom_DirectLink) Initialising...
27215 ms. Exception: Script could not be loaded.

I have tried a full backup of MIDI Remote Scripts with a full copy of the 9.1.4 repo files. In this case, nothing works at all (meaning my other devices also do not work).

Here is my setup:
Ableton 9.1.5
Windows 7
Axiom 61 (2nd Gen), Launch Control, APC 40 and Oxygen 25.

It may well be as simple as - I'm on 9.1.5 and the 9.1.4 scripts won't work. However, my own decompile of the production pyc also does not work.

I have decompiled with my own build of pycdc for windows. I built this in Visual C++ 2013.

My next step would be create an Axiom_Directlink2 folder and slowly build the axiom script to full functionality line by line to find the problem. This would be painful, but I would learn alot I guess.

By the way - why do all the script files in this repo have this as the first line:
#Embedded file name: /Users/versonator/Jenkins/live/Binary/Core_Release_64_static/mid (etc...)
Where is that coming from. When I decompile, I don't see that in my results.

Thanks for any help

from abletonlive9_remotescripts.

egasimus avatar egasimus commented on June 8, 2024

#Embedded file name: /Users/versonator/Jenkins/live/Binary/Core_Release_64_static/mid (etc...)

This is obviously a path on the original developer's machine. :-) Jenkins is a "continuous integration" system that Ableton are apparently using for their builds.

"Script could not be loaded" sounds very much like an exception during the initial parsing of the script, such as an ImportError or perhaps SyntaxError... I'm shooting in the dark here, since I've never done any pyc decompilation myself (and abandoned the Ableton scripting battle quite early anyway) -- but could the decompiler be outputting Python code in a more recent version of the language, e.g. 2.7 or 3.0+? You should be aiming for Python 2.5 since that's what Ableton has.

from abletonlive9_remotescripts.

kithara avatar kithara commented on June 8, 2024

Hi Adam,

I will post something more substantial tomorrow. I just spent the last 6
hours doing printf debugging to the Ableton log, restarted Ableton about 50
times and finally got the axiom direct link script working. I have blue
lights, and I have to test more tomorrow to see if all the axiom Features
are working.

What I ended up doing was fixing a bunch of logic around setting up shift
buttons for the mixer, session Clip slots and the transport buttons.

I suspect that you maybe right; some side effect of my decompilation was
messing with Boolean operations and comparisons with None. So that was my
decompilation, but the copy on github didn't work for me either so the same
problem could be effecting other scripts in the repo

Anyway thanks for your response and I'll let you know what else I discover

Kithara

On Monday, November 10, 2014, Adam Avramov [email protected] wrote:

#Embedded file name:
/Users/versonator/Jenkins/live/Binary/Core_Release_64_static/mid (etc...)

This is obviously a path on the original developer's machine. :-) Jenkins
http://jenkins-ci.org/ is a "continuous integration" system that
Ableton are apparently using for their builds.

"Script could not be loaded" sounds very much like an exception during the
initial parsing of the script, such as an ImportError or perhaps
SyntaxError... I'm shooting in the dark here, since I've never done any pyc
decompilation myself (and abandoned the Ableton scripting battle quite
early anyway) -- but could the decompiler be outputting Python code in a
more recent version of the language, e.g. 2.7 or 3.0+? You should be aiming
for Python 2.5 since that's what Ableton has.


Reply to this email directly or view it on GitHub
#20 (comment)
.

Sent from Gmail Mobile on my iPad

from abletonlive9_remotescripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.