Returns a FoscLeafMaker.
Leaf-maker.
Returns a FoscSelection.
| forbiddenNoteDuration | Gets forbidden note duration. |
| forbiddenRestDuration | Gets forbidden rest duration. |
| increaseMonotonic | Is true when durations increase monotonically. Otherwise false. |
| metricalHierarchy | Gets metrical hierarchy. |
| skipsInsteadOfRests | Is true when skips appear in place of rests. Otherwise false. |
| repeatTies | Is true when ties are repeat ties. |
| useMultimeasureRests | Is true when rests are multimeasure. |
| tag | Gets tag. |
| value | Calls leaf-maker on pitches and durations. |
Integer and string elements in pitches result in notes.
m = FoscLeafMaker().(#[62,64,"F#5","G#5"], [1/4]);
m.show;
Tuple elements in pitches result in chords.
m = FoscLeafMaker().(#[[60,62,64], ["F#5","G#5","A#5"]], [1/2]);
m.show;
!!!TODO: single string as chord not working
m = FoscLeafMaker().(#[[60,62,64], "F#5 G#5 A#5"], [1/2]);
m.show;
Nil-valued elements in pitches result in rests.
m = FoscLeafMaker().(nil, 1/4 ! 4);
m.show;
Values passed to pitches can be mixed and matched.
m = FoscLeafMaker().(#[[60,62,64], nil, "C#5", "D#5"], [1/4]);
m.show;
Works with pitch segments.
m = FoscLeafMaker().(FoscPitchSegment(#["E5","Eb5","D5","Db5", "C5"]), [1/4]);
m.show;
Reads pitches cyclically when the length of pitches is less than the length of durations.
m = FoscLeafMaker().(#[72], [3/8, 1/8, 3/8, 1/8]);
m.show;
Reads durations cyclically when the length of durations is less than the length of pitches.
m = FoscLeafMaker().(#[72,74,76,77], [1/4]);
m.show;
Elements in durations with non-power-of-two denominators result in tuplet-nested leaves.
m = FoscLeafMaker().(#[60,62,64,65], [1/4, 1/12, 1/6, 1/2]);
m.show;
Set increaseMonotonic to false to return nonassignable durations tied from greatest to least.
m = FoscLeafMaker(increaseMonotonic: false).(#["E5"], [13/16]);
x = FoscStaff(m);
x[0].attach(FoscTimeSignature(#[13, 16]));
x.show;
Set increaseMonotonic to true to return nonassignable durations tied from least to greatest.
m = FoscLeafMaker(increaseMonotonic: true).(#["E5"], [13/16]);
x = FoscStaff(m);
x[0].attach(FoscTimeSignature(#[13, 16]));
x.show;
!!!TODO: update to abjad 3.0 documentation
Set forbiddenNoteDuration to avoid notes greater than or equal to a certain written duration.
m = FoscLeafMaker(forbiddenNoteDuration: FoscDuration(1, 2)).(#[65,67], [5/8]);
x = FoscStaff(m);
x[0].attach(FoscTimeSignature(#[5, 4]));
x.show;
forbiddenWrittenDuration and increaseMonotonic may be set together.
m = FoscLeafMaker(increaseMonotonic: true, forbiddenNoteDuration: FoscDuration(1, 2));
m = m.(#[65,67], [5/8]);
x = FoscStaff(m);
x[0].attach(FoscTimeSignature(#[5, 4]));
x.show;
Nil-valued elements in pitches result in multimeasure rests when the multimeasure rest keyword is set.
m = FoscLeafMaker(useMultimeasureRests: true).(#[nil], [3/8, 5/8]);
x = FoscStaff(m, lilypondType: 'RhythmicStaff');
x.leafAt(0).attach(FoscTimeSignature(#[3, 8]));
x.leafAt(1).attach(FoscTimeSignature(#[5, 8]));
x.show;
Make skips instead of rests.
m = FoscLeafMaker(skipsInsteadOfRests: true).([nil], [13/16]);
x = FoscStaff(m);
x.format;\new Staff {
s2.
s16
}Gets forbidden note duration.
Returns duration or nil.
Gets forbidden rest duration.
Returns duration or nil.
Is true when durations increase monotonically. Otherwise false.
Gets metrical hierarchy.
Returns metrical hierarchy or none.
Is true when skips appear in place of rests. Otherwise false.
Is true when ties are repeat ties.
Is true when rests are multimeasure.
Gets tag.
Calls leaf-maker on pitches and durations.
Returns selection.