Text this: A maximum-likelihood decoder for joint pulse position and amplitude modulations