MCPcopy Create free account
hub / github.com/bspaans/python-mingus / can_play_notes

Method can_play_notes

mingus/containers/instrument.py:82–94  ·  view source on GitHub ↗

Test if the notes lie within the range of the instrument. Return True if so, False otherwise.

(self, notes)

Source from the content-addressed store, hash-verified

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."""

Callers 1

notes_in_rangeMethod · 0.95

Calls 1

note_in_rangeMethod · 0.95

Tested by

no test coverage detected