Hello Metronome

Last Revision:
Version 1.1, 2017-02-24
Added Swift triangle wave generator used by all targets and Swift Metronome class implementation for iOS target. General clean up and project reorganization.
(Full Revision History)
Build Requirements:
Xcode 8.2.1 or later
Runtime Requirements:
macOS 10.11 or greater, iOS 10.0 or later, watchOS 3.0 or later

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.

The macOS version is a command line app and can use an included .caf file for the metronome bip sound or bips will be generated via a TriangleWaveGenerator class. Use the -f option to use the .caf file.

The iOS version provides a simple UI implementing the delegate method (metronomeTicking:bar:beat:) and uses the TriangleWaveGenerator class to generate the metronome bip sounds.

The watchOS version provides a slightly more complex UI with a delegate method to draw the animation for each tick and also uses the TriangleWaveGenerator class to generate the metronome bip sounds.