FoscRhythmLeaf

Returns a FoscRhythmLeaf.


Description

A rhythm-tree leaf.


Attributes Summary

Instance Properties

duration
improperParentage
parentageRatios A sequence describing the relative durations of the nodes in a node’s improper parentage.
prolation Prolation of rhythm tree node.
prolations Prolations of rhythm tree node.
properParentage
startOffset The starting offset of a node in a rhythm-tree relative to the root.
stopOffset The stopping offset of a node in a rhythm-tree relative to the root.
isTiedToPrevLeaf_

Instance Methods

doesNotUnderstand Delegate unknown methods to FoscRhythmMixin.
value Generate Abjad score components.


Usage

  1. Example

    a = FoscRhythmLeaf(5);
    b = a.(1/16);
    b.duration.str;
    5/16
    FoscVoice(b).show;

  2. Example

    a = FoscRhythmLeaf(-5);
    b = a.(1/16);
    b.duration.str;
    5/16
    FoscVoice(b).show;


Instance Properties


duration

  1. Example

    a = FoscRhythm(3/4, [1, 2, 2, 1, 1]);
    a.duration.str;
    3/4
  2. Example

    b = FoscRhythm(4, [-3, 2]);
    c = FoscRhythm(3/4, [1, 2, b]);
    c.duration.str;
    3/4
    b.duration.str;
    3/7
    b.items.last.duration.str;
    6/35


improperParentage

  1. Example

    b = FoscRhythm(4, [-3, 2]);
    a = FoscRhythm(3/4, [1, 2, b]);
    
    a.improperParentage;
    [ FoscRhythm.new ]
    b.improperParentage;
    [ FoscRhythm.new, FoscRhythm.new ]
    b.items.last.improperParentage;
    [ FoscRhythmLeaf.new, FoscRhythm.new, FoscRhythm.new ]


parentageRatios

A sequence describing the relative durations of the nodes in a node’s improper parentage.

The first item in the sequence is the preprolated_duration of the root node, and subsequent items are pairs of the preprolated duration of the next node in the parentage and the total preprolated_duration of that node and its siblings.

Returns array.


prolation

Prolation of rhythm tree node.

Returns multiplier.

  1. Example

    b = FoscRhythm(4, [-3, 2]);
    a = FoscRhythm([3, 4], [1, 2, b]);
    a.prolation.pair;
    [ 1, 1 ]
    b.prolation.pair;
    [ 3, 28 ]


prolations

Prolations of rhythm tree node.

Returns array.

  1. Example

    b = FoscRhythm(4, [-3, 2]);
    a = FoscRhythm([3, 4], [1, 2, b]);
    a.prolations.collect { |each| each.pair };
    [ [ 1, 1 ] ]
    b.prolations.collect { |each| each.pair };
    [ [ 1, 1 ], [ 3, 28 ] ]


properParentage

  1. Example

    b = FoscRhythm(4, [-3, 2]);
    a = FoscRhythm([3, 4], [1, 2, b]);
    a.properParentage;
    [  ]
    b.properParentage;
    [ FoscRhythm.new ]


startOffset

The starting offset of a node in a rhythm-tree relative to the root.

Returns a FoscOffset.

  1. Example

    a = FoscRhythm([1, 1], [1, [1, [1, 1]], [1, [1, 1]]]);
    a.do { |node|
        node.depth.do { Post.tab };
        node.startOffset.pair.postln;
    };
    [ 0, 1 ]
      [ 0, 1 ]
      [ 1, 3 ]
        [ 1, 3 ]
        [ 1, 2 ]
      [ 2, 3 ]
        [ 2, 3 ]
        [ 5, 6 ]


stopOffset

The stopping offset of a node in a rhythm-tree relative to the root.

Returns a FoscOffset.

  1. Example

    a = FoscRhythm(1, [1, [1, [1, 1]], [1, [1, 1]]]);
    a.do { |node|
        node.depth.do { Post.tab };
        node.stopOffset.pair.postln
    };
    [ 1, 1 ]
      [ 1, 3 ]
      [ 2, 3 ]
        [ 1, 2 ]
        [ 2, 3 ]
      [ 1, 1 ]
        [ 5, 6 ]
        [ 1, 1 ]


isTiedToPrevLeaf_


Instance Methods


doesNotUnderstand

Delegate unknown methods to FoscRhythmMixin.


value

Generate Abjad score components.

Returns selection.

  1. Example

    a = FoscRhythmLeaf(5);
    a.prGetPreprolatedDuration.str;
    b = a.([1, 16]);
    FoscVoice(b).show;

  2. Example

    a = FoscNonreducedFraction(#[2, 4]);
    a = a * 3;
    a.str;
    6/4