Forums > Max For Live

Optimizing patch by pre-reading and storing path Id's – waddayathink?

March 11, 2012 | 3:23 am

I think I know I have to do this, but wondering where to start. Much of my work so far has been creating a better remote control interface into Live using Max and TouchOSC. I want to have flexibility so everything is dynamic. When I select a different track, a lot of settings are dynamically queried, especially track, device, and parameter names.

I think I can optimize my patch by quering all path Id’s, tracknames, device names and parameter names on all tracks at when I launch a set. I rarely change devices mid-set and I am intending on adding an ‘update’ button which will re-query all the settings. But now I need to store the list of path Id’s and names, and retrieve them.

what would you use for storing track, device, and paramater path id’s and names> Coll, pattr, dict… Preferrably something that is future-proof so I don’t have to learn a new tool when I get more ambitious in the future..

Also as this is max for live.. should I keep whatever I use ‘local’ and access it all from within the same device? Or maybe use a file to read/write?

as always, your responses are much appreciated!



Lee
March 13, 2012 | 12:18 pm

Hi, I do something similar here for my controller. I use a coll to store a mapping from a name to a live id.

i construct the name from trackid-device-parameter which gives a unique name across the set, e.g.

track1-rack1-locut -> id 51
senda-rack2-delay1 -> id 99
master-rack1-hicut -> id 137

L


March 18, 2012 | 5:21 pm

Thanks leehu: I’m actually going the other way round, I want to store all the names in a file so I can display them on my Ipad when selected, without having to querie live every time I select something different

I’m looking for something that is kind of like a tree diagram that is easy to navigate. I want to store 16 tracks (name, ID) x 4 devices per track (path IDs, names) x 8 parameters per device (path IDs, names)
Once I built the coll with names I need to easily retrieve, say, the name of parameter 5 on device 2 on track 12. Some kind of coordinate system would be ideal (eg 12, 2, 5 for the above example)

Anyone any ideas?

*track1 ID, track name
-Device1 ID, name
–Parameter1 ID, name
–Parameter2 ID, name
–(etc….)
–Parameter8 ID, name
-Device2 ID, name
–Parameter1 ID, name
–Parameter2 ID, name
–(etc….)
–Parameter8 ID, name
-Device.. (etc until Device 4)
*track2 ID, track name
-Device1 ID, name
–Parameter1 ID, name
–Parameter2 ID, name
–(etc….)
–Parameter8 ID, name
-Device2 ID, name
–Parameter1 ID, name
–Parameter2 ID, name
–(etc….)
–Parameter8 ID, name
-Device.. (etc until Device 4)


March 18, 2012 | 8:00 pm

Ok I decided to go for a linear system: all path Ids and names are stored in one big coll, the index number being the key to what info is stored. I’m seriously thinking I’m overcomplicating this…. Any suggestions welcome!
Here’s my system for indexing data in my coll:

TRACK numbers are *1000
DEVICE numbers are *100+1
PARAMETER numbers are *10+1
Final digit 0=Id 1=Name string

if the 100′s and 10′s are ’0′ you’re retreiving TRACK info
If the 100′s are >0 and the 10′s are ’0′ you’re retrieving DEVICE info
If the 100′s and 10"s are >0 you’re retrieving PARAMETER info

EG
12001 = track 12 name
12000 = track 12 Id

09500 = track 5 device 0 Id
09501 = track 5 device 1 Name

03680 = track 3 device 6 parameter 8 Id
03681 = track 3 device 6 parameter 8 name


Viewing 4 posts - 1 through 4 (of 4 total)