Skip to content
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

outgoing polyphonic aftertouch messages incorrectly use velocity instead of pressure. #10

Open
the-t-in-rtf opened this issue Feb 17, 2019 · 1 comment

Comments

@the-t-in-rtf
Copy link
Contributor

Now that I have a device that supports polyphonic aftertouch, I discovered that while incoming polyphonic aftertouch messages correctly use "pressure", outgoing messages must use "velocity" so that the value survives its trip through flock.midi.write.note:

https://github.com/colinbdclark/Flocking/blob/master/src/web/midi.js#L613

@colinbdclark
Copy link
Contributor

After a further conversation with @the-t-in-rtf, it sounds like the issue is that when we are trying to encode an outgoing polyphonic aftertouch message, Flocking's implementation erroneously reuses the writer function for note messages, which expect to read and encode a velocity property, which isn't appropriate for polyphonic aftertouch messages (which need to encode the pressure property).

Here's the implementation of
flock.midi.write.note
. To fix this issue, we should simply ensure that the line that @the-t-in-rtf provides above does not reuse the note writer, but instead makes a call directly to flock.midi.write.threeByteMessage.

@the-t-in-rtf, if you've got a fix for this, a PR here is fine and then eventually we'll start the work of forward-porting everything to flocking-midi (which hasn't been looked at in a couple years, needs to be de-Nodeified and then finished.

@colinbdclark colinbdclark transferred this issue from lichen-community-systems/Flocking Jun 8, 2020
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

No branches or pull requests

2 participants