Tree
-
Create a
DurationTreewith the beat values of the givenproportionTreewith the givensubdivision.Note
Ensure the givenproportionTreehas been normalized.Declaration
Swift
@inlinable public init(_ subdivision: Int, _ proportionTree: ProportionTree) -
Create a
DurationTreewith the givendurationas the value of the root node, and the givenproportionsscaled appropriately.Declaration
Swift
@inlinable public init(_ duration: Duration, _ proportionTree: ProportionTree)
-
Durationvalue of thisDurationTreenode.Declaration
Swift
@inlinable public var duration: Duration { get } -
Declaration
Swift
@inlinable public var scaling: Tree<Fraction, Fraction> { get }Return Value
Treecontaining the inherited scale of each node contained herein. -
Declaration
Swift
@inlinable public var scaled: Tree<Fraction, Fraction> { get }Return Value
DurationTreewith the durations scaled by context. -
Todo
Change to concrete offsets.
Todo
Refactor to
concreteOffsets(startingAt: Duration, in structure: Meter.Structure)Declaration
Swift
@inlinable public var offsets: [Fraction] { get }Return Value
Array of tuples containing the scaled offset from the start of this
DurationTree.
-
Declaration
Swift
@inlinable public var normalized: ProportionTree { get }Return Value
A new
ProportionTreein which the value of each node can be represented with the same subdivision-level (denominator).
-
Create a single-depth
ProportionTreewith the given rootdurationand childdurations.Declaration
Swift
@inlinable public init(_ duration: Int, _ durations: [Int])
View on GitHub
Install in Dash
Tree Extension Reference