lengthInBeats
The total duration of the track, in beats.
Declaration
var lengthInBeats: AVMusicTimeStamp { get set }Discussion
This property returns the beat of the last event in the track, plus any additional time that’s necessary to fade out the ending notes, or to round a loop point to a musical bar.
If the user doesn’t set this value, the track length always adjusts to the end of the last active event in a track, and adjusts dynamically as the user adds or removes events.
This property returns the maximum of the user-set track length or the calculated length.