Class: OutroRails::ChordChart::Voicing

Inherits:
ApplicationRecord show all
Defined in:
app/models/outro_rails/chord_chart/voicing.rb

Class Method Summary collapse

Class Method Details

.normalize_bass(value) ⇒ Object



27
28
29
30
31
32
33
# File 'app/models/outro_rails/chord_chart/voicing.rb', line 27

def self.normalize_bass(value)
  return "" if value.to_s.strip.empty?

  Theory::NoteName.parse(value).to_s
rescue ArgumentError
  value.to_s
end