Returns a FoscRhythmMaker.
FoscRhythmMaker
Object model of a partially evaluated function that accepts a (possibly empty) list of divisions as input and returns a list of selections as output. Output structured one selection per division with each selection wrapping a single fixed-duration tuplet.
Usage follows the two-step configure-once / call-repeatedly pattern shown here.
| beamSpecifier | Gets beam specifier. |
| divisionMasks | Gets division masks. |
| durationSpecifier | Gets duration spelling specifier. |
| logicalTieMasks | Gets logical tie masks. |
| tieSpecifier | Gets tie specifier. |
| tupletSpecifier | Gets tuplet spelling specifier. |
| illustrate | Illustrates rhythm-maker. |
| show | |
| value |
Example
a = FoscRhythmMaker();
a.(divisions: [1/4], ratios: #[[1,1],[3,2],[4,3]]);
a.show;
Example
a = FoscRhythmMaker();
a.(divisions: [2/16, 3/16, 5/32], ratios: #[[2,1],[3,2],[4,3]]);
a.show;
!!!TODO: DEPRECATE THIS BEHAVIOUR ??
Floating point-values specify the beginnings of ties.
a = FoscRhythmMaker();
a.(divisions: [2/16, 3/16, 5/32], ratios: #[[2,1.0],[3,2.0],[4,3]]);
a.show;ERROR: FoscRhythm::new: bad value: 1.0.Negative values in tuplet ratio specify rests.
a = FoscRhythmMaker();
a.(divisions: [2/16, 3/16, 5/32], ratios: #[[-2,1],[3,2],[4,-3]]);
a.show;
Patterns may be used as arguments.
a = FoscRhythmMaker();
a.(divisions: [1/8], ratios: Pseq(#[[-2,1],[3,2]], 7));
a.show;
Patterns may be used as arguments.
a = FoscRhythmMaker();
a.(divisions: Pseq([[1,8],[3,16]], 7), ratios: #[[-2,3]]);
a.show;
Patterns may be used as arguments.
a = FoscRhythmMaker();
a.(divisions: Pseq([[1,8],[3,16]], 7), ratios: Pseq(#[[-2,3], [3, -2]], 4));
a.show;
Apply sustain mask to tuplets.
FIXME: WARNING: keyword arg hold not found in call to Meta_FoscSustainMask:new Execution warning: Class FoscSegmentList not found ERROR: Primitive _ObjectIsKindOf failed. Wrong type.
p = FoscPattern(#[0,1,4,5]) | FoscPattern.last(3);
m = FoscSustainMask(p, hold: true);
a = FoscRhythmMaker();
a.(divisions: 1/4 ! 4, ratios: #[[1,1,1,1,1]], masks: [m]);
a.show;FIXME: ERROR: Message sizes not understood.
a = FoscRhythmMaker();
m = FoscSustainMask(FoscPattern.sizes(#[4,-3,5,-4,4]));
a.(divisions: 1/4 ! 4, ratios: #[[1,1,1,1,1]], masks: m);
a.show;With tuplet specifier and beam specifier.
FIXME: ERROR: Message sizes not understood.
t = FoscTupletSpecifier(extractTrivial: true, rewriteSustained: true, rewriteRestFilled: true);
b = FoscBeamSpecifier(beamRests: false);
a = FoscRhythmMaker(beamSpecifier: b, tupletSpecifier: t);
m = FoscSustainMask(FoscPattern.sizes(#[4,-3,5,-4,4]));
a.(divisions: 1/4 ! 4, ratios: #[[1,1,1,1,1]], mask: m);
a.show;Beam rests and include stemlets.
FIXME: ERROR: Class not defined
t = FoscTupletSpecifier(extractTrivial: true, rewriteSustained: true, rewriteRestFilled: true);
b = FoscBeamSpecifier(beamRests: true, stemletLength: 2);
a = FoscRhythmMaker(beamSpecifier: b, tupletSpecifier: t);
m = a.(divisions: 1/4 ! 4, ratios: #[[1,1,1,1,1]], mask: FoscFuseMask(#[4,-3,5,-8]));
a.show;Extract trivial tuplets, rewrite sustained tuplets, and rewrite rest-filled tuplets.
FIXME: ERROR: Class not defined
t = FoscTupletSpecifier(extractTrivial: true, rewriteSustained: true, rewriteRestFilled: true);
a = FoscRhythmMaker(tupletSpecifier: t);
m = a.(divisions: 1/4 ! 4, ratios: #[[1,1,1,1,1]], mask: FoscFuseMask(#[4,-3,5,-8]));
m.selectRuns.do { |run| run.beam };
a.show;!!!TODO: BROKEN: tuplet specifier causes entire final tuplet selection to be extracted
Bypass specifiers in factory stage. Apply them after further transformations on selections.
a = FoscRhythmMaker();
m = a.(divisions: 1/4 ! 4, ratios: #[[1,1,1,1,1]], mask: FoscFuseMask(#[4,-3,5,-8]));
m = FoscTupletSpecifier(extractTrivial: true, rewriteSustained: true, rewriteRestFilled: true).(m);
m.selectRuns.do { |run| run.beam };
a.show;Gets beam specifier.
Gets division masks.
Gets duration spelling specifier.
Gets logical tie masks.
Gets tie specifier.
Gets tuplet spelling specifier.
Illustrates rhythm-maker.
Returns LilyPond file.
Example
a = FoscRhythmMaker();
a.(divisions: [1/4], ratios: #[1,1,1,1,1] ! 4);
a.show;