Skip to content

Expose velocity attribute #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 9, 2022
Merged

Expose velocity attribute #48

merged 3 commits into from
Mar 9, 2022

Conversation

tekktrik
Copy link
Member

@tekktrik tekktrik commented Mar 8, 2022

Resolves #47 by exposing the velocity attribute, just as NoteOn does. Required disabling duplicate-code pylint warning.

@tekktrik tekktrik requested a review from a team March 8, 2022 04:19
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! One suggestion.

@@ -38,17 +38,17 @@ class NoteOff(MIDIMessage): # pylint: disable=duplicate-code
def __init__(self, note, velocity=0, *, channel=None):
self.note = note_parser(note)
"""key, either int (0-127) or string that will be turned off """
self._velocity = velocity
self.velocity = velocity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment after it like self.note above. That will make it show up in the docs.

@tekktrik tekktrik requested a review from tannewt March 8, 2022 18:27
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit 1ca7258 into adafruit:main Mar 9, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Mar 10, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_SCD4X to 1.3.0 from 1.2.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_SCD4X#13 from tekktrik/dev/clearer-i2c-failure
  > Fixed readthedocs build
  > Post-patch cleanup
  > Consolidate Documentation sections of README

Updating https://github.com/adafruit/Adafruit_CircuitPython_MIDI to 1.4.7 from 1.4.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_MIDI#48 from tekktrik/dev/expose-velocity-attr
  > Fixed readthedocs build
  > Consolidate Documentation sections of README
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.

AttributeError: 'NoteOff' object has no attribute 'velocity'
2 participants