Metronome
final class Metronome
The observable metronome for Chord Provider
-
The time signature
Declaration
Swift
var time: String = "4/4"
-
The current BPM of the metronome
Declaration
Swift
var bpm: Float = 60.0
-
Bool if the metronome ticker is enabled
Declaration
Swift
var enabled: Bool = false
-
Bool for the high/low tick and animation
Declaration
Swift
var flip: Bool = true
-
Timing for the next ‘tick’
Declaration
Swift
private var nextTick: DispatchTime = DispatchTime.distantFuture
-
The BPM value
Declaration
Swift
private var bpmValue: Float = 60.0
-
timeSignature
Declaration
Swift
private var timeSignature: Int = 4
-
tickCounter
Declaration
Swift
private var tickCounter: Int = 1
-
The ID of the ‘low’ sound
Declaration
Swift
private var lowSoundID: SystemSoundID = 1
-
The ID of the ‘low’ sound
Declaration
Swift
private var highSoundID: SystemSoundID = 2
-
Init the class
Declaration
Swift
init()
-
Play the metronome ‘tick’ as a system sound
Declaration
Swift
private func tick()