---
title: "beats(forSeconds:)"
framework: avfaudio
role: symbol
role_heading: Instance Method
path: "avfaudio/avaudiosequencer/beats(forseconds:)"
---

# beats(forSeconds:)

Gets the beat position (timestamp) for the specified time in the track.

## Declaration

```swift
func beats(forSeconds seconds: TimeInterval) -> AVMusicTimeStamp
```

## Parameters

- `seconds`: The time to retrieve the beat timestamp for.

## See Also

### Handling Beat Range

- [beats(forHostTime:error:)](avfaudio/avaudiosequencer/beats(forhosttime:error:).md)
- [AVMusicTimeStampEndOfTrack](avfaudio/avmusictimestampendoftrack.md)
- [AVBeatRange](avfaudio/avbeatrange-swift.typealias.md)
