hello again,
I found the issue,
with -nogui
, the patch is loaded before midisettings are done (like
audiosettings)
and [mediasettings/midisettings]
updates it's own device list on startup
or on [device ...(
message.
So when the patch is loaded at startup without gui,
[mediasettings/midisettings(
records 0 mididevices.
I have to send a dummy [device ...(
message 1sec after loadbang to update
the list and then [listdevices(
report the right number of devices.
Another solution could be to delay the patch loading.
Shouldn't [mediasettings/midisettings]
update it's own device lists on
[listdevices(
message ?
A
-- do it yourself http://antoine.villeret.free.fr
2014-02-09 16:17 GMT+01:00 Antoine Villeret antoine.villeret@gmail.com:
thanks, but no,
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.
According to this 10-years old post [1], I can still make a redirection of stderr or read at it.
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.
a
[1] : http://lists.puredata.info/pipermail/pd-list/2004-10/023368.html
-- do it yourself http://antoine.villeret.free.fr
2014-02-09 16:08 GMT+01:00 Pagano, Patrick pat@digitalworlds.ufl.edu:
I think it's just --listdevices on the command line
Sent from my iPhone
On Feb 9, 2014, at 10:03 AM, "Antoine Villeret" < antoine.villeret@gmail.com> wrote:
Hello,
I'm wondering how to get a list of midiout devices without GUI. This has to work without GUI.
I tried [mediasettings/midisettings] but it always report 0 devices (both in and out) when there is no GUI. 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.
I observe this on Linux (both Ubuntu 12.04 64bit and Raspbian (kernel 3.10.25+) with pd 0.45-4. But it seems to be OK on MacOS with pd 0.45-3.
Thanks
Antoine
-- do it yourself http://antoine.villeret.free.fr
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list