---
title: "copyEvents(in:from:insertAt:)"
framework: avfaudio
role: symbol
role_heading: Instance Method
path: "avfaudio/avmusictrack/copyevents(in:from:insertat:)"
---

# copyEvents(in:from:insertAt:)

Copies the events from the source track and splices them into the current music track.

## Declaration

```swift
func copyEvents(in range: AVBeatRange, from sourceTrack: AVMusicTrack, insertAt insertStartBeat: AVMusicTimeStamp)
```

## Parameters

- `range`: The range of beats.
- `sourceTrack`: The music track to copy the events from.
- `insertStartBeat`: The start beat to splice the events into.

## Discussion

Discussion All events originally at or past the insertion beat shift forward by the duration of the copied-in range.

## See Also

### Cutting and Copying Events

- [cutEvents(in:)](avfaudio/avmusictrack/cutevents(in:).md)
- [copyAndMergeEvents(in:from:mergeAt:)](avfaudio/avmusictrack/copyandmergeevents(in:from:mergeat:).md)
