Skip to content

Commit 483e684

Browse files
committed
Update sequencer.py
Fixed bug that caused all tracks to play to channel 1
1 parent 6558cac commit 483e684

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mingus/midi/sequencer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ def play_Note(self, note, channel=1, velocity=100):
139139
you can set the Note.velocity and Note.channel attributes, which
140140
will take presedence over the function arguments.
141141
"""
142-
if hasattr(note, "velocity"):
142+
if "velocity" in note.__dict__:
143143
velocity = note.velocity
144-
if hasattr(note, "channel"):
144+
if "channel" in note.__dict__:
145145
channel = note.channel
146146
self.play_event(int(note) + 12, int(channel), int(velocity))
147147
self.notify_listeners(

0 commit comments

Comments
 (0)