|
From: | Robert A. Macy |
Subject: | Re: wavwrite |
Date: | Tue, 09 Oct 2007 08:41:52 -0700 |
Came with my Windows binary octave 2.1.50a-inst.exe I don't use the 2.9.13 binary very often, because the plot functions required me to rewrite ALL my scripts plus even after rewritten I couldn't get them to work right, so gave up for now. Attached functions for your use. I may have rewritten the functions to prevent 'toggling' when the signal is zero. In other words, the bit boundary encompasses zero, instead of straddling it. But don't remember now. There should be some chatter in the archives concerning wavread and wavwrite before June 2004. Robert On Tue, 9 Oct 2007 17:25:23 +0200 "Schirmacher, Rolf" <address@hidden> wrote: > > Hello Robert, > > where did you get your wavwrite from? > > Mine is the one distributed with the windows binary > distribution of 2.9.13, > giving > > octave.exe> help wavwrite > -- Function File: wavwrite (FILENAME, Y) > Write Y to the canonical RIFF/WAVE sound file > FILENAME. A sample > rate of 8000 Hz and 16-bit samples are assumed. Each > column of > the data represents a separate channel. > > -- Function File: wavwrite (FILENAME, Y, FS) > Set the sample rate to FS Hz. > > -- Function File: wavwrite (FILENAME, Y, FS, BITS) > Set the sample rate to FS Hz and resolution to BITS > bits. > > See also: wavread. > > c:\programme\octave\share\octave\2.9.13\m\audio\wavwrite.m > > > Perhaps, you might contribute your wavwrite? > > Regards, > > Rolf > > > -----Original Message----- > > From: Robert A. Macy [mailto:address@hidden > > Sent: Tuesday, October 09, 2007 5:15 PM > > To: Schirmacher, Rolf > > Cc: address@hidden > > Subject: Re: wavwrite > > > > > > My wavwrite is EXACTLY like Matlab. > > > > >> wavwrite(signal,sf,bits,"filename.wav"); > > > > PLUS, I routinely have been using it to write 24 bit > wav > > files and routinely using wavread to read 24 bit files, > > again, in the same order: > > >> [signal, sf, bits]=wavread("filename.wav"); > > > > What's the problem? > > > > Robert > > > > On Tue, 9 Oct 2007 09:39:13 +0200 > > "Schirmacher, Rolf" <address@hidden> > > wrote: > > > > > > Hello, > > > > > > I just found some incompatibility in between octave > an > > > matlab for wavwrite. > > > > > > Octave wants to get the filename first, Matlab last. > So > > > we have > > > wavwrite(filename, signal, fs, bits) in Octave and > > > wavwrite(signal, fs, bits, filename) in Matlab. > > > > > > Changing it would be straight forward (as far as I > > > see...), but it would > > > break existing Octave code :-( > > > > > > So, how to proceed? > > > > > > Rolf > > > > > > BTW, there are some more differences: 24 bit is > currently > > > not supported in > > > octave and 32 bit is implemented as 32 bit integer. > > > Matlab has 24 bit > > > integer and 32 bit normalised floats. I regard this a > > > minor issue as both > > > seems to be correct / legal within the data format > and > > > would not really > > > break code (except of giving an "unsupported" error > for > > > octave 24 bit). > >
WAVREAD.M
Description: Binary data
wavreadORIGINAL.m
Description: Binary data
WAVWRITE.M
Description: Binary data
wavwriteORIGINAL.m
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |