Class: OutroRails::Theory::Key::CirclePosition
- Inherits:
-
Struct
- Object
- Struct
- OutroRails::Theory::Key::CirclePosition
- Defined in:
- lib/outro_rails/theory/key.rb
Overview
One wedge of the circle-of-fifths wheel: the major key(s) at a position (two spellings at the enharmonic seam, F#/Gb) and their relative minors, kept in matching order (F# => D#m, Gb => Ebm).
Instance Attribute Summary collapse
-
#majors ⇒ Object
Returns the value of attribute majors.
-
#minors ⇒ Object
Returns the value of attribute minors.
Instance Method Summary collapse
Instance Attribute Details
#majors ⇒ Object
Returns the value of attribute majors
23 24 25 |
# File 'lib/outro_rails/theory/key.rb', line 23 def majors @majors end |
#minors ⇒ Object
Returns the value of attribute minors
23 24 25 |
# File 'lib/outro_rails/theory/key.rb', line 23 def minors @minors end |
Instance Method Details
#major_label ⇒ Object
28 29 30 |
# File 'lib/outro_rails/theory/key.rb', line 28 def major_label majors.map(&:to_s).join("/") end |
#minor_label ⇒ Object
32 33 34 |
# File 'lib/outro_rails/theory/key.rb', line 32 def minor_label minors.map(&:to_s).join("/") end |
#pitch_class ⇒ Object
24 25 26 |
# File 'lib/outro_rails/theory/key.rb', line 24 def pitch_class majors.first.tonic.pitch_class end |