Skip to content

Conversation

@ZimingYuan
Copy link

In the function "play_Note" of class "Sequencer" :

    def play_Note(self, note, channel=1, velocity=100):
        if hasattr(note, "velocity"):
            velocity = note.velocity
        if hasattr(note, "channel"):
            channel = note.channel

The code checks "velocity" and "channel" attributes. In original code the "Note" class has these two attributes in default, so above two condition clauses will pass any time, making you unable to control which channel to play through the function parameter. Deleting these two attributes makes them only exist after calling "Note.set_channel" method.

@edudobay
Copy link
Collaborator

edudobay commented May 9, 2020

Thank you for the contribution and sorry for the delay! This seems indeed wrong in the original code and your commit seems to fix it. However there are some other issues with channel and velocity that I think should be fixed along with this. I'll be investigating these on the next few days and will reply here when I have an answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants