Midi Remote Scripts Community and Playhead feedback problems

Discussion of music production, audio, equipment and any related topics, either with or without Ableton Live
cylab
Posts: 2
Joined: Sat Dec 31, 2016 9:46 am

Midi Remote Scripts Community and Playhead feedback problems

Post by cylab » Sat Dec 31, 2016 10:47 am

Hi there

I am new to Ableton and bought myself am APC40 MK2. I am trying to migrate the Step Sequencer of Will Marshall (http://forum.djtechtools.com/showthread.php?t=84554) to Ableton 9.7.

I have it roughly working by frankensteining code from Martin Pechmanns APC400000, but I don't get any button highlight on played drums and also there is no running light showing the playhead position in the steps. When I was searching for answers, I was quite shocked, that there doesn't seem to be a community for Ableton Remote Scripts anywhere. Am I searching in the wrong places or is nobody doing scripts??? If so, why is that?

Anyway. I seem to not understand the concept of feedback channels here. I assume these are the midi channels over which the current played note gets sent back to the device. But why do they need to be set and how and why do they differ from the midi channel selected for a track? Or something is missing in the APCDrumGroupComponents (https://github.com/cylab/APCequencer/bl ... mponent.py)

If anybody could point me to some more information or a vivid community forum for this stuff, I would be thankful. So far I found:
- Hanz Petrov's site: http://remotescripts.blogspot.de/
- Julien Bayle's site: http://julienbayle.net/ableton-live-9-m ... e-scripts/
- Martin Pechmann's APC400000: viewtopic.php?f=1&t=217646&p=1675572&hi ... 0#p1675572

My git repo with the partly working Step Sequencer for the APC40 MK2 is here:
(needs to be checked out to <Ableton-Live>/Resources/MIDI Remote Scripts/APCequencer)
https://github.com/cylab/APCequencer

It depends on the 9.2 version of Push scripts I put in here
(needs to be checked out to <Ableton-Live>/Resources/MIDI Remote Scripts/_PushLegacy)
https://github.com/cylab/_PushLegacy

I also forked Julien Bayle's Remote Script Repositories to add the decompiled 9.7 scripts for reference:
https://github.com/cylab/AbletonLive9_RemoteScripts

and generated a Python Stub of Live's API to include in an IDE (I use Intellij/PyCharm)
https://github.com/cylab/AbletonLive-API-Stub

Any help would be greatly appreciated!
Mathias

P.S.
If you are interested, you can even use PyCharm's awesome debugger with the Remote Scripts by unpacking the pycharm-debug.egg's contents to <Ableton-Live>/Resources/Python/site-packages/pycharm-debug.egg, create a new Python Remote Debug configuration in PyCharm (using localhost and e.g. port 4223) and put

Code: Select all

    import pydevd
    pydevd.settrace('localhost', port=4223, stdoutToServer=True, stderrToServer=True)
in the __init__ method of the script you want to debug. Everything is there - including stepping, (exception-)breakpoints, variable inspection and custom code execution in context of the current code frame!

eMPac
Posts: 5
Joined: Wed Aug 22, 2012 5:02 pm

Re: Midi Remote Scripts Community and Playhead feedback problems

Post by eMPac » Sun Jan 01, 2017 4:32 pm

Hi Mathias,

Hanz's and Julien's sites that you listed are pretty much the only bits of documentation on Live scripts I know of. (There are two introductory articles I just found: controlling-the-controllers-communicating-with-and-controlling-live-scripts-part-3/ and launching-one-clip-at-a-time-in-ableton-live-9-with-the-apc40) Another useful resource is Vladimir Zevakhin's Live API Documentation (https://nsuspray.github.io/Live_API_Doc/). So there are a few people doing scripts, but not a community like for instance with Bitwig, I suppose.

The main problem is lack of documentation. I think Ableton don't (or didn't in the past) want to document things, because the API and Framework were constantly changing. With Push 2 there seems to be an effort on Ableton's part to consolidate the Framework somewhat (there appears to be a completely new Framework version compared to what Hanz Petrov was working with: https://github.com/gluon/AbletonLive9_R ... ableton/v2). At this time the best idea is probably to study the decompiled Push scripts, if you seriously want to get into controller scripting. These are scripts that were developed by Ableton themselves and respresent the state of the art, so to speak.

About the playhead feedback: I don't think the feedback channel definition is exactly for sending midi notes to the APC in the ordinary way. Specifically, a track's midi channel setting is an entirely different concept. What you need to know is that the APC doesn't really do anything on its own. If you want it do have a button light up, you need to have the script send it a certain midi message that's in the format of a midi note message. (There's a reference document for the APC Mk1 here: APC40CommunicationsProtocolrev1.pdf)

So I think in Will Marshall's script the APC's button matrix is being told to listen to one specific midi channel and light up according to the pre-formatted messages that Live generates for the APC. In my script (the APC400000 version for the APC Mk1) I never got the playhead feedback to work, so there might be some artifacts from my own failed attempts in there. One thing you could try is to uncomment the _update_control_from_script method in the APCDrumGroupComponent class. Actually I'm surprised that things don't just work with Will Marshall's original script and the legacy Push classes from 9.2. I'd be interested to know why not, if you can get it to work. Another thing to be careful about is that there can always be some problems in decompilation. For example I'm using the 'Easy Python Decompiler' and I always have to fix instances of the raise command manually.

The PyCharm debugging method looks intriguing, thanks for that! I hope this helps and hopefully you can come up with some cool scripting for the APC,

Martin

cylab
Posts: 2
Joined: Sat Dec 31, 2016 9:46 am

Re: Midi Remote Scripts Community and Playhead feedback problems

Post by cylab » Sun Jan 01, 2017 5:10 pm

Hi Martin

Actually browsing through the decompiled scripts is what I was doing the whole week prior to christmas (happy new year by the way :)), but unfortunately the framework puts in too much abstractions to really get to the low level part for debugging the behaviour. I would love to find a way to actually trace the messages sent by ableton (e.g. the playhead position notes and the note feedback), but it looks, that these parts are on the native/C side of the API :/.

Also some more insight on the layering of the API would also be helpful. Especially with things like the PlayheadComponent and the PlayheadElement (which is in fact only a proxied wrapper for the native object). A lot of the code I have seen, seems to be more complicated, than it should be, in the sense that there is a lot of code and callbacks involved to form a component, without them actually doing much - and having this fancy-pansy dependency injection and layering mechanics, doesn't help either...

I am too surprised, Will Marshalls script don't just work with the legacy Push code, so I assume, something might have changed on the Live side, that I don't understand :/ Therefor I am interested into some know how, how the feedback channel stuff is supposed to work and what purpose they have.

Thanks for your reply!
Mathias

stutter
Posts: 488
Joined: Tue Sep 05, 2006 3:58 pm

Re: Midi Remote Scripts Community and Playhead feedback problems

Post by stutter » Mon Jan 09, 2017 2:29 pm

Thanks for the decompiled 9.7 scripts (sorry, I'm no help re: your q)

snappyass
Posts: 60
Joined: Sat Jan 04, 2014 1:40 pm

Re: Midi Remote Scripts Community and Playhead feedback problems

Post by snappyass » Thu Mar 16, 2017 6:27 am

Hi. are you still working on this?

snappyass
Posts: 60
Joined: Sat Jan 04, 2014 1:40 pm

Re: Midi Remote Scripts Community and Playhead feedback problems

Post by snappyass » Thu Mar 16, 2017 7:15 pm

I have taken wills script and replaced all the 'from .push' parts of the code with 'from _PushLegacy' and then installed the push legacy script you have linked and it seems to almost be working.

tweety3
Posts: 10
Joined: Wed Mar 15, 2017 7:44 pm

Re: Midi Remote Scripts Community and Playhead feedback problems

Post by tweety3 » Wed Mar 29, 2017 7:53 pm

Hi snappyass,

please can you help me? do you have install the sequencer functionally to ableton 9.7? i also use the mk2 and the sequencer doesn't run...
i have try to understand your topic in this board but i can't follow your instruction as well :(

can you give me the install script for the push legacy?

i have copy the midi-script-folder in the "Live 9 Suite\Resources\MIDI Remote Scripts". in Ableton i can find now the APCSequencer as a midi-device. but in the input an output field i can only select a APC40 mkII without any reaction on the mkII. I'm not firm im programming python. i'm only a vba-scripter ;)

Please do you have a tip for me or the midi-Script-files they are running with Ableton Live 9.7?

Thanks a lot
Stefan

snappyass
Posts: 60
Joined: Sat Jan 04, 2014 1:40 pm

Re: Midi Remote Scripts Community and Playhead feedback problems

Post by snappyass » Sun Apr 02, 2017 4:10 am

so you need the push legacy script? https://github.com/cylab/_PushLegacy. install it the same place as the apc script. heres a link to the apc script that i have almost working now.
https://www.dropbox.com/sh/lm84txfm4aiu ... rcC6a?dl=0

tweety3
Posts: 10
Joined: Wed Mar 15, 2017 7:44 pm

Re: Midi Remote Scripts Community and Playhead feedback problems

Post by tweety3 » Mon Apr 17, 2017 11:19 pm

Hi snappyass,

excuse please the late feedback.

I have implemented the script in the Ableton-path. So far everything also runs excellently. Only I have two conspicuities. The rolling green steplight is not to be seen if the sequence runs. Is there here one more trick or does make I a little bit wrong?

Otherwise just 4 white Pads are indicated me instead of 8 Pad of the uppermost row. Is this also correct?

Otherwise first-class work of you. At least one sequencer which can be used on the APC40 mkII, finally.

Many greetings
Stefan

snappyass
Posts: 60
Joined: Sat Jan 04, 2014 1:40 pm

Re: Midi Remote Scripts Community and Playhead feedback problems

Post by snappyass » Tue Apr 18, 2017 4:21 am

tweety3 wrote:Hi snappyass,

excuse please the late feedback.

I have implemented the script in the Ableton-path. So far everything also runs excellently. Only I have two conspicuities. The rolling green steplight is not to be seen if the sequence runs. Is there here one more trick or does make I a little bit wrong?

Otherwise just 4 white Pads are indicated me instead of 8 Pad of the uppermost row. Is this also correct?

Otherwise first-class work of you. At least one sequencer which can be used on the APC40 mkII, finally.

Many greetings
Stefan


try this link. I have put n updated script here.(link removed)
Last edited by snappyass on Sun Oct 08, 2017 1:43 am, edited 1 time in total.

tweety3
Posts: 10
Joined: Wed Mar 15, 2017 7:44 pm

Re: Midi Remote Scripts Community and Playhead feedback problems

Post by tweety3 » Tue Apr 18, 2017 12:52 pm

Hi snappyass,

thx for the update. but nothing happens :cry:

Unfortunately, the run light is not indicated. pads of the drumkit shine excellently in time. But the sequence on the right side is not indicated. :oops: :cry:

btw: Nevertheless, it is right, I need only copy and paste the files from you into the existing folders?

Many greetings
Stefan

snappyass
Posts: 60
Joined: Sat Jan 04, 2014 1:40 pm

Re: Midi Remote Scripts Community and Playhead feedback problems

Post by snappyass » Tue Apr 18, 2017 4:23 pm

tweety3 wrote:Hi snappyass,

thx for the update. but nothing happens :cry:

Unfortunately, the run light is not indicated. pads of the drumkit shine excellently in time. But the sequence on the right side is not indicated. :oops: :cry:

btw: Nevertheless, it is right, I need only copy and paste the files from you into the existing folders?

Many greetings
Stefan

Hi. just delete the original midi script and paste/drag the new 1 into its place.
If you hold the top left button of the matrix and/then press shift button the right of the matrix will show green running light :)

