Class: Stave::Theory::ScaleType
Instance Attribute Summary
Attributes inherited from Core::Lookup
#variant
Instance Method Summary
collapse
class_key, #count, #degrees, #intervals, #relative_rotate, #rotate, #steps, #uniq
#==, each_key, find_by, #initialize, keys, string_keys, variant, variant?, variant_lookup, variants, where, with_options
Instance Method Details
#hexatonic? ⇒ Boolean
50
51
52
|
# File 'lib/stave/theory/scale_type.rb', line 50
def hexatonic?
count == 7
end
|
#mode_type_at(position) ⇒ Object
70
71
72
73
74
|
# File 'lib/stave/theory/scale_type.rb', line 70
def mode_type_at(position)
position -= 7 while position >= 8
mode_types[position - 1]
end
|
#mode_types ⇒ Object
66
67
68
|
# File 'lib/stave/theory/scale_type.rb', line 66
def mode_types
ModeType.where(scale_type: self).sort_by(&:position)
end
|
#pentatonic? ⇒ Boolean
46
47
48
|
# File 'lib/stave/theory/scale_type.rb', line 46
def pentatonic?
count == 5
end
|
#seventh_types ⇒ Object
60
61
62
63
64
|
# File 'lib/stave/theory/scale_type.rb', line 60
def seventh_types
Core::ScaleHarmoniser
.new(scale_type: self, chord_set: ChordType::Set.seventh)
.harmonise!
end
|
#triad_types ⇒ Object
54
55
56
57
58
|
# File 'lib/stave/theory/scale_type.rb', line 54
def triad_types
Core::ScaleHarmoniser
.new(scale_type: self, chord_set: ChordType::Set.triad)
.harmonise!
end
|