From: phil@ohm.Berkeley.EDU (Phil Lapsley)
Newsgroups: comp.dsp,news.answers
Subject: comp.dsp FAQ [1 of 2]
Supersedes: <dspone_717450427@ohm.berkeley.edu>
Followup-To: poster
Date: 11 Oct 1992 17:36:37 GMT
Organization: University of California at Berkeley
Distribution: world
NNTP-Posting-Host: tukey.berkeley.edu
Summary: This is a periodic posting to comp.dsp that gives information
	on frequently asked questions asked in this newsgroup.

Archive-name: dsp-faq/part1
Last-modified: Sun Oct 11 1992
Version: 0.5

Here is the sixth release of the comp.dsp FAQ.  We are eagerly seeking
information on all topics, from the best layout (e.g., should chips and
prototype boards be another FAQ?) to a good annotated list of DSP
articles and reference books.  Please email your suggestions to
comp-dsp-faq@ohm.Berkeley.EDU.  Meta-comments are all in curly braces
{like this}.  Acknowledgements to people responsible for articles
and/or bits of information are in square brackets, [like so].

You can ftp the very latest version of this FAQ from: evans.ee.adfa.oz.au
(131.236.30.24) in pub/dsp/dsp-faq.help, or from copernicus.Berkeley.EDU
in dsp-faq.help.

We are most grateful to the following contributors who helped out with version
0.5 of the FAQ:

John Fisher		johnf@dsp.sps.mot.com
Ed Hall			edhall@rand.org
Vince Herried		vjh21@cas.org
Gints Klimanis		gints@roadkill.esd.sgi.com
Ronnin Yee		ronnin.yee@analog.com

and the following folks who helped out with previous versions:

Joe Campbell		jpcampb@afterlife.ncsc.mil
Malachy Devlin		madmal@spd.eee.strathclyde.ac.uk
Brian Evans		evans@markov.eedsp.gatech.edu
Dan Frankowski		dfrankow@cs.umn.edu
Maurice Givens		maury@tellabs.com
Eric Jacobsen		ericj@hwcae.honeywell.com
Pete Janzow		pjanzow@prenhall.com
Richard Kim		richard@math.mit.edu
Greg Koker		greg.koker@analog.com
John Lazzaro		lazzaro@boom.CS.Berkeley.EDU 
Paul Russell		paulr@syma.sussex.ac.uk
Bill Schottstaedt	bil@ccrma.stanford.edu
Greg Smart		rcogs@citri.edu.au
Andrew Ukrainec		ukrainec@nimios.Eng.McMaster.CA

Get your name here - contribute something!  (If you don't want your
email address listed in your contribution, please indicate so.)

Phil Lapsley		phil@ohm.Berkeley.EDU	(temporary FAQ maintainer)
Bradley Hards		hards@ee.adfa.oz.au	(original FAQ maintainer)

=============================================================================

0. What is comp.dsp?

1. General DSP.
   1.1 Summary of DSP books and articles.
   1.2 Where can I get free software for general DSP?
       1.2.1 What is Gabriel?  Where can I get it?
       1.2.2 What is Ptolemy?  Where can I get it?
       1.2.3 What is Khoros?  Where can I get it?
       1.2.4 What are DSP Tutorials?  Where can I get them?
       1.2.5 What are some DSP extensions to MATLAB?  Where can I get them?
       1.2.6 What is the Signal Processing Package for Mathematica?
             Where can I get it?
       1.2.7 What is the Controls System Package for Mathematica?
             Where can I get it?
       1.2.8 What are some other DSP Notebooks for Mathematica?
       1.2.9 What is the Linear Systems Toolbox for Maple?  Where can I get it?
       1.2.10 Where can I get text to speech conversion software?

2. Algorithms and standards.
   2.1 Where can I get some algorithms for DSP?
   2.2 What is CELP and LPC?  Where can I get source for them?
   2.3 How does pitch perception work, and how do I implement it?
   2.4 What standards exist for digital audio?  What is AES/EBU?
       What is S/PDIF?
   2.5 What is mu-law encoding?  Where can I get source for it?
   2.6 How can I do CD <-> DAT sample rate conversion?

3. Programmable DSP chips and their software.
   3.1 What are some current, popular programmable DSP chips?
   3.2 Software for Motorola DSPs.
	3.2.1 Where can I get a free assembler for the Motorola DSP56000?
	3.2.2 Where can I get a free C compiler for the Motorola DSP56000?
	3.2.3 Where can I get algorithms or libraries for Motorola DSPs?
	      What is the number for the Motorola DSP BBS?
	3.2.4 Where can I get NeXT-compatible Motorola DSP56001 code?
   3.3 Software for Texas Instruments DSPs.
	3.3.1 Where can I get algorithms or libraries for TI DSPs?
       	      What is the number for the TI DSP BBS?
	3.3.2 Where can I get a free C compiler for the TMS320C30?

