File tree Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -148,26 +148,26 @@ def _is_channel_message(status_byte):
148
148
return status_byte >= NOTE_OFF and status_byte < SYSEX
149
149
150
150
151
- def _read_n_bytes (port , buf , dest , num_bytes ):
152
- while num_bytes :
153
- if port .readinto (buf ):
154
- dest .append (buf [0 ])
155
- num_bytes -= 1
156
-
157
-
158
- def _read_byte_works (port ):
159
- while True :
160
- buf = port .read (1 )
161
- if buf :
162
- return buf [0 ]
163
-
164
-
165
151
def _read_byte (port ):
166
152
while not (buf := port .read (1 )):
167
153
pass
168
154
return buf [0 ]
169
155
170
156
157
+ # def _read_n_bytes(port, buf, dest, num_bytes):
158
+ # while num_bytes:
159
+ # if port.readinto(buf):
160
+ # dest.append(buf[0])
161
+ # num_bytes -= 1
162
+
163
+
164
+ # def _read_byte_works(port):
165
+ # while True:
166
+ # buf = port.read(1)
167
+ # if buf:
168
+ # return buf[0]
169
+
170
+
171
171
class Message :
172
172
"""
173
173
MIDI Message.
@@ -205,6 +205,9 @@ def __bytes__(self):
205
205
return bytes ([status_byte , self .data0 ])
206
206
return bytes ([status_byte ])
207
207
208
+ def __repr__ (self ):
209
+ return self .__str__ ()
210
+
208
211
# pylint: disable=consider-using-f-string
209
212
def __str__ (self ):
210
213
mtype = self .type
You can’t perform that action at this time.
0 commit comments