How to observe events and functions from MIDIClockListener and MIDIBeatObserver?

129 Views Asked by At

I am trying to use the MIDIBeatObserver/MIDIClockListener class in AudioKit 5, so I can sync MTC, realtime messages and Bars/Beats time code from Logic Pro to my app (Swift / Xcode 13.4.1).

However, I can't seem to find any information on this subject in the AudioKit documentation, except for the following (from the first comments section of the MidiClockListener.swift source file from AudioKit 5):

/// This class is used to count midi clock events and inform observers
/// every 24 pulses (1 quarter note)
///
/// If you wish to observer its events, then add your own MIDIBeatObserver

I would, if I only knew how. So my question(s) are simply:

How do I proceed to "add my own MIDIBeatObserver", and how do I access the methods and functions from it? Swift example code please.

Thanks!

Andreas

0

There are 0 best solutions below