Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#######
#
# E-scripts on support for sound, sound ports and devices, etc
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/sound.e>
#           or at <http://angg.twu.net/e/sound.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######





# «.audio-group»	(to "audio-group")
# «.alsaconf»		(to "alsaconf")
# «.arecord»		(to "arecord")
# «.pulseaudio»		(to "pulseaudio")
# «.jackd»		(to "jackd")
# «.sox»		(to "sox")

See:
  (find-es "music")
  (find-es "alsa")





#####
#
# "a" is not in the audio group
# 2008nov08
#
#####

# «audio-group»  (to ".audio-group")
# (find-man "1 groups")
# (find-node "(coreutils)groups invocation")
# (find-man "5 group")
# (find-man "mpg123")
# (find-man "sudo")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
groups
sudo -u edrx ~/run-zsh
groups
cd ~/NICOTINE/FEELIES/Crazy_rhythms/
laf
p 01._the_boy_with_the_perpetual_nervou.mp3

w p
w p1
w myplay1
mpg321           01._the_boy_with_the_perpetual_nervou.mp3

mpg321 -o oss    01._the_boy_with_the_perpetual_nervou.mp3

mpg321 -o alsa   01._the_boy_with_the_perpetual_nervou.mp3

mpg321 -o alsa09 01._the_boy_with_the_perpetual_nervou.mp3

mpg321 -o esd    01._the_boy_with_the_perpetual_nervou.mp3

mpg321 -o arts   01._the_boy_with_the_perpetual_nervou.mp3





#####
#
# alsaconf
# 2008nov08
#
#####

# «alsaconf»  (to ".alsaconf")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# R
sudo alsaconf
sudo alsactl store

# (find-man "1 alsactl")
# (find-status   "linux-sound-base")
# (find-vldifile "linux-sound-base.list")
# (find-udfile   "linux-sound-base/")
# (find-udfile   "linux-sound-base/README.Debian")
# (find-status   "alsa-utils")
# (find-vldifile "alsa-utils.list")
# (find-udfile   "alsa-utils/")
# (find-status   "alsa-base")
# (find-vldifile "alsa-base.list")
# (find-udfile   "alsa-base/")

Playing MPEG stream from 01._the_boy_with_the_perpetual_nervou.mp3 ...
MPEG 1.0 layer III, 160 kbit/s, 44100 Hz stereo
Can't find a suitable libao driver. (Is device in use?)

# (find-sh "dmesg")

/home/edrx(root:de)# alsaconf
Unloading ALSA sound driver modules: snd-intel8x0 snd-intel8x0m snd-ac97-codec snd-ac97-bus snd-pcm snd-timer snd-page-alloc.
Building card database.

# (find-sh "locate alsaconf")
# (find-man "8 alsaconf")
# (find-fline "/usr/sbin/alsaconf")
# (find-fline "/usr/sbin/alsaconf" "cfgfile=\"/etc/modutils/sound\"")
# (find-fline "/usr/sbin/alsaconf" "Soundcard Selection")
# (find-fline "/usr/sbin/alsaconf" "devs_found[@]")
# (find-fline "/usr/sbin/alsaconf" "Configuring %s")
# (find-fline "/usr/sbin/alsaconf" "Building card database...")
# (find-fline "/usr/sbin/alsaconf" "OK, sound driver is configured.")
# (find-fline "/usr/sbin/alsaconf" "/etc/init.d/alsa")
# (find-fline "/etc/modutils/")
# (find-fline "/etc/modutils/sound")
# (find-fline "/etc/init.d/alsa")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
sudo /etc/init.d/alsa reload

# (find-man "1 grep-available")
# (find-zsh "grep-available -F Section sound")
# (find-zsh "grep-available -F Section sound -s Package")
# (find-zsh "grep-available -F Section sound -s Package | cut -b10- | sort")
# (find-zsh "grep-status    -F Section sound -s Package | cut -b10- | sort")

# Building card database...
# Running update-modules...
# Loading driver...
# Setting default volumes...
#  Now ALSA is ready to use.
#  For adjustment of volumes, use your favorite mixer.

# (find-available "alsa-base")
# (find-available "alsa-firmware-loaders")
# (find-available "alsa-oss")
# (find-available "alsa-source")
# (find-available "alsa-tools")
# (find-available "alsa-tools-gui")
# (find-available "alsa-utils")
# (find-available "alsamixergui")
# (find-available "alsaplayer-alsa")
# (find-available "alsaplayer-common")
# (find-available "alsaplayer-daemon")
# (find-available "alsaplayer-esd")
# (find-available "alsaplayer-gtk")
# (find-available "alsaplayer-jack")
# (find-available "alsaplayer-nas")
# (find-available "alsaplayer-oss")
# (find-available "alsaplayer-text")
# (find-available "alsaplayer-xosd")


alsa-driver

http://ftp.debian.org/debian/pool/main/a/alsa-driver/alsa-driver_1.0.17.dfsg-4.dsc




#####
#
# arecord
# 2009nov03
#
#####

