Skip to content

Commit 543fa7a

Browse files
authored
Merge pull request #44 from adafruit/note_private_fix
Made note public variable
2 parents 2a2b097 + 61d8728 commit 543fa7a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

adafruit_midi/note_off.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,18 @@ class NoteOff(MIDIMessage): # pylint: disable=duplicate-code
3636
LENGTH = 3
3737

3838
def __init__(self, note, velocity=0, *, channel=None):
39-
self._note = note_parser(note)
39+
self.note = note_parser(note)
40+
"""key, either int (0-127) or string that will be turned off """
4041
self._velocity = velocity
4142
super().__init__(channel=channel)
42-
if not 0 <= self._note <= 127 or not 0 <= self._velocity <= 127:
43+
if not 0 <= self.note <= 127 or not 0 <= self._velocity <= 127:
4344
self._raise_valueerror_oor()
4445

4546
def __bytes__(self):
4647
return bytes(
4748
[
4849
self._STATUS | (self.channel & self.CHANNELMASK),
49-
self._note,
50+
self.note,
5051
self._velocity,
5152
]
5253
)

0 commit comments

Comments
 (0)