Warning: this is a htmlized version!
The original is across this link.
#######
#
# E-scripts on sound and music (on a very wide sense)
#
# 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/a/e/music.e>
#           or at <http://angg.twu.net/e/music.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/a/.emacs[.html]>,
#                 <http://angg.twu.net/a/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######





######
#
# cdparanoia source
# 00feb07
#
######

#  «cdparanoia_src»

pdsc /big/slinks2/dists/slink/main/source/sound/cdparanoia_3a9-1.dsc
cd /usr/src/cdparanoia-3a9/

# (code-c-d "cdpa" "/usr/src/cdparanoia-3a9/")
# (find-cdpafile "")
# (find-cdpafile "main.c" "smilie=\" :^D\"")
# (find-cdpafile "main.c" "'+'")

cdparanoia -v 6 floorshow_detmold.wav

(/ (- 108032 86440) 287.0)
Cerca de 75 stores por segundo.

cd /mp3s/MINE/WAV/
anonftp ifigenia 'cd /hda1/' 'mget *.wav' 'quit'




#####
#
# cdparanoia-III src
# 00feb08
#
#####

# From the homepage:
#
#   This alpha release is stable code; its status as 'alpha' is because
#   the library interface (Paranoia III) is soon to be replaced (by
#   Paranoia IV) and as such, will not be supported after Paranoia IV's
#   release.

# (code-c-d "cdpa3" "/usr/src/cdparanoia-III-alpha9.7/")

rm -Rv /usr/src/cdparanoia-III-alpha9.7/
cd /usr/src/
tar -xvzf $S/http/www.xiph.org/paranoia/download/cdparanoia-III-alpha9.7.src.tgz
cd /usr/src/cdparanoia-III-alpha9.7/

./configure	|& tee oc
make		|& tee om
make install	|& tee omi

# (find-cdpa3file "")







#####
#
# cdda2wav
#
#####

cdda2wav -D /dev/cdrom -t 7 mlobo_7.wav
cdda2wav -D /dev/cdrom -t 8 mlobo_8.wav
cdda2wav -D /dev/cdrom -t 9 mlobo_9.wav

cd /mp3s/MINE/WAV/
anonftp ifigenia 'cd /hda1/' 'mget mlobo_?.wav' quit






#####
#
# bladeenc-081
# 99sep??
#
#####

rm -Rv /usr/src/bladesrc-081/
cd /usr/src/
tar -xvzf $S/http/home8.swipnet.se/~w-82625/encoder/source/bladeenc-081-src-stable.tar.gz
cd /usr/src/bladesrc-081/
# make	|& tee om
make CFLAGS="-O6 -malign-jumps=2 -malign-loops=2 -funroll-all-loops" \
  |& tee om

cd ~edrx/
/usr/src/bladesrc-081/bladeenc
/usr/src/bladesrc-081/bladeenc huh.wav huh.b.mp3

cd ~edrx/
/usr/src/bladesrc-081/bladeenc down_on_the_street.wav down_on_the_street.mp3

# (eeman "renice")
renice 20 $(pidof bladeenc)




#####
#
# bladeenc-0.91
# 00feb11
#
#####

#  «bladeenc_src»

# (code-c-d "blenc" "/usr/src/bladeenc-0.91.0/")
# (find-blencfile "INSTALL")
# (find-blencfile "bladeenc/")
# (find-blencfile "bladeenc/system.h" "#ifndef	SYSTEM")
# (find-blencfile "configure.in")
# (find-blencfile "")

rm -Rv /usr/src/bladeenc-0.91.0/
cd /usr/src/
tar -xvzf $S/http/bladeenc.mp3.no/source/bladeenc-0.91-src-stable.tar.gz
cd /usr/src/bladeenc-0.91.0/

patch configure.in <<'%%'
19c19,21
< AC_OUTPUT(Makefile bladeenc/Makefile bladeenc/docs/Makefile bladeenc/docs/en/Makefile )
---
> dnl AC_OUTPUT(Makefile bladeenc/Makefile bladeenc/docs/Makefile bladeenc/docs/en/Makefile )
> 
> AC_OUTPUT(Makefile bladeenc/Makefile)
%%

