[PD] pd -nogui, connecting/disconnecting from soundcards

Dan Wilcox danomatika at gmail.com
Wed Oct 22 23:49:02 CEST 2008

On Wed, 2008-10-22 at 08:37 +0100, Claude Heiland-Allen wrote: 

> but i don't know if it will work at all, pd only seems to scan for 
> soundcards when it starts (which i think is a bug); so you'd have to 
> start pd with it plugged in, then probably have to switch pd to/from the 
> non-usb soundcard before/after replugging the usb

Pd seems to just ask alsa each time, so if I plug in the USB card while
pd is running it appears in the audio menu.  My initial plan is to use
udev to + pdsend to switch to the external card when it is plugged in
and to switch back to the internal card if it's unplugged.  I don't the
internal card, but it;s there so I might as well use it as the default

I'll try it tonight and see.  I'm sure I will need to have a button to
press that switches the audio cards in pd before I unplug the USB
card .... but it would also be nice to know it would work if I'm jumping
around and the usb cable falls out or something.  Not a problem on a
laptop I know, but I don't play with a laptop.

The whole plan is to have the wearable/headless computer a hotpluggable
pd machine.  Thus far, I have had to manually run startup scripts before
a show.  I'd rather event script everything, test the hell out of it,
and then be able to strap it on boot and play.  It has a Compact Flash
slot which I am going to make hotpluggable for pd patch sets. 

> i'm not sure if any app behaves nicely when you abruptly unplug hardware 
> that it is using - there might be a way to handle it in the ALSA plugin 
> layer, but the ALSA wiki doesn't look promising...

I've been using pd+jack in the past, but I think I will try alsa.  Pd
does work with Alsa in Ubuntu hardy if you kill Pulseaudio.  The worst
case scenerio is to have to kill pd and restart it each time, but even
that would not be so bad as long as I write some sort of state setting
now and then that the main control patch load on a crash. 

> > .hc
> > 
> > On Oct 20, 2008, at 1:31 PM, Dan Wilcox wrote:
> > 
> >>
> >> In Ubuntu ...
> >>
> >> When running pd with -nogui as a daemon, can I send messages to 
> >> connect to and disconnect from a soundcard?  I want to be able to hot 
> >> plug my usb soundcard without having to stop and start pd each time, 
> >> if possible.
> >>
> >> ---
> >> Dan Wilcox
> >> robotcowboy.com

Dan Wilcox
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20081022/1482a4db/attachment.htm>

More information about the Pd-list mailing list