If Pd uses Portmidi on Linux, then it should be pretty easy to list the available ports. It’s no so hard with ALSA itself either. Check the RtMidi ALSA implementation inside RtMidi.cpp. I’ve used that in the past as a reference, although it’s a little hairy to pick apart, it’s at least a good working example beyond the ALSA documentation.

--------
Dan Wilcox
@danomatika
danomatika.com
robotcowboy.com

On Apr 21, 2016, at 9:28 AM, pd-list-request@lists.iem.at wrote:

From: Miller Puckette <msp@ucsd.edu>
Subject: Re: [PD] time travelling with AKM320 and Pd
Date: April 21, 2016 at 9:09:58 AM MDT
To: Jonathan Wilkes <jancsika@yahoo.com>
Cc: "pd-list@lists.iem.at" <pd-list@lists.iem.at>, IOhannes m zmoelnig <zmoelnig@iem.at>


I don't know of any reason this can't be done.  The main alsa api limitation
that has stopped me is: Not Worth the Hassle.  That, however, is subjective -
if you indeed want to attack it I'll be glad to see it (and perhaps even
borrow it into vanilla if you're game).