<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVMusicTrack/copyEvents(in:from:insertAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVMusicTrack(im)copyEventsInRange:fromTrack:insertAtBeat:"
  },
  "title" : "copyEvents(in:from:insertAt:)"
}
-->

# copyEvents(in:from:insertAt:)

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

```
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

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)