sensel-controller-scripts icon indicating copy to clipboard operation
sensel-controller-scripts copied to clipboard

Ableton 9 Support

Open jscheel opened this issue 5 years ago • 13 comments

What would be needed to support Ableton Live 9?

jscheel avatar Aug 28 '19 22:08 jscheel

Hmm, so I just found this great tool that compares the docs from each ableton version. Here is 9.7.0 -> 10.0.1:

https://nsuspray.github.io/Live_API_Doc/9.7.0-10.0.1.xml

And here are the framework docs for 9: https://julienbayle.studio/AbletonLiveRemoteScripts_Docs/_Framework/

jscheel avatar Aug 29 '19 19:08 jscheel

I tried manually tossing the remote scripts in, to see if Ableton would report any errors. It compiled the python scripts, but the control surface doesn't appear in the list. I don't see any place where Ableton might log errors. Any ideas where to look?

jscheel avatar Aug 29 '19 19:08 jscheel

Ah, n/m on the log location. Found it. This could be a good starting point to tracking down backwards compatibility.

3568 ms. RemoteScriptError:   File "<string>", line 1, in <module>

3568 ms. RemoteScriptError:   File "/Applications/Ableton Live 9 Suite.app/Contents/App-Resources/MIDI Remote Scripts/Sensel_Morph/__init__.py", line 6, in <module>

3568 ms. RemoteScriptError:     
3568 ms. RemoteScriptError: from .Morph import Morph

3568 ms. RemoteScriptError:   File "/Applications/Ableton Live 9 Suite.app/Contents/App-Resources/MIDI Remote Scripts/Sensel_Morph/Morph.py", line 14, in <module>

3569 ms. RemoteScriptError:     
3569 ms. RemoteScriptError: from ableton.v2.control_surface import DeviceDecoratorFactory, BankingInfo

3569 ms. RemoteScriptError: ImportError
3569 ms. RemoteScriptError: : 
3569 ms. RemoteScriptError: cannot import name DeviceDecoratorFactory
3569 ms. RemoteScriptError: 

jscheel avatar Aug 29 '19 19:08 jscheel

The differences between Live 9 and Live 10 support files are the reason it won't compile in the older version. I suspect the amount of changes needed to get things working in Live 9 are small, but I'd have to look at all the diffs between those versions as my memory of all of them isn't so good this late in the game.

If you want to do it yourself, I'd recommend this process (it's what I'd probably end up doing):

  1. Look at the log.txt to figure out what's breaking.
  2. Look at the diffs between Live 9/Live 10 support files to see why it's breaking.
  3. Change it so it's not generating an error.
  4. Recompile by restarting Live.

Rinse, repeat.

I'll take a look at this Friday and see what I can do about it, it's probably not a big deal to back port but it's been a while since I've looked at the Live9 framework so no guarantees....

Also, fwiw I don't think you're going to get much mileage out of the API docs refs you're using, but here's a couple decompile diffs I maintain (the one for Live10 isn't current, but it'll get you what you need since you're working with the 10.0.1 release version of the script):

https://github.com/aumhaa/livepy_diff https://github.com/aumhaa/livepy_diff_ten

aumhaa avatar Aug 29 '19 20:08 aumhaa

Yep. that's what I'm doing right now. I've taken care of a few things so far. Will post a PR when possible. Thanks for the pointers. Once I got a feel for the framework around the scripts, it started to make sense.

jscheel avatar Aug 29 '19 20:08 jscheel

@aumhaa so, it looks like 10.0.4 had some pretty big changes, but I don't have access to the scripts for that version. Any chance you have those somewhere?

jscheel avatar Aug 29 '19 20:08 jscheel

I maintain one but I had to move to private repo b/c I use it for diffing between alpha/beta/release versions of Live and I'm under NDA. I'll try to find time to copy only the release branch over to the my public repo as soon as I get a chance.....and yes, as you observed, there are some substantial framework changes at 10.0.4 if I remember correctly.

Julien Bayle used to maintain one somewhere, too, but I don't think it's up to date.

a

aumhaa avatar Aug 29 '19 20:08 aumhaa

Yes, you're right, Julien Bayle's is also out of date. I'll hang tight for your release branch!

jscheel avatar Aug 29 '19 20:08 jscheel

Give it a spin-up now, I copied all of the release branch over to livepy_diff_ten. Let me know if you have any other trouble, I didn't actually get a chance to look at the scripts at all and my next window is after Tuesday but I'm glad to help when I get the time....good luck!

aumhaa avatar Aug 31 '19 06:08 aumhaa

Awesome, thanks! I'll dig in when I get a moment and post my results.

jscheel avatar Sep 02 '19 02:09 jscheel

Ok, I've gotten somewhere with this. Basically, there seems to be a lot of things that were in pushbase in 9, that got properly abstracted out to the api in 10. I have a proof of concept working, though it's probably wrong in some important way 😆. I need take my change and make it work with both versions, so I need to figure out how to do some version detection.

jscheel avatar Sep 02 '19 22:09 jscheel

Haven't forgotten about this, just been super swamped. I'll get a PR cleaned up at some point soon.

jscheel avatar Sep 12 '19 14:09 jscheel

No worries, I've been in the same situation...let me know when you get something stable working.

aumhaa avatar Sep 20 '19 00:09 aumhaa