# «arecord»  (to ".arecord")
# (find-man "1 arecord" "arecord -d 10")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
arecord -d 10 -f cd -t wav -D copy foobar.wav
arecord -d 10 -f cd -t wav foobar.wav
arecord -d 4 -f cd -t wav /tmp/foobar.wav
p /tmp/foobar.wav

# (find-man "xterm")
xterm alsamixer


* (eexterm "mix")
alsamixer




#####
#
# pulseaudio
# 2011may04
#
#####

# «pulseaudio»  (to ".pulseaudio")
# (find-angg ".emacs" "pulseaudio")
# (find-es "alsa" "pulseaudio")
# https://wiki.ubuntu.com/PulseAudio
# http://www.pulseaudio.org
# http://www.pulseaudio.org/wiki/Daemon
# http://www.pulseaudio.org/wiki/FirstSteps
# http://www.pulseaudio.org/wiki/PerfectSetup
# http://www.pulseaudio.org/wiki/PerfectSetup#ALSAApplications
# http://www.pulseaudio.org/wiki/PerfectSetup#ESOUNDApplications
# http://www.pulseaudio.org/wiki/FAQ
# http://www.pulseaudio.org/wiki/CLI
# http://jackaudio.org/pulseaudio_and_jack
# (find-fline "/etc/pulse/")
# (find-fline "/etc/pulse/default.pa" "module-hal-detect")
# (find-sh "pstree")
# (find-sh "ps ax")
# (find-man "1 pacmd")
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
pacmd

(find-pacmd "help")
(find-pacmd "play-file /usr/share/sounds/question.wav 0")

* (eepitch-pacmd)
* (eepitch-kill)
* (eepitch-pacmd)
help
list-cards
list-sinks
play-file /usr/share/sounds/question.wav 0

list-modules
list-sources
list-clients
list-sink-inputs
list-source-outputs
list-cards
stat
info
load-module
unload-module
describe-module
set-sink-volume
set-sink-input-volume
set-source-volume
set-sink-mute
set-sink-input-mute
set-source-mute

# (find-man "pacmd")
# (find-man "pactl")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
echo list-modules | pacmd




sudo apt-get install libasound2-plugins "pulseaudio-*" paman padevchooser paprefs pavucontrol pavumeter

# (find-status   "paprefs")
# (find-vldifile "paprefs.list")
# (find-udfile   "paprefs/")
# (find-status   "padevchooser")
# (find-vldifile "padevchooser.list")
# (find-udfile   "padevchooser/")
# (find-man "1 padevchooser")

# (find-status   "pulseaudio-utils")
# (find-vldifile "pulseaudio-utils.list")
# (find-udfile   "pulseaudio-utils/")
pacmd

# (find-zsh "installeddebs | sort | grep pulse")
# (find-zsh "availabledebs | sort | grep pulse")
# (find-zsh "grep-available 'Source: pulseaudio'")
# (find-zsh "grep-available pulse")
# (find-zsh "grep-installed pulse")
# (find-zsh "grep-status pulse")

Package: libpulse-browse0
Package: libpulse-browse0-dbg
Package: libpulse-dev
Package: libpulse-mainloop-glib0
Package: libpulse-mainloop-glib0-dbg
Package: libpulse0
Package: libpulse0-dbg
Package: pulseaudio-dbg
Package: pulseaudio-esound-compat
Package: pulseaudio-esound-compat-dbg
Package: pulseaudio-module-bluetooth
Package: pulseaudio-module-bluetooth-dbg
Package: pulseaudio-module-gconf
Package: pulseaudio-module-gconf-dbg
Package: pulseaudio-module-hal
Package: pulseaudio-module-hal-dbg
Package: pulseaudio-module-jack
Package: pulseaudio-module-jack-dbg
Package: pulseaudio-module-lirc
Package: pulseaudio-module-lirc-dbg
Package: pulseaudio-module-raop
Package: pulseaudio-module-raop-dbg
Package: pulseaudio-module-x11
Package: pulseaudio-module-x11-dbg
Package: pulseaudio-module-zeroconf
Package: pulseaudio-module-zeroconf-dbg
Package: pulseaudio-utils
Package: pulseaudio-utils-dbg

pulse

libpulse-mainloop-glib0
libpulse0





#####
#
# jackd
# 2011may04
#
#####

# «jackd»  (to ".jackd")
# (find-zsh "installeddebs | sort | grep jackd")
# (find-zsh "availabledebs | sort | grep jackd")
# http://jackaudio.org/
# http://jackaudio.org/files/docs/html/index.html
# http://jackaudio.org/applications
# http://jackaudio.org/documentation
# http://jackaudio.org/device_naming
# http://jackaudio.org/pulseaudio_and_jack
# (find-fline "/proc/asound/cards")
# (find-man "1 qjackctl")
# (find-sh "ps ax" "jackd")
# (find-sh "ps ax" "/usr/bin/jackd -dalsa -dhw:0 -r44100 -p1024 -n2")
# (find-fline "~/.jackdrc")
# (find-man "1 jackd")
# (find-man "1 jackd" "-d, --driver" "alsa")
# (find-man "1 jackd" "-d, --device" "hw:0")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
killall jackd

