init(midiNote:velocity:instrumentID:groupID:duration:)
Creates a note on event with the default instrument.
Declaration
init(midiNote: Float, velocity: Float, instrumentID: UInt32, groupID: UInt32, duration: AVMusicTimeStamp)Parameters
- midiNote:
The MIDI note number.
- velocity:
The MIDI velocity.
- instrumentID:
The default instrument.
- groupID:
The identifier that represents the audio unit channel that handles the event.
- duration:
The duration of the event, in beats.
Discussion
Use defaultInstrument when you set instrumentID.