Class: Tonal::ExtendedRatio
- Inherits:
-
Object
- Object
- Tonal::ExtendedRatio
- 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 extended ratio.
-
#to_subharmonic_extended_ratio ⇒ Tonal::SubharmonicExtendedRatio
(also: #to_sefr)
The subharmonic 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 extended ratio.
68 69 70 71 72 73 |
# File 'lib/tonal/extended_ratio.rb', line 68 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_subharmonic_extended_ratio ⇒ Tonal::SubharmonicExtendedRatio Also known as: to_sefr
Returns the subharmonic extended ratio.
80 81 82 |
# File 'lib/tonal/extended_ratio.rb', line 80 def to_subharmonic_extended_ratio switch_to(:subharmonic) end |