TempoInterpolationCollectionBuilder

public final class TempoInterpolationCollectionBuilder

A class which encapsulates the stateful incremental building process of a Tempo.Interpolation.Collection.

  • Add the given interpolation to the accumulating storage of Tempo.Interpolation.Fragment values.

    Declaration

    Swift

    @discardableResult
    public func add(_ interpolation: Tempo.Interpolation)
        -> TempoInterpolationCollectionBuilder

    Return Value

    Self

  • Add the given tempo at the given metrical offset, along with the information whether the given tempo interpolates into the next.

    Declaration

    Swift

    @discardableResult
    public func add(
        _ tempo: Tempo,
        at offset: Fraction,
        easing: Tempo.Interpolation.Easing? = nil
    ) -> TempoInterpolationCollectionBuilder
  • Declaration

    Swift

    public func build() -> Tempo.Interpolation.Collection

    Return Value

    The completed Tempo.Interpolation.Collection.