help-octave
[Top][All Lists]

## signal processing routines

 From: Paul Kienzle Subject: signal processing routines Date: Wed, 6 Oct 1999 10:44:42 +0100 (BST)

I've put a bunch of my own m-files on the web at the following address:
http://users.powernet.co.uk/kienzle/octavePAK/index.html.  These are
largely clones of bits of the Matlab signal processing toolbox, along
with better audio support.

I would like some comments on the preference for putting audio
processing as a system function (you can kill it if it is going wrong
without destroying your octave session) vs. in a .oct file (cleaner

I would also like some comments on the output of the following:
[b a] = butter(14, 0.5); zplane(b,a);
The zeros are distributed in a circle about -1 rather than all
of them sitting on -1.  This is because roots(poly(-ones(1,n))
does not equal -ones(1,n).  Is this a machine precision problem,
or a roots of unit problem.  Are the roots of a polynomial
with real coefficients not unique in the complex plane?  Regardless,
can anyone suggest a solution to the problem?

Paul Kienzle

Here is the aformentioned web page:
I've been busy generating some bits of Matlab that are missing from octave,
particularly from the signal processing toolbox. You can
grab the current tarball from

Oct 6, 1999

general/
mod.m
Not part of Matlab, but I needed a modulo function. rem()
doesn't cut it since rem(-3,5)!=2.
audio/
auplot.m
Plot an audio waveform at the given sampling rate, with time
on the x axis.
Load a .wav or a .au audio file, returning the waveform and the
sampling rate, and each channel in a different column. It almost
handles .aiff files as well, but someone who needs them has to
add the 80-bit IEEE floating point I/O routines to octave first.
ausave.m
Save a .wav or a .au audio file, along with sampling rate. Again,
it almost handles .aiff files.
aurecord.m
Record audio at the requested rate/channels. Needs system helper
function (currently only linux is written since I'm no longer
playing with SGI's or Sun's).
aucapture.m
Record with endpoint detection so you don't have to clean up
your waveform when you are done recording. Very convenient. Needs
system helper function, only available on linux.
auplay.m
Play audio with the requested rate/channels. Needs system helper
function, again only for linux.
Makefile
build the system helper function
auplay.c
play binary data from a pipe, 16 bit integer, native byte order,
preceded by 32 bit integer sample rate and number of channels.
aurecord.cc
record binary data to a pipe, 16 bit integer, native byte order,
preceded by 32 bit integer sample rate and number of channels.
Use command line parameters -r rate, -c channels, -t max. record
time, and -e for endpoint detection.
endpoint.cc, endpoint.h and endpoint.doc
Bruce Lowerre's endpoint detection code.
image/
red.m, green.m, blue.m, hsv.m, prism.m, copper.m, hot.m and bone.m
Various colour maps.
clip.m
set all values in matrix less than 0 to 0 and all values greater
than 1 to 1. Perhaps should be made generic (i.e., optional
high and low values) and moved to general/clip.m. Not in Matlab.
signal/
butter.m
Butterworth filter design
sftrans.m
s-plane frequency transform, lowpass to highpass, bandpass,
bandstop.
zplane.m
Plot z-plane poles and zeros. Note that roots(poly(-ones(n,1)))
does not equal -ones(n,1) for larger n (something about the
roots of unity I expect), and your pole-zero positions will be
significantly off.
bilinear.m
s-plane to z-plane transformation
rceps.m
cepstrum
unwrap.m
phase unwrapping.
gaussian.m
gaussian window (not in Matlab)
impz.m
Return or plot impulse response for filter.
freqz.m
Added automatic plotting of the magnitude/phase for the filter
if there are no return values.
cheby1.m
Chebyshev Type I filter.
cheby2.m
Chebyshev Type II filter. (not yet working)
buttord.m
Order selection routine for butterworth filters. Works for
lowpass and highpass. Sort of works for bandpass and bandreject.
remez.cc, Makefile
* Parks-McClellan algorithm for FIR filter design (C version)
(c) 1995,1998 Jake Janovetz (address@hidden) I have some
in the file. Perhaps someone could compare it's output with
that produced by Matlab for a variety of filters?

---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure