Scripting Questions And Help

I want to make a little function for deleting all automation lanes in a single track in a single pattern. All good so far except I can find no way to tell how many automation envelopes are currently active so I can’t run the renoise.song():pattern():track().automation[]:clear() command within a For Loop with the correct boundaries. If that command is run and there is no automation present it throws up an error.

I know this specific command will clear the contents and leave it marked active. That is fine for what I want to do.

Or am I trying to build what is already there? I could see a function to clear entire track but not for only pattern data or only automation data…

(Thanks to Joule for the helpful pointers on IRC so far!)

Well typical! I work it out immediately after posting!!

#renoise.song():pattern():track().automation

will give the number of active automations in specified track.

Will keep this thread open and rename, for further questions on current tool…

Does this one might help you out?

– Is automated. Not valid for parameters of instrument devices.
renoise.song().tracks[].devices[].parameters[].is_automated, _observable
-> [read-only, boolean]

As the edit at the end says this is what I wanted:

#renoise.song():pattern():track().automation

Your above would be useful if wanting to collate a table of exactly which parameters were automated, for example. I just wanted a number of total active envelopes to use in a For loop. :)