observing Launchpad focus area (red ring)?

Questions and discussion about building and using Max for Live devices
Post Reply
hyaahyaa
Posts: 21
Joined: Thu Oct 22, 2009 2:35 am

observing Launchpad focus area (red ring)?

Post by hyaahyaa » Sun Jan 17, 2010 10:36 pm

Poking around in matcham's very useful Live API explorer (http://forum.ableton.com/viewtopic.php?f=35&t=125694), I figured out I could set the position of the Launchpad's focus area (the colored ring around the clips/tracks you're controlling) by sending "call set_offsets" to a live.object pointed at the launchpad's session component. I could also find its position by sending "call track_offset" and "call scene_offset", however, I couldn't find a way to tell live.observer to do it for me.

I suppose I could just make those function calls every time an arrow key was pressed, but that seems a little clunky to me. Anyone have any idea how to do this?

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

Re: observing Launchpad focus area (red ring)?

Post by S4racen » Mon Jan 18, 2010 12:40 pm

As the only way to my knowledge of moving the red box (i have an apc40) is to press the arrow button i imagine that this is the only way to bang a message to update the live.object

Thanks for finding it though, i wonder how much work i'm gonna need to change my patches so they move with the red box as currently i have lots hard wired into the fact that i use just 8 tracks, would be good to be able to move across and have more tracks....

Cheers
D

ring (Simon Slowik)
Posts: 121
Joined: Fri Oct 30, 2009 3:35 pm

Re: observing Launchpad focus area (red ring)?

Post by ring (Simon Slowik) » Mon Jan 18, 2010 7:05 pm

that's exactly what I also found out, and - what a pitty - what I also did not find out.

I wrote a eMail to the ableton support with (funny!) exactly the same question, but they didn't answer yet. They only told me, that it isn't properly documented yet.

...So let's push them together... :)

Markemark
Posts: 250
Joined: Mon Jun 22, 2009 3:51 pm

Re: observing Launchpad focus area (red ring)?

Post by Markemark » Sun Feb 14, 2010 10:30 pm

ring wrote:that's exactly what I also found out, and - what a pitty - what I also did not find out.

I wrote a eMail to the ableton support with (funny!) exactly the same question, but they didn't answer yet. They only told me, that it isn't properly documented yet.

...So let's push them together... :)
Any answer on this yet? I'd like to observe these offsets too and right now all I'm getting is "property cannot be listened to"

Adam YW
Posts: 14
Joined: Wed Jul 26, 2006 10:12 pm
Location: Windsor, Ontario, Canada
Contact:

Re: observing Launchpad focus area (red ring)?

Post by Adam YW » Thu Oct 21, 2010 2:26 am

I want to kinda do the opposite... I want to change the focus ring of my launchpad by pressing track select buttons on another controller (so when I select a track it becomes the leftmost track in the launchpad's focus ring). Ideas?

ShelLuser
Posts: 3610
Joined: Sun Dec 06, 2009 10:26 pm
Location: Wageningen, Netherlands

Re: observing Launchpad focus area (red ring)?

Post by ShelLuser » Thu Oct 21, 2010 4:35 am

Adam YW wrote:I want to kinda do the opposite... I want to change the focus ring of my launchpad by pressing track select buttons on another controller (so when I select a track it becomes the leftmost track in the launchpad's focus ring). Ideas?
Should be easy; if you can intercept the keypresses then just have your patch call the right function in the launchpad script.

The only thing which you obviously can't do is observe a function's output (I know the thread is dated, just mentioning it).
With kind regards,

Peter

Using the Big Trio: Live 10 Suite (+ Push & Max 8 ), Reason 10 and Komplete 12.
Blog: SynthFan

ShelLuser
Posts: 3610
Joined: Sun Dec 06, 2009 10:26 pm
Location: Wageningen, Netherlands

Re: observing Launchpad focus area (red ring)?

Post by ShelLuser » Thu Oct 21, 2010 5:05 am

Now, this whole thread is dated and I kinda suspect that the api navigator also spit out flawed values in those days (I don't use it, but for example; the class required to control the ring is different on a per-controldevice basis; the thing which is equal is its name ('Session_Control')) yet I kinda wonder here if it really is impossible to listen for changes...

When going over this using my lom.navigator I noticed calls named "on_selected_scene_changed", "on_selected_track_changed" together with a (not so obvious) "link_with_track_offset".


I wonder.. When I call "on_selected_scene_changed" the outcome is 0. Its also a function which doesn't accept parameters.

I'm not familiar with Python, but I am with Java. In Java you can "overload" (wrong term probably) classes where you basically change one (or more) specific methods for that class with your own.

IN other words; if method X in class A gets executed what is actually happening is that your_method X is used.

Wouldn't the same be possible here ?


My programming expertise solely confines itself to Max (optionally expanded with Java) and that's it so far. But I wonder...
With kind regards,

Peter

Using the Big Trio: Live 10 Suite (+ Push & Max 8 ), Reason 10 and Komplete 12.
Blog: SynthFan

Hanz_Petrov
Posts: 119
Joined: Sat Feb 06, 2010 2:39 pm
Contact:

Re: observing Launchpad focus area (red ring)?

Post by Hanz_Petrov » Thu Oct 21, 2010 4:20 pm

Hi ShelLuser,

You're not wrong - in python one can indeed override a method to change its functionality. In this case you would need to override the _bank_left_value, _bank_right_value, _bank_up_value, and _bank_down_value methods if you want to receive notification when the red ring is moved by a control surface (perhaps via a new method which might be called "on_session_highlight_moved" or something similar). The LiveAPI does not provide a red ring position listener, which means that the only other choice is to poll for changes to the track_offset and scene_offset variables. Of course, moving the red ring involves calling set_offsets, which essentially sets these last two variables to new values.

on_scene_list_changed, on_selected_scene_changed, on_selected_track_changed, and on_track_list_changed are ControlSurfaceComponent notification methods, which are meant to be overridden by child components - basically allowing a script to take action when the session state changes. link_with_track_offset is used to "link" SessionComponents from two or more control surfaces (known as "combination mode" and currently only offically used for the APC20/APC40).

Don't know if any of this is helpful or not, but there it is , from a python framework script point-of-view (which is where it all starts).

Best,

Hanz
http://remotescripts.blogspot.com/ - an introduction to the Framework classes

ShelLuser
Posts: 3610
Joined: Sun Dec 06, 2009 10:26 pm
Location: Wageningen, Netherlands

Re: observing Launchpad focus area (red ring)?

Post by ShelLuser » Thu Oct 21, 2010 4:41 pm

Hanz_Petrov wrote:Don't know if any of this is helpful or not, but there it is , from a python framework script point-of-view (which is where it all starts).
Hi Hanz,

This is very helpful and useful to me, thanks very much!

Not only does it confirm that what I already came to suspect, but I'm also glad to learn that everything I "dug up" from the live.api using my explorer is also fully consistent with reality.

I'm definitely saving the info you gave here so that I got some leverage should I ever dig further into Python (already "de-compiled" some of the midi remote scripts, a technique I'm familiar with due to my Java backgrounds) but right now I'm not going to dive into this too deeply.

Thanks again.
With kind regards,

Peter

Using the Big Trio: Live 10 Suite (+ Push & Max 8 ), Reason 10 and Komplete 12.
Blog: SynthFan

akaratz
Posts: 17
Joined: Thu Aug 30, 2007 2:30 pm
Contact:

Re: observing Launchpad focus area (red ring)?

Post by akaratz » Mon Oct 17, 2011 6:08 pm

Hey guys!
This topic is quite old, but he treats about a question which stays unresolved.

So, does someone has an idea how to move the "red ring" with MFL, bypassing the py control surface scripts.

I use a Novation Launchpad and I have a second "blue ring", 4x4 matrix, connected to a external keypad. Moving the second is easy, but moving the Launchpad one, unless recode some parts of the CS scripts (first I must decompile them :x ) seems impossible, even with a complex midi message transcription.

I passed few hours with the Live API Explorer, putting random values on random places, no success.

So, does someone discovered hot to achieve that? - Moving around and getting the relative position of the "rings"?

Please, I'm a Newbi in MFL, so be patient :)

amounra93
Posts: 431
Joined: Sat Jan 24, 2009 8:16 pm
Location: Arcata, CA
Contact:

Re: observing Launchpad focus area (red ring)?

Post by amounra93 » Mon Oct 17, 2011 7:07 pm

It requires some hot-rodding of the py scripts in order to do what you want....it can be accomplished with a combination of m4l and custom _Framework scripts, but the _Framework does not support it 'out of the box'.

a
http://www.aumhaa.com for Monomod and other m4l goodies.

Forge.
Posts: 5792
Joined: Wed Jun 24, 2009 2:16 pm
Location: Earth
Contact:

Re: observing Launchpad focus area (red ring)?

Post by Forge. » Wed Oct 09, 2013 7:02 am

does anyone know how to move the red box with Push?

Post Reply