4. Hardware.
    4.1 DSP development boards.
	4.1.1 IBM PC.
	4.1.2 Mac Nubus.
	4.1.3 SBus.
	4.1.4 VMEbus.
	4.1.5 Next bus.
	4.1.6 SCSI bus.
	4.1.7 Standalone.
    4.2 Who makes AES/EBU chips?

5. List of manufacturers and addresses.

To search for a particular question within a text editor, look for the
pattern "Q#.##:", e.g., "Q1.2:".

=============================================================================

Q0: What is comp.dsp?

Comp.dsp is a worldwide UseNet news group that is used to discuss
various aspects of digital signal processing.  It is unmoderated,
though we try to keep the signal to noise ratio up :-).  If you need to
ask a question that isn't in the FAQ, and can't figure out how to post,
consult news.newusers.questions.  Other relevant news groups are
comp.compression and sci.image.processing.

=============================================================================

1. General DSP.

This section deals with general DSP, that is, DSP books, algorithms,
and packages that are not related to a particular manufacturer's DSP chip.

=========================================================================

Q1.1: Summary of DSP books and significant research articles.

(1) Bibles of DSP:

A.V. Oppenheim and R.W. Schafer, "Digital Signal Processing",
Prentice-Hall, Inc., Englewood Cliffs, N.J., 1975.

A.V. Oppenheim and R.W. Schafer, "Discrete-Time Signal Processing"
Prentice Hall, Englewood Cliffs, New Jersey 07632, 1989. ISBN 0-13-216292-X
This is an updated version of the original, with some old material deleted
and lots of new material added.

L.R. Rabiner & R.W. Schafer, "Digital Processing of Speech Signals",
Prentice Hall, 1978, ISBN 0-13-213603-1.

R. E. Crochiere & L. R. Rabiner, "Multirate Digital Signal Processing",
Prentice-Hall, 1983, ISBN 0136051626.
This book is the only real reference for filter banks and multirate
systems, as opposed to being a tutorial.

Thomas Parsons, "Voice and Speech Processing", McGraw-Hill, 1987,
ISBN 0-07-048541-0.
Addresses the cocktail party effect, as well as other material.
[Maurice Givens, maury@tellabs.com]

--------------------------------------------------

(2) Adaptive signal processing:

S. Haykin, "Adaptive Filter Theory", 2nd Ed., Prentice Hall,
Englewood Cliffs, NJ, 1991.

B. Widrow and S.D. Stearns, "Adaptive Signal Processing", 
Prentice-Hall, Inc., Englewood Cliffs, N.J., 1985.

--------------------------------------------------

(3) Array signal processing:

J.E. Hudson, "Adaptive Array Principles", IEE London and New York,
Peter Peregrinus Ltd. Stevenage, U.K., and New York, 1981.

R.A. Monzingo and T.W. Miller, "Introduction to Adaptive Arrays"
John Wiley and Sons, New York, 1980.

S. Haykin, J.H. Justice, N.L. Owsley, J.L. Yen, and A.C. Kak
"Array Signal Processing", Prentice-Hall, Inc., Englewood Cliffs, N.J., 1985.

R.T. Compton, Jr., "Adaptive Antennas, Concepts and Performance",
Prentice-Hall, 1988, ISBN 0-13-004151-3.

--------------------------------------------------

(4) Windowing articles.

F. J. Harris, "On the Use of Windows for Harmonic Analysis with the DFT",
IEEE Proceedings, January 1978, pp. 51-83.
Perhaps the classic overview paper for discrete-time windows.  It discusses
some 15 different classes of windows including their spectral responses and
the reasons for their development.  [Brian Evans, evans@eedsp.gatech.edu]

Nezih C. Geckinli & Davras Yavuz, "Some Novel Windows and a Concise Tutorial
Comparison of Window Families", IEEE Transactions on Acoustics, Speech,
and Signal Processing, Vol. ASSP-26, No. 6, December 1978.
[Bob Beauchaine, bobb@vice.ico.tek.com]

=========================================================================

Q1.2: Where can I get free software for general DSP?

The packages listed below are mostly for general purpose DSP, that is,
DSP that is not specific to a particular programmable DSP chip.  See
the later sections in the FAQ for software relevant to a particular
programmable DSP chip.

According to Brian Evans: "There was an entire session on this subject
[free DSP software] at ICASSP '92, chaired by Dr. Sally Wood and
Dr. James McClellan.  It appears in Volume 4 of the Proceedings, pages
73-112.  There will be another such session at ICASSP '93." [Brian Evans,
evans@eedsp.gatech.edu]  Much of the information below is from Brian's mail.

--------------------------------------------------

Q1.2.1: What is Gabriel?  Where can I get it?

Package: Gabriel

Description:
Hierarchical block diagram environment for prototyping signal processing
systems on single or multiple processors.  Algorithms expressed in block
diagram form can be simulated, and assembly code can also be generated for
the Motorola DSP56001 and DSP96002.  Gabriel has almost been obsoleted by
Ptolemy, below.

Platforms: sun 3, sun 4, X windows.  Written in Lisp (lisp compiler supplied).

Contact: Alan Kamas, aok@ohm.berkeley.edu.

