Method: Fet::Note#flattened_note

Defined in:
lib/fet/note.rb

#flattened_noteObject

NOTE: performs the following conversions: Fxx -> F#x -> Fx -> F# -> F -> Fb -> Fbb



58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/fet/note.rb', line 58

def flattened_note
  note_as_string = case
                   when accidental.start_with?("x")
                     "#{natural_note}##{accidental[1..]}"
                   when accidental.start_with?("#")
                     "#{natural_note}#{accidental[1..]}"
                   else
                     "#{natural_note}#{accidental}b"
                   end

  return Note.new(note_as_string)
end