FoscRhythmMaker

Returns a FoscRhythmMaker.


Description

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.


Attributes Summary

Instance Properties

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.

Instance Methods: Special Methods

illustrate Illustrates rhythm-maker.
show
value


Usage

  1. Example

    a = FoscRhythmMaker();
    a.(divisions: [1/4], ratios: #[[1,1],[3,2],[4,3]]);
    a.show;

  2. Example

    a = FoscRhythmMaker();
    a.(divisions: [2/16, 3/16, 5/32], ratios: #[[2,1],[3,2],[4,3]]);
    a.show;

  3. !!!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.
  4. 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;

  5. Patterns may be used as arguments.

    a = FoscRhythmMaker();
    a.(divisions: [1/8], ratios: Pseq(#[[-2,1],[3,2]], 7));
    a.show;

  6. Patterns may be used as arguments.

    a = FoscRhythmMaker();
    a.(divisions: Pseq([[1,8],[3,16]], 7), ratios: #[[-2,3]]);
    a.show;

  7. 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;

  8. 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;
  9. 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;
  10. 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;
  11. 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;
  12. 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;
  13. !!!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;


Instance Properties


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.


Instance Methods: Special Methods


illustrate

Illustrates rhythm-maker.

Returns LilyPond file.


show

  1. Example

    a = FoscRhythmMaker();
    a.(divisions: [1/4], ratios: #[1,1,1,1,1] ! 4);
    a.show;


value