---
title: "clearEvents(in:)"
framework: avfaudio
role: symbol
role_heading: Instance Method
path: "avfaudio/avmusictrack/clearevents(in:)"
---

# clearEvents(in:)

Removes all events in the given beat range from the music track.

## Declaration

```swift
func clearEvents(in range: AVBeatRange)
```

## Parameters

- `range`: The range of beats.

## Discussion

Discussion The system won’t modify the events outside of the range you specify.

## See Also

### Adding and Clearing Events

- [addEvent(_:at:)](avfaudio/avmusictrack/addevent(_:at:).md)
- [moveEvents(in:by:)](avfaudio/avmusictrack/moveevents(in:by:).md)
