Page 1 of 1

APC-40 Python Midi Script question: Targetting Device Racks

Posted: Tue Dec 21, 2010 3:10 pm
by quirksmode
Does anyone know how to target a device rack that is placed within a rack? I would usually use the following to target an outer rack (Rack1), but I cannot work out how to target a rack that is placed within another rack (Rack1 > Inner Rack).

for device in song().master_track.devices
if device.name == "Rack1":
# do something

Hope that makes sense?

Re: APC-40 Python Midi Script question: Targetting Device Racks

Posted: Tue Dec 21, 2010 4:49 pm
by S4racen
It can't be done in M4L so i expect it cant be done with control surface scripts either....

Cheers
D

Re: APC-40 Python Midi Script question: Targetting Device Racks

Posted: Tue Dec 21, 2010 10:53 pm
by quirksmode
Thanks for getting back to me, that's such a shame about not being able to target them, fingers crossed they will address this with the next release. Do you know anything about Cue points in Ableton. I stumbled across this and was wondering if it can indeed be achieved with a bit of tinkering?

http://www.cycling74.com/docs/max5/refp ... l#CuePoint

Re: APC-40 Python Midi Script question: Targetting Device Racks

Posted: Wed Dec 22, 2010 12:08 am
by quirksmode
Think I have found a way around my initial problem, but now need to link two knobs together from separate devices, which ableton annoying doesn't let you manually map yourself. Got the code I need and it works fine, but it currently only triggers when a button is pushed and I need it to automatically/constantly trigger whilst the main knob is being turned.

self._parent.song().tracks[track_index].devices[2].parameters[8].value = self._parent.song().tracks[track_index].devices[0].parameters[1].value

Any ideas? :-)

Re: APC-40 Python Midi Script question: Targetting Device Racks

Posted: Thu Dec 23, 2010 9:45 am
by quirksmode
I also found that cue_point is a child of song() and there are commands to jump to cue points. Are these hidden commands in ableton and can they be unlocked with some scripting or am I barking up the wrong tree?


cue_points CuePoint get, observe Cue points are the markers in the arranger to which you can jump.

can_jump_to_next_cue bool get, observe The reason why it can't jump (0=cannot jump) is that there is no cue point to the right of the current, or none at all.

can_jump_to_prev_cue bool get, observe The reason why it can't jump (0=cannot jump) is that there is no cue point to the left of the current, or none at all.