Raspberry Pi: Difference between revisions

From SGMK-SSAM-WIKI
Jump to navigation Jump to search
(Created page with " = Sound = Get a cheap USB soundcard: [http://www.aliexpress.com/snapshot/6085241515.html "Creative Sound Blaster"] List sound devices: <pre>cat /proc/asound/cards</pre> C...")
 
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 like so (replace U0x41e0x30d3 with your device name, that you get via the above mentioned command to list devices):
On a headless raspberry pi (assuming raspian distro), we need a trick to start jack WITHOUT an X session like so.
 
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, ...)
<pre>
<pre>
#!/bin/bash
#!/bin/bash

Revision as of 18:30, 26 July 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):

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 like so.

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`
/usr/bin/jackd -dalsa -dhw:U0x41e0x30d3 -r44100 -p1024 -n2