How to get the currently selected track and it's first device parameters?

flocked's icon

I’m complete new to Max4Live and I hope it’s okay to ask all these noob questions :)

How is it possible to get an object of the currently selected track in Live and the parameters of its first device?

So basically If I select track 3 in Live and it contains e.g. a VST device, I want to get a list of all its parameters (that were previously assigned.

I attached a picture with the Hive synth VST. In this case e.g if it's track is selected I would like to get all 8 XY parameters to future control them in my patch.

flocked's icon

I'm as far as:
"path live_set view selected_track" -> "live path" - > "M4L.api.GetAllDeviceIds"

How do I get the first one and it's parameters. Thanks! :)

broc's icon

You can select the first device with zl.slice and get its parameters by path extension counting the parameter index from 1 to 8.

Max Patch
Copy patch and select New From Clipboard in Max.