module MTK::Groups
Collections of {MTK::Core} objects
Public Class Methods
to_pitch_classes(*anything)
click to toggle source
# File lib/mtk/groups/collection.rb, line 168 def to_pitch_classes(*anything) anything = anything.first if anything.length == 1 if anything.respond_to? :to_pitch_classes anything.to_pitch_classes else case anything when ::Enumerable then anything.map{|item| MTK.PitchClass(item) } else [MTK.PitchClass(anything)] end end end
to_pitches(*anything)
click to toggle source
# File lib/mtk/groups/collection.rb, line 182 def to_pitches(*anything) anything = anything.first if anything.length == 1 if anything.respond_to? :to_pitches anything.to_pitches else case anything when ::Enumerable then anything.map{|item| MTK.Pitch(item) } else [MTK.Pitch(anything)] end end end
Private Instance Methods
to_pitch_classes(*anything)
click to toggle source
# File lib/mtk/groups/collection.rb, line 168 def to_pitch_classes(*anything) anything = anything.first if anything.length == 1 if anything.respond_to? :to_pitch_classes anything.to_pitch_classes else case anything when ::Enumerable then anything.map{|item| MTK.PitchClass(item) } else [MTK.PitchClass(anything)] end end end
to_pitches(*anything)
click to toggle source
# File lib/mtk/groups/collection.rb, line 182 def to_pitches(*anything) anything = anything.first if anything.length == 1 if anything.respond_to? :to_pitches anything.to_pitches else case anything when ::Enumerable then anything.map{|item| MTK.Pitch(item) } else [MTK.Pitch(anything)] end end end