To obtain:
Anonymous ftp to copernicus.berkeley.edu, and retrieve gabriel-license.shar.
This is a shar file of licenses that you must sign and mail back to us (the
old-fashioned way) before we can give you the source.  Then we can tell you
the password for an account that will allow you to FTP Gabriel.
--------------------------------------------------

Q1.2.2: What is Ptolemy?  Where can I get it?

Package: Ptolemy

Description:
Hierarchical, heterogeneous block diagram DSP design environment.  Supports
simulation (dataflow and discrete event), code generation, and hardware
modeling.  All the features of Gabriel, but much cleaner and better designed.

Platforms: sun 3, sun 4, DECstation, HP, VAX.  X windows.  Written in C++.

Contact: Alan Kamas, aok@ohm.berkeley.edu.

To obtain:
Anonymous ftp to forney.berkeley.edu, and retrieve ptolemy-license.shar.
This is a shar file of licenses that you must sign and mail back to us (the
old-fashioned way) before we can give you the source.  Then we can tell you
the password for an account that will allow you to FTP Ptolemy.
--------------------------------------------------

Q1.2.3: What is Khoros?  Where can I get it?

Package: Khoros

Description:
Block diagram simulator for image and video processing.  1-D signal processing
is also supported.  See the UseNet group comp.soft-sys.khoros.

Platforms: sun 3, sun 4, others?  X windows.  Written in C.

To obtain:
Anonymous ftp to pprg.eece.unm.edu, cd /pub/khoros/release, get install.ftp.
--------------------------------------------------

Q1.2.4: What are DSP Tutorials?  Where can I get them?

Package: DSP Tutorials

Description: Computer aided instruction.

Platforms: suns under SunView.

Contact: Dr. Sally Wood, Electrical Engineering Department, Santa Clara
University, Santa Clara, CA 95053.
--------------------------------------------------

Q1.2.5: What are some DSP extensions to MATLAB?  Where can I get them?

Package: MATLAB user's group public domain extensions to MATLAB

