push-wrapper icon indicating copy to clipboard operation
push-wrapper copied to clipboard

Push defaults to Channel Aftertouch, but the library looks for Polyphonic

Open psychedelicious opened this issue 6 years ago • 0 comments

Push uses Channel Aftertouch (e.g. 208), but the API only handles Polyphonic Aftertouch (e.g. 160).

See MIDI spec: https://www.midi.org/specifications-old/item/table-2-expanded-messages-list-status-bytes

The Push can be set to Polyphonic Aftertouch mode by sending sysex 92,0,1,0, though Ableton Live does not support Polyphonic Aftertouch. If I do this, I can use onAftertouch() to do things as expected.

Push can also be set back to Channel Aftertouch mode by sending sysex 92,0,1,1.

The Channel Aftertouch message is [208, pressure = 0-127].

I have tried to add an additional dispatcher to handle 208 but my JS knowledge is not quite advanced enough to accomplish this successfully, so I am submitting this issue instead of a PR.

Request ~renaming onAftertouch() to onPolyAftertouch and~ adding onChannelAftertouch and associated listeners/dispatchers etc.

The following additional functions getting tacked on to the module's exports would be nice as well (tested working on my end):

  setPolyphonicAftertouch: () => sendSysex([92,0,1,0]),
  setChannelAftertouch: () => sendSysex([92,0,1,1])

Thank you very much for this API!

psychedelicious avatar Aug 03 '19 12:08 psychedelicious