Just FYI, on my RPI running raspbian Pd doesn't need a delay to turn the audio on, but does require a substantial buffer in order to work fine with the analog output.

Pierre.

2012/9/4 m.e.grimm <megrimm@gmail.com>
it ends up that i forgot to do the delay on the loadbang thing to turn
audio on with -nogui flag.

works but doesnt sound so good... ill work on that one...

cheers
m

On Sun, Sep 2, 2012 at 2:01 PM, Miller Puckette <msp@ucsd.edu> wrote:
> Well, first off, do you know about X11 forwarding in ssh?  It's easy
> to run GUI programs over ssh and have all teh windows pop up on
> the calling machine.  Just make sure /etc/ssh/sshd_config on the
> Pi has the line "X11Forwarding yes" (and restart sshd if necessary) and
> run "ssh -X" from the calling machine (-X might be on by default anyway;
> also you can change the default in /etc/ssh/ssh_configu).  Type "pd" on
> the remote shell and bingo, the Pd window pops up on the calling one.
>
> Sometimes there's an extra step to get permission to use the audio device on
> the remote machine if you aren't roo on it -- this can be done by adding your
> user account to group 'audio'.
>
> cheers
> Miller
>
> On Sun, Sep 02, 2012 at 09:52:50AM -0400, m.e.grimm wrote:
>> hey miller.
>>
>> yeah on raspbian i got rid of the "invalid card" nag. no way to test
>> stuff at moment via gui. all done via ssh on headless rpi.
>>
>> my guess is it has nothing to do with pd. usb cards have to be set to default.
>>
>> $ nano /etc/asound.conf
>>
>> pcm.!default {
>>         type hw
>>         card 0
>> }
>>
>> ctl.!default {
>>         type hw
>>         card 0
>> }
>>
>> $nano /etc/modprobe.d/alsa-base.conf
>> change line:
>> # Keep snd-usb-audio from beeing loaded as first soundcard
>> options snd-usb-audio index=-2
>>
>> to:
>> # Keep snd-usb-audio from beeing loaded as first soundcard
>> options snd-usb-audio index=0
>>
>>
>> m
>>
>> On Sat, Sep 1, 2012 at 7:13 PM, Miller Puckette <msp@ucsd.edu> wrote:
>> > Hmm - no matter what I try over here I can't get Pd to complain
>> > 'Invalid value for card' - a lame guess would be that either the
>> > input or output only does mono and Pd is asking for 2 channels or
>> > something like that.
>> >
>> > I suppose all works fine when you open Pd with a GUI, right?
>> >
>> > Thanks for your patience...
>> > M
>> >
>> > On Sat, Sep 01, 2012 at 06:33:37PM -0400, m.e.grimm wrote:
>> >> hey miller,
>> >>
>> >> > You can type "pd -nogui -audiodev 1" (1 is the default anyway) to get
>> >>
>> >> yeah that's what i meant. "pd -nogui -audiodev 1", "pd -nogui
>> >> -audiodev 2", etc etc.... All giving me the same error.
>> >>
>> >> ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card
>> >> snd_pcm_open (input): No such file or directory
>> >> ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card
>> >> snd_pcm_open (output): No such file or directory
>> >>
>> >>
>> >>
>> >> m
>> >>
>> >>
>> >> On Sat, Sep 1, 2012 at 2:17 PM, Miller Puckette <msp@ucsd.edu> wrote:
>> >> > You can type "pd -nogui -audiodev 1" (1 is the default anyway) to get
>> >> > the "hardware" device or  "pd -nogui -audiodev 2" to get the "plughw"
>> >> > device.  The "device numbers" in the Pd argument agree with the numbering
>> >> > that "-listdev" prints out.
>> >> >
>> >> > cheers
>> >> > Miller
>> >> >
>> >> > On Sat, Sep 01, 2012 at 12:11:42PM -0400, m.e.grimm wrote:
>> >> >> My audio card is listed as:
>> >> >>
>> >> >> pi@raspberrypi ~ $ lsusb
>> >> >> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> >> >> Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
>> >> >> Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
>> >> >> Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un
>> >> >> 802.11n Wireless Adapter [Realtek RTL8188CUS]
>> >> >> Bus 001 Device 008: ID 0d8c:000e C-Media Electronics, Inc. Audio
>> >> >> Adapter (Planet UP-100, Genius G-Talk)
>> >> >>
>> >> >> pi@raspberrypi ~ $ aplay -l
>> >> >> **** List of PLAYBACK Hardware Devices ****
>> >> >> card 1: Device [Generic USB Audio Device], device 0: USB Audio [USB Audio]
>> >> >>   Subdevices: 1/1
>> >> >>   Subdevice #0: subdevice #0
>> >> >>
>> >> >>
>> >> >> When i do:
>> >> >>
>> >> >> pi@raspberrypi ~ $speaker-test -Dplughw:1,0 -t sine -f 800
>> >> >>
>> >> >> I get a test tone from the output. Then I do:
>> >> >>
>> >> >> pi@raspberrypi ~ $ sudo pd -nogui -listdev
>> >> >> audio input devices:
>> >> >> 1. Generic USB Audio Device (hardware)
>> >> >> 2. Generic USB Audio Device (plug-in)
>> >> >> audio output devices:
>> >> >> 1. Generic USB Audio Device (hardware)
>> >> >> 2. Generic USB Audio Device (plug-in)
>> >> >> API number 1
>> >> >>
>> >> >> pi@raspberrypi ~ $ pd -nogui -alsa -nomidi -audiodev 1,1
>> >> >> ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card
>> >> >> snd_pcm_open (input): No such file or directory
>> >> >> ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card
>> >> >> snd_pcm_open (output): No such file or directory
>> >> >>
>> >> >>
>> >> >> hmmmm... am i doing something silly wrong here? what am i missing with
>> >> >> my flags that giving me "Invalid value for card"?
>> >> >>
>> >> >> thanks!
>> >> >> m
>> >> >>
>> >> >> --
>> >> >> ____________________
>> >> >> m.e.grimm | m.f.a | ed.m.
>> >> >> megrimm@gmail.com
>> >> >> _________________________________
>> >> >>
>> >> >> _______________________________________________
>> >> >> Pd-list@iem.at mailing list
>> >> >> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>> >>
>> >>
>> >>
>> >> --
>> >> ____________________
>> >> m.e.grimm | m.f.a | ed.m.
>> >> megrimm@gmail.com
>> >> _________________________________
>>
>>
>>
>> --
>> ____________________
>> m.e.grimm | m.f.a | ed.m.
>> megrimm@gmail.com
>> _________________________________



--
____________________
m.e.grimm | m.f.a | ed.m.
megrimm@gmail.com
_________________________________

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