Get current track?

Learn about building and using Max for Live devices.
Post Reply
gavspav
Posts: 342
Joined: Tue Jul 12, 2005 12:43 am

Get current track?

Post by gavspav » Tue Nov 10, 2009 10:19 am

What is the best way to get the track number of the current device?
I've done it like this (below) but reckon there is an easier way?


<pre><code>
----------begin_max5_patcher----------
547.3ocyVF0jaBBDG+Y8SAiOmKiBlKZeq8qQmaxfHMgVEbT7ZZu49tWYId0b
mV8rFaePLt6B7merrgmbc7RTm4UdnOf9Lxw4IWGGvjwfykuc7xomYYzJHLOI
+6pju5sw5RyOqAyYJZZBUdr0gHEL2D5cA6ZM9EkTKo4bv0GKEzLzmTYostU0
5LtV+iBtUPdv.hdnSuqD+DbF3u0+hYYctP1zOPdAWLVP0rSB4wCkbl1NZA62
0zGzcDS6N32AQa8eY3aFGq.rCjw3yttllMSEM04I7x9HP3bIfPp81rvffrCP
PP38.I7GgD34Ph9SRpkET12PTTBhgD8AJxbAkgRsOFnsTvBGGC7AGZdse+Hv
Jb4fktgRY8wH7e0wICiVN3XSghLsD71cKdhTNuphdj+F3bjqazyo9vi+rSgd
WXA+mvBjrDgMsg1Tl6W1JMCTDV7HeaiCiRdKYh9O.LPlRfusFb7MnF7PILlr
Ej9jn5PJ+QAiiXToRJXzrCEzRt7EfkIjblpVp6tV5PQx+dJZqBAnLFHId+pk
cMvoNb7vXY7Z18SF76udjkLDaUInE6OHZHcPCDBr2+pKCAyhw907pRUWxZWG
sWxA86YJkWoERpVnjcBhbULmDoobvc65LWjVnZ92qKZ.8PuadSVRloiLhjLW
MYE0TzDnTvJiI7Tzj+5qofQzTzUwbqkj4D9nR5Ur7liI+Ir0EspRhLAEAnbt
Rp4imc+EHIIKjC
-----------end_max5_patcher-----------
</code></pre>

pukunui
Posts: 405
Joined: Thu Jan 29, 2009 10:26 pm
Location: Los Angeles

Re: Get current track?

Post by pukunui » Tue Nov 10, 2009 3:47 pm

Looks fine to me. I imagine canonical_parent is optional, but there's no penalty.

-A

LaotzeSunHammer
Posts: 89
Joined: Fri Oct 02, 2009 6:59 pm

Re: Get current track?

Post by LaotzeSunHammer » Sun Nov 15, 2009 2:36 pm

Thanks, I've been trying to do this myself. So to take it one step further, what is the necessary command to get the current device number?

stretta
Posts: 5
Joined: Fri Sep 18, 2009 4:57 pm

Re: Get current track?

Post by stretta » Wed Nov 18, 2009 7:27 pm

Is there a simple way to be notified when the track the patch is on is selected?

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: Get current track?

Post by hoffman2k » Wed Nov 18, 2009 7:29 pm

stretta wrote:Is there a simple way to be notified when the track the patch is on is selected?
Compare the selected track number with the track number you can get from the device using the this_device API commands.

stretta
Posts: 5
Joined: Fri Sep 18, 2009 4:57 pm

Re: Get current track?

Post by stretta » Wed Nov 18, 2009 7:31 pm

I was afraid that was what you were going to say.

Post Reply