We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a764c70 commit b12f924Copy full SHA for b12f924
1 file changed
examples/midi_inoutdemo.py
@@ -35,12 +35,12 @@
35
major_chord = [0, 4, 7]
36
while True:
37
38
- (msg_in, channel_in) = midi.receive() # non-blocking read
+ msg_in = midi.receive() # non-blocking read
39
# For a Note On or Note Off play a major chord
40
# For any other known event just forward it
41
if isinstance(msg_in, NoteOn) and msg_in.velocity != 0:
42
print("Playing major chord with root", msg_in.note,
43
- "from channel", channel_in + 1)
+ "from channel", msg.channel + 1)
44
for offset in major_chord:
45
new_note = msg_in.note + offset
46
if 0 <= new_note <= 127:
0 commit comments