Tempo
public struct Tempo
Model of a Tempo
.
-
Undocumented
Declaration
Swift
public typealias BeatsPerMinute = Double
-
Duration in seconds of a given beat.
Declaration
Swift
public var durationOfBeat: Double { get }
-
Double value of
Tempo
.Declaration
Swift
public var doubleValue: Double { get }
-
Value of
Tempo
.Declaration
Swift
public let beatsPerMinute: BeatsPerMinute
-
Subdivision of
Tempo
.- 1: whole note
- 2: half note
- 4: quarter note
- 8: eighth note
- 16: sixteenth note
- …
Declaration
Swift
public let subdivision: Subdivision
-
The context of a particular point within a
See moreTempo.Interpolation
.Declaration
Swift
public struct Context : Equatable
-
Creates a
Tempo
with the givenvalue
for the givensubdivision
.Declaration
Swift
public init(_ beatsPerMinute: BeatsPerMinute, subdivision: Subdivision = 4)
-
Declaration
Swift
public func respelling(subdivision newSubdivision: Subdivision) -> Tempo
Return Value
A
Tempo
with the numerator and subdivision adjusted to match the givensubdivision
. -
Declaration
Swift
public func duration(forBeatAt subdivision: Subdivision) -> Double
Return Value
Duration in seconds for a beat at the given
subdivision
.
-
Create a
Tempo
with abeatsPerMinute
of the givenvalue
, at the quarter-note level.Declaration
Swift
public init(integerLiteral value: Int)
-
Create a
Tempo
with abeatsPerMinute
of the givenvalue
, at the quarter-note level.Declaration
Swift
public init(floatLiteral value: Double)