How to get track number from inside the track.
I have many tracks with the same max4live device in them. I need to know for each device the id of the proper track. Each device must send the number of his track to a message "path live_set tracks $1". Does exist a message witch give the number of the track where it belong? For example: can I ask to live.path something like "this track?" and receive back the track number?
I need it to build a device that can be placed in every tracks but it must knows the number of its track.
Could anybody help me?
thx in advance..
You can use ‘path this_device’ to figure out the track that the device is on. Here is one way to do it:
----------begin_max5_patcher---------- 647.3ocyVFsjZBCEF9Z7oHCWiNjfnXuoS6c8InWryNLQHUSKDbHAqs6ru6Mb B5xtJZDXb5EDkS.x+4K+4j7xDG20EGXRWzmPOgbbdYhiCDpNfSy8Nt4zCIYT I7XtB1uKV+SWOSWJ1AEDVhlNcpZKWFqJoI+5X++nPnDzbF7LeojSyPesHKsc 2R9egtw9yvMgEU4bQFSAiXqfEUpiQ8ahtipR1xEahKYIJSdP7il46gHgKp+Y IbCV2hdt4c3ofbzowTbnacrWmLotwyRFjTjmyDpyfv22RUHH+Qzbz2PEhO2O PbJ6JYR8.QU7BQ6LDC4DAZ8WbVBNP9Y.GInyueaY0dHZA1k8gqc3sTnMLkVn aQYVhSShp9yNlIkbc8zWmze+scjtw1xU.mlC3ZQ30bcqBGQ5TI1Ua3L7gumE KYMlPIhOHd0bw0N8Q.cyuE5H9yAnE5eU1EMhrKqfltlJ1zWLAu6HvF7UXCT+ ZIvjvEWkLq5EYpxWyJ6K.p8FdVxgNJlgIlJzvj+El6G1pxiaFXJlcgOuE0xv 9jwzyoWiNS2QsD66py6xxQtaKmoRVj+sqjg8CNpRIcOKM1jXwTkpjutRYNag yIB43FuiUJ4RESj.p1GhCn8dAbNSJoaXmQXnTHbVjT1ddB6+ZLuJ.ZM6nunK JOerMf0LZvaNLBU9BtoMjXV4hutM7c6nBOhNOEe7nsvnTG+8TSVTUlbL6Z1j wCEbZjRYREWbpDwSuUVvC8ld1xSSYh1GtJmmtqPWhrQEnmu3jnshp1Ezd75R UgOTUo20wFQM+9DUzxYgdnHn1sts4+CFfgVn0UOX9EZE+Bd7hBaknvOP+efM SeQO3EkDal+FhmReyqS9Gb8+kFA -----------end_max5_patcher-----------
Thanks a lot ! I was looking for the same thing…
Is there a place where we can find all the attributes, messages and other needed informations for the API objects ?
A sort of thesaurus or are the LOM reference page and M4L tutorials the only ones ?
For example, in another thread, I was asking something related to midi channel of a live track. The secret (thanks to broc for the answer) was the "Ch." to put in the message box. I can’t find it in the two pages mentioned above.
Everything should be in either the LOM ref or the individual object ref entries. In Max, just go to Help->Max For Live. You can get to all the objects under Reference->Objects A-Z.
Let us know if you aren’t finding what you are looking for.
This will just depend on what the available routings are. I believe that "Ch." convention is used for midi channel input/output, as it appears in the channel strip.
Thanks you very much. I’m not lucky today: live.object: get path: error calculating the path. This is the error that the live.object in your patch gives to me and I can’t understand the why.
The problem was that my device was inside a drum rack. If I put it outside it works.
The easiest solution for your problem is the "this_device" root object (as mentioned above) but in comparison with the "canonical_parent" path. This child will always point to the previous (parent) class in the hierarchy.
So when looking at the LOM you’ll notice that the parent of a device is a track.
As such simply use: "path this_device canonical_parent" which will point at the track the device is on.
As you noticed yourself things change when you’re inside a rack; that’s because the physical location of the device is now no longer the track, but instead a Chain within the rack.
To get out of a chain you could use: "path this_device canonical_parent canonical_parent canonical_parent". You actually need 3 "hops": one to go to the Chain class, one to go to the Device class (the Rack device itself) and finally one to go to the Track class.
To answer your other question… Stuff like "canonical_parent" is explained in the Live API overview.
Great thanks for this – I am working on a similar problem.
Is it possible to do this with live.observer?
Forums > Max For Live