5151class NoteOff (MIDIMessage ):
5252 """Note Off Change MIDI message.
5353
54- :param note: The note (key) number either as an int (0-127) or a str which is parsed, e.g. "C4" (middle C) is 60, "A4" is 69.
54+ :param note: The note (key) number either as an ``int`` (0-127) or a
55+ ``str`` which is parsed, e.g. "C4" (middle C) is 60, "A4" is 69.
5556 :param int velocity: The release velocity, 0-127.
5657
5758 """
@@ -60,7 +61,7 @@ class NoteOff(MIDIMessage):
6061 _STATUSMASK = 0xf0
6162 LENGTH = 3
6263 CHANNELMASK = 0x0f
63-
64+
6465 def __init__ (self , note , velocity ):
6566 self .note = note_parser (note )
6667 self .velocity = velocity
@@ -70,10 +71,10 @@ def __init__(self, note, velocity):
7071 # channel value is mandatory
7172 def as_bytes (self , channel = None ):
7273 return bytearray ([self ._STATUS | (channel & self .CHANNELMASK ),
73- self .note , self .velocity ])
74+ self .note , self .velocity ])
7475
7576 @classmethod
7677 def from_bytes (cls , databytes ):
77- return cls (databytes [0 ], databytes [1 ])
78+ return cls (databytes [0 ], databytes [1 ])
7879
7980NoteOff .register_message_type ()
0 commit comments