Returns a FoscTuplet.
A tuplet.
| denominator | Gets preferred denominator of tuplet. |
| denominator_ | Sets preferred denominator of tuplet. |
| forceFraction | Gets force fraction flag. |
| forceFraction_ | Sets force fraction flag. |
| impliedProlation | Gets implied prolation of tuplet. |
| identifier | !!!TODO |
| isHidden | Is true when tuplet bracket isHiddens. |
| isHidden_ | Sets isHidden flag. |
| multipliedDuration | Gets multiplied duration of tuplet. |
| multiplier | Gets tuplet multiplier. |
| multiplier_ | Sets tuplet mutliplier. |
| tag | Gets tag. |
| tweaks | Gets tweaks. |
| asCompileString | |
| storeArgs | Gets new arguments of tuplet. |
| add | (append) |
| addAll | (extend) |
| indexOf | !!!TODO |
| insert | !!!TODO |
| isAugmentation | (augmentation) |
| isDiminution | (diminution) |
| isTrivial | (trivial) |
| isTrivializable | (trivializable) |
| minimumDenominator_ | (set_minimum_denominator) |
| normalizeMultiplier | Normalizes tuplet multiplier. |
| pop | !!!TODO |
| remove | !!!TODO |
| rewriteDots | Rewrites dots. |
| toggleProlation | Changes augmented tuplets to diminished; changes diminished tuplets to augmented. |
| trivialize | Trivializes tuplet. |
Example
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/8]));
a.show;
A nested tuplet.
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/8]));
b = FoscTuplet(4/7, FoscLeafMaker().(#[67,69], [3/8, 1/16]));
a.insert(1, b);
a.show;
Tuplets can be tweaked.
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/8]));
tweak(a).color = 'blue';
a.show;
Gets preferred denominator of tuplet.
Example
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/8]));
a.denominator; // nilSets preferred denominator of tuplet.
Set preferred denominator.
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/8]));
a.show;
a.denominator = 4;
a.show;
Gets force fraction flag.
Returns true or false.
Example
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/8]));
a.forceFraction; // falsefalse
a.show;
Sets force fraction flag.
Example
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/8]));
a.show;
a.forceFraction = true;
a.show;
Gets implied prolation of tuplet.
Example
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/8]));
a.impliedProlation.str;2/3!!!TODO
Is true when tuplet bracket isHiddens.
Returns true or false.
Example
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/8]));
a.isHidden; // falsefalseSets isHidden flag.
Example
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/8]));
a.show;
a.isHidden = true;
a.show;
Gets multiplied duration of tuplet.
Example
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/8]));
a.multipliedDuration.str;1/4Gets tuplet multiplier.
Returns multiplier.
Example
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/8]));
a.multiplier.str;2/3Sets tuplet mutliplier.
Example
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/8]));
a.multiplier_(#[4, 3]);
a.show;
Gets tag.
Gets tweaks.
Gets new arguments of tuplet.
Returns array.
Example
a = FoscTuplet(2/3, [FoscNote(60, 1/4), FoscNote(60, 1/8)]);
a.storeArgs;
a.cs; //!!! TODO: make compactRepresentationFoscTuplet(FoscMultiplier(2, 3), [ ])(append)
Adds component to tuplet.
Add note to tuplet.
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,65], [1/4]));
a[0..].slur;
a.show;
a.add(FoscNote(64, 1/4));
a.show;
Add note to tuplet and preserve tuplet duration.
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,65], [1/4]));
a[0..].slur;
a.show;
a.add(FoscNote(64, 1/4), preserveDuration: true);
a.show;
a.normalizeMultiplier;
a.show;
(extend)
Add all components to tuplet.
Add three notes to tuplet.
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,65], [1/4]));
a[0..].slur;
a.show;
b = FoscLeafMaker().(#[64,62,64], [1/32,1/32,1/16]);
a.addAll(b);
a.show;
Add three notes to tuplet and preserve tuplet duration.
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,65], [1/4]));
a[0..].slur;
a.show;
b = FoscLeafMaker().(#[64,62,64], [1/32,1/32,1/16]);
a.addAll(b, preserveDuration: true);
a.show;
!!!TODO
!!!TODO
(augmentation)
Is true when tuplet multiplier is greater than 1.
Returns true or false.
Augmented tuplet.
a = FoscTuplet(4/3, FoscLeafMaker().(#[60,62,64], [1/4]));
a.isAugmentation;trueDiminished tuplet.
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/4]));
a.isAugmentation;falseTrivial tuplet.
a = FoscTuplet(1/1, FoscLeafMaker().(#[60,62,64], [3/8]));
a.isAugmentation;false(diminution)
Is true when tuplet multiplier is less than 1.
Returns true or false.
Augmented tuplet.
a = FoscTuplet(4/3, FoscLeafMaker().(#[60,62,64], [1/4]));
a.isDiminution;falseDiminished tuplet.
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/4]));
a.isDiminution;trueTrivial tuplet.
a = FoscTuplet(1/1, FoscLeafMaker().(#[60,62,64], [3/8]));
a.isDiminution;false(trivial)
Is true when tuplet multiplier is equal to 1 and no multipliers attach to any leaves in tuplet.
Example
a = FoscTuplet(1/1, FoscLeafMaker().(#[60,62,64], [3/8]));
a.isTrivial;trueTuplet is not trivial when any leaves have a multiplier.
a = FoscTuplet(1/1, FoscLeafMaker().(#[60,62,64], [3/8]));
a[0].multiplier_(FoscMultiplier(3, 2));
a.isTrivial;false(trivializable)
Is true when tuplet is trivializable (can be rewritten with a ratio of 1:1).
Trivializable tuplet.
a = FoscTuplet(3/4, [FoscNote(60, 1/4), FoscNote(60, 1/4)]);
a.isTrivializable;trueNon-trivializable tuplet.
a = FoscTuplet(3/5, FoscLeafMaker().(60 ! 5, [1/4]));
a.isTrivializable;false(set_minimum_denominator)
Sets preferred denominator of tuplet to at least denominator.
Sets preferred denominator of tuplet to at least 8.
a = FoscTuplet(3/5, FoscLeafMaker().(#[60,62,64,65,67], [1/4,1/8,1/8,1/4,1/2]));
a.show;
a.minimumDenominator = 8;
a.show;
Normalizes tuplet multiplier.
Example
a = FoscTuplet(1/3, FoscLeafMaker().(#[60,62,64], [1/4]));
a.show;
a.normalizeMultiplier;
a.show;
!!!TODO
!!!TODO
Rewrites dots.
Rewrites single dots at 3:2 prolation.
a = FoscTuplet(1, [FoscNote(60, 3/16), FoscNote(60, 3/16)]);
a.show;
a.rewriteDots;
a.show;
Rewrites double dots at 7:2 prolation.
a = FoscTuplet(1, [FoscNote(60, 7/32), FoscNote(60, 7/32)]);
a.show;
a.rewriteDots;
a.show;
Does nothing when dot counts differ.
a = FoscTuplet(1, FoscLeafMaker().(#[60,62,64], [3/16,3/16,1/8]));
a.show;
a.rewriteDots;
a.show;
Does nothing when leaves carry no dots.
a = FoscTuplet(3/2, FoscLeafMaker().(#[60,62,64], [1/8]));
a.show;
a.rewriteDots;
a.show;
Changes augmented tuplets to diminished; changes diminished tuplets to augmented.
Does not yet work with nested tuplets.
Changes augmented tuplet to diminished.
a = FoscTuplet(4/3, FoscLeafMaker().(#[60,62,64], [1/8]));
a.show;
a.toggleProlation;
a.show;
Changes diminished tuplet to augmented.
a = FoscTuplet(2/3, FoscLeafMaker().(#[60,62,64], [1/4]));
a.show;
a.toggleProlation;
a.show;
Trivializes tuplet.
Example
a = FoscTuplet(3/4, [FoscNote(60, 2/4)]);
a.show;
a.trivialize;
a.show;