Simple demonstration of a metronome using AVAudioEngine and AVAudioPlayerNode to schedule buffers for timing accurate playback using scheduleBuffer:atTime:options:completionHandler:. The implementation also provides for a delegate object to call with the method (metronomeTicking:bar:beat:) which can be used for timing or to provide UI.
Metronome.swift
- Source file for metronome implementation in all the targets.
TWGenerator.swift
- Generic TriangleWaveGenerator swift class used by all targets.
1.0 Initial release.
Xcode 8.2.1 or later, macOS 10.12, iOS 10.2, watchOS 3.1 SDKs
macOS 10.9 or greater iOS 11.0 or greater watchOS 4 or greater