FoscTransposition

Returns a FoscTransposition.


Description

Transposition operator

Object model of twelve-tone transposition operator.


Attributes Summary

Instance Methods

value


Usage

  1. Example

    a = FoscTransposition(4);
    p = FoscPitch(60);
    a.(p).pitchNumber;
    64.0
  2. Example

    a = FoscTransposition(4);
    p = [FoscPitch(60), FoscPitch(64), FoscPitch(67)];
    a.(p).collect { |each| each.pitchNumber };
    [ 64.0, 68.0, 71.0 ]
  3. Only transpose masked pitches.

    FIXME: ERROR: Class not defined

    a = FoscTransposition(4, mask: FoscPitchClassMask(#[0,7]));
    p = [FoscPitch(60), FoscPitch(64), FoscPitch(67)];
    a.(p).collect { |each| each.pitchNumber };
  4. Example

    a = FoscTransposition(4);
    p = FoscPitchSegment([FoscPitch(60), FoscPitch(64), FoscPitch(67)]);
    a.(p).str;
    <e' af' b'>


Instance Methods


value