Canonical parents, please help

Learn about building and using Max for Live devices.
Post Reply
olivierseb
Posts: 230
Joined: Sun Dec 11, 2005 8:52 pm
Location: FRANCE
Contact:

Canonical parents, please help

Post by olivierseb » Thu Oct 01, 2009 4:33 pm

Hi,
Could someone help me to understand exactly what this means.
I watched the excellent screencast about path, but I am still puzzled about this.

the defiitions given in Live Obeject Model reference doesn't help

thanks a lot

Olivier
Image

MacBookPro17", mac OS 10.6.2/RME FF400 & FF800
http://www.olivierseb.com

Max for Live training sessions in Paris @
http://www.apaxxdesigns.com/

Max for Live training sessions in Rennes @
http://www.intouchmedia.fr

ztutz
Posts: 100
Joined: Sat Jul 30, 2005 5:59 pm
Contact:

Re: Canonical parents, please help

Post by ztutz » Thu Oct 01, 2009 8:04 pm

Hi Olivier - I haven't found any official doc for this, so that gives me license to speculate. :)

In geek lingo, a "canonical path" is the one true path that conforms to the well-established conventional patterns. It is unambiguous.

There are other kinds of paths that are not canonical. For example, a path containing "this_device" is essentially a nickname. When you deref it, its canonical name turns out to be "live_set tracks N devices M" (according to the object model diagram...)

If you look carefully at the object model diagram on the Live Object Model refpage, the solid black lines represent the canonical relationships between objects. The dotted lines, on the other hand, are relationships that are also available to you as a programmer, but these "reference relationships" are not part of the set of base relationships that stitch the whole model together. For example: visible_tracks is certainly a useful path, but if push comes to shove, you can use the canonical relationships to find the same info, by looking at all of the tracks and checking their is_visible property.

Soooo....to get back to the question: canonical_parents is very useful for an object to use that wants to know unambiguously where it stands in the object model at a given moment. There are many places that the doc refers to the relationship between "current path" and "id" - clearly a specific object can move around in the path structure, since Ableton is a very dynamic environment. And the API object has two different navigational modes, which have not yet been documented. So I'm sure that there is much more documentation to come...

Sorry to be so long-winded! Hope it is helpful.

olivierseb
Posts: 230
Joined: Sun Dec 11, 2005 8:52 pm
Location: FRANCE
Contact:

Re: Canonical parents, please help

Post by olivierseb » Thu Oct 01, 2009 8:56 pm

Thanks a lot.
I think I start to undestand now, have to pratice a bit to confirm this.
So we could say canonical path are kind of absolute path when non canonical are relative.

About an object's path when this object moves in live, does it keep its Id ?
if so, does its canonical path changes ?

Thanks again
Olivier
Image

MacBookPro17", mac OS 10.6.2/RME FF400 & FF800
http://www.olivierseb.com

Max for Live training sessions in Paris @
http://www.apaxxdesigns.com/

Max for Live training sessions in Rennes @
http://www.intouchmedia.fr

ztutz
Posts: 100
Joined: Sat Jul 30, 2005 5:59 pm
Contact:

Re: Canonical parents, please help

Post by ztutz » Thu Oct 01, 2009 10:56 pm

Relative versus absolute paths are different ways of navigating, while "canonical" is more about being the sanctioned name for a given object.

Here is a little patch that shows a live.path in action. Several things to try:

1) Send the "this_device" message, and note your ID.
2) Send the "canonical_parent" message, and note its ID.
3) Drag your device to another track - watch how the IDs change.
4) Relative motion: send "this_device", followed by "goto canonical_parent" twice. Note the IDs.

Two other small things to note, that may be obvious:
ID 0 is used as a NULL identifier.
Up to persistence, IDs don't appear to change. If you close the set and then reopen it, you will get different IDs.


----------begin_max5_patcher----------
671.3ocwW1riaBCDG+L7TXw4zH+Ae1aspWpT6SP0pHufShaA6nfytoc09tWX
LYKUAZYg.6EGECyX6e+GOyvStNd2qOKJ8PuG8MjiyStNNvT0S3z7eGuB94zb
dI7Zd4xGDqykJg2J6SUmJzmL4BC7bbyrGNJJEJC2H0pMGEoF6ZPRhWiWghpG
BpGHAj0XzcWrhaR2KU6ZYAEae4j+XBF21jVKTsEjl4kYv1Ue+2eWPqspTcYm
Rpm6YW25gUC7vWHJK46d4naDmgcY89dOplLaJEFj4HO8GkHBJS7fLUThvWLn
lao5SJvJZm.7x9eqVYT7BA3+ObTxyQeTmmcwSVKL+7fvhIOuNIRaPR.34a+w
xSRXKRVuhkxeANjTg390Dher0IvHCDHZzqSTXzNUE5bqJ3qUkkR.n.tHQSW.
nDvW9VWEFekqFh.fuYBPptnnZ0tR.9pLKKWfrnB84OgR2yU6pP+i6EJT0ln5
.gpbhNUxMhLzixJACTslWry6Mrtv7.tYgGlv1m5YybkDBrNA3OMYbWehXf0r
laQXPKIuN4iFeyxp0m78EwVSehGnRRSoHe6+TrnuQhEb6Jj9RIlQKVfFQ8ws
jp+xSCQphlqBPKUlKlMpG6CEgwSozQSruMAVGtZH7DO6kN1oM5qKnu3XGx3X
YjEXik5AVqoQ84qAfcBatv9hwSngkvjoGEiwSNJlPeahhW71dfjFgg2fn3lv
WLYJQw9yUaO2xBXLLb3XMsYXCvhGWuhA91XURe9ZHTiL6eCEDrlxUZkLkmu4
.+Xurc1hUIPpAFqci5irCca29QQ84pgTmiM+YHDl5N4V7DwVNSZ+QLiLk.3n
ndbz.fr+xjE1rWVtw9kmKMrsW3gw3jom9MJrGOMjzHA+WZity8Y2ea0+BhH
-----------end_max5_patcher-----------

matcham
Posts: 29
Joined: Fri Mar 06, 2009 1:35 pm

Re: Canonical parents, please help

Post by matcham » Fri Oct 02, 2009 6:49 am

hey

this device (Live.API_explorer) I just posted in this thread http://forum.ableton.com/viewtopic.php?f=35&t=125694 should help you surfing the LOM !

MathieU
________________
Mathieu Chamagne
http://mathieuchamagne.com

olivierseb
Posts: 230
Joined: Sun Dec 11, 2005 8:52 pm
Location: FRANCE
Contact:

Re: Canonical parents, please help

Post by olivierseb » Fri Oct 02, 2009 7:01 am

wonderfull !
exactly what I planned to do.

Merci Mathieu :D

olivier
Image

MacBookPro17", mac OS 10.6.2/RME FF400 & FF800
http://www.olivierseb.com

Max for Live training sessions in Paris @
http://www.apaxxdesigns.com/

Max for Live training sessions in Rennes @
http://www.intouchmedia.fr

Post Reply