Contents

addEvent(_:at:)

Adds a music event to a track at the time you specify.

Declaration

func addEvent(_ event: AVMusicEvent, at beat: AVMusicTimeStamp)

Parameters

  • event:

    The event to add.

  • beat:

    The time to add the event at.

Discussion

The system copies event contents into the track, so you can add the same event at different timestamps. You can’t add all AVMusicEvent subclasses to a track.

See Also

Adding and Clearing Events