Hello There
I started writing Ableton Scripts in python and now I am at a point where I´m stuck. I try to count the number of slots which one track in Live can have. I thought of handling a track as a list and therefor tried the following:
song = self.song()
len(song.Tracks[0]) #[0] stands for the first track
but that doesn´t work. Is there any other method (a working one ) to get the number of slots inside a track?
Much greetings
MrCoffee
Ableton Framework counting slots within tracks
Re: Ableton Framework counting slots within tracks
What do you mean by “slot”? If you want to get length of all track-object sub elements, write something like this:
P. S. “Tracks” should be write with a lowercase letter.
Code: Select all
track_dir = dir(song.tracks[0]) # get list of names
track_dir_len = len(track_dir)