Raspberry Pi: Difference between revisions
No edit summary |
|||
Line 17: | Line 17: | ||
[http://hyperreal.org/raves/spirit/vibe/JacksHouse.html "Who is Jack, and what is it that Jack does?"] | [http://hyperreal.org/raves/spirit/vibe/JacksHouse.html "Who is Jack, and what is it that Jack does?"] | ||
On a headless raspberry pi (assuming raspian distro), we need a trick to start jack WITHOUT an X session | On a headless raspberry pi (assuming raspian distro), we need a trick to start jack WITHOUT an X session, for this we'll need a small script. | ||
Make sure to replace U0x41e0x30d3 with your device name, that you get via the above mentioned command to list devices. | Make sure to replace U0x41e0x30d3 with your device name, that you get via the above mentioned command to list devices. |
Revision as of 23:27, 3 August 2014
Sound
Get a cheap USB soundcard: "Creative Sound Blaster"
List sound devices:
cat /proc/asound/cards
Change volume, select USB sound card with F6, caution: the sound blaster can be very loud on your headphones.
alsamixer
Save volume:
sudo alsactl store
Play wav file on external device:
aplay -D plughw:1,0 test.wav
JACK Audio Connection Kit
"Who is Jack, and what is it that Jack does?"
On a headless raspberry pi (assuming raspian distro), we need a trick to start jack WITHOUT an X session, for this we'll need a small script.
Make sure to replace U0x41e0x30d3 with your device name, that you get via the above mentioned command to list devices.
Also you might want to change the other parameters (sample rate, frames, ...)
#!/bin/bash export DISPLAY=:0 export `dbus-launch | grep ADDRESS` jackd -P70 -t3000 -dalsa -dhw:U0x41e0x30d3 -r44100 -p1024 -n3 -s
Send Audio to the Raspberry Pi over LAN
This assumes that you are running jackd (check section above).
sudo apt-get update sudo apt-get install jacktrip
Check out the jacktrip documentation.
Make sure, jackd on your computer has the same settings as defined on the raspberry (ie the settings you just put in the above bash script).
On your computer, start jacktrip as server (don't forget to start jackd first, if it's not running already.):
jacktrip -s
Start jacktrip on the raspberry pi (exchange YOUR_SERVER_IP_HERE with your IP, doh!):
jacktrip -c YOUR_SERVER_IP_HERE