Tree
-
Create a
DurationTree
with the beat values of the givenproportionTree
with the givensubdivision
.Note
Ensure the givenproportionTree
has been normalized.Declaration
Swift
@inlinable public init(_ subdivision: Int, _ proportionTree: ProportionTree)
-
Create a
DurationTree
with the givenduration
as the value of the root node, and the givenproportions
scaled appropriately.Declaration
Swift
@inlinable public init(_ duration: Duration, _ proportionTree: ProportionTree)
-
Duration
value of thisDurationTree
node.Declaration
Swift
@inlinable public var duration: Duration { get }
-
Declaration
Swift
@inlinable public var scaling: Tree<Fraction, Fraction> { get }
Return Value
Tree
containing the inherited scale of each node contained herein. -
Declaration
Swift
@inlinable public var scaled: Tree<Fraction, Fraction> { get }
Return Value
DurationTree
with 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
ProportionTree
in which the value of each node can be represented with the same subdivision-level (denominator).
-
Create a single-depth
ProportionTree
with the given rootduration
and childdurations
.Declaration
Swift
@inlinable public init(_ duration: Int, _ durations: [Int])