autoconf
./configure	|& tee oc
make		|& tee om





#####
#
# encoder
# 99sep??
#
#####

rm -Rv /usr/src/encoder-js/
cd /usr/src/
tar -xvzf $S/ftp/wopr.campus.luth.se/pub/mpeg_layer_3/encoder-pre2.0.tgz
cd /usr/src/encoder-js/
./configure	|& tee oc
make		|& tee om

cd ~edrx/
/usr/src/encoder-js/encode
/usr/src/encoder-js/encode huh.wav huh.e.mp3





#####
#
# lilypond (slink)
# 99nov06
#
#####

#  «ps_to_png»

apti lilypond
# (find-vldifile "lilypond.list")
# (find-fline "/usr/doc/lilypond/")

pdsc /big/slinks2/dists/slink/main/source/tex/lilypond_1.0.19.uu3-1.dsc
# (find-lilyfile "")
# (find-lilyfile "INSTALL.txt")
# (find-lilyfile "NEWS")
# (find-lilyfile "NEWS-0.0")

# On converting .ps's to .png's:

# (find-lilyfile "buildscripts/ps-to-pngs.sh")
# (find-lilyfile "buildscripts/ps-to-gifs.sh")
# (find-lilyfile "buildscripts/ps-to-gifs.sh" "gs -sDEVICE")

cat ~/LATEX/tmp.ps \
  | gs -sDEVICE=ppmraw -sA4 -sOutputFile="/tmp/p%d.ppm" -r150 \
      -dNOPAUSE - -c quit ~/LATEX/tmp.ps
