Class: GuitarProParser::ChordDiagram
- Inherits:
-
Object
- Object
- GuitarProParser::ChordDiagram
- Defined in:
- lib/guitar_pro_parser/chord_diagram.rb
Instance Attribute Summary collapse
-
#add ⇒ Object
Returns the value of attribute add.
-
#barres ⇒ Object
Returns the value of attribute barres.
-
#base_fret ⇒ Object
Returns the value of attribute base_fret.
-
#bass ⇒ Object
Returns the value of attribute bass.
-
#display_as ⇒ Object
Returns the value of attribute display_as.
-
#display_fingering ⇒ Object
Returns the value of attribute display_fingering.
-
#eleventh_tonality ⇒ Object
Returns the value of attribute eleventh_tonality.
-
#fifth_tonality ⇒ Object
Returns the value of attribute fifth_tonality.
-
#fingers ⇒ Object
Returns the value of attribute fingers.
-
#frets ⇒ Object
Returns the value of attribute frets.
-
#intervals ⇒ Object
Returns the value of attribute intervals.
-
#name ⇒ Object
Returns the value of attribute name.
-
#nine_eleven_thirteen ⇒ Object
Determines if the chord goes until the ninth, the eleventh, or the thirteenth.
-
#ninth_tonality ⇒ Object
Returns the value of attribute ninth_tonality.
-
#root ⇒ Object
Returns the value of attribute root.
-
#tonality ⇒ Object
Returns the value of attribute tonality.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #add_barre(fret, start_string, end_string) ⇒ Object
-
#initialize ⇒ ChordDiagram
constructor
A new instance of ChordDiagram.
Constructor Details
#initialize ⇒ ChordDiagram
Returns a new instance of ChordDiagram.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 26 def initialize @name = '' @base_fret = 0 @frets = [] @display_as = :sharp @root = nil @type = 'M' @nine_eleven_thirteen = 0 @bass = nil @tonality = :perfect @add = false @fifth_tonality = :perfect @ninth_tonality = :perfect @eleventh_tonality = :perfect @barres = [] @intervals = [] @fingers = [] @display_fingering = false end |
Instance Attribute Details
#add ⇒ Object
Returns the value of attribute add.
15 16 17 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 15 def add @add end |
#barres ⇒ Object
Returns the value of attribute barres.
15 16 17 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 15 def @barres end |
#base_fret ⇒ Object
Returns the value of attribute base_fret.
5 6 7 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 5 def base_fret @base_fret end |
#bass ⇒ Object
Returns the value of attribute bass.
15 16 17 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 15 def bass @bass end |
#display_as ⇒ Object
Returns the value of attribute display_as.
5 6 7 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 5 def display_as @display_as end |
#display_fingering ⇒ Object
Returns the value of attribute display_fingering.
15 16 17 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 15 def display_fingering @display_fingering end |
#eleventh_tonality ⇒ Object
Returns the value of attribute eleventh_tonality.
15 16 17 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 15 def eleventh_tonality @eleventh_tonality end |
#fifth_tonality ⇒ Object
Returns the value of attribute fifth_tonality.
15 16 17 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 15 def fifth_tonality @fifth_tonality end |
#fingers ⇒ Object
Returns the value of attribute fingers.
15 16 17 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 15 def fingers @fingers end |
#frets ⇒ Object
Returns the value of attribute frets.
5 6 7 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 5 def frets @frets end |
#intervals ⇒ Object
Returns the value of attribute intervals.
15 16 17 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 15 def intervals @intervals end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 5 def name @name end |
#nine_eleven_thirteen ⇒ Object
Determines if the chord goes until the ninth, the eleventh, or the thirteenth.
13 14 15 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 13 def nine_eleven_thirteen @nine_eleven_thirteen end |
#ninth_tonality ⇒ Object
Returns the value of attribute ninth_tonality.
15 16 17 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 15 def ninth_tonality @ninth_tonality end |
#root ⇒ Object
Returns the value of attribute root.
5 6 7 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 5 def root @root end |
#tonality ⇒ Object
Returns the value of attribute tonality.
15 16 17 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 15 def tonality @tonality end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 5 def type @type end |
Instance Method Details
#add_barre(fret, start_string, end_string) ⇒ Object
46 47 48 |
# File 'lib/guitar_pro_parser/chord_diagram.rb', line 46 def (fret, start_string, end_string) @barres << { fret: fret, start_string: start_string, end_string: end_string } end |