tweety3
Posts: 10
Joined: Wed Mar 15, 2017 7:44 pm

Re: Midi Remote Scripts Community and Playhead feedback problems

Post by tweety3 » Tue Apr 18, 2017 5:09 pm

Hi snappyass,

i do not do this with green running. I believe I am too silly. Unfortunately, the key combination does not function with me so properly or I interpret this wrong.

Is it correct then that pads from 5 to 8 do not shine?

I have sent you a link with the video by pm. Then maybe you recognise my problem.

thx
Stefan

snappyass
Posts: 60
Joined: Sat Jan 04, 2014 1:40 pm

Re: Midi Remote Scripts Community and Playhead feedback problems

Post by snappyass » Tue Apr 18, 2017 5:29 pm

sorry you will need to replace the push legacy script aswell (link removed)
Last edited by snappyass on Sun Oct 08, 2017 1:44 am, edited 2 times in total.

tweety3
Posts: 10
Joined: Wed Mar 15, 2017 7:44 pm

Re: Midi Remote Scripts Community and Playhead feedback problems

Post by tweety3 » Tue Apr 18, 2017 6:08 pm

Hi,

it looks like better :D now i can see the complete matrix on the right side. :lol:

However, it should be really in such a way that the green running is not to be seen permanent. only when i press shift the running will be shown. As an orientation on the matrix this would be perfect when the green permanently runs. Also with the key combination "left Pad and Shift" no reaction occurs.

Does the beat runs with the green running on your APC?

Excuse, I irritate you with it. But if the beat still step with green running light in the right matrix constantly, the thing would be really perfect and the sequencer is finish :mrgreen:

Stefan

Post Reply