Class: Tonal::SubharmonicExtendedRatio
- Inherits:
-
Object
- Object
- Tonal::SubharmonicExtendedRatio
- Includes:
- ExtendableRatio
- Defined in:
- lib/tonal/extended_ratio.rb
Instance Attribute Summary
Attributes included from ExtendableRatio
Instance Method Summary collapse
-
#ratios(reduced: true) ⇒ Array<Tonal::Ratio, Tonal::ReducedRatio>
The ratios of the subharmonic extended ratio.
-
#to_extended_ratio ⇒ Tonal::ExtendedRatio
(also: #to_efr)
The harmonic extended ratio.
Methods included from ExtendableRatio
#initialize, #inspect, #interval_between
Instance Method Details
#ratios(reduced: true) ⇒ Array<Tonal::Ratio, Tonal::ReducedRatio>
Returns the ratios of the subharmonic extended ratio.
105 106 107 108 109 110 |
# File 'lib/tonal/extended_ratio.rb', line 105 def ratios(reduced: true) first = partials.first partials.map do |n| reduced ? Tonal::ReducedRatio.new(n, first) : Tonal::Ratio.new(n, first) end end |
#to_extended_ratio ⇒ Tonal::ExtendedRatio Also known as: to_efr
Returns the harmonic extended ratio.
117 118 119 |
# File 'lib/tonal/extended_ratio.rb', line 117 def to_extended_ratio switch_to(:harmonic) end |