FoscMeterSpecifier

Returns a FoscMeterSpecifier.


Description

Meter specifier.


Attributes Summary

Instance Properties

decreaseMonotonic Is true when all durations should be spelled as a tied series of monotonically decreasing values. Otherwise false.
forbidMeterRewriting Is true when meter rewriting is forbidden.
forbiddenDuration Gets forbidden written duration.
rewriteMeter Is true when all output divisions should rewrite meter. Otherwise false.
spellMetrically Is true when durations should spell according to approximate common practice understandings of meter. Otherwise false.

Instance Methods: Special Methods

asCompileString !!!TODO: NOT YET IMPLEMENTED
format !!!TODO: NOT YET IMPLEMENTED
value


Usage

  1. Example

    m = #[[2,4],[2,4],[2,4],[2,4]];
    a = FoscLeafMaker().(#[60,62,64,65], [3/8,6/8,2/8,5/8]);
    a = FoscMeterSpecifier(m).([a]);
    a.selectLeaves[0].attach(FoscTimeSignature(#[2,4]));
    FoscStaff(a).show;

  2. Example

    m = #[[2,4],[2,4],[2,4],[2,4]];
    a = FoscLeafMaker().(#[nil,62,nil,nil], [3/8,6/8,2/8,5/8]);
    a = FoscMeterSpecifier(m).([a]);
    t = nil;
    a.do { |sel, i|
        if (m[i] != t) { sel.leafAt(0).attach(FoscTimeSignature(m[i])); t = m[i] };
    };
    FoscStaff(a).show;

  3. Example

    m = #[[4,4],[4,4]];
    a = FoscLeafMaker().(#[nil], [3/8,6/8,2/8,5/8]);
    a = FoscMeterSpecifier(m).([a]);
    t = nil;
    a.do { |sel, i|
        if (m[i] != t) { sel.leafAt(0).attach(FoscTimeSignature(m[i])); t = m[i] };
    };
    FoscStaff(a).show;

  4. FIXME FoscTupletMaker ERROR: Class not defined.

    t = #[[4,4],[1,4],[3,4]];
    a = FoscTupletMaker();
    m = a.(divisions: 1/4 ! 8, tupletRatios: #[[1,1,1,1,1]], applySpecifiers: false);
    m = FoscFuseMask(#[17,20,-3]).(m);
    m = FoscTupletSpecifier(extractTrivial: true, rewriteSustained: true, rewriteRestFilled: true).(m);
    FoscBeamSpecifier().(m);
    m = FoscMeterSpecifier(t).(m);
    m.do { |sel, i| sel.leafAt(0).attach(FoscTimeSignature(t[i])) };
    FoscLilypondFile.rhythm(m).show;
  5. Raise exception if duration of meters is not equal to duration of selections.

    m = #[[5,4],[4,4]];
    a = FoscLeafMaker().(#[60,62,64,65], [3/8,6/8,2/8,5/8]);
    a = FoscMeterSpecifier(m).([a]);
    ERROR: FoscMeterSpecifier:prRewriteMeter: duration of meters must be equal to duration of selections: meters: 9/4, selections: 2/1.


Instance Properties


decreaseMonotonic

Is true when all durations should be spelled as a tied series of monotonically decreasing values. Otherwise false.

Defaults to true.

Returns true or false.


forbidMeterRewriting

Is true when meter rewriting is forbidden.

Defaults to nil.

Returns boolean or nil.


forbiddenDuration

Gets forbidden written duration.

Defaults to nil.

Returns duration or nil.


rewriteMeter

Is true when all output divisions should rewrite meter. Otherwise false.

Defaults to nil.

Set to true, false or nil.

Returns true, false or nil.


spellMetrically

Is true when durations should spell according to approximate common practice understandings of meter. Otherwise false.

Spells unassignable durations like 5/16 and 9/4 metrically when set to unassignable. Leaves other durations unchanged.

Defaults to nil.

Returns boolean, unassignable or nil..


Instance Methods: Special Methods


asCompileString

!!!TODO: NOT YET IMPLEMENTED

Gets interpreter representation.

Returns string.


format

!!!TODO: NOT YET IMPLEMENTED

Formats duration spelling specifier.

Returns string.


value