Returns a FoscParentage.
Parentage of a component.
!!!TODO: incomplete
| component | The component from which the selection was derived. |
| components | Gets components. |
| depth | Length of proper parentage of component. |
| isOrphan | Is true when component has no parent. Otherwise false. |
| parent | Gets parent. Returns nil when component has no parent. |
| prolation | Gets prolation. |
| root | Root is last component in parentage. |
| scoreIndex | Gets score index. |
| tupletDepth | DEPRECATED |
| firstInstanceOf | (abjad: get_first) |
| logicalVoice | Gets logical voice of items. |
Example
a = FoscNote(60, 1/4);
b = FoscVoice([a]);
p = FoscParentage(a);
p.components;[ FoscNote(FoscPitch("C4"), FoscDuration(1, 4)), FoscVoice([ ], 'Voice', false) ]The component from which the selection was derived.
Returns component.
Example
a = FoscNote(60, 1/4);
b = FoscVoice([a]);
p = FoscParentage(a);
p.component == a; // truetrueGets components.
Returns array.
Example
a = FoscNote(60, 1/4);
b = FoscVoice([a]);
p = FoscParentage(a);
p.components;[ FoscNote(FoscPitch("C4"), FoscDuration(1, 4)), FoscVoice([ ], 'Voice', false) ]Length of proper parentage of component.
Returns integer.
FIXME ERROR: FoscRhythm::new: bad value: FoscNote(C4, 1/1).
a = FoscNote(60, 1);
b = FoscContainer([FoscRhythm([3, 4], [a, 2, 1])]);
p = FoscParentage(a);
p.depth;Is true when component has no parent. Otherwise false.
Returns true or false.
Example
a = FoscNote(60, 1);
b = FoscVoice([a]);
p = FoscParentage(a);
p.isOrphan; // falsefalse
a = FoscNote(60, 1);
p = FoscParentage(a);
p.isOrphan; // truetrueGets parent. Returns nil when component has no parent.
Returns component or nil.
Example
a = FoscNote(60, 1);
b = FoscVoice([a]);
p = FoscParentage(a);
p.parent === b; // truetrue
a = FoscNote(60, 1);
p = FoscParentage(a);
p.parent; // nilGets prolation.
Returns multiplier.
Example
a = FoscTuplet(2/3, [FoscNote(60, 1/4)]);
a[0].prGetParentage.prolation.str;2/3Root is last component in parentage.
Returns component.
Example
a = FoscNote(60, 1);
b = FoscVoice([a]);
p = FoscParentage(a);
p.root == b;trueGets score index.
Returns array of zero or more nonnegative integers.
Example
a = FoscNote(60, 1);
b = FoscScore([FoscStaff([FoscVoice([a])])]);
p = FoscParentage(a);
p.scoreIndex;[ 0, 0, 0 ]
a.prGetParentage.scoreIndex[ 0, 0, 0 ]DEPRECATED
Example
a = FoscNote(60, 1);
b = FoscRhythm([3, 4], [1, FoscRhythm(3, [1, 2, a])]);
p = FoscParentage(a);
p.tupletDepth;(abjad: get_first)
Gets first instance of prototype in parentage.
Returns component or none.
FIXME ERROR: Message add not understood.
a = FoscNote(60, 1);
b = FoscContainer([c = FoscRhythm([3, 4], [a, 2, 1])]);
p = FoscParentage(a);
p.firstInstanceOf(FoscNote) === a; // truep.firstInstanceOf(FoscRhythm) === c; // truep.firstInstanceOf(FoscContainer) === b; // truep.firstInstanceOf(FoscRest); // nilGets logical voice of items.
Example
a = FoscLeafMaker().(#[60,62,64,65], [1/4]);
b = FoscVoice(a);
c = FoscStaff([b], name: 'bar');
d = FoscScore([c], name: 'foo');
p = FoscParentage(b[0]);
l = p.logicalVoice;( 'staff_group': "", 'voice': "FoscVoice-2125999743", 'staff': "FoscStaff-bar", 'score': "FoscScore-foo" )