hi, dear list !
i tried to use the -listdev option of pd.exe to get a list of available audio and midi devices, and to write the output into a textfile for later "grep" usage.
here's what i wrote on the command line (w32):
pd.exe -batch -listdev > D:\Temp\devices.txt
the problem i encountered is, that PD always gets started, and the output of "-listdev" is written into PD's console window but not into the textfile i declared. "D:\Temp\devices.txt" exists, but is empty, and an instance of PD was started.
do you know a way to just get this specific information without actually starting PD ?
P.S.: i know about the "mediasettings" external, but i really would like to do this on the command line, WITHOUT actually starting PD.
thanks
oliver
This might work:
pd -stderr -listdev -nogui -send "pd quit"
(This puts the info out on the standard error, not standard out; I'm not sure whether you can redirect standard error in windows.)
cheers Miller
On Fri, Jul 15, 2016 at 09:48:29PM +0200, oliver wrote:
hi, dear list !
i tried to use the -listdev option of pd.exe to get a list of available audio and midi devices, and to write the output into a textfile for later "grep" usage.
here's what i wrote on the command line (w32):
pd.exe -batch -listdev > D:\Temp\devices.txt
the problem i encountered is, that PD always gets started, and the output of "-listdev" is written into PD's console window but not into the textfile i declared. "D:\Temp\devices.txt" exists, but is empty, and an instance of PD was started.
do you know a way to just get this specific information without actually starting PD ?
P.S.: i know about the "mediasettings" external, but i really would like to do this on the command line, WITHOUT actually starting PD.
thanks
oliver
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Following these two related threads: https://lists.puredata.info/pipermail/pd-list/2016-07/115642.html https://lists.puredata.info/pipermail/pd-list/2016-07/115656.html I`ve done some tests, Using ASIO everything works as expected: list devices to a txt file: pd -asio -blocksize 256 -listdev -stderr 2> asio.txt -send "pd quit" Call the device by name: pd -asio -blocksize 256 -audioaddoutdev "ASIO:M-Audio USB ASIO" note the “ “ for spaces in the device name.
Problems come with MMIO: list to file OK, pd -listdev -stderr 2> list.txt -send "pd quit" This will name i.e: A, B and C. When calling -audioaddoutdev “A”, I get “B” and when calling “B” I get “C”. Not sure if this is a “Pd” thing or a “portaudio” thing.
Salutti,Lucarda. Mensaje telepatico asistido por maquinas.
Lucas Cordiviola wrote:
Following these two related threads:
https://lists.puredata.info/pipermail/pd-list/2016-07/115642.html
https://lists.puredata.info/pipermail/pd-list/2016-07/115656.html
I`ve done some tests,
Using ASIO everything works as expected:
list devices to a txt file:
pd -asio -blocksize 256 -listdev -stderr 2> asio.txt -send "pd quit"
thanks, Lucas !
now, on my own machine, i can also confirm that this works.
strange, it's the same OS as on my former test machine, where the textfile remained empty.
maybe something was messed up with the other machine's OS ...
Call the device by name:
pd -asio -blocksize 256 -audioaddoutdev "ASIO:M-Audio USB ASIO"
note the “ “ for spaces in the device name.
great !
the "-audioadddev" flag does exactly what i was looking for !
(although it's mentioned in the PD options info, i probably didn't think about using it because in my logic i don't want to ADD an audio device but SELECT it, hence the confusion)
Problems come with MMIO:
well, that's alright with me, because i never use MMIO ;-)
thanks again & best
oliver
hello,
I think -batch is not helping here and -stderr is what you where looking for.
I don't know how "not to start pd" , but you can close it as soon as it start with : -send "pd quit"
on linux, this is doing what you need : pd -noprefs -stderr -listdev -send "pd quit" 2> /tmp/pd_listdev.txt
cheers c
Le 15/07/2016 21:48, oliver a écrit :
hi, dear list !
i tried to use the -listdev option of pd.exe to get a list of available audio and midi devices, and to write the output into a textfile for later "grep" usage.
here's what i wrote on the command line (w32):
pd.exe -batch -listdev > D:\Temp\devices.txt
the problem i encountered is, that PD always gets started, and the output of "-listdev" is written into PD's console window but not into the textfile i declared. "D:\Temp\devices.txt" exists, but is empty, and an instance of PD was started.
do you know a way to just get this specific information without actually starting PD ?
P.S.: i know about the "mediasettings" external, but i really would like to do this on the command line, WITHOUT actually starting PD.
thanks
oliver
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
hi, miller, cyrille
first, thanks a lot for your nice help
I think -batch is not helping here and -stderr is what you where looking for.
I don't know how "not to start pd" , but you can close it as soon as it start with : -send "pd quit"
on linux, this is doing what you need : pd -noprefs -stderr -listdev -send "pd quit" 2> /tmp/pd_listdev.txt
the first part works as expected.
unfortunately (at least here on windows 7) the redirection of stderr always produces an empty file. i tried (i think) all possible combinations that should do this, i.e.:
pd -noprefs -stderr -listdev -nogui -send "pd quit" 2> C:\Temp\pd_listdev.txt pd -noprefs -stderr -listdev -nogui -send "pd quit"
C:\Temp\pd_listdev.txt 2>&1
result: the console is empty, pd quits, and "C:\Temp\pd_listdev.txt" is created, but empty
what also seems strange to me, is that no matter if i add the -stderr flag or not, the devices are listed in the console, so:
pd -noprefs -stderr -listdev -nogui -send "pd quit" pd -noprefs -listdev -nogui -send "pd quit"
both give the same results ________________________________________________________________________________________
can anybody help ?
best
oliver