Class: Stave::Theory::Scale
Instance Attribute Summary
#root, #type
Instance Method Summary
collapse
inherited, #initialize, #note_at, #notes, #to_h, type_class, #uniq
Instance Method Details
#key_signature ⇒ Object
4
5
6
|
# File 'lib/stave/theory/scale.rb', line 4
def key_signature
KeySignature.parse(self)
end
|
#mode(position) ⇒ Object
20
21
22
23
24
25
26
27
|
# File 'lib/stave/theory/scale.rb', line 20
def mode(position)
return if type.mode_types.empty?
Mode.new(
type: type.mode_type_at(position),
root: note_at(position)
)
end
|
#sevenths ⇒ Object
14
15
16
17
18
|
# File 'lib/stave/theory/scale.rb', line 14
def sevenths
return unless type.hexatonic?
harmonise!(type.seventh_types)
end
|
#triads ⇒ Object
8
9
10
11
12
|
# File 'lib/stave/theory/scale.rb', line 8
def triads
return unless type.hexatonic?
harmonise!(type.triad_types)
end
|