Define the "selected_parameter" (number) in automation

I need a little help. How to define the selected parameter (the index, or number) in the automation editor?

  •[???].playmode = renoise.PatternTrackAutomation.PLAYMODE_CUBIC
  •[“the number of selected parameter???”].playmode = renoise.PatternTrackAutomation.PLAYMODE_CUBIC

For example, inside the automation editor, in mixer, exist: Panning, Volume, Width, 3 parameters.

Is there any shorter way to define it? I was looking for something like: (number),but this does not exist.How to define the number of the selected parameter?



-- play-mode (interpolation mode).[].tracks[].automation[???????????].playmode, _observable 
  -> [enum = PLAYMODE]

Knowing this detail,it is possible to control all this:

Click to view contents
-- renoise.PatternTrackAutomation
-- General remarks: Automation "time" is specified in lines + optional 1/256 
-- line fraction for the sub line grid. The sub line grid has 256 units per 
-- line. All times are internally quantized to this sub line grid.
-- For example a time of 1.5 means: line 1 with a note column delay of 128
-------- Constants

-------- Functions
-- Removes all points from the automation. Will not delete the automation
-- from tracks[]:automation, instead the resulting automation will not do
-- anything at all.[].tracks[].automation[]:clear()
-- Remove all existing points in the given [from, to) time range from the 
-- automation.[].tracks[].automation[]:clear_range(from_time, to_time)
-- Copy all points and playback settings from another track automation.[].tracks[].automation[]:copy_from(
  other renoise.PatternTrackAutomation object)
-- Test if a point exists at the given time (in lines[].tracks[].automation[]:has_point_at(time)
   -> [boolean]
-- Insert a new point, or change an existing one, if a point in
-- time already exists.[].tracks[].automation[]:add_point_at(time, value)
-- Removes a point at the given time. Point must exist.[].tracks[].automation[]:remove_point_at(time)

-------- Properties
-- Destination device. Can in some rare circumstances be nil, i.e. when 
-- a device or track is about to be deleted.[].tracks[].automation[].dest_device
  -> [renoise.AudioDevice or nil]
-- Destination device's parameter. Can in some rare circumstances be nil, 
-- i.e. when a device or track is about to be deleted.[].tracks[].automation[].dest_parameter
  -> [renoise.DeviceParameter or nil]
-- play-mode (interpolation mode).[].tracks[].automation[].playmode, _observable
  -> [enum = PLAYMODE]
-- Max length (time in lines) of the automation. Will always fit the patterns length.[].tracks[].automation[].length
  -> [number, 1-NUM_LINES_IN_PATTERN]
-- Selection range as visible in the automation editor. always valid. 
-- returns the automation range no selection is present in the UI.[].tracks[].automation[].selection_start, _observable
  -> [number >= 1 <= automation.length+1][].tracks[].automation[].selection_end, _observable
  -> [number >= 1 <= automation.length+1]
-- Get or set selection range. when setting an empty table, the existing 
-- selection, if any, will be cleared.[].tracks[].automation[].selection_range[], _observable
  -> [array of two numbers, 1-automation.length+1]
-- Get all points of the automation. When setting a new list of points,
-- items may be unsorted by time, but there may not be multiple points
-- for the same time. Returns a copy of the list, so changing
-- `points[1].value` will not do anything. Instead, change them via
-- `points = { something }` instead.[].tracks[].automation[].points[], _observable
  -> [array of {time, value} tables]
-- An automation point's time in pattern lines.[].tracks[].automation[].points[].time
  -> [number, 1-NUM_LINES_IN_PATTERN]
-- An automation point's value [0-1.0][].tracks[].automation[].points[].value
  -> [number, 0-1.0]


I have found a way:

local sp =
local spt =
local spa = spt:find_automation( sp )

spa.playmode = renoise.PatternTrackAutomation.PLAYMODE_POINTS

… but is there another simpler way?

The most correct way is this?: ).playmode =renoise.PatternTrackAutomation.PLAYMODE_POINTS ???

Edit:I mention this issue as resolved.