Class: Stave::Theory::ChordInversionType

Inherits:
Core::DegreeCollection show all
Defined in:
lib/stave/theory/chord_inversion_type.rb

Instance Attribute Summary

Attributes inherited from Core::Lookup

#variant

Instance Method Summary collapse

Methods inherited from Core::DegreeCollection

class_key, #count, #intervals, #relative_rotate, #rotate, #steps, #uniq

Methods inherited from Core::Lookup

#==, each_key, find_by, #initialize, keys, string_keys, variant, variant?, variant_lookup, variants, where, with_options

Constructor Details

This class inherits a constructor from Stave::Core::Lookup

Instance Method Details

#degreesObject



23
24
25
# File 'lib/stave/theory/chord_inversion_type.rb', line 23

def degrees
  chord_type.relative_rotate(position).uniq(&:variant)
end

#positionObject



19
# File 'lib/stave/theory/chord_inversion_type.rb', line 19

def position = inversion + 1

#root_positionObject



21
# File 'lib/stave/theory/chord_inversion_type.rb', line 21

def root_position = degrees.count - inversion

#symbolObject



27
28
29
# File 'lib/stave/theory/chord_inversion_type.rb', line 27

def symbol
  "(#{'i' * inversion})"
end