[PD] Bug: Double parsing of -mididev startup parameters in Linux

Alexander Connor a.connexx at runbox.com
Wed Sep 20 00:04:11 CEST 2017

On Tue, 19 Sep 2017 19:01:37 +0200, IOhannes m zmölnig <zmoelnig at iem.at> wrote:

> On 09/19/2017 05:07 AM, Alexander Connor wrote:
> > pd -rt -noaudio -audiobuf 1 -sleepgrain 0.5 -alsamidi -mididev 1,0 2,0 3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 15,0 16,0
> ???
> where did you get that syntax from?

That comes from a combination of the vagueness of the Pd help file ("-midiindev ...   -- midi in device list; e.g., "1,3" for first and third" -mididev uses same syntax) and some possibly outdated info found elsewhere that may or may not have to do with  changes made to the startup flags over the course of Pd development.  That info suggested that the second variable after the comma may have had something to do with designating the platform-specific midi system port number or somesuch, but with alsa it's just a single port that gets dynamically switched so it's always zero.  As I said, that syntax will create 16 I/O ports, it's just that Pd also interprets everything after the "1,0" as a filename as well.

> and what is wrong with
> $ pd -alsamidi -mididev 0,1,2,3,4,5,6,7,8,9,11,12,13,14,15
> which nicely opens 16 midi in/outports, without any error?

You are correct in that that string will not produce the errors.

However, you missed the 10, so that only produces 15.  Upon inserting the 10 and experimenting further I find that it actually doesn't matter what numerals you give it (they can all be zeros or anything) as long as there are 16 of them separated by commas.  At least, that's the way it is with Linux and Alsa.  It may be different on the other systems due to the Alsa-specific issues I touched on above.  That is, different besides the fact that Mac/Win can't do more than 9 I/0 ATM anyway...

Thanks thou, at least I don't have to look at those errors any more.

> gfmards
> IOhannes
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list

More information about the Pd-list mailing list