magenta / drumbot

Play real-time music with a machine learning drummer that drums based on your melody.
https://drumbot.glitch.me/
Other
232 stars 33 forks source link

Handle "Note On" events with velocity 0 #4

Closed jpetazzo closed 4 years ago

jpetazzo commented 4 years ago

A lot of MIDI instruments (almost every keyboard I ever played!) are using "running status" and emit "Note On" with a velocity of zero when a key is released (instead of "Note Off").

This causes every note to sound twice (once when pressed, once when released).

This patch addresses this. Sorry if it's not very Node-ish; feel free to rewrite, discard, or ignore :)

googlebot commented 4 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

jpetazzo commented 4 years ago

@googlebot I signed it!

googlebot commented 4 years ago

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.