TempoInterpolationCollectionBuilder
public final class TempoInterpolationCollectionBuilder
A class which encapsulates the stateful incremental building process of
a Tempo.Interpolation.Collection
.
-
The end result of the building process (
Tempo.Interpolation.Collection
).Declaration
Swift
public typealias Product = Tempo.Interpolation.Collection
-
The intermediate storage of
Tempo.Interpolation.Fragment
values indexed by theirFraction
offsets.Declaration
Swift
public var intermediate: OrderedDictionary<Fraction, Tempo.Interpolation>
-
Create an empty
Tempo.Interpolation.Collection.Builder
ready to construct a nice littleTempo.Interpolation.Collection
for you.Declaration
Swift
public init()
-
Add the given
interpolation
to the accumulating storage ofTempo.Interpolation.Fragment
values.Declaration
Swift
@discardableResult public func add(_ interpolation: Tempo.Interpolation) -> TempoInterpolationCollectionBuilder
Return Value
Self
-
Add the given
tempo
at the given metricaloffset
, along with the information whether the giventempo
interpolates into the next. -
Declaration
Swift
public func build() -> Tempo.Interpolation.Collection
Return Value
The completed
Tempo.Interpolation.Collection
.