<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt">In Pd-l2ork you can also do this:<br>[print(<br>|<br>[pdinfo]<br><br>Which prints all the info for the running Pd instance to the console, including devices.&nbsp; Or you can send it a message to get a specific attribute like<br>[audio-outdev, midi-outdevlist(<br>|<br>[pdinfo]<br><br>I tried it with [loadbang] and -nogui, and all the audio devices display properly.&nbsp; I can't test midi because I don't have any midi devices.<br><div><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span>-Jonathan<br></span></div><div style="display: block;" class="yahoo_quoted"> <br> <br> <div style="font-family: HelveticaNeue, Helvetica Neue,
 Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> On Sunday, February 9, 2014 10:49 AM, Antoine Villeret &lt;antoine.villeret@gmail.com&gt; wrote:<br> </font> </div>  <div class="y_msg_container"><div id="yiv0099711632"><div><div dir="ltr">hello again,&nbsp;<div><br clear="none"></div><div><br clear="none"></div><div>I found the issue,&nbsp;</div><div><br clear="none"></div><div>with `-nogui`, the patch is loaded before midisettings are done (like audiosettings)</div><div>and `[mediasettings/midisettings]` updates it's own device list on startup or on `[device ...(` message.</div>

<div><br clear="none"></div><div>So when the patch is loaded at startup without gui, `[mediasettings/midisettings(` records 0 mididevices.</div><div>I have to send a dummy `[device ...(` message 1sec after loadbang to update the list and then `[listdevices(` report the right number of devices.</div>

<div>Another solution could be to delay the patch loading.</div><div><br clear="none"></div><div>Shouldn't `[mediasettings/midisettings]` update it's own device lists on `[listdevices(` message ?</div><div><br clear="none"></div><div>+</div>

<div>A</div><div><br clear="none"></div><div><br clear="none"></div></div><div class="yiv0099711632gmail_extra"><br clear="all"><div>--<br clear="none">do it yourself &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://antoine.villeret.free.fr/">http://antoine.villeret.free.fr</a><br clear="none">

</div>
<br clear="none"><br clear="none"><div class="yiv0099711632gmail_quote">2014-02-09 16:17 GMT+01:00 Antoine Villeret <span dir="ltr">&lt;<a rel="nofollow" shape="rect" ymailto="mailto:antoine.villeret@gmail.com" target="_blank" href="mailto:antoine.villeret@gmail.com">antoine.villeret@gmail.com</a>&gt;</span>:<br clear="none"><div class="yiv0099711632yqt5009711102" id="yiv0099711632yqt35362"><blockquote class="yiv0099711632gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div dir="ltr">thanks, but no,&nbsp;<div><br clear="none"></div><div>at least with Pd Vanilla 0.45-4, the right flag is *-listdev* to list all devices (both midi and alsa) in the PD's console.</div><div><br clear="none"></div><div>According to this 10-years old post [1], I can still make a redirection of stderr or read at it.</div>



<div><br clear="none"></div><div>Another solution, since my problem concern only Linux, is to read the output of `ls /dev/midi* | wc -l` to get a list of mididevices, but this doesn't tell if it's input or output.</div><div><br clear="none">


</div><div>+</div><div>a</div><div><br clear="none"></div><div>[1] :&nbsp;<a rel="nofollow" shape="rect" target="_blank" href="http://lists.puredata.info/pipermail/pd-list/2004-10/023368.html">http://lists.puredata.info/pipermail/pd-list/2004-10/023368.html</a></div>


</div><div class="yiv0099711632gmail_extra"><div class="yiv0099711632"><br clear="all"><div>--<br clear="none">do it yourself &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://antoine.villeret.free.fr/">http://antoine.villeret.free.fr</a><br clear="none"></div>
<br clear="none"><br clear="none"></div><div class="yiv0099711632gmail_quote">2014-02-09 16:08 GMT+01:00 Pagano, Patrick <span dir="ltr">&lt;<a rel="nofollow" shape="rect" ymailto="mailto:pat@digitalworlds.ufl.edu" target="_blank" href="mailto:pat@digitalworlds.ufl.edu">pat@digitalworlds.ufl.edu</a>&gt;</span>:<div><div class="yiv0099711632h5">

<br clear="none"><blockquote class="yiv0099711632gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">




<div>
<div>I think it's just --listdevices on the command line<br clear="none">
<br clear="none">
Sent from my iPhone</div><div><div>
<div><br clear="none">
On Feb 9, 2014, at 10:03 AM, "Antoine Villeret" &lt;<a rel="nofollow" shape="rect" ymailto="mailto:antoine.villeret@gmail.com" target="_blank" href="mailto:antoine.villeret@gmail.com">antoine.villeret@gmail.com</a>&gt; wrote:<br clear="none">
<br clear="none">
</div>
<blockquote type="cite">
<div>
<div dir="ltr">Hello,&nbsp;
<div><br clear="none">
</div>
<div>I'm wondering how to get a list of midiout devices without GUI.</div>
<div>This has to work without GUI.</div>
<div><br clear="none">
</div>
<div>I tried [mediasettings/midisettings] but it always report 0 devices (both in and out) when there is no GUI.</div>
<div>i also know the -listdev option to Pd, but this only list devices in console, and I need to proccess the number in the patch.</div>
<div><br clear="none">
</div>
<div>I observe this on Linux (both Ubuntu 12.04 64bit and Raspbian (kernel 3.10.25+) with pd 0.45-4.</div>
<div>But it seems to be OK on MacOS with pd 0.45-3.</div>
<div><br clear="none">
</div>
<div>Thanks</div>
<div><br clear="none">
</div>
<div>Antoine</div>
<div><br clear="all">
<div>--<br clear="none">
do it yourself &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://antoine.villeret.free.fr/">http://antoine.villeret.free.fr</a><br clear="none">
</div>
</div>
</div>
</div>
</blockquote>
</div></div><blockquote type="cite">
<div><span>_______________________________________________</span><br clear="none">
<span><a rel="nofollow" shape="rect" ymailto="mailto:Pd-list@iem.at" target="_blank" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list</span><br clear="none">
<span>UNSUBSCRIBE and account-management -&gt; <a rel="nofollow" shape="rect" target="_blank" href="http://lists.puredata.info/listinfo/pd-list">
http://lists.puredata.info/listinfo/pd-list</a></span><br clear="none">
</div>
</blockquote>
</div>

</blockquote></div></div></div><br clear="none"></div>
</blockquote></div></div><br clear="none"></div></div></div><br><div class="yqt5009711102" id="yqt23209">_______________________________________________<br clear="none"><a shape="rect" ymailto="mailto:Pd-list@iem.at" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br clear="none">UNSUBSCRIBE and account-management -&gt; <a shape="rect" href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br clear="none"></div><br><br></div>  </div> </div>  </div> </div></body></html>