Instance Method


Creates and writes a MIDI file from the events in the sequence.


func write(to fileURL: URL, smpteResolution resolution: Int, replaceExisting replace: Bool) throws


Only MIDI events are written when writing to the MIDI file. MIDI files are normally beat based, but can also have a SMPTE (or real-time rather than beat time) representation. The relationship between tick and quarter note for saving to Standard MIDI File will be the value that is currently set on the tempo track. Use the value 0 for this default.

See Also

Creating an Audio Sequencer


Initializes a new sequencer that's not connected to an audio engine.

init(audioEngine: AVAudioEngine)

Initializes a new sequencer, handing it the audio engine.