The frontend decoder is entirely implemented in Max; it's a straight-forward patcher:
This just recognizes the MIDI layout used by
the Max Handpan frontend; we are careful to first output a retune index and then
a (category, index)
pair; for example, we might output (2, 1)
to mean
"ghost note at tone field 1". See the description of the
Soniccouture backend
for an example use case.