[PD] Audio In on Raspberry Pi

Johann Diedrick jdiedrick at gmail.com
Thu Mar 21 23:04:59 CET 2013


Hey Pd list-

I'm having a bit of trouble debugging whether or not I can use Pd to get 
audio in on the Raspberry Pi. I'm using this USB audio dongle:

http://www.amazon.com/gp/product/B000N35A0Y/?ref=oh_details_o03_s01_i01&tag=lifehackeramzn-20

Following t3db0t's instructions, I am able to get audio out from Pd. 
Further research got me to edit my /boot/cmdline.txt file to add 
"dwc_otg.speed=1" at the end:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 
console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline 
rootwait dwc_otg.speed=1

I also went ahead and removed pulse audio. I ran it twice just to be sure:

ohann at raspberrypi ~/pd $ sudo  apt-get remove pulseaudio
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'pulseaudio' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

Running alsamixer, it looks like my speaker and mic are on and armed, 
and my capture tab is on with the levels up.

Rebooting for good measure, I am still able to get t3db0t's testPatch.pd 
to work. I'm running this command with these flags:

pd -nogui -sounddev 1 testPatch.pd

I made a simple mic test on my mac to try testing the microphone in Pd 
on my Rasberry Pi. My very simple mic test can be found here:

http://heavenoutside.net/pd/mictest.pd

if you'd like to wget it. It is simply taking adc and sending it to dac.

When trying my mictest.pd patch, I hear a low constant tone that seems 
to be affected if I wiggle my mic input around. If I unplug my mic it 
becomes unbearably loud, then gets quiet again, making me think the 
input is kind of sort of working, but not really...

I'm not sure what other info might be helpful, but here is my 
asound.conf file:

pcm.!default {
         type hw
         card 0
         device 0
}


And here are my devices listed with pd -nogui -listdev:

johann at raspberrypi ~/pd $ 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

no midi input devices found
no midi output devices found
snd_pcm_hw_params_set_channels (input): Invalid argument


Please let me know if you need anymore information from me. I could do 
some screen grabs from alsamixer if that would be helpful.

Thanks for any help in advance!

All the best,
Johann



More information about the Pd-list mailing list