FoscStaffPosition

Returns a FoscStaffPosition.


Description

Staff position


Attributes Summary

Instance Properties

number
toPitch Makes named pitch from staff position and clef.

Instance Methods: Special Methods

== Is true when object is a staff position with the same number as this staff position.
< Is true when staff position is less than object.
asCompileString
hash !!!TODO: not yet implemented
str


Instance Properties


number


toPitch

Makes named pitch from staff position and clef.

  1. Treble clef.

    (-6..5).collect { |i| FoscStaffPosition(i).toPitch('treble').str };
    [ "c'", "d'", "e'", "f'", "g'", "a'", "b'", "c''", "d''", "e''", "f''", "g''" ]
  2. Bass clef.

    (-6..5).collect { |i| FoscStaffPosition(i).toPitch('bass').str };
    [ "e,", "f,", "g,", "a,", "b,", "c", "d", "e", "f", "g", "a", "b" ]
  3. Alto clef.

    (-6..5).collect { |i| FoscStaffPosition(i).toPitch('alto').str };
    [ "d", "e", "f", "g", "a", "b", "c'", "d'", "e'", "f'", "g'", "a'" ]
  4. Percussion clef.

    (-6..5).collect { |i| FoscStaffPosition(i).toPitch('percussion').str };
    [ "d", "e", "f", "g", "a", "b", "c'", "d'", "e'", "f'", "g'", "a'" ]


Instance Methods: Special Methods


==

Is true when object is a staff position with the same number as this staff position.


<

Is true when staff position is less than object.


asCompileString


hash

!!!TODO: not yet implemented


str

  1. Example

    a = FoscStaffPosition(1);
    a.str;
    FoscStaffPosition(1)