I was going to ask about the message details but I figured it would make me sound like an asshole, so thanks for that. I've looked for this kind of message specifically and not found it in the spec. Does it specify a note number or do something odd?
FYI, I wasn't worried about synths generating the message but rather receiving it. It's not too hard to tell whether a synth has a concept of per-note aftertouch, but I guess if it's two distinct messages it's okay to be selective about which you support.
Yes, the message format of polyphonic aftertouch is similar to that of a note on event (= note # + pressure). Channel aftertouch includes only the pressure.
In case you're interested, I e-mailed to the address on your GitHub a copy of the message formats from the MIDI spec. I don't know where I found it (it's not freely available) or else I'd have linked it.
This page: http://www.srm.com/qtma/davidsmidispec.html (which is quite obviously highly unofficial) mentions both 0xAx and 0xDx, calling them "Key Pressure" and "Channel Pressure", respectively. The explanation says:
Some keyboards can detect a change in pressure on each key, while they are held by the player; these keyboards can report "key pressure" over MIDI. Some keyboards may sense the overall pressure on the device, such as with a weight sensor beneath the entire keyboard. These devices can report "channel pressure."
(Edit: whoops, I'm bad at converting bin->hex.)