Description:

    The MATLAB Digest is issued at irregular intervals based on the  number
    of  questions  and  software  items  contributed  by  users.   To  make
    submissions  to the digest, please send  to hwilson@ua1vm.ua.edu with a
    subject: "DIG" and description.

    For  the  Pacific,   try  netlib@draci.cs.uow.edu.au  located   at  the
    University of Wollongong, NSW, Australia.

    A plethora of toolboxes are available at FTP site: research.att.com
    (use netlib for the username)

    General index for the MATLAB User Group software library
    ----------------------------------------------------------
    Currently there are the following subdirectories:
    approximation      approximation theory
    archive            old MATLAB user group digests
    control            control theory
    dataanalysis       data analysis and statistics
    graphics           graphics programs
    integration        numerical integration
    linearalgebra      linear algebra utilities
    misc               miscellaneous
    ode                ordinary differential equations
    optimization       as the name says
    pde                partial differential equations
    rootfinding        zero-finding routines
    specialfunctions   special functions
    teaching           for classroom use
    tools              miscellaneous tools

    In order to get an index for a subdirectory (tools, say)
    send the message
        send index from MATLAB/tools
    to netlib@ornl.gov.

    In order to get some code, (unbundle in the `tools'
    directory, say), send the message
        send unbundle from MATLAB/tools
    to netlib@ornl.gov.

    FOR  STUDENTS: Prentice Hall has published  a student edition of matlab
    which contains a book and  set of disks for PCs and Macs.  The software
    is limited only in matrix size (32 x 32 matrix;  1024 elements) and  in
    its ability  to import or call  C or Fortran  subroutines.  On the plus
    side, it is able to run without a coprocessor (it will use one if it is
    present) and it includes a subset of the Signal Processing and Controls
    Toolboxes, The Signals and  Systems Toolbox,  which  provides for added
    functionality. Book only (about US$30): ISBN = 0138560064; Book + disk:
    (about US$50 ISBN=0-13-855974-0 for 3.5" or ISBN=0-13-855982-1 for 5.25
    Macintosh version:  ISBN=0-13-855990-2. There will be related books out
    by mid to late 1993 :  Computer Aided Signal Processing with MATLAB, by
    Burrus, Oppenheim, McClellan, Parks, Schafer, and Schussler; and Signal
    Processing : A Computer  Approach, by Etter. More books in this  MATLAB
    Curriculum Series are planned. For general info: matlab@prenhall.com

	[From the Matlab Users Group (Editor, hwilson@ua1vm.ua.edu)]
--------------------------------------------------

Q1.2.6: What are the Signal Processing Packages for Mathematica?
        Where can I get them?

Package: Signal Processing Pacakages (SPP) and Notebooks.

Description:

         Public domain  extensions  to  Mathematica.   Enables the symbolic 
    manipulation of signal processing expressions:  1-D discrete/continuous
    convolutions and 1-D/m-D linear transforms  (Laplace, Fourier, z, DTFT,
    and DFT).   For  linear  transforms, you can specify your own transform
    pairs and see the intermediate computations. Great for showing students
    how to take transforms, or for deriving input-output relationships in a
    transform  domain.   Additional abilities include analog filter design,
    solving DE's using transforms, converting signal processing expressions
    to their equivalent TeX forms, and number theoretic operations  (Bezout
    numbers, Smith Form decompositions, and matrix factors).   Accompanying
    SPP  are  tutorial notebooks on analog filter design, Fourier analysis,
    piecewise convolution,  and  the  z-transform (includes a discussion of
    fundamentals  of  digital  filter  design).  These Notebooks illustrate
    difficult concepts (such as  the  flip-and-slide  view  of convolution)
    through animation.  A Notebook reader is available in the public domain
    for Macintosh computers (a BinHexed version is on the ftp site).

    FOR STUDENTS:   A student version of Mathematica is available for $175.
    The price includes a copy of the reference manual.  The only drawbacks
    to the student version are that the floating point coprocessor is dis-
    abled and that upgrades cannot be ordered.

Contact: Brian Evans, evans@eedsp.gatech.edu.

To obtain: anonymous ftp to gauss.eedsp.gatech.edu (130.207.226.24).
(available in UNIX, Mac, and MS-DOS archive formats).

--------------------------------------------------

Q1.2.7: What is the Control Systems Analysis Packages for Mathematica?
        Where can I get them?

Package: Control Systems Analysis Package (COSYPAK) and Notebooks

Description: Public domain extension to Mathematica.  Classical and
state-space control analysis and design methods.  The Notebooks
supplement the material in the textbook "Modern Controls Theory" by
Ogata.  Largely based on the Signal Processing Packages (SPP, see above).

Contact: Dr. Sreenath, sree@veda.esys.cwru.edu.

To obtain: anonymous ftp veda.esys.cwru.edu (129.22.40.9).
--------------------------------------------------

Q1.2.8: What are some other Mathematica DSP Notebooks?

The following Mathematica notebooks can be ftped from ccrma-ftp.stanford.edu:

pub/DSP/GenHamming.ma.Z         Generalized Hamming windows
pub/DSP/Kaiser.ma.Z             The Kaiser window
pub/DSP/WinFlt.ma.Z             Digital filter design by the "window method"

(There are other DSP related items in pub/DSP on ccrma-ftp; see other
sections of this FAQ for details).
--------------------------------------------------

Q1.2.9: What is the Linear Systems Toolbox for Maple?
        Where can I get it?

Package: Linear systems toolbox for Maple.

Description: Public domain extension to Maple.

Contact: Tony Richardson, amr@egr.duke.edu.

To obtain: anonymous ftp to cameron.egr.duke.edu, file pub/maple/linsys.tar.Z.
--------------------------------------------------

Q1.2.10: Where can I get text to speech conversion software?

Free (but not public domain) text to speech conversion software is
available via anonymous ftp from wilma.cs.brown.edu in the pub directory
as speak.tar.Z.  It will compile and run on a SPARC's built-in audio
after modifying speak.c with the path of your libaudio.h (e.g.,
/usr/demo/SOUND/libaudio.h).  It's a simple phoneme concatenation
system with commensurate synthesized speech quality (a directory of
phoneme audio files is included).  [Joe Campbell, jpcampb@afterlife.ncsc.mil]

=============================================================================

2. Algorithms and standards.

This section deals with DSP algorithms and related standards.

=======================================================================
Q2.1: Where can I get some algorithms for general DSP?

The following archives contain things such as matrix  operations, FFT's and
generally useful things like that, as opposed to complete applications:

(1) host ux1.cso.uiuc.edu - log in as anonymous, get the file math/README.
    It summarises the contents of the archive.

(2) Netlib, which serves some of this software via email. Try mail to
    netlib@ORNL.GOV with "send help" in the subject field.
    For Europe: 
        Internet:       netlib@nac.no
        EARN/BITNET:    netlib%nac.no@norunix.bitnet
        X.400:          s=netlib; o=nac; c=no;
        EUNET/uucp:     nac!netlib
    For the Pacific, try    
        netlib@draci.cs.uow.edu.au
     For background about netlib, see Jack J. Dongarra and Eric Grosse,
     "Distribution of Mathematical Software Via Electronic Mail,"
     Comm. ACM (1987) 30,403--407.
     
     A similar collection of statistical software is available from
           statlib@temper.stat.cmu.edu.

     The symbolic algebra system REDUCE is supported by
          reduce-netlib@rand.org.

(3) It may be possible to get an extensive set of fortran routines
    produced by the Naval Surface Warfare Centre. { Any one got more data? }

If you don't know where to find what you're after, try archie.

=======================================================================

Q2.2: What are CELP and LPC?  Where can I get the source for CELP and LPC?

CELP stands for "code excited linear prediction".  LPC stands for
"linear predictive coding".  They are compression algorithms used for
low bit rate (2400 and 4800 bps) speech coding.

The U.S. DoD's Federal-Standard-1016 based 4800 bps code excited linear
prediction voice coder version 3.2 (CELP 3.2) Fortran and C simulation
source codes are available for worldwide distribution at no charge (on
DOS diskettes, but configured to compile on Sun SPARC stations) from:

	Bob Fenichel
	National Communications System
	Washington, D.C.  20305
	1-703-692-2124
	1-703-746-4960 (fax)

Example input and processed speech files, a technical information bulletin,
and the official standard "Federal Standard 1016, Telecommunications:
Analog to Digital Conversion of Radio Voice by 4,800 bit/second Code
Excited Linear Prediction (CELP)" are included at no charge.

The following article describes the Federal-Standard-1016 4.8-kbps CELP coder:

Campbell, Joseph P. Jr., Thomas E. Tremain and Vanoy C. Welch, "The
Proposed Federal Standard 1016 4800 bps Voice Coder:  CELP," Speech
Technology Magazine, April/May 1990, p. 58-64.

The U.S. DoD's Federal-Standard-1015/NATO-STANAG-4198 based 2400 bps
linear prediction coder version 53 (LPC-10e v53) Fortran or C simulation
source codes are available on a limited basis upon written request to:
 
	Tom Tremain
	Department of Defense
	Ft. Meade, MD  20755-6000
	USA

The U.S. Federal Standard 1015 (NATO STANAG 4198) is described in:
Thomas E. Tremain, "The Government Standard Linear Predictive Coding
Algorithm:  LPC-10," Speech Technology Magazine, April 1982, p. 40-49.

Copies of the official standards FS 1015 and FS 1016 are available for
US $2.50 each from:

	GSA Rm 6654
	7th & D St SW
	Washington, D.C.  20407
	1-202-708-9205

Realtime DSP code for FS-1015 and FS-1016 is sold by:

	John DellaMorte
	DSP Software Engineering
	165 Middlesex Tpk, Suite 206
	Bedford, MA  01730
	1-617-275-3733
	1-617-275-4323 (fax)
	dspse.bedford@channel1.com

DSP Software Engineering's FS-1016 code can run on a DSP Research's Tiger 30
or on Intellibit's AE2000 TMS320C31 based 3" by 2.5" card.  See section 4.1
for more on these cards.

[Most of the above from Joe Campbell, jpcampb@afterlife.ncsc.mil]

=======================================================================

Q2.3: How does pitch perception work, and how do I implement it on my DSP chip?

Pitch is officially defined as "That attribute of auditory sensation
in terms of which sounds may be ordered on a musical scale."  Several
good examples illustrating the subtleties of pitch perception are
included in the "Auditory Demonstrations CD" which is available from
the Acoustical Society of America, Woodbury, NY 10797 for $20.

A good general reference about the psychology of pitch perception is
the book:

	B.C.J. Moore, "An Introduction to the Psychology of Hearing",
	Academic Press, London, 1989.

This book is available in paperback and makes a good desk reference.

An algorithm implementation that matches a large body of psychoacoustical
work, but which is computationally very intensive, is presented in the paper:

	Malcolm Slaney and Richard Lyon, "A Perceptual Pitch Detector," 
	Proceedings of the International Conference of Acoustics, Speech, 
	and Signal Processing, 1990, Albuquerque, New Mexico.

The definitive papers describing the use of such a perceptual pitch
detector as applied to the classical pitch literature is in:

	Ray Meddis and M. J. Hewitt. "Virtual pitch and phase
        sensitivity of a computer model of the auditory periphery. "
        Journal of the Acoustical Society of America 89 (6 1991): 2866-2682.
        and 2883-2894.

The current work that argues for a pure spectral method starts with the work
of Goldstein:

	J. Goldstein,  "An optimum processor theory for the 
	central formation of the pitch of complex tones," Journal
	of the Acoustical Society of America 54, 1496-1516, 1973.

Two approaches are worth considering if something approximating pitch
is appropriate.  The people at IRCAM have proposed a harmonic analysis
approach that can be implemented on a DSP

	Boris Doval and Xavier Rodet, "Estimation of Fundamental Frequency
	of Musical Sound Signals," Proceedings of the 1991 International
	Conference on Acoustics, Speech, and Signal Processing, Toronto,
	Volume 5, pp. 3657-3660.

The classic paper for time domain (peak picking) pitch algorithms is:

	B. Gold and L. Rabiner, "Parallel processing techniques for estimating
	pitch periods of speech in the time domain," Journal of the Acoustical
	Society of America, 46, pp 441-448, 1969.

Finally, a word of caution: Pitch is not single-valued.  We can hear a
sound and match it to several different pitches.  Imagine the number
of instruments in an orchestra, each with its own pitch.  Even a
single sound can have more than one pitch.  See for example
Demonstration 27 from the ASA Auditory Demonstrations CD.

[The above from Malcolm Slaney, Apple Computer, and John Lazzaro,
U.C. Berkeley.]

=======================================================================

Q2.4: What standards are there for digital audio?  What is AES/EBU?
      What is S/P-DIF?

The "AES/EBU" (Audio Engineering Society / European Broadcast Union)
digital audio standard is probably the most popular digital audio
standard today.  Most consumer and professional digital audio devices
(CD players, DAT decks, etc.) that feature digital audio I/O support
AES/EBU.

AES/EBU is a bit-serial communications protocol for transmitting
digital audio data through a single transmission line.  It provides two
channels of audio data, a method for communication control and status
information ("channel status bits"), and some error detection
capabilities.  Clocking information (i.e., sample rate) is derived
from the AES/EBU bit stream, and is thus controlled by the transmitter.
The standard mandates use of 32 kHz, 44.1 kHz, or 48 kHz sample rates,
but some interfaces can be made to work at other sample rates.

AES/EBU provides both "professional" and "consumer" modes.  The big
difference is in the format of the channel status bits mentioned above.
The professional mode bits include alphanumeric channel origin and
destination data, time of day codes, sample number codes, word length,
and other goodies.  The consumer mode bits have much less information,
but do include information on copy protection (naturally).

There physical connection media are commonly used with AES/EBU:
balanced (differential), using two wires and shield in three-wire microphone
cable with XLR connectors; unbalanced (single-ended), using audio coax cable
with RCA jacks; and optical (via fiber optics).

"S/P-DIF" (Sony/Philips Digital Interface Format) typically refers to
AES/EBU operated in consumer mode over unbalanced RCA cable.  Note
that S/P-DIF and AES/EBU mean different things depending on how much
of a purist you are in the digital audio world; see the Finger article
below.

References:

Finger, Robert, "AES3-199X: The Revised Two Channel Digital Audio
Interface (DRAFT)", presented at the 91st Convention of the Audio
Engineering Society, October 4-8, 1991.  Reprints: AES, 60 East 42nd
St., New York, NY, 10165.

[The above from Phil Lapsley, phil@ohm.Berkeley.EDU]

=============================================================================

Q2.5: What is mu-law encoding?  Where can I get source for it?

Mu-law (also "u-law") encoding is a form of logarithmic quantization
or companding.  It's based on the observation that many signals are
statistically more likely to be near a low signal level than a high
signal level.  Therefore, it makes more sense to have more quantization
points near a low level than a high level.  In a typical mu-law system,
linear samples of 14 to 16 bits are companded to 8 bits.  Most telephone
quality codecs (including the Sparcstation's audio codec) use mu-law
encoded samples.

Desktop Sparc machines come with routines to convert between linear and
mu-law samples.  On a desktop Sparc, see the man page for audio_ulaw2linear
in /usr/demo/SOUND/man.

Craig Reese posted the source of similar routines to comp.dsp in August '92.

References:

CCITT Recommendation G.711 (very difficult to follow).

Michael Villeret, et. al, "A New Digital Technique for Implementation
of Any Continuous PCM Companding Law,", IEEE Int. Conf. on Communications,
1973, vol. 1, pp. 11.12-11.17.

MIL-STD-188-113, "Interoperability and Performance Standards
for Analog-to-Digital Conversion Techniques," 17 February 1987.

"TI Digital Signal Processing Applications with the TMS320 Family",
pp. 169-198.

[From Joe Campbell; Craig Reese, cfreese@super.org; Sepehr Mehrabanzad,
sepehr@falstaff.dev.cdx.mot.com]

=============================================================================

Q2.6: How can I do CD <-> DAT sample rate conversion?

CD players use a 44.1 kHz sample rate, whereas DAT uses a 48 kHz sample rate.
This means that you must do sample rate conversion before you can get data
from a CD player directly into a DAT deck.

[From Ed Hall, edhall@rand.org:]

For a start, look at "Multirate Digital Signal Processing" by Crochiere
and Rabiner (see FAQ section 1.1).

Almost any technique for producing good digital low-pass filters will be
adaptable to sample-rate conversion. 44.1:48 and vice-versa is pretty
hairy, though, because the lowest whole-number ratio is 147:160.  To do
all that in one go would require a FIR with thousands of coefficients,
of which only 1/147th or 1/160th are used for each sample--the real
problem is memory, not CPU for most DSP chips.  You could chain several
interpolators and decimators, as suggested by factoring the ratio into
3*7*7:2*2*2*2*2*5.  This adds complexity, but reduces the number of
coefficients required by a considerable amount.

In any case, your local DSP guru will probably be able to suggest a good
program for designing digital filters (this is a good general question
for the net, anyway).  This is one case where going beyond the simpler
windowed-sinc-based approaches might pay off (and I'm afraid I can't
recommend any readily available programs myself).

=============================================================================

3. Programmable DSP chips and software.

This section deals with programmable DSP chips and their software.

Q3.1: What are the available DSP chips and chip architectures?

{ This is based on a woefully inadequate databook collection.  Anyone want
  to add to this list?  Manufacturers want to submit anything? }

The "big four" programmable DSP chip manufacturers are Texas Instruments,
with the TMS320 series of chips; Motorola, with the DSP56000 and DSP96000
series; AT&T, with the DSP16 and DSP32 series; and Analog Devices, with
the ADSP2100 series.  Here's a chip breakdown by manufacturer:

-------------------------------------

Texas Instuments:

TMS320C1x: family of low cost fixed-point DSP's; 16 bit data, 32 bit
registers; Various RAM&ROM configurations; 16 bit I/O bus, serial ports.

TMS320C25: 50MHz fixed-point DSP; 16 bit data, 32 bit registers;
12.5 MIPS @ 50MHz.

TMS320C30: 27/33/40 MHz floating point DSP; 32 bit floating point,
24 bit fixed point data, 40 bit  registers; DMA  controller; dual serial
ports; some support for multi-processor arrays.

TMS320C31: version of C30 minus peripheral bus, one serial port, and the 4Kx32
internal ROM.  ~$20, 132 pin PQFP.

TMS320C40: 40/50 MHz floating point DSP; extensive parallel processing
support through 6 buffered byte-wide 20 Mb/s links and 6 channel DMA; cache.

TMS320C50: enhanced TMS320C25 (double throughput); low overhead looping;
10 Kwords SRAM on chip.

-------------------------------------

Motorola:

DSP56001: 20.5, 27, or 32 MHz fixed point DSP.  24 bit data bus, 16 bit
address bus, 56 bit accumulators (2), host interface port, serial ports (2),
general purpose I/O pins, timer.  Harvard architecture.  512 words program
RAM, 512 words data RAM on chip.

DSP56000: Mask-programmed version of DSP56001.

DSP56002: DSP56001 with On-Chip Emulation (OnCE) debug port and clock PLL.
Also has a four cycle double precision multiply and support for block
floating point.  Available up to 40 MHz.

DSP56156: 40, 50, or 60 MHz fixed point DSP; 16 bit data bus, 40 bit
accumulators (2), host interface port, serial ports (2), timer, OnCE
debug port, clock PLL, 14 bit sigma-delta voice band CODEC, 2K words
program RAM, 2K words data RAM on chip.

DSP96002: IEEE format floating point DSP; 32 bit data and address bus, two
complete external buses; Harvard architecture.

-------------------------------------

AT&T:

DSP32C: floating point DSP; 32 bit floating point, 16/24 bit fixed point data.

DSP3210: floating point DSP; 32 bit floating point, 16/32 bit fixed point data;
32 bit address and data bus, serial port.

[and others; we don't have a good list, unfortunately].

-------------------------------------

Analog Devices:

ADSP2100: 32 and 50Mhz fixed point DSP (8 MIPS, 12.5MIPS).  16 bit registers
except for multiplyer-accumulate register which is 40 bits.  No on chip memory
except for a 16 word instruction cache. 

ADSP2101: Derived from ADSP2100, 16 bit registers except for the multiplier
accumulator which is 40 bits. 2Kx24 instruction/data ram in program memory
space, 1Kx16 data ram in data memory space.  Adds memory, timer, serial ports,
etc. to the 2100.  Fastest speed grade in production is 16.6 MHz (16.6MIPS).

ADSP2102: Ram/rom version of 2101; user selects how much of the 2kx24 program
memory is mask rom.

ADSP2103: 3V version of the 2101.

ADSP2105: 10Mhz fixed point DSP with 1 serial port, timer and 1kx24
instruction/data ram in program memory space, and 512 word data ram
in data memory space. This processor sells for US $9.90 in any quantity.

ADSP2111: adds a 8/16bit host interface port [to 2101?].

ADSP21msp50: ADSP2111 with an on chip a/d and d/a interface and additional
low power modes.

ADSP2161: has 8Kx24 mask rom.

DSP21020: 20/25/33 MHz floating-point DSP;  Supports 32-bit fixed point, IEEE 
format 32-bit floating point, and 40-bit floating point;  40-bit registers plus two 80-bit fixed-point multiply-accumulators;  Harvard arch. with 32 word 
instruction cache allows two data accesses in a single cycle;  IEEE 1149.1 JTAG boundry scan; 33.3 MIPS @ 33.3 MHz.

ADSP21010: Slower and cheaper version of '020 (16 MHz).  Limited to 32-bit
fixed and floating point.

All of the processors (except the 2100) use a 1X instruction clock and use an
on chip PLL to generate an internal 4X clock.  All processors have an extended
Harvard architecture which allows two data fetches and an instruction fetch
every cycle in parallel with an alu or mac operation.  All instructions
including accessing external memory can complete in 1 cycle.

[Greg Koker, greg.koker@analog.com]

=======================================================================

Q3.2: Software for Motorola DSPs.

=======================================================================

Q3.2.1: Where can I get a free assembler for the Motorola DSP56000?

A free assembler for the Motorola DSP56000 exists, thanks to Quinn
Jensen, jensenq@qcj.icon.com.  The current version is 1.1, and
it is posted to alt.sources, so look for it on mirrors of that
newsgroup (like wuarchive.wustl.edu).

=======================================================================

Q3.2.2: Where can I get a free C compiler for the Motorola DSP56000?

There are two separate compiler sources for the Motorola DSP56000.  One
is the port of gcc 1.40 done by Andrew Sterian (asterian@eecs.umich.edu) and
the other is a port of gcc 1.37.1 done by Motorola and returned to the
FSF.  Andrew's port has bowed to Motorola's version.  Both may be
portable to gcc2.x.x with some effort required.  Neither of these comes
with an assembler, but you can get a free DSP56000 assembler elsewhere
(see Q3.2.1 above).

The Motorola gcc source is available for FTP from:

	nic.funet.fi		~pub/ham/dsp/dsp56k-tools/dsp56k-gcc.tar.Z
	evans.ee.adfa.oz.au	pub/micros/56k/g56k.tar.Z

From Andrew Sterian, asterian@eecs.umich.edu:

My DSP56156 port is still the only DSP56156 compiler around and I have
just released an updated version of it.  Both this compiler and the
previous incarnation are archived on wuarchive.wustl.edu (in the
usenet/alt.sources directory) amongst other places.

=======================================================================

Q3.2.3: Where can I get algorithms and libraries for Motorola DSPs?
	What is the number for the Motorola DSP BBS?

Motorola runs "Dr. Bub", a bulletin board for DSPs containing source code
for various libraries and algorithms.  You can call it at (512) 891-3771
(9600, 4800, 2400, 1200 bps) or (512) 891-3773 (2400/1200/300 bps).
Format is 8 data bits, no parity, 1 stop bit).  Log in as "guest" to
browse the system, or you can open an account by entering "new" at the
account name prompt.  [John Fisher, johnf@dsp.sps.mot.com]

Alternatively, Dr. BuB is mirrored on the following sites:

calvin.stanford.edu   (36.14.0.43)     in   /motorola
bode.ee.ualberta.ca   (129.128.16.96)  in   /pub/dos/motorola
nic.funet.fi          (128.214.6.100)  in   /pub/misc/motorola
doc.ic.ac.uk          (146.169.3.7)    in   
/computing/systems/motorola/digital-signal-processing/dr.bub.sources

Also try nic.funet.fi in /pub/ham/dsp for a lot of good stuff on 
communications uses, including some hardware.

ccrma-ftp.stanford.edu also has a variety of DSP code (much of it NeXT
specific, see below), including the following for the DSP56000:

pub/clm.tar.Z		"CLM", a package aimed mainly at composers doing
			computer music in Common Lisp, but includes a Lisp
			56000 assembler, debugger, loader, large libraries of
			DSP56000 routines useful in computer music, and
			a compiler from a subset of Common Lisp to
			DSP56000 code.  [bil@ccrma.stanford.edu]

=======================================================================

Q3.2.4: Where can I get NeXT-compatible Motorola DSP56001 code?

Try the following from ccrma-ftp.Stanford.EDU:

DSP programs for the NeXT platform:

pub/DSP/resample.tar.Z          Audio sampling-rate conversion and FIR
				filter design.
pub/DSP/ResoLab2.1.tar.Z        Interactive filter instrument; sources now
				included, online help.
pub/DSP/Spectro.Z               Spectrum analysis tool, with source code.
pub/DSP/WaveFormEditor.tar.Z    Jean Laroche's real-time waveform editor,
				with DAJ's additions.

DSP programming examples for the NeXT platform:

pub/DSP/dsp_dma_stream.tar.Z    Fast DSP DMA programming example (two-way DMA).
pub/DSP/JeanLaroche.tar.Z       Low-level sound and DSP programming examples
				and docs.

[bil@ccrma.Stanford.EDU]

=======================================================================

Q3.3: Software for Texas Instruments DSPs.

=======================================================================

Q3.3.1: Where can I get algorithms or libraries for TI DSPs?
        What is the number for the TI DSP BBS?

nic.funet.fi has some old, apparently public domain, assembler and
related tools from TI for the TMS320 family.  [Antti-Pekka Virtanen,
antsu@utu.fu]

The TI DSP bulletin board is at (713) 274-2323 (300, 1200, 2400, or 9600 bps;
8 data, 1 stop, no parity).

evans.ee.adfa.oz.au has a mirror of the TI DSP bulletin board in
"mirrors/tibbs".  See the "00README" file at the top of the
directory tree for info.  Please restrict FTP session to outside of
8 am to 6 pm local time (10 pm to 8 am GMT).  [Brad Hards,
hards4@ee.adfa.oz.au]

{ If anyone knows of any other sources for TI DSP software, please let
us know at comp-dsp-faq@ohm.Berkeley.EDU.  Thanks! }

=======================================================================

Q3.3.2: Where can I get a free C compiler for the TI TMS320C30?

Sonitech (see vendors list) has a gcc based TMS320C30 C compiler
that was originally done Computer Motion.  Sonitech sells it
for $995, but under the terms of the Gnu Public License, other
people can then give it away.  While we haven't heard of any
ftp sites yet, there are bound to be some soon.

=============================================================================

Questions, comments, or submissions for this FAQ should be mailed to
comp-dsp-faq@ohm.Berkeley.EDU, ...!ucbvax!ohm!comp-dsp-faq.  Thanks!