From help-octave-request at bevo dot che dot wisc dot edu Tue Dec 11 10:10:34 2001 Subject: Re: audio problems From: Paul Kienzle To: Matthew Flax , Drew Krause Cc: help-octave at bevo dot che dot wisc dot edu Date: Tue, 11 Dec 2001 11:10:22 -0500 When you are downsampling, you will want to low-pass filter your input first. E.g., to downsample by a factor of q [b, a] = cheby1(n, 0.05, 1/q); y = filter(b,a,x); y = y(1:q:length(x)); The function cheby1 is available from octave-forge at octave.sf.net Also, /dev/dsp may be expecting mulaw encoded data. In that case you will need to do playaudio(lin2mu(y)). Paul Kienzle pkienzle at users dot sf dot net On Tue, Dec 11, 2001 at 06:50:55PM +1100, Matthew Flax wrote: > Hi there, > > I am just writing to let you know that the audio output is alwayse at 8 > bit, 8 KHz > The way to use this is to make sure your signal (x) is : > %# scale x to max 8 bit levels > x=x/max(x)*128; > %# resample x to the correct sampling freq. > fs=44100 > playaudio(x(1:(fs/x):length(x))) > > that should work I believe > -- > Matt > > For electronic musicians ... > Vector Bass : http://mffmvectorbass.sourceforge.net/ > For developers ... > TimeScale Audio Mod : http://mffmtimescale.sourceforge.net/ > Multimedia Time Code : http://mffmtimecode.sourceforge.net/ > 3D Audio Library : http://mffm3daudiolib.sourceforge.net/ > > > > ------------------------------------------------------------- > Octave is freely available under the terms of the GNU GPL. > > Octave's home on the web: http://www.octave.org > How to fund new projects: http://www.octave.org/funding.html > Subscription information: http://www.octave.org/archive.html > ------------------------------------------------------------- > ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------