Skip to content

Commit

Permalink
Only show notes within a single octave in scales (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
deckerego authored Mar 6, 2023
1 parent a8c1e56 commit 5f20ef3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scales.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ def sleep(self):
def set_scale(self, name, key, scale):
self.wake()
self.group[1].text = name
notes = map(lambda d: Key.to_note(key.number + d), scale[:7])
degrees = filter(lambda d: d < 12, scale)
notes = map(lambda d: Key.to_note(key.number + d), degrees)
self.group[7].text = ' '.join(notes)
self.display.refresh()

Expand Down

0 comments on commit 5f20ef3

Please sign in to comment.