jackd2-firewire_1.9.6~dfsg.1-2.deb
jackd2_1.9.6~dfsg.1-2.deb
jackd_5.deb
libjack-jackd2-0_1.9.6~dfsg.1-2.deb
libjack-jackd2-dev_1.9.6~dfsg.1-2.deb

# (find-status   "jackd")
# (find-status   "jackd2")
# (find-vldifile "jackd2.list")
# (find-udfile   "jackd2/")
# (find-status   "jack-tools")
# (find-vldifile "jack-tools.list")
# (find-udfile   "jack-tools/")
# (find-man "1 jack.clock")
# (find-man "1 jack.ctl")
# (find-man "1 jack.play")
# (find-man "1 jack.plumbing")
# (find-man "1 jack.scope")
# (find-man "1 jack.udp")





#####
#
# pulseaudio and sox
# 2011may12
#
#####

# «sox»  (to ".sox")
# (find-man "1 paplay")
# (find-man "1 pasuspender")
# (find-man "1 pabrowse")
# (find-man "1 pacmd")
# (find-man "1 pacat")
# (find-man "1 pax11publish")
# (find-man "1 pactl")
# (find-man "1 padsp")

# (find-man "parecord")
# (find-sh "parecord --help")
# (find-sh "parecord --list-file-formats")
# (find-sh "paplay --help")
# (find-sh "parec --help")
# (find-sh "parec --list-file-formats")
# (find-sh "pacat --help")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
parecord --format=wav
parec -r --format=wav /tmp/o.wav
parec -d 0 -r --format=wav /tmp/o.wav
parec -d 0 > /tmp/o.wav
parec -d 0 --format wav > /tmp/o0.wav
parec -d 1 --format wav > /tmp/o0.wav
parec -d 1 --format=u8 > /tmp/o0.wav
# (find-sh0 "parec -d 0 > /tmp/o0.wav")
# (find-sh0 "parec -d 1 > /tmp/o1.wav")
# (find-sh0 "parec -d 0 > /tmp/o0.wav")
# (find-sh0 "parec -d 1 > /tmp/o1.wav")
laf /tmp/
file /tmp/*.wav


/usr/bin/parec
/usr/bin/parecord
/usr/bin/paplay
/usr/bin/pamon


http://www.pulseaudio.org/wiki/FAQ#HowdoIrecordstuff
parec -d 1 --format=s16le --rate=44100 --channels=2 | sox --type raw -s2L --rate 44100 --channels 2 - --type wav /tmp/o1.wav


parec -d 0 --format=s16le --rate=44100 --channels=2 | sox --type raw -s2L --rate 44100 --channels 2 - --type wav /tmp/o0.wav
parec -d 1 --format=s16le --rate=44100 --channels=2 | sox --type raw -s2L --rate 44100 --channels 2 - --type wav /tmp/o1.wav
p /tmp/o0.wav
p /tmp/o1.wav

# (find-man "1 sox")
# (find-man "1 sox" "-t, --type FILE-TYPE")
# (find-man "1 sox" "-s/-u/-f/-A/-U/-o/-i/-a/-g")
# (find-man "1 sox" "-e ENCODING, --encoding ENCODING")
# (find-man "1 sox" "-e ENCODING, --encoding ENCODING" "signed")
# (find-man "1 sox" "synth [-j KEY] [-n]")
# (find-man "1 sox" "-n, --null")
# (find-man "1 sox" "-c CHANNELS, --channels CHANNELS")
# (find-man "1 sox" "-r, --rate RATE[k]")
# (find-sh "sox --help")

# (find-status   "sox")
# (find-vldifile "sox.list")
# (find-udfile   "sox/")

# (find-man "7 soxformat")
# (find-man "1 soxi")
soxi


* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
play -n -c1 synth sin %-12 sin %-9 sin %-5 sin %-2 fade h 0.1 1 0.1
sox play -n -c1 synth sin %-12 sin %-9 sin %-5 sin %-2 fade h 0.1 1 0.1
play -n synth 1 sine 440



play existing-file.wav    ;# equiv to "sox existing-file.wav -d"
rec  new-file.wav         ;# equiv to "sox -d new-file.wav"








/etc/security/limits.d/audio.conf

libjack-jackd2-0

   38  apti jackd2 jack-tools


Atari POKEY:
http://asma.atari.org/
http://asap.sourceforge.net/


http://en.wikipedia.org/wiki/Speech_recognition_in_Linux
http://en.wikipedia.org/wiki/CMU_Sphinx
http://en.wikipedia.org/wiki/Julius_(software)
http://en.wikipedia.org/wiki/List_of_speech_recognition_software
http://shout-toolkit.sourceforge.net/
http://en.wikipedia.org/wiki/RWTH_ASR

# (find-available "gstreamer0.10-plugins-good")
# (find-zsh "availabledebs | sort | grep sphinx")










#  Local Variables:
#  coding:               raw-text-unix
#  ee-delimiter-hash:    "\n#*\n"
#  ee-delimiter-percent: "\n%*\n"
#  ee-anchor-format:     "«%s»"
#  End: