This is a live midi device patch Ive made for educational/exploratory purposes. It lets you navigate (hopefully!) all of the live object model via a simple UI and as such may help considerably in helping people find their way around it.
It is a single huge patch rather than chopped up into patchers/bpatchers - thats really because I wanted to see the whole thing together. Those with smaller screen may find that a pain when not in presentation mode.
Also buried in here is what I think is quite a good reusable subpatcher for dealing with live path storage, including the ability automatically track and store changes to a path (due to user moving the device from one track to another for example) as well as notify them back to the host patcher and without crashing Live as this has to be done in a thread safe manner.
You can see the effect of this by clicking "Goto Live Set", then selected "appointed_device" from the Children menu, then watch the Current Path while you drag the device from one track to another. Same applies if you move another device that is currently selected.
One word of warning, it seems that some paths will crash live if there is nothing on the end of them, for example, attempting to navigate to the view's detail_clip will cause a crash because obviously while messing with this, you will not have a clip detail view open :)
Another quirk is that live.path's goto up message doesnt seem to work with objects that have a canonical_parent child.
Anyway - I hope some people will find this useful in finding your way around M4L and take alot of experimentation and guess work out of accessing objects.
Some learnings from writing this (for any who dont know already):
Object Ids are dynamically generated on a per patch basis, thus (as is often mentioned here) cannot by relied upon for storage. In fact they will vary according to the order in which objects happen to be accessed.
Due to above, you need to store live paths instead. However, live paths only work so long as the object stays in the same place - so if a user moves a device from one track to another, then the stored value will no longer be valid. You need to do change tracking on a live.path and keep the pattr store updated (as mention above, there is a subpatcher buried in here to do all this).
live.path object middle (path id) output - do not invoke live.object or live.path in response to a change here you your code didnt cause directly.
Doing so will definately crash live (on a pc at least). I'm guessing that change notification from this object come from another thread) - so use a deferlow object inline to avoid this.
Some live objects only work when live is in a certain state (the detail clip in the view above for example). I havnt yet looked into checking some property or other to find out if accessing these child object is valid. Unfortunately the object model behaviour is not helpful here (it crashed Live!).