help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wavread problems (focusing on this)


From: Doug Stewart
Subject: Re: wavread problems (focusing on this)
Date: Sun, 08 May 2005 12:30:40 -0500
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

This is not just a wav file see below.

-d

137D:0100 52 49 46 46 70 B1 02 00-57 41 56 45 66 6D 74 20 RIFFp...WAVEfmt 137D:0110 10 00 00 00 01 00 02 00-44 AC 00 00 10 B1 02 00 ........D....... 137D:0120 04 00 10 00 63 75 65 20-34 00 00 00 00 00 00 00 ....cue 4....... 137D:0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 137D:0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 137D:0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 137D:0160 64 61 74 61 10 B1 02 00-FC FF FC FF 03 00 03 00 data............ 137D:0170 FD FF FD FF 01 00 02 00-FF FF FE FF FF FF 00 00 ................
-q

it has a "cue" section and then the "data".
Wave read was not intended to read all the posible Riff file formats.
See:
http://ccrma.stanford.edu/CCRMA/Courses/422/projects/WaveFormat/

I will not be changing  wavread.m  to read this.
You can if you want. :-)
Doug Stewart






Doug Stewart wrote:

OK I will fix it for this one.


I would stay with Octave.
Doug Stewart


Marc Vinyes wrote:

I was going to do some more fixing and then submit it  or join it with
the other audio read .m file

I will try and do that soon.
Doug Stewart


Nice.
But I've got some bad news... I was loading more wav files, and I have
found one file for which wavread fails to read it (your version and the
orginal one)... so you were right and more bug fixing must be done :O
I've uploaded the file to:
http://www.telefonica.net/web2/mrvinyes/fails.wav.zip

Maybe sbdy can find some time to fix it. I'll try it later; too busy now...
I think we should take a look at the source of programs like rezound,
which support perfectly all kind of wav's, and the port it to matlab...

MarC
Marc Vinyes wrote:

Ok, thank you very much. Now it works fine.

BTW, why the octave-forge doesn't accept your version of wavread.m????

I guess the clue is in:
< tmpi = fread(fpi,1,'int32')
< ###################### changed a 2 to nchans
< ##if (tmpi != nchans*srate)
< ##  error(sprintf('*** %d bytes per second looks wrong. Expect %d',
tmpi,2*srate));
< ## end

Also, I can't understand why wavread doesn't output "file not found"
instead of "error: fread: invalid stream number = -1" which is rather
confusing for beginners like me...
I guess this can be achieved only adding a line of code...

When I see this little tricks, I start worrying about the reliability and
usability of octave-forge code... It's worth starting to use it in a
serious work? What do you think? (question to more advanced octave
users).



Marc Vinyes wrote:



Hello,
I am working in some audio processing programs which require high
efficiency in large-scale minimization problems. I have some issues
which
keep me from starting to use Octave...

* I started working with Matlab because the octave-forge wavread.m
function fails to read some wav files. Do you know if there's some
work to
fix this or already fixed in another version?





You can try my ver of waveread:


http://dougs.homeip.net/octave/wavread.m

doug stewart














-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]