Skip to content

Commit

Permalink
Key: Make case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
ideoforms committed Sep 15, 2024
1 parent ac96a81 commit 45269c0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions isobar/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ def note_name_to_midi_note(name):
octave = -1

try:
# TODO: Fix such that note names can be lowercase (must also work with e.g. Bb)
index = note_names.index([nameset for nameset in note_names if name in nameset][0])
index = note_names.index([nameset for nameset in note_names if name.capitalize() in nameset][0])
except IndexError:
raise UnknownNoteName("Unknown note name: %s" % name)

Expand Down

0 comments on commit 45269c0

Please sign in to comment.