laf /tmp
for i in /tmp/*.ppm; do
    o=`dirname $i`/`basename $i .ppm`.png
    cat $i | pnmscale 0.5 | pnmtopng $color > $o
    rm $i
done
laf /tmp


# (find-fline "$S/http/www.cs.uu.nl/people/hanwen/lilypond/mutopia/E.Satie/out-www/petite-ouverture-a-danser.ly.txt")


# Some old notes:

# (find-vldifile "latex2html.list")
# (find-fline "/usr/doc/latex2html/")
# (find-fline "/usr/lib/latex2html/")
# (find-fline "/usr/lib/latex2html/pstoimg")

cd ~/LATEX/
/usr/lib/latex2html/pstoimg -help
/usr/lib/latex2html/pstoimg -debug -o tmp.png -png tmp.ps
/usr/lib/latex2html/pstoimg -o tmp.png -png tmp.ps






######
#
# Lilypond (hamm)
#
######

#  «lilypond»

# (find-fline "/usr/doc/lilypond/")
# (find-fline "/usr/doc/lilypond/examples/")
# (find-fline "/usr/doc/lilypond/README.Debian")
# (find-fline "/var/lib/dpkg/info/lilypond.list")

# (find-fline "/usr/doc/lilypond/examples/mutopia/gallina.ly.gz")

cd ~/LILY/
gzip -cd < /usr/doc/lilypond/examples/mutopia/gallina.ly.gz > gallina.ly
ly2dvi gallina.ly |& tee o
xdvi -thorough gallina.dvi

# (find-fline "/usr/doc/lilypond/mudela.doc.gz")
# (find-fline "/usr/doc/lilypond/")

cd ~/LILY/
rm -Rv out/
mkdir out/
gzip -cd < /usr/doc/lilypond/mudela.doc.gz > introduction.doc
mudela-book --outdir=out/ --outname=introduction.mudtex introduction.doc
latex '\nonstopmode \input out/introduction.mudtex'
latex '\nonstopmode \input out/introduction.mudtex'
latex '\nonstopmode \input out/introduction.mudtex'
xdvi introduction.dvi

# It needs a4.sty, so we need to install this:
dpkg -i /debian/non-free/binary-all/tex/tetex-nonfree_0.9-9.deb
# (find-vldifile "tetex-nonfree.list")

pdsc /debian/main/source/tex/lilypond_0.1.61-1.dsc
./configure |& tee oc




######
#
# Writing my own `.ly's
#
######

# (find-fline "/usr/lib/emacs/site-lisp/mudela-mode.el")
# (find-fline "~/LILY/0.ly")

cd ~/LILY/
ly2dvi 0.ly

xdvi 0.dvi






######
#
# Using MIDI files
# 00feb11
#
######

cd $S/http/www.cs.uu.nl/~hanwen/lilypond/mutopia/E.Satie/out-www/
playmidi petite-ouverture-a-danser.midi


cd /812.C/ultrapnp/mids/
playmidi barimyst.mid

cd /812.C/ultrapnp/mids/
mftext barimyst.mid
midi2abc -f barimyst.mid




######
#
# MIDI on Gravis
#
######

cd /812.C/ultrapnp/mids/
playmidi -g barimyst.mid
# (find-fline "/usr/doc/HOWTO/")
# (find-vldifile "ultra-mod2.0.30.list")
# (find-vldifile "ultra-utils.list")
# (find-vldifile "ultra.list")
# (find-fline "$HAI/Packages" "Package: ultra")

# (find-fline "/usr/doc/ultra-utils/")




######
#
# 
#
######

cd /cdrom
find | grep ultra
cp -diPv $(find | grep ultra) /
pdsc /debian/main/source/sound/ultra_2.99a-devel2-1.dsc
cd /usr/src/ultra-2.99a-devel2/
debian/rules binary |& tee odrb

cd ~/HASH/
dpkg -i ultra-mod2.0.30 ultra

cd /812.C/ultrapnp/mids/
ultramidi barimyst.mid





####
#
# How should we pronounce Linux?
#
####

# (find-fline "/usr/doc/FAQ/Linux-FAQ.gz" "hear Linus himself")
cd /snarf/ftp/ftp.funet.fi/pub/Linux/PEOPLE/Linus/SillySounds/
dd if=swedish.au bs=1 skip=23000 > /dev/audio

cat swedish.au > /dev/audio
cat english.au > /dev/audio





####
#
# /dev/audio
#
####

# (find-k2file "drivers/sound/")
# (find-k2file "Documentation/devices.txt" "4 = /dev/audio")
# (find-k2file "include/linux/")
# (find-k2file "include/linux/soundcard.h")
# (find-k2file "include/linux/soundcard.h" "/dev/audio")





#####
#
# Hacking workbone
# 99jun??
#
#####

# (code-c-d "wb" "/usr/src/workbone-2.40/")

pdsc /debian/dists/slink/main/source/sound/workbone_2.40-1.dsc
cd /usr/src/workbone-2.40/
ln -s ~/C/edrxwb.c .
cat >>Makefile <<'---'

edrxwb.o: edrxwb.c workbone.h

edrxwb: edrxwb.o hardware.o
	gcc -E edrxwb.c > edrxwb.E
	$(CC) -o $@ $^ $(LDFLAGS)
---

cd /usr/src/workbone-2.40/
make CFLAGS='-g' LDFLAGS='' workbone
make CFLAGS='-g' LDFLAGS='' edrxwb

# (find-fline "~/C/edrxwb.c")

# (find-wbfile "")
# (find-wbfile "hardware.c")

# (gdb "gdb /usr/src/workbone-2.40/workbone")





######
#
# alsa
#
######

apt-get install alsa-modules alsalib alsautils

# (find-fline "/etc/init.d/alsa")
# (find-fline "/usr/sbin/alsaconfig")
# (find-fline "/usr/doc/alsa-modules/")
# (find-vldifile "alsa-modules.list")

# (find-fline "/usr/doc/alsalib/")
# (find-vldifile "alsalib.list")
# (find-fline "/usr/doc/alsautils/")
# (find-vldifile "alsautils.list")

# (code-c-d "alsad" "/usr/src/alsadriver-0.2.0-pre8/")
# (code-c-d "alsal" "/usr/src/alsalib-0.1.1/")
# (code-c-d "alsau" "/usr/src/alsautils-0.0.6/")

pdsc /debian/dists/slink/main/source/sound/alsadriver_0.2.0-pre8-3.dsc
cd /usr/src/alsadriver-0.2.0-pre8/
debian/rules binary	|& tee odrb
#
# (find-alsadfile "debian/rules")
# (find-alsadfile "cards/interwave.c")

pdsc /debian/dists/slink/main/source/sound/alsalib_0.1.1-1.dsc
cd /usr/src/alsalib-0.1.1/
#
# (find-alsalfile "")

pdsc /debian/dists/slink/main/source/sound/alsautils_0.0.6-2.dsc
cd /usr/src/alsautils-0.0.6/
#
# (find-alsaufile "")





######
#
# wav
#
######

apti emusic wavtools xwave bplay


# (insert-kbd-macro (make-symbol ""))
# (setq last-kbd-macro
   "# (find-vldifile \"\C-@\C-e\C-[w.list\")\C-a\C-[[B\C-m\C-[[A# (find=-\C-?\C-?-fline \"/usr/doc/\C-y/\")\C-a\C-[[B")


# (find-fline "/usr/doc/bplay/")
# (find-fline "/usr/doc/emusic/")
# (find-fline "/usr/doc/wavtools/")
# (find-fline "/usr/doc/xwave/")

# (find-vldifile "bplay.list")
# (find-vldifile "emusic.list")
# (find-vldifile "wavtools.list")
# (find-vldifile "xwave.list")

# (find-fline "$S/http/www.freshmeat.net/news/1999/")
# (find-fmfile "1999/05/20/index.html.txt")


    6958 dists/potato/main/source/sound/mp3blaster_2-0b9-1.diff.gz
     809 dists/potato/main/source/sound/mp3blaster_2-0b9-1.dsc
  183303 dists/potato/main/source/sound/mp3blaster_2-0b9.orig.tar.gz
    1297 dists/potato/main/source/sound/mp3info_0.2.16-1.diff.gz
     619 dists/potato/main/source/sound/mp3info_0.2.16-1.dsc
   42990 dists/potato/main/source/sound/mp3info_0.2.16.orig.tar.gz


psne $FDEBIAN/README.non-US

psne ftp://nonus.debian.org/pub/debian-non-US/ls-lR.gz





#####
#
# some slink mp3 programs
#
#####

pdsc $SDEBIAN/dists/slink/non-free/source/sound/mp3asm_0.01-1.dsc
debian/rules binary	|& tee odrb

pdsc $SDEBIAN/dists/slink/non-free/source/sound/mp3info_0.2.9-1.dsc
debian/rules binary	|& tee odrb

cd /usr/src/
mv *.deb .debs
apt-update





######
#
# potato freeamp
#
######

pdsc $SDEBIAN/dists/potato/main/source/sound/freeamp_1.2.0-1.dsc
cd /usr/src/freeamp-1.2.0/
debian/rules binary	|& tee odrb





#####
#
# csound-3.484 (slink)
#
#####

pdsc $SDEBIAN/dists/slink/non-free/source/sound/csound_3.484.0d-1.dsc
# (find-csoundfile "Make.Targets" 31)
patch -b -z'~' Make.Targets <<'%%%'
31c31
< 		$(CC) -shared -Wl,-soname,$(CSADYN) -o $@ $(COBJS) $(LDFLAGS) $(LIBS) -lc
---
> 		$(CC) -shared -Wl,-soname,$(CSADYN) -o $@ $(COBJS) $(LDFLAGS) -lc
%%%
debian/rules binary	|& tee odrb

cd /usr/src/
mv -v csound *.deb .debs/
apt-update

apti csound

# (code-c-d "csound" "/usr/src/csound-3.484.0d/")
# (find-csoundfile "")
# (find-csoundfile "odrb")
# (find-csoundfile "odrb" "dpkg-shlibdeps: warning")

# (find-fline "/usr/bin/dpkg-shlibdeps")
# (find-csoundfile "debian/tmp/DEBIAN/shlibs")

# (find-vldifile "csound.list")
# (find-fline "/usr/doc/csound/")

cd /usr/doc/csound/CsManual3.47b2/
cd /usr/doc/csound/tutorial/



# The "toot" examples:

rm -Rv /tmp/csoundtut/
mkdir  /tmp/csoundtut/
cd     /tmp/csoundtut/
# cp -iv /usr/doc/csound/tutorial/* .
# gzip -dv *.gz
cp -iv /usr/src/csound-3.484.0d/tutorial/* .

cd /tmp/csoundtut/
A=(1 2 3 4 5 6 7 8 9 10 11 12 13)
for i in $A; do
  csound -g -W -o $i.wav toot$i.orc toot$i.sco |& tee o$i
  echo $i.wav
  bplay $i.wav
done

# (find-fline "/usr/src/csound-3.484.0d/benchmarks/")





#####
#
# csound-3.53 (+ csound-doc_3.47b2)
#
#####

#  «csound»

pdsc $SDEBIAN/dists/potato/non-free/source/sound/csound_3.53.0.1d-1.dsc
cd /usr/src/csound_3.53.0.1d/
debian/rules binary	|& tee odrb

pdsc $SDEBIAN/dists/potato/non-free/source/doc/csound-doc_3.47b2-1.dsc
cd /usr/src/csound-doc-3.47b2/
debian/rules binary	|& tee odrb

mv -v /usr/src/csound*.deb /usr/src/.debs/
apt-update

apti csound csound-dev csound-doc

# (find-fline "/usr/doc/csound/")
# (find-fline "/usr/doc/csound-dev/")
# (find-fline "/usr/doc/csound-doc/")
# (find-vldifile "csound.list")
# (find-vldifile "csound-dev.list")
# (find-vldifile "csound-doc.list")


# Trying to play the examples. Most are silent...
# The "toot" examples from the 3.484 distribution have disappeared!
# (find-fline "$SDEBIAN/dists/slink/non-free/source/sound/csound_3.484.0d-1.diff.gz")

# (find-fline "/usr/doc/csound/examples/")
rm -Rv /tmp/csound/csound/
mkdir -p /tmp/csound/csound/
cd /usr/doc/csound/examples/
cp -dipPvR * /tmp/csound/csound/

function cs2wav () {
  echo "\n$*:"
  time csound -g -W $*[3,-1] -o $2.wav $1 $2
  laf $2.wav
  bplay $2.wav
}

cd /tmp/csound/csound/
cat > p.sco <<'---'
f0 10
i1 1 4 100
i1 10 3 150
i1 20 2 400
---

cs2wav args.orc p.sco
cs2wav control.orc p.sco
cs2wav icall.orc p.sco
cs2wav kargs.orc p.sco
cs2wav micall.orc p.sco
cs2wav return.orc p.sco

cs2wav args.{orc,sco}
cs2wav control.{orc,sco}
cs2wav icall.{orc,sco}
cs2wav kargs.{orc,sco}
cs2wav micall.{orc,sco}
cs2wav return.{orc,sco}

# Benchmarks (in the 3.484 source!)
cd /usr/src/csound-3.484.0d/benchmarks/
cs2wav bach.{orc,sco}
cs2wav guitar.{orc,sco}
cs2wav james.{orc,sco}
cs2wav risset1.{orc,sco}






#####
#
# csound - playing the Ezine files
# 99oct24
#
#####

#  «csound-ezinefiles»
# (find-es "music" "csound")
cd $S/http/www.werewolf.net/~hljmm/Ezine/
find * | egrep '(orc|sco|srt)$' |& tee ~/o

rm -Rv /tmp/csound/
mkdir /tmp/csound/
cd $S/http/www.werewolf.net/~hljmm/Ezine/
for i in $(find * | egrep '(orc|sco|srt)$'); do
  cp -Pv $i /tmp/csound/
  tr -d \\r < $i > /tmp/csound/$i
done

function cs2wav () {
  echo "\n$*:"
  time csound -g -W $*[3,-1] -o $2.wav $1 $2
  laf $2.wav
  bplay $2.wav
}

cd /tmp/csound/
cs2wav Spring1999/beginner/bgoscil.{orc,sco}
cs2wav Spring1999/synthesis/parosc.{orc,sco}
cs2wav Spring1999/processing/tokbox.{orc,sco}
cs2wav Spring1999/within/depletion.{orc,sco}
cs2wav Winter1999/beginner/myfile.{orc,sco}
cs2wav beginners/envelop.{orc,sco}
cs2wav Winter1999/processing/{tanh.orc,tanh1.sco}
cs2wav Winter1999/processing/{tanh.orc,tanh2.sco}
cs2wav processing/delay.{orc,sco}

# This one takes almost four minutes to generate.
cs2wav Winter1999/synthesis/ca.{orc,sco}

# This one took 1'20''.
cs2wav synthesis/julia.{orc,sco}

# These generate only silence.
cs2wav realtime/fofrt.{orc,sco}
cs2wav Spring1999/realtime/anmod.{orc,sco}
cs2wav Spring1999/within/Within.{orc,sco}

# Other things:
# (find-fline "/tmp/csound/examples/")
# and I don't know how to use the "score.srt" files.





#####
#
# rms' free software song
# 99oct??
#
#####

cd $S/http/www.liacs.nl/~wichert/
bplay why-cooperation-with-rms-is-impossible.au

cd $S/http/www.liacs.nl/~wichert/
mp freesoftwareSong-remix.mp3




#####
#
# midikb
# 99nov27
#
#####

rm -Rv /usr/src/midikb-0.4.3/
cd /usr/src/
tar -xvzf $S/http/www.sdf.se/~simon/dl/midikb-0.4.3.tar.gz
cd /usr/src/midikb-0.4.3/
./configure	|& tee oc
make		|& tee om

cd /usr/src/midikb-0.4.3/
strace-to ~/s \
src/midikb -c midikb.conf.english

# (find-fline "/usr/src/midikb-0.4.3/")
# (find-fline "/usr/src/midikb-0.4.3/README" "output >/dev/midi")
# (find-fline "/usr/src/midikb-0.4.3/midikb.conf.english")




#####
#
# klav
# 99nov27
#
#####

rm -Rv /usr/src/klav-0.0.4/
cd /usr/src/
tar -xvzf $S/http/www.sdf.se/~simon/dl/klav-0.0.4.tar.gz
cd /usr/src/klav-0.0.4/
make	|& tee om

# (find-fline "/usr/src/klav-0.0.4/om")





#####
#
# cecilia
# 99nov27
#
#####

pdsc $SDEBIAN/dists/slink/non-free/source/sound/cecilia_2.0.2-1.dsc
cd /usr/src/cecilia-2.0.2/
debian/rules binary	|& tee odrb

mv -v /usr/src/cecilia*.deb /usr/src/.debs/
apt-update
apti cecilia
# (find-vldifile "cecilia.list")
# (find-fline "/usr/doc/cecilia/")

cd /usr/doc/cecilia/html/
edrxnetscape index.html




#####
#
# rosegarden
# 99nov27
#
#####

apti rosegarden tclmidi
# (find-vldifile "rosegarden.list")
# (find-fline "/usr/doc/rosegarden/")
# (find-vldifile "tclmidi.list")
# (find-fline "/usr/doc/tclmidi/")

pdsc /big/slinks2/dists/slink/main/source/sound/tclmidi_3.1-4.dsc
debian/rules binary	|& tee odrb

# ld: cannot open -lg++: No such file or directory

# (find-fline "/usr/src/tclmidi-3.1/tests/")
# (find-fline "/usr/src/tclmidi-3.1/tests/copy.test")

expect -c '
  package require tclmidi
  puts [midimake]
'

# even the humblest call causes a segfault...

cd /usr/src/tclmidi-3.1/tests/
for i in *.test; do
expect -c '
  package require tclmidi
' $i
done


  load tclmidi31.so

# (find-fline "/usr/bin/tmplay")





#####
#
# MIDIs from Wendy Carlos' site
# 99nov27
#
#####

cd /tmp/
unzip $S/http/www.wendycarlos.com/resources/airongst.zip
playmidi airongst

# The chords on the left hand (?) sound somewhat horrible.
# Is it general MIDI's fault?