Hi. I've been trying to get Audio Input and Output working on Pure Data for almost a year now (on and off with lots of frustration between sessions). I'm very close to getting it running, but I can't seem to get all the pieces working at once. I'd like some help.
Here's a quick status on my setup:
- I have the latest distribution of Raspian Wheezy.
- I have an logilink UA0053 USB soundcard (http://elinux.org/RPi_VerifiedPeriphera ... ound_Cards)
- I can get glitch-free audio output from Pure Data: [osc~ 440] ---- [dac~]
- I can record glitch-free audio using the following commands:
amixer sset Mic Capture 100%
arecord -d 4 -f dat /tmp/test.wav
aplay /tmp/test.wav
- I can get Pure Data to pick-up input from the microphone and route it to my soundcard, but the sound is really glitchy. This is with the exact same settings as the audio output test (ALSA)
- If I use QjackCtl to enable JACK, all audio stops working (see attached image)
Any thoughts or ideas? I'm pretty flummoxed by how difficult it is to get this working on the Pi.
Audio Input w/ Pure Data: Frustratingly Close
- Attachments
-
- pdMicrophone JACK (Silent).gif (46.58 KiB) Viewed 4009 times
Re: Audio Input w/ Pure Data: Frustratingly Close
So I played around with QJackCtl settings this evening (see attached image), and I've made some progress. I can now get glitch free audio going from the microphone to the speakers (which is a major milestone). The only problem is that I've still got ~300ms of latency from the microphone to the speakers (which is way too much for my application).
I've emulated the Jack settings from the low latency audio page: http://wiki.linuxaudio.org/wiki/raspberrypi but the audio is still laggy. I'm going to play around with some other system settings this evening to see if I can tackle this tonight.
I've emulated the Jack settings from the low latency audio page: http://wiki.linuxaudio.org/wiki/raspberrypi but the audio is still laggy. I'm going to play around with some other system settings this evening to see if I can tackle this tonight.
- Attachments
-
- Updated QJackCtl Settings
- pdMicrophone JACK (Delayed Loopback).gif (11.48 KiB) Viewed 3960 times
-
- Posts: 1
- Joined: Fri Feb 28, 2014 5:17 am
Re: Audio Input w/ Pure Data: Frustratingly Close
Have you added dwc_otg.speed=1 to the cmdline.txt file? Audio input has to use usb speed 1 for some reason...
With this line added I have been able to record quality audio into puredata using ALSA
With this line added I have been able to record quality audio into puredata using ALSA
Re: Audio Input w/ Pure Data: Frustratingly Close
Yup. I've done that. I've been running PD through a VNC client. I'm going to try running it in headless mode, but for some reason jackd won't work from the command line. I get an error saying "JackServer::Open failed with -1"
"Failed to open server"
"Failed to open server"
Re: Audio Input w/ Pure Data: Frustratingly Close
Hello
Can you give any information about how did you manage to get audio out working fine on puredata?
[osc~ 440] ---- [dac~] makes a terrible glitch for me.
Same for the input, big crackles.
I run a creative sound blaster play;
I tried with usb speed 1. Audio works fine when I'm testing playing a single file
(aplay /usr/share/scratch/Media/Sounds/Vocals/Singer1.wav )
thanks for your advices,
J.
Can you give any information about how did you manage to get audio out working fine on puredata?
[osc~ 440] ---- [dac~] makes a terrible glitch for me.
Same for the input, big crackles.
I run a creative sound blaster play;
I tried with usb speed 1. Audio works fine when I'm testing playing a single file
(aplay /usr/share/scratch/Media/Sounds/Vocals/Singer1.wav )
thanks for your advices,
J.
Re: Audio Input w/ Pure Data: Frustratingly Close
I finally got everything working, and it was super easy. Here's what I did:
1) I bought a Wolfson Audio Card:
http://www.element14.com/community/comm ... wolfson_pi
2) I downloaded a Raspbian image that has the Wolfson drivers:
http://www.element14.com/community/mess ... oad#107186
3) I Installed Pure Data
1) I bought a Wolfson Audio Card:
http://www.element14.com/community/comm ... wolfson_pi
2) I downloaded a Raspbian image that has the Wolfson drivers:
http://www.element14.com/community/mess ... oad#107186
3) I Installed Pure Data
Re: Audio Input w/ Pure Data: Frustratingly Close
I did the following to get it working:
USB 1 and turbo mode off, plus the following cmdline:
dwc_otg.speed=1 dwc_otg.microframe_schedule=1 dwc_otg.fiq_fix_enable=1 dwc_otg.lpm_enable=0 smsc95xx.turbo_mode=N sdhci-bcm2708.sync_after_dma=0 sdhci-bcm2708.enable_llm=1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
and changing the input to 1 channel instead of 2 (pd -nogui -inchannels 1 -r 44100 )
USB 1 and turbo mode off, plus the following cmdline:
dwc_otg.speed=1 dwc_otg.microframe_schedule=1 dwc_otg.fiq_fix_enable=1 dwc_otg.lpm_enable=0 smsc95xx.turbo_mode=N sdhci-bcm2708.sync_after_dma=0 sdhci-bcm2708.enable_llm=1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
and changing the input to 1 channel instead of 2 (pd -nogui -inchannels 1 -r 44100 )
- RaTTuS
- Posts: 10749
- Joined: Tue Nov 29, 2011 11:12 am
- Location: North West UK
- Contact: Twitter YouTube
Re: Audio Input w/ Pure Data: Frustratingly Close
use 48khz audio data instead of 44.1Khz
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe