Test if the notes lie within the range of the instrument. Return True if so, False otherwise.
(self, notes)
| 80 | return self.can_play_notes(notes) |
| 81 | |
| 82 | def can_play_notes(self, notes): |
| 83 | """Test if the notes lie within the range of the instrument. |
| 84 | |
| 85 | Return True if so, False otherwise. |
| 86 | """ |
| 87 | if hasattr(notes, "notes"): |
| 88 | notes = notes.notes |
| 89 | if not isinstance(notes, list): |
| 90 | notes = [notes] |
| 91 | for n in notes: |
| 92 | if not self.note_in_range(n): |
| 93 | return False |
| 94 | return True |
| 95 | |
| 96 | def __repr__(self): |
| 97 | """Return a string representing the object.""" |
no test coverage detected