I have a Mac OS desktop app which hosts virtual instrument plugins as AVAudioUnitMIDIInstrument. My app is basically a music sequencer. I would like to trigger instruments that use drum loops and/or arpeggiators. This requires sending some sort of timing information to the AVAudioUnitMIDIInstrument. How do I do this? My guess is that I need to send either a MidiMetaEvent, or perhaps regular MidiTimestamp info. How do I do this? I don't see any methods on AVAudioUnitMidiInstrument that do this. Here are the methods I see:
func sendController(UInt8, withValue: UInt8, onChannel: UInt8)
Send a MIDI controller event to the instrument.
func sendMIDIEvent(UInt8, data1: UInt8)
Sends a MIDI event which contains one data byte to the instrument.
func sendMIDIEvent(UInt8, data1: UInt8, data2: UInt8)
Sends a MIDI event which contains two data bytes to the instrument.
func sendMIDISysExEvent(Data)
Sends a MIDI System Exclusive event to the instrument.
func sendPitchBend(UInt16, onChannel: UInt8)
Sends a MIDI Pitch Bend event to the instrument.
func sendPressure(UInt8, onChannel: UInt8)
Sends a MIDI channel pressure event to the instrument.
func sendPressure(forKey: UInt8, withValue: UInt8, onChannel: UInt8)
Sends a MIDI Polyphonic key pressure event to the instrument.
func sendProgramChange(UInt8, bankMSB: UInt8, bankLSB: UInt8, onChannel: UInt8)
Sends MIDI Program Change and Bank Select events to the instrument.
func sendProgramChange(UInt8, onChannel: UInt8)
Sends MIDI Program Change and Bank Select events to the instrument.
func startNote(UInt8, withVelocity: UInt8, onChannel: UInt8)
Sends a MIDI Note On event to the instrument.
func stopNote(UInt8, onChannel: UInt8)
Sends a MIDI Note Off event to the instrument