---
title: "MusicEventIteratorSetEventInfo(_:_:_:)"
framework: audiotoolbox
role: symbol
role_heading: Function
path: "audiotoolbox/musiceventiteratorseteventinfo(_:_:_:)"
---

# MusicEventIteratorSetEventInfo(_:_:_:)

Sets information for the event at a music event iterator’s current position.

## Declaration

```swift
func MusicEventIteratorSetEventInfo(_ inIterator: MusicEventIterator, _ inEventType: MusicEventType, _ inEventData: UnsafeRawPointer) -> OSStatus
```

## Parameters

- `inIterator`: The music event iterator whose current event you want to set.
- `inEventType`: The type of music event that you are specifying. For possible event types, see doc://com.apple.audiotoolbox/documentation/AudioToolbox/MusicEventType.
- `inEventData`: The event data that you are specifying. The size and type of the data must be appropriate for the music event type you specify in the inEventType parameter.

## Return Value

Return Value A result code.

## Discussion

Discussion Use this function to set the music event type and event data for the event that a music event iterator is positioned at. This function doesn’t allow you to change an event’s timestamp; to do that, call the MusicEventIteratorSetEventTime(_:_:) function.

## See Also

### Iterating Over Music Events

- [NewMusicEventIterator(_:_:)](audiotoolbox/newmusiceventiterator(_:_:).md)
- [DisposeMusicEventIterator(_:)](audiotoolbox/disposemusiceventiterator(_:).md)
- [MusicEventIteratorNextEvent(_:)](audiotoolbox/musiceventiteratornextevent(_:).md)
- [MusicEventIteratorSeek(_:_:)](audiotoolbox/musiceventiteratorseek(_:_:).md)
- [MusicEventIteratorDeleteEvent(_:)](audiotoolbox/musiceventiteratordeleteevent(_:).md)
- [MusicEventIteratorGetEventInfo(_:_:_:_:_:)](audiotoolbox/musiceventiteratorgeteventinfo(_:_:_:_:_:).md)
- [MusicEventIteratorHasCurrentEvent(_:_:)](audiotoolbox/musiceventiteratorhascurrentevent(_:_:).md)
- [MusicEventIteratorHasNextEvent(_:_:)](audiotoolbox/musiceventiteratorhasnextevent(_:_:).md)
- [MusicEventIteratorHasPreviousEvent(_:_:)](audiotoolbox/musiceventiteratorhaspreviousevent(_:_:).md)
- [MusicEventIteratorPreviousEvent(_:)](audiotoolbox/musiceventiteratorpreviousevent(_:).md)
- [MusicEventIteratorSetEventTime(_:_:)](audiotoolbox/musiceventiteratorseteventtime(_:_:).md)
- [MusicEventIterator](audiotoolbox/musiceventiterator.md)
- [MusicEventType](audiotoolbox/musiceventtype.md)
- [ExtendedNoteOnEvent](audiotoolbox/extendednoteonevent.md)
- [ExtendedTempoEvent](audiotoolbox/extendedtempoevent.md)
